[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Errors when calling DiskSet early in the install



Hi,

I needed to get the current partition list early in the install phase
(just after the RAM checks) in anaconda, so I added some code there:

ds = DiskSet ()
ds . openDevices ()
ds . refreshDevices ()
drives = ds . disks.keys ()
drives . sort ()

for drive in drives:
    disk = ds . disks [drive]
    part = disk . next_partition ()
    while part:
        if part . fs_type:
            fstype = part . fs_type.name
            name = get_partition_name ( part )
#            print fstype, "\t" , name
            if name == dos_partition [0] and fstype == dos_partition [1]:
                found_dos_partition = 1
            parts . append ( ( name , fstype ) )
        part = disk . next_partition ( part )
ds . closeDevices ()
del ds

This worked fine for getting the partitions, but caused a problem with
not being able to initialise the swap space later.  It seems that
parted/fdisk are unable to flush the edited partition table to the
disk if DiskSet has been called earlier on in the program.

I've worked around the problem now by hacking a call to the parted
program and parsing the output.  However, I'd still like to know if
this problem was due to something I did wrong or whether it's an
innate limitation of the software.

Regards,

-- Raju
-- 
Raju Mathur          raju kandalaya org           http://kandalaya.org/
                     It is the mind that moves





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]