838 |
|
|
839 |
for dev in self.getPhysicalDevices(rootDev): |
for dev in self.getPhysicalDevices(rootDev): |
840 |
usedDevs[dev] = 1 |
usedDevs[dev] = 1 |
841 |
|
|
842 |
|
for dev in bootDevs: |
843 |
|
usedDevs[dev] = 1 |
844 |
|
|
845 |
if not os.access(instRoot + "/boot/grub/device.map", os.R_OK): |
if not os.access(instRoot + "/boot/grub/device.map", os.R_OK): |
846 |
f = open(instRoot + "/boot/grub/device.map", "w+") |
f = open(instRoot + "/boot/grub/device.map", "w+") |
889 |
|
|
890 |
cmds = [] |
cmds = [] |
891 |
for bootDev in bootDevs: |
for bootDev in bootDevs: |
892 |
gtPart = self.getMatchingPart(bootDev, grubTarget) |
gtDisk = self.grubbyPartitionName(getDiskPart(bootDev)[0]) |
|
gtDisk = self.grubbyPartitionName(getDiskPart(gtPart)[0]) |
|
893 |
bPart = self.grubbyPartitionName(bootDev) |
bPart = self.grubbyPartitionName(bootDev) |
894 |
cmd = "root %s" % (bPart,) |
cmd = "root %s" % (bPart,) |
895 |
cmds.append(cmd) |
cmds.append(cmd) |
896 |
|
|
897 |
stage1Target = gtDisk |
stage1Target = gtDisk |
898 |
if target == "partition": |
if target == "partition": |
899 |
stage1Target = self.grubbyPartitionName(gtPart) |
stage1Target = self.grubbyPartitionName(bootDev) |
900 |
|
|
901 |
cmd = "install %s%s/stage1 d %s %s/stage2 p %s%s/grub.conf" % \ |
cmd = "install %s/stage1 %s %s1+16 p %s%s/stage2 %s/grub.conf" % \ |
902 |
(forcelba, grubPath, stage1Target, grubPath, bPart, grubPath) |
(grubPath, stage1Target, stage1Target, bPart, grubPath, grubPath) |
903 |
cmds.append(cmd) |
cmds.append(cmd) |
904 |
|
|
905 |
if not justConfigFile: |
if not justConfigFile: |
1084 |
grubbyRootPart = self.grubbyPartitionName(rootDev) |
grubbyRootPart = self.grubbyPartitionName(rootDev) |
1085 |
break |
break |
1086 |
|
|
1087 |
cmd = "root %s\ninstall %s/stage1 d %s %s/stage2 p %s%s/grub.conf" \ |
cmd = "root %s\ninstall %s/stage1 %s %s1+16 p %s%s/stage2 %s/grub.conf" \ |
1088 |
% (grubbyRootPart, grubPath, grubbyStage1Dev, |
% (grubbyRootPart, grubPath, stage1Dev, stage1Dev, |
1089 |
grubPath, grubbyRootPart, grubPath) |
grubbyRootPart, grubPath, grubPath) |
1090 |
|
|
1091 |
if not justConfigFile: |
if not justConfigFile: |
1092 |
log("GRUB command %s", cmd) |
log("GRUB command %s", cmd) |