Find the answer to your Linux question:
Results 1 to 3 of 3
My hd contains tracks of 63 sectors, and each sector is 512 bytes. The first sector is of course the boot sector. The following 62 are unused, as my first ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2004
    Location
    Finland
    Posts
    22

    Advanced use of dd


    My hd contains tracks of 63 sectors, and each sector is 512 bytes. The first sector is of course the boot sector. The following 62 are unused, as my first partition starts on the second track. I assume this is because partitions can only contain whole tracks. The 62 unused sectors makes up 30 Kb, and I can't let that go to waste! So I would like someone to confirm that this is the right way to read and write a <=30 Kb file to them:

    Code:
    To write&#58; dd if=file of=/dev/hda bs=512 count=63 seek=2
    To read&#58; dd in=/dev/hda of=file bs=512 count=63 skip=1

  2. #2
    Linux Guru lakerdonald's Avatar
    Join Date
    Jun 2004
    Location
    St. Petersburg, FL
    Posts
    5,035
    holy crap thats a small hard drive! lol Looks good to me, but don't quote me on it.
    -lakerdonald

  3. #3
    Just Joined!
    Join Date
    Sep 2004
    Location
    Finland
    Posts
    22
    The above was wrong, this is how it's done.

    dd bs=512 count=62 if=/dev/hda of=file skip=1 (read)
    dd bs=512 count=62 if=file of=/dev/hda seek=1 (write)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •