2

The partition table of my /sda disk got corrupted. I don't know the details of what happened exactly, but I can still read the disk, and boot into Linux, but not into Windows 8 anymore. I'm quite new to Linux and this doesn't seem to be easy to fix, so I decided to just backup my data to another disk, format the /sda disk, and put the data back.

/sda contains:

/sda2 which is Win8 *NTFS*  
/sda3 is an extended partition containing:   
    /sda5 which is Linux / (filesystem root) *EXT4*   
    /sda6 which is swap.

/sdb is a one partition NTFS disk containing no OS, and only data.
/sdc5, a partition on my third disk, contains /home. EXT4

Here is how I was planning to backup my data:

  1. Boot Linux from USB,
  2. Use sudo cp -afv to copy /sda5 contents to a folder on /sdc5,
  3. Use sudo cp -afv to copy /sda2 contents to a folder on the /sdb disk.

Format the /sda disk, partition it the same way again, and copy the data back using the same sudo cp -afv command (all from a Linux Live USB).

So my big question is, will all this work?

Details regarding my partition problem in case you're interested.

2 Answers 2

0

I would recommend to do an image of your disk. If you are able to access your partitions with Nautilus better do that. Again, you may want to repair Windows boot instead of messing with your partitions.

-1

You may not need to backup and restore at all. 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.

Keep messing with those partition types until you eventually figure out the right combination. It's a bit tricky. Try the deep scan too. Pay attention to partition types and sizes for clues. There may be some false positives for partitions in the scan.

7
  • Thank you for that very useful program. It seems to be just what I need. However, I have problems creating a proper partition table, and the guide doesn't help with it. I have made /sda1 Primary partition, /sda2 Primary bootable partition, /sda4 logical partition. But when I try to make /sda5 logical too, it says bad partition table.
    – Djalaal
    Jan 24, 2014 at 8:55
  • Keep messing with those partition types until you eventually figure out the right combination. It's a bit tricky. Try the deep scan too. You didn't mention an sda1 before. Pay attention to partition types and sizes for clues. There may be some false positives for partitions in the scan.
    – Binoy Babu
    Jan 24, 2014 at 8:59
  • You need an extended partition for holding those logical ones. Try making sda4 extended. Then make 5 and 6 logical.
    – Binoy Babu
    Jan 24, 2014 at 9:06
  • Sorry, wanted to edit the mistake I wrote b4, but yall commented b4 that. /sda1 is just an empty 100MB NTFS partition. Nothing much. /sda5 i made logical (not /sda4, it's not there after doing a 'quick search'), and I can't make /sda6 logical (swap). when I do a deep search I get soooo many entries, I get completely lost on what to do next... I'll just try to reboot for now without making /sda6 logical.
    – Djalaal
    Jan 24, 2014 at 9:17
  • Don't commit/save those changes unless you are sure.
    – Binoy Babu
    Jan 24, 2014 at 9:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .