diff options
author | Unconfigured <Unconfigured> | 2009-06-30 05:34:43 (GMT) |
---|---|---|
committer | Unconfigured <Unconfigured> | 2009-06-30 05:34:43 (GMT) |
commit | cc49572066ec24f4e609394dd012bf9325348491 (patch) | |
tree | 1890d08eb23eb1351b3c6558f7ca6047c8e8aff6 /abs/core-testing/LinHES-config/mv_install.py | |
parent | 3ea388eb421881811585997ae691083dd996733e (diff) | |
parent | a77d9915f36ed35bce7e3ba19acd07d0078359db (diff) | |
download | linhes_pkgbuild-cc49572066ec24f4e609394dd012bf9325348491.zip linhes_pkgbuild-cc49572066ec24f4e609394dd012bf9325348491.tar.gz linhes_pkgbuild-cc49572066ec24f4e609394dd012bf9325348491.tar.bz2 |
diskless-legacy: new - please build\nLinHES-config: removed config_diskless frontend ** needed to remove reference to mythinstall.bin because the repository does not have it. Someone needs to git add it?
Diffstat (limited to 'abs/core-testing/LinHES-config/mv_install.py')
-rwxr-xr-x | abs/core-testing/LinHES-config/mv_install.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/abs/core-testing/LinHES-config/mv_install.py b/abs/core-testing/LinHES-config/mv_install.py index 9d70a55..e96dd56 100755 --- a/abs/core-testing/LinHES-config/mv_install.py +++ b/abs/core-testing/LinHES-config/mv_install.py @@ -307,6 +307,19 @@ def create_partitions(diskdevice, size, ptype, startsector): (newpart.getDeviceNodeName(), newpart.getSize(), diskdevice)) return newpart.getDeviceNodeName() +def set_active_parition(diskdevice): + """ Set the bootable flag for this partition. """ + logging.debug(" Setting active parition") + device = parted.getDevice(diskdevice) + partdisk = parted.Disk(device) + try: + for partition in partdisk.partitions: + partition.setFlag(parted.PARTITION_BOOT) + partdisk.commit() + except: + logging.info(" Couldn't set the active partition") + logging.info(" Depending on your system this may not matter") + def partition_disk(): global hostoptions @@ -319,6 +332,7 @@ def partition_disk(): label = "data" partitions_removeall("/dev/"+datadisk, label) hostoptions["rootpartition"] = create_partitions("/dev/"+rootdisk, hostoptions["rootsize"], "NORMAL", 0) + set_active_parition("/dev/"+rootdisk) hostoptions["swappartition"] = create_partitions("/dev/"+rootdisk, hostoptions["swapsize"], "SWAP", 1) if datadisk != rootdisk: hostoptions["datapartition"] = create_partitions("/dev/"+datadisk, hostoptions["datasize"], "NORMAL", 0) |