Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This might be quite the hopeless case, so I posted another method that is simpler, but still need some help with.

Will this backup the partition contents of both linux and windows?

Here is the background:

I've recently resized a partition (/sda2 to make another partition, /sda1) on a disk where Windows 8 and KDE Linux Mint are installed on. A whole lot of things went wrong.

First, the computer wouldn't boot past BIOS and gave me grub rescue. With a Live Linux USB I used the boot-repair app to reinstall grub (on /sda). Thankfully linux booted from the new grub2 menu, but windows would crash when trying to load. When looking into it more on linux I found that apps like KDE Partition Manager and GParted both couldn't read the partition on my /sda disk.

KDE Partition Manager gives me "No valid partition was found on this device". GParted gives me the whole thing is unallocated, and "unable to satisfy all constraints on the partiton".

I then installed another app, FixParts. That gave me the following:

Warning: 0xEE partition doesn't start on sector 1. This can cause problems
in some OSes.

and

Disk size is 250069680 sectors (119.2 GiB)
MBR disk identifier: 0x0FB1A4FB
MBR partitions:

                                                   Can Be   Can Be
Number  Boot  Start Sector   End Sector   Status   Logical  Primary   Code
   1                    63       192779   primary     Y        Y      0x07
   2      *         208839    134062424   logical     Y        Y      0x07
   5             134066176    234067967   logical     Y        Y      0x83
   6             234067968    250068991   primary              Y      0x82

fdisk -l gave me this:

Disk /dev/sda: 128.0 GB, 128035676160 bytes
255 heads, 63 sectors/track, 15566 cylinders, total 250069680 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: 0x0fb1a4fb

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1              63      192779       96358+   7  HPFS/NTFS/exFAT
/dev/sda2   *      208839   134062424    66926793    7  HPFS/NTFS/exFAT
/dev/sda3       134066175   250068991    58001408+   f  W95 Ext'd (LBA)
/dev/sda5       134066176   234067967    50000896   83  Linux
/dev/sda6       234067968   250068991     8000512   82  Linux swap / Solaris

where sda1 is just an empty NTFS partition, sda2 contains my Windows 8, sda5 is Linux /(root). /home is on another disk.

I want to keep my data. And I want my Windows 8 and Linux to be on the same disk because it's an SSD. If possible I would also like both Grub and Windows boot files to be on the same disk, but that's a different issue.

First I thought the problem was "0xEE partition doesn't start on sector 1", but now I'm not so sure. My other disks (i got 3) give the same error, but the partition apps can read them. However, I remember seeing the boot-repair app reinstalling grub2 on every disk, so maybe that's related. Also, now I see that Windows 8 partition (/dev/sda2) is logical??? Windows cannot boot from logical, so it couldn't have been before. How can I even change that without loosing the data on it?

Really detailed info from boot-repair app.

share|improve this question

closed as off-topic by Braiam, BuZZ-dEE, mikewhatever, ImaginaryRobots, Avinash Raj Jan 29 at 6:23

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – Braiam, BuZZ-dEE, mikewhatever, ImaginaryRobots, Avinash Raj
If this question can be reworded to fit the rules in the help center, please edit the question.

    
I think you can access more help, if you ask both question on superuser.com –  c0rp Jan 24 at 8:06
    
Mods, feel free to delete this question. I didn't realize it when I posted it, but it is indeed off-topic. I posted it on superuser. –  Djalaal Jan 29 at 23:33

2 Answers 2

testdisk is an amazing utility that can fix partition table errors. You can install it with:

sudo apt-get install testdisk

Then run

sudo testdisk

And go from there. There's an excellent guide about testdisk here. I've used this utility many times when windows screwed up my partition table.

share|improve this answer
up vote 0 down vote accepted

I've posted this question on superuser.com too. And I got a long and detailed answer there. Here is the link: http://superuser.com/questions/706242/partition-problems-after-resizing

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.