Hello there
I`m trying to boot my little boot.bin in Bochs but I got a problem. My floppy doesn`t work so I was wondering if can I create a virtual floppy drive in linux and write to it in normal means(dd). Or sowewhow link /dev/fd0 to a created by my file that i can read/write data via dd and it acts like a normal floppy.
Thanks
Virtual floppy in Linux
-
- Member
- Posts: 2566
- Joined: Sun Jan 14, 2007 9:15 pm
- Libera.chat IRC: miselin
- Location: Sydney, Australia (I come from a land down under!)
- Contact:
Re: Virtual floppy in Linux
If your boot.bin is a valid FAT12 bootsector you can insert it as the first sector of the floppy image and then mount your floppy (via the method that Combuster provided) and read/write to it using your host OS.Joseph1337 wrote:I`m trying to boot my little boot.bin in Bochs but I got a problem. My floppy doesn`t work so I was wondering if can I create a virtual floppy drive in linux and write to it in normal means(dd). Or sowewhow link /dev/fd0 to a created by my file that i can read/write data via dd and it acts like a normal floppy.
Thanks
-
- Member
- Posts: 566
- Joined: Tue Jun 20, 2006 9:17 am
Yup that's easy
1) dd if=/dev/zero of=myos.img bs=1k count=1440
2) mkdosfs myos.img # mke2fs for ext2 etc ...
3) mount -o loop myos.img mydir
That's alll ...
When you are done ..
umount mydir
2) mkdosfs myos.img # mke2fs for ext2 etc ...
3) mount -o loop myos.img mydir
That's alll ...
When you are done ..
umount mydir