Skip to contentSkip to conversation

grub-setup: error: no mapping exists for ... in GRUB2 v1.97.1 on fake (IMSM) RAID

DISCUSSION Lapohos Tibor 3 participants 6 messages Dec 28, 2009 – Jan 5, 2010 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Thanks for your reply.

What the OROM says is that both of my volumes are bootable.
/dev/md126 corresponds to Volume0, and its first partition (ext4) has the boot flag set.
My problem is that I cannot get grub2 installed on the device at all. I did try, as you suggested, to set
(hd0) /dev/md126

in the  device.map file and then issue

Quoted 1 line

grub-install --modules=raid /dev/md126


but I still get the same error message(s):

grub-probe: error: no mapping exists for 'md126'
grub-setup: error: no mapping exists for 'md126'

What is interesting is that, at the grub shell, I can do

grub> probe -l (hd0,1)

it returns "OS" which is the label I set for it, so the device can, under certain circumstances, definitely be detected. Nevertheless, grub-install does not seem to behave the same way.
Thanks,
Tibor

--- On Sun, 12/27/09, Michael Evans <[email protected]> wrote:

From: Michael Evans <[email protected]>
Subject: Re: grub-setup: error: no mapping exists for ... in GRUB2 v1.97.1 on fake (IMSM) RAID
To: "Lapohos Tibor" <[email protected]>
Cc: [email protected]
Date: Sunday, December 27, 2009, 7:26 PM

On Sat, Dec 26, 2009 at 5:33 AM, Lapohos Tibor <[email protected]> wrote:

Hello All,

I have 2 SATA disks in an Intel Matrix RAID setup. It contains two volumes, one in RAID1, the other in RAID0 configuration. These I created using the Option ROM of the motherboard,  partitioned using cfdisk, and finally assembled into RAID devices using mdadm v3.0.3. As such, I obtained the following devices:

/dev/md127 (the container to which /dev/md/imsm0 is pointing)
/dev/md126 (the RAID1 "Volume0" pointed at by /dev/md/Volume0)
/dev/md126p1 (the first partition intended to serve as the root fs)
/dev/md126p2 (intended for user space)
/dev/md126p3 (intended for swap)
/dev/md125 (the RAID0 "Volume1" pointed at by /dev/md/Volume1)
/dev/md125p1 (intended for user scratch space)
/dev/md125p2 (itended for swap)

(the long names came from mdadm v 3.0.3).

If I boot from my USB memory stick, and make a stop at the grub shell, I can see all these partitions listed as (hd1) (hd1,[123]), (hd2) and (hd2,[12]), while my USB stick comes up under (hd0) and (hd0,[12]). Therefore, I would dare to say that grub does detect these devices.
I tried to install grub 1.97.1 on /dev/md126 by countless ways without success. The command

$ grub-install --modules=raid /dev/md126 
 
for example returns the error message
 
$ grub-setup: error: no mapping exists for "md126"
 
The /boot/grub folder got created correctly, but the "device.map" file does not mention any virtual RAID devices. It reads:
 
(hd0) /dev/sda (SATA1)
(hd1) /dev/sdb (SATA2)
(hd2) /dev/sdc (USB flash memory stick)
 
which, by the way, does not resemble what the 
sh: grub> ls
command returns before booting (see the list described before).
 
Do I need to give up using "fake RAID" and turn to pure SW RAID to get the system up and running, or is there a way to install GRUB2 in this configuration?
 
Your help is much appreciated. Thanks ahead,
Tibor
 
_______________________________________________
Help-grub mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-grub

If you -know- that given drives will be in some positions during startup then you can edit the device.map file your self to tell grub where things will be on reboot.

You should only provide the containers; however a very important question exists.  Are you able to select one of those containers as your boot volume within the bios?  If so make it like that and tell grub that the volume is 'hd0' instead of /dev/sda.  Then you can do the usual setup/install and it should work when using that device.map.

-----Inline Attachment Follows-----

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

#2 lore raw

Am Sonntag, den 27.12.2009, 17:50 -0800 schrieb Lapohos Tibor:

Quoted 8 lines

Thanks for your reply.

What the OROM says is that both of my volumes are bootable. /dev/md126 corresponds to Volume0, and its first partition (ext4) has the boot flag set.

My problem is that I cannot get grub2 installed on the device at all. I did try, as you suggested, to set

You're problem is that you're using metadata 1.x and not the older default 0.90. Which we don't support yet.

