[funtoo] coreboot raid

91 views
Skip to first unread message

mikehunt

unread,
May 20, 2010, 2:14:24 PM5/20/10
to Funtoo
Hi all,

I doing a new funtoo unstable on a new machine following the
http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml

But I can't get the boot.cfg done.

I get only this always:

grub-probe --device /dev/md1 --target=abstraction
grub-probe: error: no mapping exists for `md1'

boot.conf is:

boot {
generate grub
default "Funtoo Linux"
set root=/dev/md3
timeout 3
}

"Funtoo Linux" {
kernel bzImage [-v]
}

Any ideas would be great.

--
You received this message because you are subscribed to the Google Groups "Funtoo" group.
To post to this group, send email to funto...@googlegroups.com.
To unsubscribe from this group, send email to funtoo-dev+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/funtoo-dev?hl=en.

Donald R. Gray Jr

unread,
May 20, 2010, 3:08:13 PM5/20/10
to funto...@googlegroups.com, Funtoo
If I remember you need to treat both mirrors seperately in grub ex /
dev/sda /dev/sdb

Piotr Karbowski

unread,
May 20, 2010, 3:27:01 PM5/20/10
to funto...@googlegroups.com
On 20.05.2010 20:14, mikehunt wrote:
> Hi all,
>
> I doing a new funtoo unstable on a new machine following the
> http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml
>
> But I can't get the boot.cfg done.
>
> I get only this always:
>
> grub-probe --device /dev/md1 --target=abstraction
> grub-probe: error: no mapping exists for `md1'
>
> boot.conf is:
>
> boot {
> generate grub
> default "Funtoo Linux"
> set root=/dev/md3
> timeout 3
> }
>
> "Funtoo Linux" {
> kernel bzImage [-v]
> }
>
> Any ideas would be great.
>

I am not sure if root should be in boot section. Also, You have wrong
wildcard for kernel, it should be "kernel bzImage[-v]" or... you really
have space right before kernel version?

-- Piotr.

mikehunt

unread,
May 23, 2010, 7:24:33 PM5/23/10
to Funtoo
So far not much progress, works with raid only, lvm breaks everything.

Can't figure out why yet.

Will keep digging.

Let you know.

Cheers,

MH

Piotr Karbowski

unread,
May 24, 2010, 3:51:20 AM5/24/10
to funto...@googlegroups.com
On 24.05.2010 01:24, mikehunt wrote:
> So far not much progress, works with raid only, lvm breaks everything.
>
> Can't figure out why yet.


How so? I have lvm and dmcrypt on rootfs (sda1 /boot, sda2 is dmcrypt
volume => /dev/mapper/dmcrypt_root lvm PV, then vg-rootfs for rootfs)
and all of it work fine, with coreboot, on few boxes I have rootfs on
lvm (only, without dmcrypt) and with coreboot/boot-update it also work ok.

Be more specific, it must work. ;-)

-- Piotr.

mikehunt

unread,
May 24, 2010, 5:30:13 PM5/24/10
to Funtoo
Not sure Piotr,

I just saw the thread about lvm in boot, maybe that was the problem,
don't know.

But at this point can't even install 64bit, or anything else. Only
plain 32bit.

I'm as puzzled as you with this unexpected and strange behavior.

I do hope to get it worked out though.

Cheers,

MH

Piotr Karbowski

unread,
May 24, 2010, 5:34:51 PM5/24/10
to funto...@googlegroups.com
You are not able to boot system on lvm (kernel panic?) or you see openrc
init and there something failing? show boot.conf and error messages.

Daniel Robbins

unread,
May 24, 2010, 6:30:59 PM5/24/10
to funto...@googlegroups.com
On May 20, 2010, at 12:14 PM, mikehunt wrote:

