1

Shame on me, I have more than 10 years using Linux and all of this about EFI and GPT is a nightmare :(

I have a Dell Inspiron 14z Ultrabook and I cannot install Ubuntu; when I launch the installer it does not see any partitions. This is the output of gdisk:

root@ubuntu:/home/ubuntu# gdisk -l /dev/sda
GPT fdisk (gdisk) version 0.8.8

Caution: invalid backup GPT header, but valid main header; regenerating
backup header from main header.

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: damaged

****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************
Disk /dev/sda: 976773168 sectors, 465.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): 4F89526A-5F1B-4BF9-8CD8-2ABAD827386D
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 976768613
Partitions will be aligned on 2048-sector boundaries
Total free space is 4029 sectors (2.0 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048         1026047   500.0 MiB   EF00  EFI system partition
   2         1026048         1107967   40.0 MiB    FFFF  Basic data partition
   3         1107968         1370111   128.0 MiB   0C01  Microsoft reserved part
   4         1370112         2373631   490.0 MiB   2700  Basic data partition
   5         2373632       956454911   454.9 GiB   0700  Basic data partition
   6       956454912       976766598   9.7 GiB     2700  Microsoft recovery part


GPT fdisk (gdisk) version 0.8.8

Caution: invalid backup GPT header, but valid main header; regenerating
backup header from main header.

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: damaged

****************************************************************************
Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk
verification and recovery are STRONGLY recommended.
****************************************************************************
Disk /dev/sdb: 62533296 sectors, 29.8 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): E570001D-72F5-4B82-9140-55C7BE414621
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 16777182
Partitions will be aligned on 2048-sector boundaries
Total free space is 4029 sectors (2.0 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048        16775167   8.0 GiB     8400  Basic data partition

This message appeared when I tried in the BIOS to change SATA from ISRT to AHCI, but anyway, Windows boots fine (I even disabled the fast startup thing).

Before that Ubuntu installer had never seen the existing partitions.

Please could you help me to install Linux?

migrated from superuser.com Jun 14 '14 at 23:01

This question came from our site for computer enthusiasts and power users.

  • Have you disabled SecureBoot? – MariusMatutiae Jun 14 '14 at 15:53
  • I've just done it and nothing changed – sebelk Jun 14 '14 at 16:44
  • In any case, you will have to leave that unset, otherwise you will never manage to install Ubuntu. – MariusMatutiae Jun 14 '14 at 17:14
  • @Mokubai This feels more like a Unix & Linux than an Ask Ubuntu question to me. On Unix & Linux we'd focus on this “invalid backup GPT header” message and how to repair the GPT header. On Ask Ubuntu we'd likely focus on the Ubuntu installer, complain about the lack of an Ubuntu version, and close and say to report a bug against the installer instead. sebelk, what version of Ubuntu did you try to install? What kernel was running when you managed to run gdisk? Did you ever repartition the disk since you got this computer? – Gilles Jun 14 '14 at 21:12
  • I've never repartitioned since I got this computer... – sebelk Jun 14 '14 at 21:46
5

Your problem is with the damaged GPT data. Chances are, though, that this is a symptom of something else -- most likely, you've got a disk that's been configured for motherboard-based software RAID (aka "fake RAID") somewhere along the line. This can cause mismatches on the disk size, which can cause the final sectors to appear to be missing in some environments. This sort of problem can be tricky to fix. It may involve digging through your firmware settings and using the Linux dmraid and even dd utilities to wipe out errant RAID data.

OTOH, it could be that something else has damaged the GPT backup data. If you've installed any third-party Windows disk utilities (encryption tools, boot loaders, etc.), they're suspect and may have damaged the disk. I recommend uninstalling them and then repairing the GPT damage.

  • 1
    Hi Rod! It looks like you have two accounts, this one (an unregistered account) and this one which is connected to your Ask Ubuntu and Super User accounts. If this was an accident you can contact Stack Exchange and they will merge them for you. – Seth Jun 15 '14 at 1:54
  • Good idea, and thanks for sharing your experience. In this case thegdisk error is coming from sda, not a dm/md device. So I guess the idea is not that the final sectors are 'missing', but they come 'too early' because the end of the device has been reserved for a RAID trailer. – sourcejedi Jun 15 '14 at 11:17
  • But gdisk shouldn't assume to look at the 'final sectors'; it should find the "backup header" (heh) based on the offsets in the main GPT. How could you get that gdisk error without corruption (possibly corruption caused by fakeraid)? – sourcejedi Jun 15 '14 at 11:31
  • 1
    Sorry, I missed "This message appeared when I tried in the BIOS to change SATA from ISRT to AHCI". That sounds like an really bad idea on an installed system. At least, the other way round would be, and I bet the docs don't recommend this direction either. Hmm. – sourcejedi Jun 15 '14 at 11:54
1

I managed to fix the damage by using the gparted on an Ubuntu 14.04 LiveCD. It prompted me to fix errors on both sda (HDD) and sdb (SSD).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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