Subject: GPT backup corruption causes parted and linux installer to crash
From: CeDeROM <[email-masked]>
To: [email-masked]
Date: Wed, 15 Jul 2015 19:34:04 +0000
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello,

I have bought 2x2TB disks and set it up for RAID0. I have installed
Win7 first with UEFI that created GPT partitions. I want to install
FreeBSD and Linux on it..

Using Lubuntu AMD64 14.04.02 ISO and UEFI boot I have problem with
installation. Installer crashes, so I have tried gparted it crashes as
well, and so parted, below are details.

Please advise :-)
Tomek

root@lubuntu:~# parted
GNU Parted 2.3
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Error: Invalid argument during seek for read on /dev/sda
Retry/Ignore/Cancel? r
Error: Invalid argument during seek for read on /dev/sda
Retry/Ignore/Cancel? r
Error: Invalid argument during seek for read on /dev/sda
Retry/Ignore/Cancel? i
Error: The backup GPT table is corrupt, but the primary appears OK, so that will
be used.
OK/Cancel? y
parted: invalid token: y
OK/Cancel? o
Backtrace has 8 calls on stack:
  8: /lib/x86_64-linux-gnu/libparted.so.0(ped_assert+0x31) [0x7fbc7ebf04b1]
  7: /lib/x86_64-linux-gnu/libparted.so.0(+0x3f5f6) [0x7fbc7ec205f6]
  6: /lib/x86_64-linux-gnu/libparted.so.0(ped_disk_new+0x49) [0x7fbc7ebf5f99]
  5: parted() [0x406dff]
  4: parted(interactive_mode+0x101) [0x40db71]
  3: parted(main+0x153d) [0x4065bd]
  2: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5) [0x7fbc7e3cdec5]
  1: parted() [0x406617]

You found a bug in GNU Parted! Here's what you have to do:

Don't panic! The bug has most likely not affected any of your data.
Help us to fix this bug by doing the following:

Check whether the bug has already been fixed by checking
the last version of GNU Parted that you can find at:

    http://ftp.gnu.org/gnu/parted/

Please check this version prior to bug reporting.

If this has not been fixed yet or if you don't know how to check,
please visit the GNU Parted website:

    http://www.gnu.org/software/parted

for further information.

Your report should contain the version of this release (2.3)
along with the error message below, the output of

    parted DEVICE unit co print unit s print

and the following history of commands you entered.
Also include any additional information about your setup you
consider important.

Assertion (last_usable <= disk->dev->length) at
../../../libparted/labels/gpt.c:994 in function _parse_header() failed.

Aborted (core dumped)

root@lubuntu:~# uname -a
Linux lubuntu 3.16.0-30-generic #40~14.04.1-Ubuntu SMP Thu Jan 15
17:43:14 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
root@lubuntu:~# parted --version
parted (GNU parted) 2.3
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by <http://git.debian.org/?p=parted/parted.git;a=blob_plain;f=AUTHORS>.

-- 
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info