I made a Baazar branch for metadata 1.x support, but it's still broken. At least RAID != 1.
But I tested RAID 1 only with grub-probe, not actual booting from it. And it's a bit complicated to get grub-probe working, because the devicename must macht the name stored in the superblock.
If you want to try it nevertheless:

bzr co http://bzr.savannah.gnu.org/r/grub/people/fzielcke/raid

Quoted 10 lines

(hd0) /dev/md126

in the device.map file and then issue

Quoted 1 line

grub-install --modules=raid /dev/md126

but I still get the same error message(s):

grub-probe: error: no mapping exists for 'md126'
grub-setup: error: no mapping exists for 'md126'

device.map isn't used at all for mdraid devices.

Quoted 7 lines

What is interesting is that, at the grub shell, I can do

grub> probe -l (hd0,1)

it returns "OS" which is the label I set for it, so the device can, under certain circumstances, definitely be detected. Nevertheless, grub-install does not seem to behave the same way.

(hdX,Y) devices are normal disk devices though and not the RAID ones. They're (mdX) and (mdX,Y) so it only works with RAID 1, but only by using one disk of them.

Signature · 2 lines
Felix Zielcke
Proud Debian Maintainer and GNU GRUB developer
#3 lore raw

Thanks for your help. Please see my further questions below.

--- On Mon, 12/28/09, Felix Zielcke <[email protected]> wrote:

From: Felix Zielcke [email protected]

You're problem is that you're using metadata 1.x and not the older
default 0.90. Which we don't support yet.

In my understanding the superblock of the container has "imsm" metadata, which is different from the v0.9x and v1.x versions. Please take a look at the outputs obtained by

Quoted 1 line

mdadm -D /dev/md12[765]

attached to this message.

Based on your input, I cannot make this work, right?

I made a Baazar branch for metadata 1.x support, but it's still broken. At least RAID != 1.

So it works for RAID 1, and it is "broken" for the other RAID levels?

But I tested RAID 1 only with grub-probe, not actual booting from it. And it's a bit complicated to get grub-probe working, because the devicename must macht the name stored in the superblock.

Would I need to be able to achieve all this as I am assembling the RAID devices?

If you want to try it nevertheless:

bzr co http://bzr.savannah.gnu.org/r/grub/people/fzielcke/raid

Thanks, I'll give it a shot once I get a better grasp of what I'm doing.

device.map isn't used at all for mdraid devices.

But my device is not "mdraid" type device, is it? The kernel does not detect it as it loads and starts running. The "mdraid" devices would be formed of "fd" type partitions, would they not?

(hdX,Y) devices are normal disk devices though and not the RAID ones.
They're (mdX) and (mdX,Y) so it only works with RAID 1, but only by
using one disk of them.

OK, I understand this. But then I must ask, how come the grub shell (got into by booting from a usb key) lists (hdX,Y) devices for all these "imsm" contained devices and partitions?
Thanks again for your help,
Tibor

#4 lore raw

Please use proper quoting. It doestn't make it easier to read if your answer is directly below my sentences without any special quoting.

Am Sonntag, den 03.01.2010, 20:29 -0800 schrieb Lapohos Tibor:

Quoted 6 lines

Thanks for your help. Please see my further questions below.

Based on your input, I cannot make this work, right?

No.
Probable we could implement support for the newly added metadata formats, but that's IMO very very low priority.
The normal ones are more important, especially now that 1.1 became the default instead of 0.90.

Quoted 5 lines

I made a Baazar branch for metadata 1.x support, but it's still broken.
At least RAID != 1.

So it works for RAID 1, and it is "broken" for the other RAID levels?

It seems so. I haven't found out why exactly yet.

Quoted 7 lines

But I tested RAID 1 only with grub-probe, not actual booting from it. And it's a bit complicated to get grub-probe working, because the devicename must macht the name stored in the superblock.

Would I need to be able to achieve all this as I am assembling the RAID devices?

You can also just rename the device files afterwards, but before you run grub-install or update-grub/grub-mkconfig.

Quoted 9 lines

If you want to try it nevertheless:

bzr co http://bzr.savannah.gnu.org/r/grub/people/fzielcke/raid

Thanks, I'll give it a shot once I get a better grasp of what I'm doing.

Quoted 6 lines

device.map isn't used at all for mdraid devices.

But my device is not "mdraid" type device, is it? The kernel does not detect it as it loads and starts running. The "mdraid" devices would be formed of "fd" type partitions, would they not?