> Hi all,
>
> I doing a new funtoo unstable on a new machine following the
> http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml
>
> But I can't get the boot.cfg done.
>
> I get only this always:
>
> grub-probe --device /dev/md1 --target=abstraction
> grub-probe: error: no mapping exists for `md1'

Are you using funtoo's boot-update with grub-1.9x?

Did you run grub-install? This should install grub, generate the device.map and fix this problem, I think.

boot-update doesn't run grub-install for you.

-Daniel

mikehunt

unread,
May 24, 2010, 6:36:12 PM5/24/10
to Funtoo
With lvm, the failure occurs in openrc,
Suddenly, it stops and reports it cannot fsck the the volume,
then brings me to a read-only prompt.

With raid and 64bit, it's a kernel panic.
It halts in the kernel boot sequence, and panics.
Raid reports an unknown-block(2,0)
64bit reports an unknown-block(8,3)

Very bizzare.

Obviously I'm doing it wrong, but i've done this successfully before
always on the first try, using the exact same recipe as now.
So I remain stumped.

Cheers,

MH

Daniel Robbins

unread,
May 24, 2010, 6:38:44 PM5/24/10
to funto...@googlegroups.com
On May 20, 2010, at 12:14 PM, mikehunt wrote:

> Hi all,
>
> I doing a new funtoo unstable on a new machine following the
> http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml
>
> But I can't get the boot.cfg done.

<snip>

> boot {
> generate grub
> default "Funtoo Linux"
> set root=/dev/md3
> timeout 3
> }
>
> "Funtoo Linux" {
> kernel bzImage [-v]
> }

The config above is incorrect - there is no "set root" option for the boot section. Also, no space between "bzImage" and "[-v]". You probably want:

boot {
generate grub
default "Funtoo Linux"
timeout 3
}

"Funtoo Linux" {
kernel bzImage[-v]
}

If you have the root filesystem listed as /dev/md3 in /etc/fstab, then boot-update will configure things automatically based on that setting. If you want to explicitly set it, it would be done this way:

"Funtoo Linux" {
kernel bzImage[-v]
params root=/dev/md3
}

See the boot-update and boot.conf man pages for more information. The configuration settings are covered in detail.

Regards,

Daniel

mikehunt

unread,
May 24, 2010, 7:30:32 PM5/24/10
to Funtoo
Alright thanks Daniel, will try tomorrow.
Hope it works, sounds reasonable because that was really the issue.
Grub 2 didn't seem to accept the file system type
However the very minimal boot.conf that I used did in fact generate
the correct /root setting in grub.cfg.

Thanks,

Cheers,

MH

Piotr Karbowski

unread,
May 25, 2010, 3:56:39 AM5/25/10
to funto...@googlegroups.com
On 25.05.2010 00:36, mikehunt wrote:
> With lvm, the failure occurs in openrc,
> Suddenly, it stops and reports it cannot fsck the the volume,
> then brings me to a read-only prompt.

You need to put lvm init (and I recommend device-mapper) in boot
runlevel, thats the reason why Daniel want add lvm+device-mapper init
scripts by-default when merging lvm2.

lvm init will do 'lvm vgchange -a y' and create LVM arrays + make nodes
in /dev.

-- Piotr.

mikehunt

unread,
May 25, 2010, 4:04:23 AM5/25/10
to Funtoo
Ok Piotr, will give it a try and report back.
Thank you for your assistance.

Cheers,

MH

mikehunt

unread,
May 25, 2010, 10:46:54 AM5/25/10
to Funtoo
Unfortunately totally a nogo.

I definitely added lvm to sysintt confirmed by eselect
and addad device-mapper to boot again confirmed

For good measure I used a boot.conf like this:
boot {
generate grub
default "Funtoo Linux"
timeout 3
}

"Funtoo Linux" {
kernel bzImage[-v]
param=/root=/dev/sda3
}

"Funtoo Linux64" {
kernel bzImage64[-v]
param=/root=/dev/md5
}

I get a kernel panic unknown block (2,0)
Which I believe means /dev/md5 is notb recognized

I have built installed, in /etc/conf.d/modules and loaded
modules_2_6="dm_mod md_mod raid0"

And so it is that the funtooer remains bewildered as ever, Tune in
next time same fun channel, same fun time.

Piotr Karbowski

unread,
May 25, 2010, 10:58:17 AM5/25/10
to funto...@googlegroups.com
On 25.05.2010 16:46, mikehunt wrote:
> Unfortunately totally a nogo.
>
> I definitely added lvm to sysintt confirmed by eselect
> and addad device-mapper to boot again confirmed
>
> For good measure I used a boot.conf like this:
> boot {
> generate grub
> default "Funtoo Linux"
> timeout 3
> }
>
> "Funtoo Linux" {
> kernel bzImage[-v]
> param=/root=/dev/sda3
> }
>
> "Funtoo Linux64" {
> kernel bzImage64[-v]
> param=/root=/dev/md5
> }
>
> I get a kernel panic unknown block (2,0)
> Which I believe means /dev/md5 is notb recognized
>
> I have built installed, in /etc/conf.d/modules and loaded
> modules_2_6="dm_mod md_mod raid0"
>
> And so it is that the funtooer remains bewildered as ever, Tune in
> next time same fun channel, same fun time.
>
> heers,
>
> MH
>

lvm init script to sysinit runlevel? It will propably not even work,
mvoe it to boot.

Your problem maybe non existing nodes in /dev, do your partitions have
flag 'raid autodetect'? If no, you may be forced to use initramfs to
detect raid and make nodes. Show your fdisk -l /dev/sdX for all raid
devices.

-- Piotr.

Daniel Robbins

unread,
May 25, 2010, 11:41:53 AM5/25/10
to funto...@googlegroups.com
On May 25, 2010, at 8:46 AM, mikehunt wrote:

> Unfortunately totally a nogo.
>
> I definitely added lvm to sysintt confirmed by eselect
> and addad device-mapper to boot again confirmed
>
> For good measure I used a boot.conf like this:
> boot {
> generate grub
> default "Funtoo Linux"
> timeout 3
> }
>
> "Funtoo Linux" {
> kernel bzImage[-v]
> param=/root=/dev/sda3
> }

Use "params root=/dev/foo" not "param=/root/dev/foo" as you have above. Please check /boot/grub/boot.cfg to make sure that the root option gets properly transferred to the config file.

If that doesn't work, we may need to do some deeper digging to see what's going on.

-Daniel

John W Higgins

unread,
May 25, 2010, 12:15:37 PM5/25/10
to funto...@googlegroups.com
Good Morning,

On Tue, May 25, 2010 at 7:46 AM, mikehunt <funto...@gmail.com> wrote:
Unfortunately totally a nogo.

I definitely added lvm to sysintt confirmed by eselect
and addad device-mapper to boot again confirmed

For good measure I used a boot.conf like this:
boot {
       generate grub
       default "Funtoo Linux"
       timeout 3
}

"Funtoo Linux" {
       kernel bzImage[-v]
       param=/root=/dev/sda3
}

"Funtoo Linux64" {
       kernel bzImage64[-v]
       param=/root=/dev/md5
}

I get a kernel panic unknown block (2,0)
Which I believe means /dev/md5 is notb recognized


I've been very confused for this entire email thread because I can't figure out what you are having an issue with. I've gather that somehow you have managed to get grub installed and now are having issues with the reboot into your new raid/lvm rootfs based system. If I'm correct then I think you are barking up the wrong tree. (And the rest of this email is assuming I'm correct in my understanding of the situation - so please ignore if I'm off track :) )
 
I have built installed, in /etc/conf.d/modules and loaded
modules_2_6="dm_mod md_mod raid0"

This would have nothing to do with the issue because you would never get this far. The only issue you should have would be setting up your initramfs correctly because that is what controls the entire process of getting lvm/raid available for the rootfs. Have you utilized genkernel with the appropriate settings for both lvm and raid? Have you added both dolvm and doraid (I believe those are correct) to the kernel config. I will be honest that I don't use the new prettied up grub but like I said earlier if I'm understanding your problem grub is so far removed by the time you get to your issues that it plays an absolutely minimal role here.

This should be extremely straight forward and again should have nothing to do with grub once you are passed it's installation (unless you haven't got the dolvm and doraid kernel config options).

John

mikehunt

unread,
May 25, 2010, 4:16:10 PM5/25/10
to Funtoo
Thanks John, no not off track by any means.

Look I've been doing Gentoos since the old days, I've done this stuff
many times before, both sucessfully and on the first try.
Always use a Manual kernel config and never used no initramfs. Old
Habits...

The problem seems to be centered around experimenting with cfdisk
partitioning utility.
I decided to try it because I read somewhere that it is a much safer
and more effective disk partitioning tool.
Doesn't seem so now.

I'm sure the old tried and true fdisk is still just fine thank you,
but I wish to try gparted which I have never done.
Doing so now, will update shortly

BTW this is about my 20th try with my new first real rig man so worth
is, having fun.

Keep smiling :)

Cheers,

MH

Daniel Robbins

unread,
May 25, 2010, 4:29:39 PM5/25/10
to funto...@googlegroups.com
On May 25, 2010, at 10:15 AM, John W Higgins wrote:

This should be extremely straight forward and again should have nothing to do with grub once you are passed it's installation (unless you haven't got the dolvm and doraid kernel config options).

Good points, and if Mike is using a genkernel-based initrd then he should be using "params real_root=/dev/foo" to point it to the post-initrd root filesystem.

-Daniel

mikehunt

unread,
May 25, 2010, 7:33:05 PM5/25/10
to Funtoo
Alright, making progress of sorts, maybe. Not sure yet.

Feeling better at any rate, just tired.

I dd zeroed everything to wipe it clean.

Used fdisk to make nice clean partitions type raid autodetect, reboot
for good measure.

re-downloaded the stage3 core2
and portage-current again

Following this baby here:

http://www.gentoo.org/doc/en/gentoo-x86+raid+lvm2-quickinstall.xml

word-for-word, command-for-command, no improvisation.

/etc/boot.conf is this:

boot {
generate grub
default "Funtoo Linux"
timeout 3
}

"Funtoo Linux" {
kernel bzImage[-v]

params root=/dev/md3
}


So now I'm back at my original dilema.

When I enter the grub-install --no-floppy /dev/sda command I get this
output:

grub-probe: error: no mapping exists for `md1'

