Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
genkernel with vanilla-sources doesn't autodetect raid array
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
dinominant
Tux's lil' helper
Tux's lil' helper


Joined: 27 Oct 2006
Posts: 102

PostPosted: Fri Sep 06, 2013 2:53 pm    Post subject: genkernel with vanilla-sources doesn't autodetect raid array Reply with quote

I've configured a custom vanilla-sources-3.10.10 with what I believe is all the necessary kernel options for root on raid1 with autodetect:
Code:
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_BLK_DEV_MD=y
CONFIG_MD_AUTODETECT=y
CONFIG_MD_RAID1=m


I then built my kernel and created an initrd:
Code:
genkernel --oldconfig --lvm --mdadm --dmraid --e2fsprogs --iscsi --disklabel all


And my lilo.conf is:
Code:
default=3.10.10
prompt
timeout=50

boot=/dev/disk/by-uuid/1380debd-9bfb-4bcc-a46c-742312b993a3
root=/dev/disk/by-uuid/cf100e5c-82fd-4393-8e83-995f9ad27383
raid-extra-boot=mbr

image=/boot/kernel-genkernel-x86_64-3.10.10
        label=3.10.10
        read-only
        append="rootdelay=10,dolvm,domdadm,real_root=UUID=cf100e5c-82fd-4393-8e83-995f9ad27383"
        initrd="/boot/initramfs-genkernel-x86_64-3.10.10"


The system boots fine into the initrd, but it is unable to locate the root filesystem. When I drop to an emergency shell I can see that there are no /dev/md* devices and the RAID array's have not been autodetected. I can issue mdadm --assemble --scan, which detects and assembles the arrays, then I can exit back to the initrd boot process and provide the correct /dev/md126 device (or whatever it was detected as) and booting resumes.

Why is the initrd generated by genkernel not autodetecting my arrays? My boot array is metadata 0.90 and my root array is metadata 1.20. Both are not detected by the genkernel initrd, but It has no problems assembling them when I issue mdadm --assemble --scan.

In /etc/genkernel.conf there is:
Code:
# Specify a custom mdadm.conf.
# By default the ramdisk will be built *without* an mdadm.conf and will auto-detect
# arrays during bootup.  Usually, this should not be needed.
#MDADM_CONFIG="/etc/mdadm.conf"


I like that because then I have a nice generic initrd that I can re-use on other systems. If I write and include an mdadm.conf file with my array UUID's I'm sure that will work, but I would very much prefer auto-detected raid arrays and then booting/mounting via UUID's.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54216
Location: 56N 3W

PostPosted: Fri Sep 06, 2013 8:56 pm    Post subject: Reply with quote

dinominant,

Quote:
My boot array is metadata 0.90
good - provided the partition type is set to fd, kernel auto assembly should work here.
Quote:
... and my root array is metadata 1.20
Oops. Kernel raid autodetect is obsolete. It only works with metadata version 0.90.

However, your initrd contains mdadm or
Code:
mdadm --assemble --scan
would fail, so provided the init script in the initrd calls mdadm, all should be well.
This is regardless of the
Code:
CONFIG_MD_AUTODETECT=y
kernel setting
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum