Find the answer to your Linux question:
Results 1 to 5 of 5
Code: Device Boot Start End Blocks Id System /dev/hda1 1 173 1386913 83 Linux /dev/hda2 1217 2434 9775552+ 83 Linux Partition 2 does not end on cylinder boundary. /dev/hda3 2090 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2005
    Posts
    54

    Partitions messed up. Need to modify partition table.


    Code:
       Device Boot      Start         End      Blocks   Id  System
    /dev/hda1               1         173     1386913   83  Linux
    /dev/hda2            1217        2434     9775552+  83  Linux
    Partition 2 does not end on cylinder boundary.
    /dev/hda3            2090        3307     9775552+  83  Linux
    Partition 3 does not end on cylinder boundary.
    /dev/hda4            3649       24058   163934623   83  Linux
    Is how my partition table looks currently.. not sure what happened to cause this but I hope the data is still there.

    It should look something closer to this:
    Code:
       Device Boot      Start         End      Blocks   Id  System
    /dev/hda1               1        1216     9775552+  83  Linux
    /dev/hda2            1217        2434     9775552+  83  Linux
    /dev/hda3            2435        3648     9775552+  83  Linux
    /dev/hda4            3649       24058   163934623   83  Linux
    First three partitions are 10 gi and the 4th is the rest of the space. Its a 200gig drive.


    Is there a command I can use to modify the table so it looks this way???

    If I just delete and re-add the partitions correctly will it destory the filesystem on those partitions?

  2. #2
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    Location
    the hills
    Posts
    1,134
    Yes, it will destroy the file systems on any partition you change,
    unless you use software that can non-destructively resize partitions.
    Partition magic, or an open source equivalent maybe.

  3. #3
    Just Joined!
    Join Date
    Dec 2005
    Posts
    54
    Currently disk looks like this, used fdisk to resize partitions. Was able to get partition 1 and 3 back.. did a fsck on them and got them back, partition 2 I believe is empty anyway so no big deal about it. Cant seem to get partition 4 back.

    Code:
    Device Boot      Start         End      Blocks   Id  System
    /dev/hda1               1        1216     9767488+  83  Linux
    /dev/hda2            1217        2434     9783585   83  Linux
    /dev/hda3            2435        3648     9751455   83  Linux
    /dev/hda4            3649       24058   163934623   83  Linux
    I know the first 3 partitions were created at 10 gig ... so I am going to delete all partitions and recreate the 4 again.. hopefully the start/end values will be the same as before and I can acess hda4

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Dec 2005
    Posts
    54
    Got it all back! All 4 partitions were recognized correctly and little to no data loss on hda4...

    Code:
    Device Boot      Start         End      Blocks   Id  System
    /dev/hda1               1        1217     9775521   83  Linux
    /dev/hda2            1218        2434     9775552+  83  Linux
    /dev/hda3            2435        3651     9775552+  83  Linux
    /dev/hda4            3652       24321   166031775   83  Linux
    Apparently using fdisk does not destroy any of the data or the filesystem on the drive when you change the partition size.

  6. #5
    Linux Newbie
    Join Date
    Jul 2005
    Posts
    180
    Quote Originally Posted by Zero-0-Effect
    Apparently using fdisk does not destroy any of the data or the filesystem on the drive when you change the partition size.
    I think that depends on the file system used. NTFS and ext3 are really robust with resizing, other file systems can simply be corrupted by doing that.

Posting Permissions

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