Skip to contentSkip to conversation

grub2 (1.97.1) on RAID0

DISCUSSION André Fettouhi 3 participants 4 messages Nov 12, 2009

lore
Share & tools
lore
#0 lore raw

I'm using Arch Linux 64bit and I want to switch to grub2 since 2.0 is getting somewhat close. I'm running a RAID0 (using dmraid) setup and I can't figure out how to install grub2 on RAID0. With the legacy grub I have to go into the grub command prompt and do the following

# dmsetup mknodes
# grub --device-map=/dev/null
grub> device (hd0) /dev/mapper/raid_set
grub> geometry (hd0) C H S

grub> root (hd0,0)
grub> setup (hd0)
grub> quit

# reboot

how can I do this in grub2?

Signature · 14 lines
---------------------------------------------------------------
Dr. rer. nat. André Fettouhi, Postdoc.
Center for Phase Equilibria and Separation Processes (IVC-SEP)
DTU Chemical Engineering
Department of Chemical and Biochemical Engineering
Technical University of Denmark
Søltofts Plads
Building 229, room 218
2800 Kgs. Lyngby
Denmark
Telephone: +45-45252978
Fax: +45-45882258
E-Mail: [email protected]
---------------------------------------------------------------
#1 lore raw

To bad :)
Its not possible to use dmraid with Grub2 yet.

I had to switch bad to grub1 because its not possible to get it working. Hopefully some developper wants to implement this :)

Sincerely,
Jean-Louis

Quoted 16 lines · André Fettouhi

I'm using Arch Linux 64bit and I want to switch to grub2 since 2.0 is getting somewhat close. I'm running a RAID0 (using dmraid) setup and I can't figure out how to install grub2 on RAID0. With the legacy grub I have to go into the grub command prompt and do the following

# dmsetup mknodes
# grub --device-map=/dev/null
grub> device (hd0) /dev/mapper/raid_set
grub> geometry (hd0) C H S

grub> root (hd0,0)
grub> setup (hd0)
grub> quit

# reboot

how can I do this in grub2?

#2 lore raw

That sucks big time! <Sad>

[email protected] skrev:

Quoted 37 lines

To bad :)
Its not possible to use dmraid with Grub2 yet.

I had to switch bad to grub1 because its not possible to get it working. Hopefully some developper wants to implement this :)

Sincerely,
Jean-Louis

Quoted 10 lines · André Fettouhi

I'm using Arch Linux 64bit and I want to switch to grub2 since 2.0 is getting somewhat close. I'm running a RAID0 (using dmraid) setup and I can't figure out how to install grub2 on RAID0. With the legacy grub I have to go into the grub command prompt and do the following

# dmsetup mknodes
# grub --device-map=/dev/null
grub> device (hd0) /dev/mapper/raid_set
grub> geometry (hd0) C H S
Quoted 7 lines

grub> root (hd0,0)
grub> setup (hd0)
grub> quit

# reboot

how can I do this in grub2?

_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel

Signature · 14 lines
---------------------------------------------------------------
Dr. rer. nat. André Fettouhi, Postdoc.
Center for Phase Equilibria and Separation Processes (IVC-SEP)
DTU Chemical Engineering
Department of Chemical and Biochemical Engineering
Technical University of Denmark
Søltofts Plads
Building 229, room 218
2800 Kgs. Lyngby
Denmark
Telephone: +45-45252978
Fax: +45-45882258
E-Mail: [email protected]
---------------------------------------------------------------
#3 lore raw

Am Donnerstag, den 12.11.2009, 12:40 +0100 schrieb André Fettouhi:

Quoted 12 lines

That sucks big time! <Sad>

[email protected] skrev:

Quoted 9 lines

To bad :)
Its not possible to use dmraid with Grub2 yet.

I had to switch bad to grub1 because its not possible to get it working. Hopefully some developper wants to implement this :)

Sincerely,
Jean-Louis

If you have some /dev/mapper/nvida_ pdc_ or isw_ device you can try attached patch.
But it's a dirty way to implement it and not really tested. I haven't checked it with recent releases but at the time I wrote it it worked with my nvidia dmraid device.
isw_ devices seems to have different formats only one of them is supported.
And pdc_ worked for Pavel but for someone else on IRC it didn't.

Signature · 2 lines
Felix Zielcke
Proud Debian Maintainer and GNU GRUB developer
util/getroot.c +26 -1
index 120ab13..f1bfd4c 100644
@@ -396,13 +396,38 @@ grub_guess_root_device (const char *dir)
 
   return os_dev;
 }
+int
+grub_util_is_dmraid (const char *os_dev)
+{
+  if (! strncmp (os_dev, "/dev/mapper/nvidia_", 19))
+    return 1;
+  else if (! strncmp (os_dev, "/dev/mapper/isw_", 16))
+    return 1;
+  else if (! strncmp (os_dev, "/dev/mapper/hpt37x_", 19))
+    return 1;
+  else if (! strncmp (os_dev, "/dev/mapper/hpt45x_", 19))
+    return 1;
+  else if (! strncmp (os_dev, "/dev/mapper/via_", 16))
+    return 1;
+  else if (! strncmp (os_dev, "/dev/mapper/lsi_", 16))
+    return 1;
+  else if (! strncmp (os_dev, "/dev/mapper/pdc_", 16))
+    return 1;
+  else if (! strncmp (os_dev, "/dev/mapper/jmicron_", 20))
+    return 1;
+  else if (! strncmp (os_dev, "/dev/mapper/asr_", 16))
+    return 1;
+  else if (! strncmp (os_dev, "/dev/mapper/sil_", 16))
+    return 1;
 
+  return 0;
+}
 int
 grub_util_get_dev_abstraction (const char *os_dev UNUSED)
 {
 #ifdef __linux__
   /* Check for LVM.  */
-  if (!strncmp (os_dev, "/dev/mapper/", 12))
+  if (!strncmp (os_dev, "/dev/mapper/", 12) && ! grub_util_is_dmraid (os_dev))
     return GRUB_DEV_ABSTRACTION_LVM;
 
   /* Check for RAID.  */
util/hostdisk.c +113 -18

173 lines not on this page · raw message