1

Topic: boot problems after elarging C: drive on dual boot system

I followed the steps in this recent post:   http://gparted-forum.surf4.info/viewtopic.php?id=17505 and changed the size of some of the partitions on my first hard drive, including the first one (C:) which is where Windows 7 is installed.

After I was done I got an error when trying to boot  the Windows 7 partition:

"No such device  2AFA3AD308C8EEE  setting partition type to 0 x 39"  Then the partition would boot.  So I used the Win 7 repair disk and from a command prompt I ran :  Bootrec.exe /FixMbr

Then it wouldn't boot at all and I got the error "Error!"  So I rebuilt the GRUB 2 menu and reinstalled GRUB to the MBR "grub-install /dev/sda" while running my Linux (Ubuntu) installation.  That seemed to fix things except if I run gparted while I'm in Ubuntu I shows that the disk is one big un-partitioned space.  If I run gparted from the Live-CD I made I can see the disk and its partitions OK but I get the error,

"Libparted error -- Can't have overlapping partitions"  So what is the problem?  Can I fix it, should I fix it?

2

Re: boot problems after elarging C: drive on dual boot system

lcharles wrote:

"Libparted error -- Can't have overlapping partitions"  So what is the problem?  Can I fix it, should I fix it?

This error message is very descriptive of the problem.  It can be fixed, and should be fixed if you want to ensure the integrity of your data.  If two or more partitions overlap then any write to one partition in the overlapping area has the potential to break things in the other partition that shares the overlapping area.

See How-to Fix Invalid MSDOS Partition Tables, especially the section on How-to Fix Overlapping Partitions.

3 (edited by lcharles 2016-03-08 06:40:53)

Re: boot problems after elarging C: drive on dual boot system

Here is the output from fdisk:

larry1404@larry1404-64:~$ sudo fdisk -l -u /dev/sda
[sudo] password for larry1404:
Warning: ignoring extra data in partition table 5
Warning: ignoring extra data in partition table 5
Warning: ignoring extra data in partition table 5
Warning: invalid flag 0x0006 of partition table 5 will be corrected by w(rite)

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x15261525

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048   144283647    72140800    7  HPFS/NTFS/exFAT
/dev/sda2       144283585   461772799   158744607+   f  W95 Ext'd (LBA)
/dev/sda3   *   461788425   488392064    13301820   83  Linux
/dev/sda5   ?  3959003097  7793121246  1917059075    6  FAT16

So by my calculation the new end/size of sda1 is:

New end of sda1 144,283,584
New size of sda1  144,283,584 - 2048 + 1 = 144,281,537

However I have a problem when I try to run sfdisk:

larry1404@larry1404-64:~$ sudo sfdisk -d /dev/sda > sda-backup.txt
Warning: extended partition does not start at a cylinder boundary.
DOS and Linux will interpret the contents differently.

sfdisk: ERROR: sector 144283585 does not have an msdos signature

Is my simple math correct? Should I proceed despite the error message from sfdisk?

Just one other un-informed question.  Gparted live shows I could resize the C: partition.  Could I just shrink 0.5 GBytes with gparted to fix the problem?

4

Re: boot problems after elarging C: drive on dual boot system

lcharles wrote:

Is my simple math correct? Should I proceed despite the error message from sfdisk?

The math looks correct to me.  The cylinder boundary warning can be safely ignored assuming you are using operating systems from this century (only OSes like DOS need cylinder alignment).

Before proceeding I highly recommend that you backup your data.

You might try running testdisk to scan the disk surface to see what it thinks the partition boundaries are.  Then if they seem reasonable you could use testdisk to write these values to disk.

lcharles wrote:

Just one other un-informed question.  Gparted live shows I could resize the C: partition.  Could I just shrink 0.5 GBytes with gparted to fix the problem?

This is a good question. Unfortunately GParted will only work with valid partition tables.

5 (edited by lcharles 2016-03-09 02:15:22)

Re: boot problems after elarging C: drive on dual boot system

Thanks, I'll give it shot tomorrow when I'll have most of the day to work on the current problem and unexpected new ones that might arise.

Well I tried to recover it and got a new batch of errors.  At this point I going to give up, repartition, and re-install the system.

6

Re: boot problems after elarging C: drive on dual boot system

You might wish to check the integrity of the drive before putting it back into service.

Often drive testing software is available for download from the manufacturer's web site.  Be sure to have a backup of you data first!

Also you can use gsmartcontrol to see if the drive is reporting any issues that might indicate impending failure.  gmartcontrol is included on the GParted Live image.