0

I am very enthusiast about operating systems and I am following a course related. So as a project I was assigned to implement a simple operating system.

They provided me the simple operating system implementation of JOSH.

I can follow all the given instructions and compile the boot sector and the rudimentary kernel part using NASM assembler. Also I added my own code to display additional information of the machine.

To sum up, JOSH is a operating system that was designed to boot from a floppy disk drive. But I don't have any devices to work with floppy disk drives.

The JOSH designers provided dd if=boot.bin bs=512 count=1 of=/dev/fd0 for putting the boot.bin file into the floppy disk.

I need to know that if a virtual floppy disk part can be created on a usb drive and can I boot this operating system from that.

Since I use ubuntu I really appreciate it if someone can explain me how to create this virtual floppy disk on my usb and how to put the boot.bin and kernel.bin files in that virtual drive.

As I understood we should have some kind of 512 byte sector for this boot.bin file.

I really appreciate it if someone can help me with this.

1
  • @John Oh I get your point. I'll try to do it with a virtual machine first. Thank you very much Commented Jul 15, 2020 at 19:40

3 Answers 3

1

You should look into PXE booting.

Not that I'm saying you should necessarily use PXE instead of a floppy (though you might end up doing so).

But the PXE boot technology uses a virtual floppy to bootstrap the loading of your eventual operating system. And there are various associated tools to work with virtual floppies (populate them, store them as a file) as well as sending the virtual floppy over the wire for the target machine to boot from. So you are very likely to find what you need in the PXE world.

I used Tftpd32 for this in the past. I was going to post a link to it but Chrome now warns of malware on that site so be careful. I believe Windows now includes things of this kind too (under WDS in Windows Server).

1
  • I will try it thank you so much. I will ask any questions if there is any Commented Jul 16, 2020 at 7:49
0

Never mind found the solution.

JOSH is a single tasking interrupt driven operating system. We get the 512 bytes boot file which has a valid boot signature, from the site and a simple kernel file which actually is the operating system.

Now this boot sector only understand the FAT12 file system, so we have to use a floppy disk drive to run it.

What I did is create a virtual floppy disk and burn the boot file into the MBR of that disk and copied the kernel file into it and I run it in a virtual machine.

As I found from here we can create a floppy disk image using the below commands.

~$ cd /media    // open the terminal in your home directory and head to /media

/media$ sudo mkdir floppy     // create a directory in media


// go back to home directory again


~$ mkfs.msdos -C myfloppy.img 1440      // create a floppy disk image of size 1.44 MB

~ $ sudo mount -o loop myfloppy.img /media/floppy/    // mount the image with the floppy directory.

// now open another terminal where your boot.bin file and kernel.bin file is and enter the following

/os$ lsblk    // get the name of the mounted floppy image, you can identify it from the list with a disk that has 1.5 MB size

/os$ sudo dd if=./boot.bin of=/dev/loop0    // now burn the boot file to the MBR

/os$ sudo cp kernel.bin /media/floppy/     // copy the kernel file to the disk image

After that you can boot from this floppy disk image using a virtual machine.

0

I have an old USB stick that has a floppy disk emulation: You can write a floppy image on it, and the stick will be detected as an USB floppy drive.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .