| Summary: | parted.PedDisk.new fails on disk with invalid partition table | ||
|---|---|---|---|
| Product: | Gentoo Release Media | Reporter: | Steven Mertens <mertens.steven> |
| Component: | Installer | Assignee: | Gentoo Linux Installer <gli-bugs> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | normal | ||
| Priority: | High | ||
| Version: | unspecified | ||
| Hardware: | x86 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
*** This bug has been marked as a duplicate of 93113 *** Moving to Release Media/Installer. |
The __init__ constructor of the Device class in the module GLIStorageDevice class will fail if a disk doesnt contain a recognisable label. self._parted_disk = parted.PedDisk.new(self._parted_dev) --> this part will fail There should be a check of the disk contains a label, if not something like disk = device.disk_new_fresh(parted.disk_type_get(label)) disk.commit() should be executed. Failure of parted.PedDisk.new(self._parted_dev) gives the following error >>> dev = parted.PedDevice.get('/dev/sdb') >>> disk = parted.PedDisk.new(dev) Traceback (most recent call last): File "<stdin>", line 1, in ? parted.error: Error: Unable to open /dev/sdb - unrecognised disk label. Output of fdisk jabba root # fdisk -l /dev/sdb Disk /dev/sdb: 4294 MB, 4294967296 bytes 255 heads, 63 sectors/track, 522 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk /dev/sdb doesn't contain a valid partition table