Auto-detection of a filesystem module failed.
Please specify the module with the option `--modules' explicitly.

Tried grub-install --no-floppy /dev/md1
Same output:

grub-probe: error: no mapping exists for `md1'

Auto-detection of a filesystem module failed.
Please specify the module with the option `--modules' explicitly.


No idea how to proceed from here.

Spent but still smiling :)

Cheers

MH

mikehunt

unread,
May 25, 2010, 7:35:04 PM5/25/10
to Funtoo
BTW also did

rc-update add lvm boot
rc-update add device-mapper boot

as recommended by Piotr.

Daniel Robbins

unread,
May 25, 2010, 9:18:55 PM5/25/10
to funto...@googlegroups.com

It might be best to track us down in #funtoo on freenode and go through troubleshooting there. I'm concerned this thread is dragging on and not very productive with a round-trip time between responses of several hours. Chat would be better. You could even let us log in and try to figure it out.

-Daniel

mikehunt

unread,
May 25, 2010, 9:21:50 PM5/25/10
to Funtoo
Ok I can try that. Must emerge software first.

mikehunt

unread,
May 25, 2010, 9:39:18 PM5/25/10
to Funtoo
This could take a while. I'd have to get a DynDNS thingy, open a port
in the router, I'm not even at home. It's complicated.

Maybe doable. See you in a couple of days then.

mikehunt

unread,
May 25, 2010, 9:58:50 PM5/25/10
to Funtoo
I tried like this:

since fdisk also complained that /dev/md1 had no available map, I did
a fdisk /dev/md1 and hit the 'w' key for write and exit. Now fdisk is
silent.

But grub-install --modules="lvm raid" --no-floppy /dev/sda returns:

grub-probe: error: no mapping exists for `md1'
grub-probe: error: no mapping exists for `md1'
grub-probe: error: no mapping exists for `md1'

