Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Installing gentoo 3.5.7 amd64 with grub2 on 1.2 mdraid
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
lanthruster
n00b
n00b


Joined: 01 Jan 2012
Posts: 29

PostPosted: Wed Nov 28, 2012 4:28 am    Post subject: Installing gentoo 3.5.7 amd64 with grub2 on 1.2 mdraid Reply with quote

Just to share some time saving data.

The two latest livecd are both broken:

Code:

install-amd64-minimal-20121107.iso
install-amd64-minimal-20121013.iso


The latest working livecd:

Code:
install-amd64-minimal-20120621.iso


All will be well till the grub installation. At this point you discover that the new mdraid is using a different metadata format/placement and the old grub won't install on md volumes. Fortunately you can unmask the latest grub2 which can handle metadata version 1.2. grub2 is working well, though it will take you half an hour to understand it's new design and to generate menu.lst

Now you reboot the system and another surprise is waiting. The kernel is not able to find your md's. You check /dev/ and really you see no sign of your md*, though sd* are there. The kernel stops with

Code:
mounting / on /newroot failed.


The first though is that you forgot to add RAID autodetect in the kernel config, after checking it - more complex ideas will come to your mind. After two-three hours you'll be absolutely certain that there is nothing wrong with your config.

And then you find out that the new kernels cannot detect mdraid volumes with metadata version 1.2 yet.
After another half an hour a bright idea visits you - just add domdadm option to the kernel. And you already figured it out how to do it with the new grub2.

You boot and of course you forgot that domdadm relies on mdadm, not on the kernel, that's why it supposed to work while kernel doesn't. You see missing:

Code:

/sbin/mdadm missing


that's because your initramfs is missing /sbin/mdadm, you boot from livecd again and modify it:

Code:

genkernel --kernel-config=/usr/src/config --mdadm initramfs


you reboot again, this time the boot process will go further. It will search for md's but when it will find them they will receiverandom names like md125, md126, different at each boot. And you're expecting it to be say /md3, you can see your raids ls -l /dev/md* but you still can't use them - you didn't add /etc/mdadm.conf to the initrfamfs and mdadm doesn't know what ID give to the md's. A rule of thumb - if you see mdxxx - your md's were initialized by mdadm without mdadm.conf, not by kernel.

You run
Code:

mdadm --detail --scan >> /etc/mdadm.conf


then modify the device id to md1, md2 (or your desired)

then you re-assemble initramfs again
Code:

genkernel --kernel-config=/usr/src/config --mdadm --mdadm-config=/etc/mdadm.conf --disklabel initramfs

And this will do it. You now have 3.5.7 kernel with md raids, grub2 and metadata 1.2

It took me about 12 hours to install Gentoo and I hope you will not spend so much time after reading this post.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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