1 |
slords |
1.1 |
From aee5b5cdc91b441e04fa74a8abd174dc40457730 Mon Sep 17 00:00:00 2001 |
2 |
|
|
From: Shad L. Lords <slords@mail.com> |
3 |
|
|
Date: Thu, 22 Oct 2009 09:24:38 -0600 |
4 |
|
|
Subject: [PATCH] Install grub correctly on raid1 devices |
5 |
|
|
|
6 |
|
|
--- |
7 |
|
|
bootloaderInfo.py | 13 ++++--------- |
8 |
|
|
1 files changed, 4 insertions(+), 9 deletions(-) |
9 |
|
|
|
10 |
|
|
diff --git a/bootloaderInfo.py b/bootloaderInfo.py |
11 |
|
|
index 3c4f0cc..e5582f0 100644 |
12 |
|
|
--- a/bootloaderInfo.py |
13 |
|
|
+++ b/bootloaderInfo.py |
14 |
|
|
@@ -934,17 +934,14 @@ class x86BootloaderInfo(bootloaderInfo): |
15 |
|
|
|
16 |
|
|
cmds = [] |
17 |
|
|
for bootDev in bootDevs: |
18 |
|
|
- gtPart = self.getMatchingPart(bootDev, grubTarget) |
19 |
|
|
- gtDisk = self.grubbyPartitionName(getDiskPart(gtPart)[0]) |
20 |
|
|
+ gtDisk = self.grubbyPartitionName(getDiskPart(bootDev)[0]) |
21 |
|
|
bPart = self.grubbyPartitionName(bootDev) |
22 |
|
|
- cmd = "root %s\n" % (bPart,) |
23 |
|
|
|
24 |
|
|
stage1Target = gtDisk |
25 |
|
|
if target == "partition": |
26 |
|
|
- stage1Target = self.grubbyPartitionName(gtPart) |
27 |
|
|
+ stage1Target = self.grubbyPartitionName(bootDev) |
28 |
|
|
|
29 |
|
|
- cmd += "install %s%s/stage1 d %s %s/stage2 p %s%s/grub.conf" % \ |
30 |
|
|
- (forcelba, grubPath, stage1Target, grubPath, bPart, grubPath) |
31 |
|
|
+ cmd = "root %s\nsetup %s" % (bPart, stage1Target) |
32 |
|
|
cmds.append(cmd) |
33 |
|
|
|
34 |
|
|
if not justConfigFile: |
35 |
|
|
@@ -1133,9 +1130,7 @@ class x86BootloaderInfo(bootloaderInfo): |
36 |
|
|
grubbyRootPart = self.grubbyPartitionName(rootDev) |
37 |
|
|
break |
38 |
|
|
|
39 |
|
|
- cmd = "root %s\ninstall %s/stage1 d %s %s/stage2 p %s%s/grub.conf" \ |
40 |
|
|
- % (grubbyRootPart, grubPath, grubbyStage1Dev, |
41 |
|
|
- grubPath, grubbyRootPart, grubPath) |
42 |
|
|
+ cmd = "root %s\nsetup %s" % (grubbyRootPart, grubbyStage1Dev) |
43 |
|
|
|
44 |
|
|
if not justConfigFile: |
45 |
|
|
#log("GRUB command %s", cmd) |
46 |
|
|
-- |
47 |
|
|
1.5.5.6 |
48 |
|
|
|