You attempted a cross-disk install, but the filesystem containing /
boot/grub does not support UUIDs.

mikehunt

unread,
May 26, 2010, 4:47:49 AM5/26/10
to Funtoo
It's looking more like some sort of mixup about how the metadata is
distributed nowadays and isn't picked up by grub - yet.

Maybe possible to fix by leaving small gaps 100-200kb between the
devices and at the end of the disk.

re-zeroing with dd now - again.

will report back.

mikehunt

unread,
May 26, 2010, 6:10:18 AM5/26/10
to Funtoo
When I do mdadm --create ... I get this warning:

mdadm: Note: this array has metadata at the start and
may not be suitable as a boot device. If you plan to
store '/' or '/boot' on this device please ensure that
your boot-loader understands md/v1.x metadata, or use
--metadata=1.0

Googling it now to turn anything up.

Piotr Karbowski

unread,
May 26, 2010, 6:55:58 AM5/26/10
to funto...@googlegroups.com
On 26.05.2010 12:10, mikehunt wrote:
> When I do mdadm --create ... I get this warning:
>
> mdadm: Note: this array has metadata at the start and
> may not be suitable as a boot device. If you plan to
> store '/' or '/boot' on this device please ensure that
> your boot-loader understands md/v1.x metadata, or use
> --metadata=1.0
What type of raid is it? raid1? Raid0? And, do you have separated
partition for /boot?

