Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: Partition table overlaps, possibly due to Super Grub Disk

  1. #1
    Join Date
    Nov 2006
    Beans
    73
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Partition table overlaps, possibly due to Super Grub Disk

    Hey all, I'm having some troubles with parted.
    It tells me I have overlapping partitions.

    I recently installed Windows XP on a small 20GB partition outside of the extended partition in which my Ubuntu partitions reside, then I restored GRUB to the MBR using Super Grub Disk, This worked fine, Ubuntu booted without issue. I'd intended to shrink my Ubuntu partition and grow my windows one (20GB isn't enough for a full XP install along with all of the half life series )
    I went to open gparted, but it died with the error "Cannot have overlapping partitions", I tried with parted, same error.
    Here's the output of fdisk -lu
    Code:
    omitting empty partition (5)
    
    Disk /dev/sda: 160.0 GB, 160041885696 bytes
    255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Disk identifier: 0x1f29c9cc
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1            2048    14465023     7231488   27  Unknown
    Partition 1 does not end on cylinder boundary.
    /dev/sda2        14469840   270632879   128081520    5  Extended
    Partition 2 does not end on cylinder boundary.
    /dev/sda3        78457680   270632879    96087600   83  Linux
    Partition 3 does not end on cylinder boundary.
    /dev/sda4   *   270632880   312575759    20971440    7  HPFS/NTFS
    Partition 4 does not end on cylinder boundary.
    /dev/sda5        14469966    73059839    29294937   83  Linux
    /dev/sda6        73059903    78457679     2698888+  82  Linux swap / Solaris
    and windows displays my partition table as such:
    partitions.jpg

    I can boot both windows and ubuntu fine at the moment, but I'd really like to be able to resize my partitions and I feel uncomfortable with my partition table in such a state.
    Many thanks in advance, Forlornity.

  2. #2
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

    Re: Partition table overlaps, possibly due to Super Grub Disk

    Quote Originally Posted by Forlornity View Post
    Code:
    omitting empty partition (5)
    
    Disk /dev/sda: 160.0 GB, 160041885696 bytes
    255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Disk identifier: 0x1f29c9cc
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1            2048    14465023     7231488   27  Unknown
    Partition 1 does not end on cylinder boundary.
    /dev/sda2        14469840   270632879   128081520    5  Extended
    Partition 2 does not end on cylinder boundary.
    /dev/sda3        78457680   270632879    96087600   83  Linux
    Partition 3 does not end on cylinder boundary.
    /dev/sda4   *   270632880   312575759    20971440    7  HPFS/NTFS
    Partition 4 does not end on cylinder boundary.
    /dev/sda5        14469966    73059839    29294937   83  Linux
    /dev/sda6        73059903    78457679     2698888+  82  Linux swap / Solaris
    Unfortunately your partition table is corrupt, because as parted has all ready alerted you, your sda HDD has overlapping partitions. Or to be more specific, your sda3 primary partition is inside of your sda2 extended partition, so sda3 should be a logical partition instead. If you would like some help fixing your partition table, how about posting:
    Code:
    sudo sfdisk -d
    Also, which partition has your main Ubuntu install, sda3 or sda5?
    Last edited by caljohnsmith; February 17th, 2009 at 04:33 PM.

  3. #3
    Join Date
    Nov 2006
    Beans
    73
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Partition table overlaps, possibly due to Super Grub Disk

    sudo sfdisk -d:
    Code:
    # partition table of /dev/sda
    unit: sectors
    
    /dev/sda1 : start=     2048, size= 14462976, Id=27
    /dev/sda2 : start= 14469840, size=256163040, Id= 5
    /dev/sda3 : start= 78457680, size=192175200, Id=83
    /dev/sda4 : start=270632880, size= 41942880, Id= 7, bootable
    /dev/sda5 : start= 14469966, size= 58589874, Id=83
    /dev/sda6 : start= 73059903, size=  5397777, Id=82
    My main install was on two partitions inside the extended partition (or should be at least, that's how it was after install) with / being on sda5 and /home on sda3.
    Here's df -h:
    Code:
    /dev/sda5              28G  5.7G   21G  22% /
    tmpfs                1012M     0 1012M   0% /lib/init/rw
    varrun               1012M  364K 1012M   1% /var/run
    varlock              1012M     0 1012M   0% /var/lock
    udev                 1012M  2.8M 1009M   1% /dev
    tmpfs                1012M  104K 1012M   1% /dev/shm
    lrm                  1012M  2.0M 1010M   1% /lib/modules/2.6.27-11-generic/volatile
    /dev/sda3              91G   62G   24G  72% /home

  4. #4
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

    Re: Partition table overlaps, possibly due to Super Grub Disk

    Do you have a Live CD that you can boot? You will need that in order to carry out all the steps, because you will need to reinstall Grub to the MBR since we have to make your sda3 partition sda5, and then your sda5 partition will become sda6. So if you have a Live CD ready, how about downloading the attached "partition_table.txt" file to your Ubuntu desktop (at this point it can be your Ubuntu install on sda5 or the Live CD, it doesn't matter), and then do:
    Code:
    sudo sfdisk --no-reread -f /dev/sda < ~/Desktop/partition_table.txt
    And please post the output. Then reboot to your Live CD, and please post the output of all the following commands:
    Code:
    sudo fdisk -lu
    sudo parted /dev/sda print
    sudo grub
    grub> root (hd0,5)
    grub> setup (hd0)
    grub> quit
    And we can work from there.
    Attached Files Attached Files

  5. #5
    Join Date
    Nov 2006
    Beans
    73
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Partition table overlaps, possibly due to Super Grub Disk

    So do I run
    Code:
    sudo sfdisk --no-reread -f /dev/sda < ~/Desktop/partition_table.txt
    in the liveCD or booted?
    Or does it not matter?

    Just gotta be sure
    Last edited by Forlornity; February 17th, 2009 at 05:10 PM.

  6. #6
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

    Re: Partition table overlaps, possibly due to Super Grub Disk

    Quote Originally Posted by Forlornity View Post
    So do I run
    Code:
    /media/Data/dotnetfx3setup.exe
    in the liveCD or booted?
    Or does it not matter?

    Just gotta be sure
    Where did you get that command? That's not the sfdisk command I gave in my post. You can run that sfdisk from your booted Ubuntu install or the Live CD, it does not matter so long as you first download the "partition_table.txt" file to your desktop. You might as well run it from your Ubuntu install since that is where you seem to be right now.

  7. #7
    Join Date
    Nov 2006
    Beans
    73
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Partition table overlaps, possibly due to Super Grub Disk

    Output for partition table rewrite:
    Code:
    Disk /dev/sda: 19457 cylinders, 255 heads, 63 sectors/track
    Warning: extended partition does not start at a cylinder boundary.
    DOS and Linux will interpret the contents differently.
    Old situation:
    Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
    
       Device Boot Start     End   #cyls    #blocks   Id  System
    /dev/sda1          0+    900-    901-   7231488   27  Unknown
    		end: (c,h,s) expected (900,103,35) found (956,163,35)
    /dev/sda2        900+  16846-  15946- 128081520    5  Extended
    		start: (c,h,s) expected (900,180,1) found (957,0,1)
    		end: (c,h,s) expected (1023,254,63) found (1023,239,63)
    /dev/sda3       4883+  16846-  11963-  96087600   83  Linux
    		start: (c,h,s) expected (1023,254,63) found (1023,0,1)
    		end: (c,h,s) expected (1023,254,63) found (1023,239,63)
    /dev/sda4   *  16846+  19456-   2611-  20971440    7  HPFS/NTFS
    		start: (c,h,s) expected (1023,254,63) found (1023,0,1)
    		end: (c,h,s) expected (1023,254,63) found (1023,239,63)
    /dev/sda5        900+   4547-   3648-  29294937   83  Linux
    		start: (c,h,s) expected (900,182,1) found (957,2,1)
    		end: (c,h,s) expected (1023,254,63) found (1023,239,63)
    /dev/sda6       4547+   4883-    336-   2698888+  82  Linux swap / Solaris
    		start: (c,h,s) expected (1023,254,63) found (1023,1,1)
    		end: (c,h,s) expected (1023,254,63) found (1023,239,63)
    New situation:
    Units = sectors of 512 bytes, counting from 0
    
       Device Boot    Start       End   #sectors  Id  System
    /dev/sda1          2048  14465023   14462976  27  Unknown
    /dev/sda2      14469840 270632879  256163040   5  Extended
    /dev/sda3             0         -          0   0  Empty
    /dev/sda4   * 270632880 312575759   41942880   7  HPFS/NTFS
    /dev/sda5      78457680 270632879  192175200  83  Linux
    /dev/sda6      14469966  73059839   58589874  83  Linux
    /dev/sda7      73059903  78457679    5397777  82  Linux swap / Solaris
    Warning: partition 1 does not end at a cylinder boundary
    Successfully wrote the new partition table
    
    Re-reading the partition table ...
    BLKRRPART: Device or resource busy
    The command to re-read the partition table failed
    Reboot your system now, before using mkfs
    
    If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
    to zero the first 512 bytes:  dd if=/dev/zero of=/dev/foo7 bs=512 count=1
    (See fdisk(8).)
    Ran that in main booted env.
    Rebooting to liveCD now.

  8. #8
    Join Date
    Nov 2006
    Beans
    73
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Partition table overlaps, possibly due to Super Grub Disk

    Quote Originally Posted by caljohnsmith View Post
    Where did you get that command? That's not the sfdisk command I gave in my post. You can run that sfdisk from your booted Ubuntu install or the Live CD, it does not matter so long as you first download the "partition_table.txt" file to your desktop. You might as well run it from your Ubuntu install since that is where you seem to be right now.
    My mistake, had the correct command copied then I went and middle clicked
    I meant the sfdisk command.

    Also, for note, I'm posting this on my desktop, while my laptop's the one with the issues, and it's all backed up so no need to worry too much, though I'd rather not have to go through the restoration process again, of course.

    And thanks for the help so far
    Last edited by Forlornity; February 17th, 2009 at 05:13 PM.

  9. #9
    Join Date
    Nov 2006
    Beans
    73
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Partition table overlaps, possibly due to Super Grub Disk

    Here's the output of my liveCD session:
    Code:
    ubuntu@ubuntu:~$ sudo fdisk -lu
    
    Disk /dev/sda: 160.0 GB, 160041885696 bytes
    255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
    Units = sectors of 1 * 512 = 512 bytes
    Disk identifier: 0x1f29c9cc
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1            2048    14465023     7231488   27  Unknown
    Partition 1 does not end on cylinder boundary.
    /dev/sda2        14469840   270632879   128081520    5  Extended
    /dev/sda4   *   270632880   312575759    20971440    7  HPFS/NTFS
    /dev/sda5        78457680   270632879    96087600   83  Linux
    /dev/sda6        14469966    73059839    29294937   83  Linux
    /dev/sda7        73059903    78457679     2698888+  82  Linux swap / Solaris
    
    Partition table entries are not in disk order
    ubuntu@ubuntu:~$ sudo parted /dev/sda print
    Model: ATA HITACHI HTS54251 (scsi)
    Disk /dev/sda: 160GB
    Sector size (logical/physical): 512B/512B
    Partition Table: msdos
    
    Number  Start   End     Size    Type      File system  Flags
     1      1049kB  7406MB  7405MB  primary   ntfs              
     2      7409MB  139GB   131GB   extended                    
     6      7409MB  37.4GB  30.0GB  logical   ext3              
     7      37.4GB  40.2GB  2764MB  logical   linux-swap        
     5      40.2GB  139GB   98.4GB  logical   ext3              
     4      139GB   160GB   21.5GB  primary   ntfs         boot 
    
    ubuntu@ubuntu:~$ sudo grub
    Probing devices to guess BIOS drives. This may take a long time.
    ubuntu@ubuntu:~$
    and during the grub session:

    Code:
    grub> root (hd0,5)
    
    grub> setup (hd0) 
     Checking if "/boot/grub/stage1" exists... yes
     Checking if "/boot/grub/stage2" exists... yes
     Checking if "/boot/grub/e2fs_stage1_5" exists... yes
     Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  16 sectors are embedded.
    succeeded
     Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,5)/boot/grub/stage2
    /boot/grub/menu.lst"... succeeded
    Done.
    Any more before I reboot?

    - Forlornity

  10. #10
    Join Date
    Mar 2008
    Location
    California, USA
    Beans
    8,111

    Re: Partition table overlaps, possibly due to Super Grub Disk

    I forgot to ask, but are you using 8.10 or a previous Ubuntu version? If you are using 8.10, go ahead and reboot and let me know how far you get. If you are using a version prior to 8.10, you will probably have to tweak your menu.lst to account for the new partition changes. Let me know if that applies to you or not.

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

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