Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem with initramfs and GRUB2 / GPT / root on LVM on RAID
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
bhuisgen
n00b
n00b


Joined: 07 Sep 2008
Posts: 6
Location: France

PostPosted: Sun Jun 19, 2011 12:59 am    Post subject: Problem with initramfs and GRUB2 / GPT / root on LVM on RAID Reply with quote

Hello everybody,

I'm trying to make a new gentoo install with root on LVM on RAID. The RAID has metadatas 1.2 so I use GRUB2 and a initramfs which assemble the RAID and mount the root on LVM. But there is a problem with the root switch, the system seems to freeze with no error message...

Here is the details :
- kernel : 2.6.38-hardened-r6 with grsecurity, devtmpfs & EFI GPT partition support.
- GPT partitioning
- GRUB2 : sys-boot/grub-9999
- RAID1 : /dev/md0 for boot + /dev/md1 for LVM.
- LVM : vg/root + vg/swap

Here is the init script of my initramfs :

Code:

#!/bin/busybox sh

rescue_shell() {
   echo "Something went wrong. Dropping you to a shell."
   busybox --install -s
   exec /bin/sh
}

CMDLINE=`cat /proc/cmdline`

mount -t proc none /proc
mount -t sysfs none /sys
mount -t devtmpfs none /dev

mdadm --assemble --scan /dev/md0
mdadm --assemble --scan /dev/md1

lvm vgscan --mknodes
lvm lvchange -aly vg/root
mount -o ro /dev/mapper/vg-root /mnt/root || rescue_shell

umount /dev
umount /sys
umount /proc

exec /bin/busybox switch_root /mnt/root /sbin/init ${CMDLINE}


Have you any idea why the last line doesn't work ?
Back to top
View user's profile Send private message
cach0rr0
Bodhisattva
Bodhisattva


Joined: 13 Nov 2008
Posts: 4123
Location: Houston, Republic of Texas

PostPosted: Sun Jun 19, 2011 2:07 am    Post subject: Reply with quote

as this is a new install, have you seen this? https://forums.gentoo.org/viewtopic-t-880149.html

devtmpfs support in the kernel is insufficient for getting around that issue apparently
also note that the devtmpfs you mount inside your initramfs goes away once you unmount /dev and switch_root

you will need to mknod those three devices within your actual install (as in, not inside the initramfs, but rather on the /dev that's on your rootfs) if you haven't already
_________________
Lost configuring your system?
dump lspci -n here | see Pappy's guide | Link Stash
Back to top
View user's profile Send private message
bhuisgen
n00b
n00b


Joined: 07 Sep 2008
Posts: 6
Location: France

PostPosted: Sun Jun 19, 2011 10:54 am    Post subject: Reply with quote

Yes ! After adding the three nodes, it works ! Thank you.
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