Errors when calling DiskSet early in the install

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

 



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@xxxxxxxxxxxxx           http://kandalaya.org/
                     It is the mind that moves





[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux