The mkboot shell script uses the dd command twice:

dd if=stage1 of=/dev/fd0 bs=512 count=1
dd if=stage2 of=/dev/fd0 bs=512 seek=1

Please let me know if I understand the purpose of dd correctly. The block
size is 512 bytes because bs=512. Line 1 writes out exactly one block of
stage1. Line 2 skips ahead 1 block in /dev/fd0 and writes out the rest of
stage2.

Alternative 1.
Doesn't this do the same thing?

dd if=stage1 of=grub-boot bs=512 count=1
dd if=stage2 of=grub-boot bs=512 seek=1
cat grub-boot > /dev/fd0

Alternative 2.
If stage1 is exactly 512 bytes, doesn't this do the same thing?

cat stage1 + stage2 > /def/fd0

About JOS
We need an equivalent dd program in JOS, don't we? Imagine this:

dd if=http://www.jos.org/redist/mirror/stage1 of=/dev/fd0 bs=512 count=1
dd if=http://www.jos.org/redist/mirror/stage2 of=/def/fd0 bs=512 seek=1


_______________________________________________
Kernel maillist  -  [EMAIL PROTECTED]
http://jos.org/mailman/listinfo/kernel

Reply via email to