Boot Floppy
Boot Floppy
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
Bochs will happily run a 512 byte file, it doesn't have to be a full disk image.
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Boot Floppy
if you really want to insert padding in your disk image, you still can use
of course, if you need more than 4096 zero bytes, just change the value ...
Code: Select all
head --bytes=4096 /dev/zero >>floppy.img
Re:Boot Floppy
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.
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.