2

I currently have a 250 GB hard disk dual booting Windows XP and Ubuntu 11.04. The main partitions are as followed:

  • Windows XP main partition: 160 GB
  • An NTFS partition which only contains media files: 40 GB
  • Linux partition: 45 GB

The rest of the space is probably in the Linux swap.

By running sudo fdisk -l from the Ubuntu terminal, I get:

omitting empty partition (5)

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

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       19663   157943016    7  HPFS/NTFS
/dev/sda2           19664       25252    44893642+  83  Linux
/dev/sda3           25253       30400    41351310    f  W95 Ext'd (LBA)
/dev/sda4           25497       30400    39391348+   7  HPFS/NTFS
/dev/sda5           25253       25496     1959867   82  Linux swap / Solaris

I'm not an expert at partitions and with the above data but is there an issue with /dev/sda3 and /dev/sda4? They seem to be overlapping each other. What is the empty partition in the above? If there's something wrong in the above partions, how can I fix them?

2 Answers 2

1

If left to my own devices, I'd start by firing up gparted and resizing something superficially. Since your swap is merely swap, I'd probably just delete that, shift sda4 as far as it'll go to the left and then make a new swap after it. It is nice having swap located physically towards the start of the drive (for speed), but whatever.

More meat has been tossed around for your enjoyment below.


According to this, it means your partition table is corrupt:

Any time fdisk reports "omitting empty partition (X)", unfortunately that is a sure sign that your partition table is corrupt; that would explain why the installer can not recognize your partitions.

You should probably go read that discussion over there as it seems quite relevant. Seems like the overall verdict is your data is quite recoverable, just with some effort invested.


I find it interesting that your Linux Swap is given sda5 but is physically located before sda4. Maybe that's causing fdisk to complain?


Failing that, I suggest you back up the data completely. After doing that, I'd (VERY CAREFULLY) attempt to remake the partition table PRECISELY as it is reported to you by fdisk above. If you get everything aligned perfectly, the data will remain accessible - provided the given map was correct itself.


This discussion here has a few suggestions in it, one suggestion that the author claims is fairly risky is:

wipe all the partitions (using fdisk or GParted) and then use TestDisk (http://www.cgsecurity.org/wiki/TestDisk) from an emergency system to locate and recover the partitions. This is easy if it works, but it's possible that TestDisk will fail to identify a partition or misidentify a partition, in which case you'll be in very deep trouble.

1
1

If you can confirm through fdisk that your partitions have no overlap (aside from the extended partition container), you should be ok.

I have seen the "omitting empty partition" message crop up after running a partition restore with Paragon. And then a partition restore will make the same message go away. Here's why I don't think it's a cause for worry:

In the extended partition (/dev/sda4, for example), the scheme permits one or more partitions within the sda4 container. Each of these is linked together on a linked list, with the first one pointed to by the extended boot record (EBR). When you hop from /dev/sda5 to ./sda6 and ./sda7, and so on, entries in each partition tell you where the next partition begins.

If one of these happens to be empty - say from a partition restore utility - you can still jump to the next partition because the EBR is still intact. It just happens to be assigned to an unused partition.

I don't know why Paragon is careless enough to leave this behind, but so far it has not been an issue with me. YMMV.

You must log in to answer this question.

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