Linux and bootsectors

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
K.J.

Linux and bootsectors

Post by K.J. »

Under Linux, how do I get my bootsector to a FAT12 floppy. I know how to do it with PartCopy under Windows. My guess is that I have to use DD under Linux.

Thanks in advance,
K.J.
Guest

RE:Linux and bootsectors

Post by Guest »

>On 2002-02-21 03:07:29, K.J. wrote:
>Under Linux, how do I get my bootsector to a FAT12 floppy. I know how to do it with PartCopy under Windows. My guess is that I have to use DD under Linux.
>
>Thanks in advance,
>K.J.
I think it was "dd in=YourBootsector out=/dev/fd0", but I'm not sure!!!

The Legend
J. Weeks

RE:Linux and bootsectors

Post by J. Weeks »

>On 2002-02-21 10:18:36, Anonymous wrote:
>>On 2002-02-21 03:07:29, K.J. wrote:
>>Under Linux, how do I get my bootsector to a FAT12 floppy. I know how to do it with PartCopy under Windows. My guess is that I have to use DD under Linux.
>>
>>Thanks in advance,
>>K.J.
>I think it was "dd in=YourBootsector out=/dev/fd0", but I'm not sure!!!

Close, dude :)

I'm pretty sure it's
dd if=./bootSect of=/dev/fd0

if = input file
of = output file

However, you're probably gonna want to put a size
argument in there as well... it _might_ go
beyond your 512 bytes, unless you specifically
tell it not to.

Also, note that the size argument (I think it's
just size=x, but check the man page to be sure)
is based on block size, which, for a floppy device,
would no doubt be 512 bytes, so set size to 1,
not 512.

Jeff
K.J.

RE:Linux and bootsectors

Post by K.J. »

Here's what I found(haven't had time to test it yet though):

dd if=my_boot skip=0 count=3 of=/dev/fd0
dd if=my_boot skip=36 count=476 of=/dev/fd0 seek=36

K.J.
Post Reply