mikehunt

unread,
May 26, 2010, 11:13:21 AM5/26/10
to Funtoo
Hi Piotr,

yes,
seperate /boot -> /dev/md1 -> raid1
/ -> /dev/md3 -> raid1
lvm -> /dev/md4 -> raid0

this time around trying:
mdadm --create --metadata=1.0 ...

If this still fails to boot then I can later try:
mdadm --create --metadata=0.90 ...

I remember glimpsing somewhere in all the recent googling that grub2
will read the metadata-0.90 which is the old style I believe.

Cheers,

MH

mikehunt

unread,
May 26, 2010, 12:54:48 PM5/26/10
to Funtoo
Oh well, that still doesn't work:

# grub-install --no-floppy /dev/sda


grub-probe: error: no mapping exists for `md1'

Auto-detection of a filesystem module failed.
Please specify the module with the option `--modules' explicitly.

# grub-install --modules="lvm raid" --no-floppy /dev/sda


grub-probe: error: no mapping exists for `md1'
grub-probe: error: no mapping exists for `md1'
grub-probe: error: no mapping exists for `md1'
You attempted a cross-disk install, but the filesystem containing /
boot/grub does not support UUIDs.

try metadata=0.90 ?
any takers? place your bets please....

:)

kdvgent

unread,
May 26, 2010, 3:09:52 PM5/26/10
to Funtoo
I do not find the right info back on the Internet right now but I had
the same issue and solved things by rebuilding the raidarray using the
older metadata format.

mikehunt

unread,
May 26, 2010, 3:24:37 PM5/26/10
to Funtoo
Well kdvgent,

Looks maybe like we will have a little jackpot to split here.

Not sure yet though because I havn't actually rebooted yet.

Just now finishing the latest mdadm --create --metadata=0.90 ...
installation.

# grub-install --no-floppy /dev/sda returns
(hd0) /dev/sda
(hd1) /dev/sdb

# boot-update returns
* Completed successfully.

# # cat /boot/grub/grub.cfg
set timeout=7

menuentry "Funtoo Linux - bzImage" {
insmod raid
insmod mdraid
insmod ext2
set root=(md1)
search --no-floppy --fs-uuid --set c0d19605-5e0f-4fb9-
a626-70a35967019a
linux /bzImage root=/dev/md3
set gfxpayload=keep
}
set default=0

Looks good to me, time to exit, unmount and reboot.

Stay tuned....

mikehunt

unread,
May 26, 2010, 3:31:46 PM5/26/10
to Funtoo
No, kdvgent not yet.

Got a kernel panic again on reboot

VFS: Unable to mount root fs on unknown-block(2,0)

Gotta dig deeper....

Later.... bye.

mikehunt

unread,
May 26, 2010, 5:04:29 PM5/26/10
to Funtoo
Ok, now before I decide to turn the lights out, gonna try one more
idea first.

Using the exact same recipe as I just did with a 64bit core2 stage3,
in the exact same way, command-for-command, word-for-word, again from
the top.

But this time using a 32bit core2-32 stage3, will it work?

And most importantly, if it does work, does it still count as a
jackpot win for kdvgent and me? My opinion is yes - who decides these
things around here anyway?

Be back soon......

mikehunt

unread,
May 26, 2010, 10:01:52 PM5/26/10
to Funtoo
Nope, sorry kdvgent got the exact same VFS panic unknown-block(2,0)
But it was worth a shot.

Have to dig deeper,
tomorrow.

Maybe now a Heineken or something... whatever.

Cheers,

MH

Piotr Karbowski

unread,
May 27, 2010, 3:57:29 AM5/27/10
to funto...@googlegroups.com

This kernelpanic is imo because missing raid support (kernel) or missing
raid autodetect flag for filesystems (do fdisk -l /dev/sda && fdlisk -l
/dev/sdb).

-- Piotr.

mikehunt

unread,
May 27, 2010, 7:53:01 AM5/27/10
to Funtoo
% fdisk -l /dev/sda && fdisk -l /dev/sdb

-- snip --

Device Boot Start End Blocks Id System
/dev/sda1 * 1 9 72261 fd Linux raid
autodetect
/dev/sda2 10 647 5124735 82 Linux swap /
Solaris
/dev/sda3 648 1030 3076447+ fd Linux raid
autodetect
/dev/sda4 1031 121601 968486557+ fd Linux raid
autodetect

-- snip --

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 9 72261 fd Linux raid
autodetect
/dev/sdb2 10 647 5124735 82 Linux swap /
Solaris
/dev/sdb3 648 1030 3076447+ fd Linux raid
autodetect
/dev/sdb4 1031 121601 968486557+ fd Linux raid
autodetect

kernel raid -> md_mod, raid0, raid1 = all modules
[*] Multiple devices driver support (RAID and LVM)
<M> RAID support
< > Linear (append) mode (NEW)
<M> RAID-0 (striping) mode
<M> RAID-1 (mirroring) mode

Piotr Karbowski

unread,
May 27, 2010, 8:01:32 AM5/27/10
to funto...@googlegroups.com

You need to bultit it to kernel, not as modules (or load modules by
initramfs, better is compile it in <*>.).

-- Piotr.

mikehunt

unread,
May 27, 2010, 8:17:58 AM5/27/10
to Funtoo
Yes Piotr correct, it actually just booted because I tried raid built
in kernel just now.
I've been doing that exact same mistake pretty much the whole way
through.

This is the core2-32 from yesterday's last attempt, so I guess kdvgent
and me do have a jackpot to split after all, Yippee-ya-yo. :)

Thanks Piotr an all others for tremendous support.
Gonna go boot core2 64 now...

Cheers,

MH

mikehunt

unread,
May 27, 2010, 9:50:40 AM5/27/10
to Funtoo
... and just for the record, core2 64bits + raid + lvm - booted :)

All of it exactly the way I wanted all along, no improvisations or
workarounds - except metadata-0.90 - required. :)

Finally after a week of getting this new box home from the store.....

Bye for now.

Reply all
Reply to author
Forward
0 new messages