886 |
|
|
887 |
cmds = [] |
cmds = [] |
888 |
for bootDev in bootDevs: |
for bootDev in bootDevs: |
889 |
gtPart = self.getMatchingPart(bootDev, grubTarget) |
gtDisk = self.grubbyPartitionName(getDiskPart(bootDev)[0]) |
|
gtDisk = self.grubbyPartitionName(getDiskPart(gtPart)[0]) |
|
890 |
bPart = self.grubbyPartitionName(bootDev) |
bPart = self.grubbyPartitionName(bootDev) |
891 |
cmd = "root %s" % (bPart,) |
cmd = "root %s" % (bPart,) |
892 |
cmds.append(cmd) |
cmds.append(cmd) |
893 |
|
|
894 |
stage1Target = gtDisk |
stage1Target = gtDisk |
895 |
if target == "partition": |
if target == "partition": |
896 |
stage1Target = self.grubbyPartitionName(gtPart) |
stage1Target = self.grubbyPartitionName(bootDev) |
897 |
|
|
898 |
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" % \ |
899 |
(forcelba, grubPath, stage1Target, grubPath, bPart, grubPath) |
(grubPath, stage1Target, stage1Target, bPart, grubPath, grubPath) |
900 |
cmds.append(cmd) |
cmds.append(cmd) |
901 |
|
|
902 |
if not justConfigFile: |
if not justConfigFile: |
1081 |
grubbyRootPart = self.grubbyPartitionName(rootDev) |
grubbyRootPart = self.grubbyPartitionName(rootDev) |
1082 |
break |
break |
1083 |
|
|
1084 |
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" \ |
1085 |
% (grubbyRootPart, grubPath, grubbyStage1Dev, |
% (grubbyRootPart, grubPath, stage1Dev, stage1Dev, |
1086 |
grubPath, grubbyRootPart, grubPath) |
grubbyRootPart, grubPath, grubPath) |
1087 |
|
|
1088 |
if not justConfigFile: |
if not justConfigFile: |
1089 |
log("GRUB command %s", cmd) |
log("GRUB command %s", cmd) |