info/disk_partitions hangs when a usb stick has a GPT partiton table
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:
-------
Attaches information about disk partitions
^^^^^^^
Running... (output in /home/ubuntu/
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
- Daniel Manrique (community): Approve
-
Diff: 10 lines (+1/-1)1 file modifiedproviders/plainbox-provider-checkbox/jobs/info.txt.in (+1/-1)
- Pierre Equoy: Approve
-
Diff: 99 lines (+8/-8)8 files modifiedcheckbox-ng/checkbox_ng/__init__.py (+1/-1)
checkbox-ng/setup.py (+1/-1)
checkbox-support/setup.py (+1/-1)
plainbox/plainbox/__init__.py (+1/-1)
plainbox/setup.py (+1/-1)
providers/plainbox-provider-checkbox/manage.py (+1/-1)
providers/plainbox-provider-resource-generic/manage.py (+1/-1)
providers/plainbox-provider-sru/manage.py (+1/-1)
Changed in plainbox-provider-checkbox: | |
milestone: | 0.7 → 0.8 |
milestone: | 0.8 → 0.7 |
Changed in plainbox-provider-checkbox: | |
status: | In Progress → Fix Committed |
Changed in plainbox-provider-checkbox: | |
status: | Fix Committed → Fix Released |