Write to second sector of floppy

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
damonbrinkley

Write to second sector of floppy

Post by damonbrinkley »

Anyone know the command to tell dd to write to the second sector of a floppy diisk in Linux? I'm trying to write something to the sector after the bootsector.
gtsphere

Re:Write to second sector of floppy

Post by gtsphere »

try this:

dd if=yourfile of=/dev/fd0 bs=512 seek=18
Tim

Re:Write to second sector of floppy

Post by Tim »

Where does 'seek=18' come from? Surely the second sector is block 1, i.e. seek=1.
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:Write to second sector of floppy

Post by distantvoices »

seek=1 = sector 1, seek=18 = sector 18 as far as i have found out .
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
damonbrinkley

Re:Write to second sector of floppy

Post by damonbrinkley »

Thanks guys. I'll try that out this afternoon.
Schol-R-LEA

Re:Write to second sector of floppy

Post by Schol-R-LEA »

It has, however, occurred to me that logical sector 18 is the first sector of the second track. Perhaps there's been a bit of confusion here...

(Note that this assumes zero-indexed sectors. While dd(1) and just about all other Linux utilities use 0-indexing, the BIOS INT 13h routines use 1-indexing for the sectors and 0-indexing for everything else. This has been the source of considerable confusion in the past.)
Post Reply