Heya all!
Basic question!
I have NASM and GCC and such on my Linux install. but Im kinda unsure how to get the bootsector.bin and the kernel.bin to their respective locations on the floppy disk.
I was simpl ythinking...
Ok, we can probably write ONE .bin file to the disk... like...
dd if=bootl.bin of=/dev/fd0
so... I should just combine... bootl.bin and prog.bin
im not exactly sure how to though.
touch newfile.bin
cat bootl.bin >> newfile.bin
cat prog.bin >> newfile.bin ?
Well, any help would be appreciated as usual.
Thanks!
~kyretzn
OS Dev in Linux
Re:OS Dev in Linux
Would work if your bootsector is exactly 512 byte (as it should be).
For simplicity, write:
cat bootl.bin prog.bin > newfile.bin
For simplicity, write:
cat bootl.bin prog.bin > newfile.bin
Every good solution is obvious once you've found it.
Re:OS Dev in Linux
There's also a complicated way: ;D
and then
The 'seek' tells dd to skip 1 block in the output file, notrunc is only needed when the output is a file rather than a block device (such as a floppy image for bochs). Just for completeness
cheers Joe
Code: Select all
dd if=bootl.bin of=/dev/fd0
Code: Select all
dd if=prog.bin of=/dev/fd0 conv=notrunc seek=1
cheers Joe