Page 1 of 1

Boot Floppy

Posted: Tue Sep 09, 2003 5:27 pm
by roodee
I've written a basic bootsector and am trying to figure out how to get it into a usable form by bochs. dd if=bootsect of=floppy.img bs=512 count=1 creates the image, but doesn't bochs want a floppy sized image? How do I create an image with just the 512 byte boot sector and the rest of the space empty for now?

Re:Boot Floppy

Posted: Tue Sep 09, 2003 7:24 pm
by Curufir
Bochs will happily run a 512 byte file, it doesn't have to be a full disk image.

Re:Boot Floppy

Posted: Wed Sep 10, 2003 1:43 am
by Pype.Clicker
if you really want to insert padding in your disk image, you still can use

Code: Select all

head --bytes=4096 /dev/zero >>floppy.img
of course, if you need more than 4096 zero bytes, just change the value ...

Re:Boot Floppy

Posted: Wed Sep 10, 2003 2:01 am
by Candy
You can also pad up your floppy disk by seeking to the last sector last byte and then writing 1 zero byte. It's slightly more flexible (just pads your disk image to 1457664 bytes).

dd if=/dev/zero of=floppy.img seek=1457663 count=1 bs=1

On windows this may also be possible, but I don't know the tool for it.