Hi. I've been attempting to follow some simple boot loader tutorials both to get an introduction to OS dev (implementation), and learn to use tools such as Bochs at the same time. My problem is that I don't have a floppy drive anywhere in my house, and all my attempts to make a floppy image and write to the beginning of it have failed. I always get some sort of panic such as "Not a bootable disk." I have tried a few approaches in creating my image and sometimes I get different results, but I never get a desirable result.
My question is, is there a way to use floppy images without having a floppy drive, or would I be better off purchasing an external floppy than trying to make it work? I know drives don't cost too much, but when something doesn't work I like to find out why, and to fix it if possible.
By the way I'm new here, so hi I got into OS development because it seems like an awesome challenge and I like learning. I've been reading and researching for a while now, but this is my first time in forums or trying to implement anything.
bochs without a floppy drive?
Use a virtual floppy drive.
In Linux you use a loopback device. (I think) I don't know much more about this.
In Windows you use a program like vfdwin which creates a virtual drive that windows thinks is a real one. I use vfdwin myself. Just google it to get it. I know a tutorial in the wiki uses it. Also lets you save your floppy as an image so you can use it later or to share it.
Also. I believe it is possible for Bochs to use the image directly. (like MS Virtual PC) Probably wrong though. Anyways you would need a specialised program to create the image if you don't have a real/virtual floppy to load everything onto.
In Linux you use a loopback device. (I think) I don't know much more about this.
In Windows you use a program like vfdwin which creates a virtual drive that windows thinks is a real one. I use vfdwin myself. Just google it to get it. I know a tutorial in the wiki uses it. Also lets you save your floppy as an image so you can use it later or to share it.
Also. I believe it is possible for Bochs to use the image directly. (like MS Virtual PC) Probably wrong though. Anyways you would need a specialised program to create the image if you don't have a real/virtual floppy to load everything onto.
My OS: SOS (Simple Operating System).
Or,
Just type:
into your bochs configuration file (I find this easier than using a virtual floppy drive).
Jules
Just type:
Code: Select all
floppya: 1_44="wherever the image is", status=inserted
Jules
The last two bytes of the first sector (on floppies, each sector is 512 bytes) of the floppy should be 0x55, 0xAA. This is a magic number that (most) BIOSes, including Bochs's one, check to make sure the disk is formatted and bootable. If these aren't right it'll give the error message you described. Open the floppy image in a hex editor to check the format maybe..?
It is most certainly possible to use floppy images without ever having a real drive, but personally I think having real computers to boot is a lot more interesting. Fortunately, once you have the kernel format right, GRUB can boot it from anywhere that GRUB can boot from (CD, network, etc.).
You can download floppy images with the GRUB bootloader already set up on them, which is extremely handy. That's what I did. You'll still need a way to save your OS kernel files into the image, though. Vfdwin or Filedisk or Winimage can help you do that.
It is most certainly possible to use floppy images without ever having a real drive, but personally I think having real computers to boot is a lot more interesting. Fortunately, once you have the kernel format right, GRUB can boot it from anywhere that GRUB can boot from (CD, network, etc.).
You can download floppy images with the GRUB bootloader already set up on them, which is extremely handy. That's what I did. You'll still need a way to save your OS kernel files into the image, though. Vfdwin or Filedisk or Winimage can help you do that.
a virtual floppy drive sounds like a great idea, actually. i grabbed vfd quickly, and I think that it's exactly what I'm looking for after running it.
by the way jules my problem is not obtaining an image, but having a properly written image with all of the information where it needed to be. often when I tried to write to an image file (instead of the usual drive) the file would get its size changed, etc...
i'll attempt this using vfd and see how it goes. thanks a lot guys
edit: my first ever power-down... lol. thanks for helpin, vfd worked like a charm
by the way jules my problem is not obtaining an image, but having a properly written image with all of the information where it needed to be. often when I tried to write to an image file (instead of the usual drive) the file would get its size changed, etc...
i'll attempt this using vfd and see how it goes. thanks a lot guys
edit: my first ever power-down... lol. thanks for helpin, vfd worked like a charm