Ubuntu – Startup USB drive made with “Startup Disk Creator” is reported to have multiple issue with its GPT

gdiskgptstartup-diskstartup-disk-creator

I created a startup USB drive with Startup Disk Creator from 18.04.1 image and successfully used it to install Ubuntu. Then I decided to inspect it with GPT fdisk, and gdisk reported "invalid main GPT header" and other issues:

§ sudo gdisk /dev/sdc
[sudo] password for alexey: 
GPT fdisk (gdisk) version 1.0.3

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

Caution! After loading partitions, the CRC doesn't check out!
Warning! Main partition table CRC mismatch! Loaded backup partition table
instead of main partition table!

Warning! One or more CRCs don't match. You should repair the disk!

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

Found valid MBR and corrupt GPT. Which do you want to use? (Using the
GPT MAY permit recovery of GPT data.)
 1 - MBR
 2 - GPT
 3 - Create blank GPT

Your answer: ^C

Is this expected? Is this a bug in "Startup Disk Creator" or something else? Is it safe to install Ubuntu from a drive where "CRCs don't match"?

Best Answer

Short answer ;-)

Well, in a way yes, in another way it should not be expected.

Long answer - cloning from the iso file

The Ubuntu Startup Disk Creator in Ubuntu 16.04 LTS and newer versions is a cloning tool. It clones the content from the iso file to the USB pendrive (or SD card or whatever mass storage device, that you intend to make a live drive).

Since several years (around 2013) Ubuntu iso files and most modern other linux iso files are hybrid iso files, which means that they can be burned to DVD disks and cloned to mass storage devices and the target devices will be bootable drives, that you can use to run a live system or installer.

Unfortunately there are still several tools, that do not understand the partition structure and file systems of iso files, the iso 9660 file system, and think that something is wrong.

lsblk has worked for years, and you can use

sudo lsblk -f
sudo lsblk -m

to list the partition structure and file system of USB boot drives cloned from Ubuntu iso files.

Recently there is a new version of gparted, that is recognizing it (instead of complaining). So things are improving :-)

gdisk is a special case. It is a tool to analyze GUID partition tables, GPT. The boot structure from a hybrid iso file is no GPT, and should not be expected to comply to it.


Examples:

Cloned (live-only) drive:

$ sudo lsblk -f /dev/sdc
NAME   FSTYPE  LABEL                     UUID                                 MOUNTPOINT
sdc    iso9660 Lubuntu 18.04.1 LTS amd64 2018-07-25-03-21-51-00               
├─sdc1 iso9660 Lubuntu 18.04.1 LTS amd64 2018-07-25-03-21-51-00               /media/olle/Lubuntu 18.04.1
└─sdc2 vfat    Lubuntu 18.04.1 LTS amd64 0D5F-1DB6                            

Extracted (persistent live drive) created with mkusb:

$ sudo lsblk -f /dev/sdc
NAME   FSTYPE  LABEL                    UUID                                 MOUNTPOINT
sdc                                                                          
├─sdc1 ntfs    usbdata                  1EA5276164CB00DA                     /media/olle/usbdata
├─sdc2                                                                       
├─sdc3 vfat    usbboot                  902D-6496                            
├─sdc4 iso9660 Lubuntu 16.04.1 LTS i386 2016-07-20-12-17-32-00               /media/olle/Lubuntu 16.04.1 
└─sdc5 ext4    casper-rw                737997c9-acf2-49bd-b7ae-ad34300775d5 /media/olle/casper-rw
Related Question