Bona Fide OS Development http://forums.osdever.net/ |
|
Gotta small problem... :? http://forums.osdever.net/viewtopic.php?f=5&t=81 |
Page 1 of 1 |
Author: | gluon [ Sat Nov 21, 2009 5:37 pm ] |
Post subject: | Gotta small problem... :? |
Hello. I'm working at a small exokernel os wich is placed in the bootsector. It reads a char, and then it runs <char>.com I'm using linux. How do i write the a.com to the floppy? i did dd if=faty.bin bs=512 of=/dev/fd0 (or tarsier.img) ..now, how can i copy the a.com? Should i first format the floppy to fat12, then copy a.com and then write the bootsector?? |
Author: | DudeOfX [ Sat Nov 21, 2009 6:19 pm ] |
Post subject: | Re: Gotta small problem... :? |
do you want the the floppy to be FAT formatted?? if yes then your bootloader must have the BIOS Parameter Block (BPB), when it does then you can just copy your file over, but your bootloader must be able to read the FAT file system in order to retrieve the file if you don't care if the floppy is FAT formatted then you can use DD to copy your file the same way you copied your bootloader except you have to add the **seek** parameter to specify a location that you know its not used in the floppy. this copies a 512 byte file to the floppy at sector 1000 Code: dd if=faty.bin bs=512 of=/dev/fd0 seek=1000 this retrieves the 512 bytes from the floppy in sector 1000 and saves it into file skinny Code: dd if=/dev/fd0 bs=512 of=skinny.bin skip=1000 |
Author: | gluon [ Sun Nov 22, 2009 2:32 am ] |
Post subject: | Re: Gotta small problem... :? |
the os reads fat12. should i first copy programs using copy and paste on a formatted floppy, and then write the bootloader?? |
Author: | DudeOfX [ Sun Nov 22, 2009 9:27 am ] |
Post subject: | Re: Gotta small problem... :? |
the floppy must be formatted first if the bootloader has a compliant BIOS Parameter Block (BPB) it doesn't matter if the files get copied first or the bootloader... if the bootloader does not have a compliant BPB then FAT file utilities will probably refuse to work with the floppy. |
Page 1 of 1 | All times are UTC - 6 hours [ DST ] |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |