Page 1 of 1

how can i write specific sectors on a floppy? for example...

Posted: Tue Aug 30, 2005 11:00 pm
by solarwind
lets say i have three files:

fileone
filetwo
filethree

i need to write:

fileone to sector 0 to floppy
filetwo to sector 1 to floppy
filethree to sector 4 to floppy

how can i do this in linux?

i know that the linux dd command can write sectors but i only managed to get the first file on the floppy and boot like this

dd if=fileone bs=512 of=/dev/fd0

but i cant get the rest of the files on...
is there a way to do this?

if anyone can respond i will greatly appreciate this

thanks in advance!

Re: how can i write specific sectors on a floppy? for exampl

Posted: Wed Aug 31, 2005 11:00 pm
by blackcatcoder
there are many ways to get files on disc!

dd is very simple!

my advice is :

create a file where all the files are written with the 512 byte align and then wrtie it with dd to an disc!

dd if=binary_image of=/dev/fd0

it would be the easiest way, for now!

all other things can only be managed with a little fs like FAT or a self coded one!

Re: how can i write specific sectors on a floppy? for exampl

Posted: Sat Sep 03, 2005 11:00 pm
by rexlunae
blackcatcoder wrote:create a file where all the files are written with the 512 byte align and then wrtie it with dd to an disc!
I think it would be simpler to use the seek option for dd.

Code: Select all

seek=n   Seek n blocks from the beginning of the output before copying.
              On non-tape devices, an lseek(2) operation is used.  Otherwise,
              existing blocks are read and the data discarded.  If the user
              does not have read permission for the tape, it is positioned
              using the tape ioctl(2) function calls.  If the seek operation
              is past the end of file, space from the current end of file to
              the specified offset is filled with blocks of NUL bytes.