summaryrefslogtreecommitdiffstats
path: root/booty
diff options
context:
space:
mode:
authorRadek Vykydal <rvykydal@redhat.com>2009-06-25 12:51:57 +0200
committerRadek Vykydal <rvykydal@redhat.com>2009-06-25 13:11:17 +0200
commita7d8f0a6f6f6cc13d6b9862adc2881bdaa19558f (patch)
tree39858ba6bee57ad84211596f9aa473b4898d1d5f /booty
parent592edfb2aae76d8899906fa92d2193a8f17c6738 (diff)
downloadanaconda-a7d8f0a6f6f6cc13d6b9862adc2881bdaa19558f.tar.gz
anaconda-a7d8f0a6f6f6cc13d6b9862adc2881bdaa19558f.tar.xz
anaconda-a7d8f0a6f6f6cc13d6b9862adc2881bdaa19558f.zip
Fix grub upgrade (#505966)
We need to run grub 'root' and 'install' commands in one grub shell session when upgrading grub.
Diffstat (limited to 'booty')
-rw-r--r--booty/x86.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/booty/x86.py b/booty/x86.py
index 4137bf40e..1da75439f 100644
--- a/booty/x86.py
+++ b/booty/x86.py
@@ -476,6 +476,7 @@ class x86BootloaderInfo(efiBootloaderInfo):
else:
stage1Devs = [theDev[5:]]
+ cmds = []
for stage1Dev in stage1Devs:
# cross fingers; if we can't find a root device on the same
# hardware as this boot device, we just blindly hope the first
@@ -494,15 +495,14 @@ class x86BootloaderInfo(efiBootloaderInfo):
break
args = "--stage2=/boot/grub/stage2 "
- cmd ="root %s" % (grubbyRootPart,)
- cmds = [ cmd ]
- cmd = "install %s%s/stage1 d %s %s/stage2 p %s%s/grub.conf" \
+ cmd ="root %s\n" % (grubbyRootPart,)
+ cmd += "install %s%s/stage1 d %s %s/stage2 p %s%s/grub.conf" \
% (args, grubPath, grubbyStage1Dev, grubPath, grubbyRootPart,
grubPath)
cmds.append(cmd)
- if not justConfigFile:
- return self.runGrubInstall(instRoot, bootDev, cmds, cfPath)
+ if not justConfigFile:
+ return self.runGrubInstall(instRoot, bootDev, cmds, cfPath)
return 0