No. mdraid devices can have any partition type you want. As with any Linux filesystem etc. pp.
fd has only the special meaning that Linux autoassembles them. But the prefered method is to let mdadm inside the initrd/initramfs handle it. And then it doestn't matter at all what partition type you use.

/dev/mdXXX and /dev/md/XXX are all mdraid devices. As long as mdadm -Q --detail works on it. Doestn't matter what mdraid metadata you use.

Quoted 8 lines

(hdX,Y) devices are normal disk devices though and not the RAID ones. They're (mdX) and (mdX,Y) so it only works with RAID 1, but only by using one disk of them.

OK, I understand this. But then I must ask, how come the grub shell (got into by booting from a usb key) lists (hdX,Y) devices for all these "imsm" contained devices and partitions?

Ok I should have written (hdx,y) devices are normal BIOS devices.

Quoted 2 lines

Thanks again for your help,
Tibor

Signature · 2 lines
Felix Zielcke
Proud Debian Maintainer and GNU GRUB developer
#5 lore raw

Thanks for the help. I consider this case closed till GRUB reaches that certain development state.

I tried a totally different approach, I guess one would call it "GRUB on pure software RAID", and I bumped into a new problem. I'll describe it under a new thread.
Thanks again,
Tibor

--- On Mon, 1/4/10, Felix Zielcke <[email protected]> wrote:

From: Felix Zielcke <[email protected]>
Subject: Re: grub-setup: error: no mapping exists for ... in GRUB2 v1.97.1 on fake (IMSM) RAID
To: "The development of GNU GRUB" <[email protected]>
Date: Monday, January 4, 2010, 4:23 AM

Please use proper quoting. It doestn't make it easier to read if your answer is directly below my sentences without any special quoting.

Am Sonntag, den 03.01.2010, 20:29 -0800 schrieb Lapohos Tibor:

Quoted 6 lines

Thanks for your help. Please see my further questions below.


Based on your input, I cannot make this work, right?

No.
Probable we could implement support for the newly added metadata formats, but that's IMO very very low priority.
The normal ones are more important, especially now that 1.1 became the default instead of 0.90.

Quoted 5 lines

I made a Baazar branch for metadata 1.x support, but it's still broken.
At least RAID != 1.

So it works for RAID 1, and it is "broken" for the other RAID levels?

It seems so. I haven't found out why exactly yet.

Quoted 7 lines

But I tested RAID 1 only with grub-probe, not actual booting from it. And it's a bit complicated to get grub-probe working, because the devicename must macht the name stored in the superblock.

Would I need to be able to achieve all this as I am assembling the RAID devices?

You can also just rename the device files afterwards, but before you run grub-install or update-grub/grub-mkconfig.

Quoted 9 lines

If you want to try it nevertheless:

bzr co http://bzr.savannah.gnu.org/r/grub/people/fzielcke/raid

Thanks, I'll give it a shot once I get a better grasp of what I'm doing.

Quoted 6 lines

device.map isn't used at all for mdraid devices.

But my device is not "mdraid" type device, is it? The kernel does not detect it as it loads and starts running. The "mdraid" devices would be formed of "fd" type partitions, would they not?

No. mdraid devices can have any partition type you want. As with any Linux filesystem etc. pp.
fd has only the special meaning that Linux autoassembles them. But the prefered method is to let mdadm inside the initrd/initramfs handle it. And then it doestn't matter at all what partition type you use.

/dev/mdXXX and /dev/md/XXX are all mdraid devices. As long as mdadm -Q --detail works on it. Doestn't matter what mdraid metadata you use.

Quoted 8 lines

(hdX,Y) devices are normal disk devices though and not the RAID ones. They're (mdX) and (mdX,Y) so it only works with RAID 1, but only by using one disk of them.

OK, I understand this. But then I must ask, how come the grub shell (got into by booting from a usb key) lists (hdX,Y) devices for all these "imsm" contained devices and partitions?

Ok I should have written (hdx,y) devices are normal BIOS devices.

Quoted 2 lines

Thanks again for your help,
Tibor

Signature · 9 lines
Felix Zielcke
Proud Debian Maintainer and GNU GRUB developer



_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
#6 lore raw
In reply to Lapohos Tibor
Quoted 1 line · Lapohos Tibor
Quoted 1 line

grub-install --modules=raid /dev/md126

You're not supposed to force addition of raid.mod. If it wasn't auto-detected, it means there is a problem somewhere. Working around it just makes GRUB fail later on in a more unpleasant way ;-)

Signature · 3 lines
Robert Millan

  "Be the change you want to see in the world" -- Gandhi