windows - With Ubuntu's fdisk, what does "omitting empty partition" mean?

06
2014-04
  • Thierry Lam

    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?

  • Answers
  • Doc

    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.

  • jack love

    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.


  • Related Question

    windows xp - Cannot boot XP, after installing Ubuntu 9.10
  • Paikkos

    I had 2 partitions with 2 XP. I selected the 1st partition, formatted it, and installed Ubuntu 9.10 on it.

    Now I can't boot into XP cz is showing me the XP loader of the XP that I deleted... I tried fixmbr and fixboot but with no effect.

    In the beginning XP couldn't boot, but at least I could browse the folders from Linux. Now in the Disk Utility it's written unrecognised, unknown or unused.

    Screenshots:

    enter image description here

    enter image description here

    Here it is:

    ~# fdisk -l
    
    Disk /dev/sda: 250.1 GB, 250059350016 bytes
    255 heads, 63 sectors/track, 30401 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0xb7e61057
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1       22508   180795478+  83  Linux
    /dev/sda2           22509       30400    63392490    f  W95 Ext'd (LBA)
    /dev/sda5   *       22752       30400    61440592+   7  HPFS/NTFS
    /dev/sda6           22509       22751     1951834+  82  Linux swap / Solaris
    
        ~#
        ~# ntfsfix /dev/sda5
        Mounting volume... $MFT has invalid magic.
        ntfs_mft_load(): Failed.
        Failed to load $MFT: Input/output error.
        Failed to startup volume: Input/output error.
        FAILED
        Attempting to correct errors... $MFT has invalid magic.
        ntfs_mft_load(): Failed.
        Failed to load $MFT: Input/output error.
        FAILED
        Failed to startup volume: Input/output error.
        Volume is corrupt. You should run chkdsk.
    

    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    Update: after playing with some partition boot CDs:

    root@ubuntu-tower:~# fdisk -l
    
    Disk /dev/sda: 250.1 GB, 250059350016 bytes
    255 heads, 63 sectors/track, 30401 cylinders
    Units = cylinders of 16065 * 512 = 8225280 bytes
    Disk identifier: 0xb7e61057
    
       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1       22508   180795478+  83  Linux
    /dev/sda3           22752       30400    61440592+   7  HPFS/NTFS
    

    Here's a screenshot of GParted and Disk Utility:

    enter image description here

    Any ideas?


  • Related Answers
  • Cicik

    I have same problem as you and Partition Table Doctor resolved it. Some time ago in work when WinXP can`t load I use fixmbr and fixboot commands from WinXP recovery console and it works too, here is tutorial

  • mac

    I believe you are right: the problem seems to be due to the XP bootloader "gone with the wind". Does any of these how-to help?