Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 93114

Summary: parted.PedDisk.new fails on disk with invalid partition table
Product: Gentoo Release Media Reporter: Steven Mertens <mertens.steven>
Component: InstallerAssignee: Gentoo Linux Installer <gli-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Steven Mertens 2005-05-18 16:12:11 UTC
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
Comment 1 Carsten Lohrke (RETIRED) gentoo-dev 2005-05-18 16:22:53 UTC

*** This bug has been marked as a duplicate of 93113 ***
Comment 2 Jeffrey Forman (RETIRED) gentoo-dev 2006-03-24 13:46:29 UTC
Moving to Release Media/Installer.