info/disk_partitions hangs when a usb stick has a GPT partiton table

Bug #1341769 reported by Jeff Lane 
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Provider - Base
Fix Released
Medium
Jeff Lane 

Bug Description

I tried testing with a USB stick installed that happened to have a GPT partition table. This was because the stick had been made into a bootable USB drive for installing 14.04 via EFI.

During the test, c-c-s seemed to hang indefinitely (I let it sit for at least 15 minutes) at this point:
----------------------------[ info/disk_partitions ]----------------------------
Attaches information about disk partitions
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Running... (output in /home/ubuntu/.cache/plainbox/sessions/pbox-bxbrcb08.session/2013.com.canonical.certification__info_disk_partitions.*)

I logged into the server through another ssh session and ran parted (that's all this script does is 'parted -l')

and found that parted was hung waiting on input to ignore or fix the GPT table:

ubuntu@pn4rf:~$ sudo parted -l
Model: ATA ST3500320AS (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
 1 1049kB 500GB 500GB primary ext4 boot

Error: The backup GPT table is corrupt, but the primary appears OK, so that will
be used.
OK/Cancel? ok
Warning: Not all of the space available to /dev/sdb appears to be used, you can fix the GPT to use all of the space (an
extra 4024320 blocks) or continue with the current setting?
Fix/Ignore?

To get around this, parted provides a -s option that ignores anything needing user intervention:

ubuntu@pn4rf:~$ sudo parted -l -s
Model: ATA ST3500320AS (scsi)
Disk /dev/sda: 500GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
 1 1049kB 500GB 500GB primary ext4 boot

Error: The backup GPT table is corrupt, but the primary appears OK, so that will be used.
Warning: Not all of the space available to /dev/sdb appears to be used, you can fix the GPT to use all of the space (an extra 4024320 blocks) or continue with the current setting?
Model: Kingston DataTraveler 2.0 (scsi)
Disk /dev/sdb: 4063MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
 1 1049kB 2002MB 2001MB fat32 boot

So to fix this, we need to append -s to the command for this job.

Related branches

Jeff Lane  (bladernr)
Changed in plainbox-provider-checkbox:
milestone: 0.7 → 0.8
milestone: 0.8 → 0.7
Zygmunt Krynicki (zyga)
Changed in plainbox-provider-checkbox:
status: In Progress → Fix Committed
Changed in plainbox-provider-checkbox:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.