Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
udev issues with booting from LVM
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
Scorpion265
Tux's lil' helper
Tux's lil' helper


Joined: 05 May 2005
Posts: 129
Location: Kansas City, MO

PostPosted: Thu Dec 13, 2012 3:28 am    Post subject: udev issues with booting from LVM Reply with quote

Hello all,

I'm having some issues with udev, for some reason it's not creating the volume groups or logical volumes in /dev...
Here is my init script from my initramfs:

Code:

#!/bin/sh
export PATH=/bin:/sbin
mount -nvt proc none /proc
mount -nvt sysfs none /sys
mount -nvt tmpfs mdev /dev
echo "/bin/mdev" >/proc/sys/kernel/hotplug && mdev -s
sleep 3

rescue_shell() {
        echo "Something broke!"
        exec /bin/sh
}

mdadm -A /dev/md0 || rescue_shell
mdadm -A /dev/md1 || rescue_shell
vgscan || rescue_shell
vgchange -ay || rescue_shell
mount -nvt ext4 /dev/mapper/vg0-ROOT /mnt/root || rescue_shell
mount -nvt ext4 /dev/mapper/vg0-USR /mnt/root/usr || rescue_shell
mount -nvt ext4 /dev/mapper/vg0-BIN /mnt/root/bin || rescue_shell
mount -nvt ext4 /dev/mapper/vg0-HOME /mnt/root/home || rescue_shell
echo >/proc/sys/kernel/hotplug
umount /sys
umount /proc
umount /dev
exec /sbin/switch_root /mnt/root /sbin/init


Could anything from here be interfering with udev on startup?
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7127
Location: almost Mile High in the USA

PostPosted: Thu Dec 13, 2012 8:45 am    Post subject: Reply with quote

Not sure if this is helpful but I have most of my boot system in one logical volume - the root volume - and it's the only volume that my initramfs mounts after setting up the RAID and detecting the logical volumes. The storage and scratch volumes are ignored for the time being. Udev deals with the rest of the volumes with Gentoo's initscripts. This setup seems to work for me though I do get warnings during boot but they go by too quickly...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Scorpion265
Tux's lil' helper
Tux's lil' helper


Joined: 05 May 2005
Posts: 129
Location: Kansas City, MO

PostPosted: Thu Dec 13, 2012 6:57 pm    Post subject: Reply with quote

There are some issues with having /bin and /usr on different partitions (I know I should be mounting them ro and doing fsck), but by mounting them in the initramfs I shouldn't have any issues. At least that's what I've been able to gather via google.
Back to top
View user's profile Send private message
Scorpion265
Tux's lil' helper
Tux's lil' helper


Joined: 05 May 2005
Posts: 129
Location: Kansas City, MO

PostPosted: Fri Dec 14, 2012 4:11 am    Post subject: Reply with quote

Anyone have any ideas? I've tried going up udev versions, I've moved bin and usr back to the root fs, but I am still not getting my devices created! Really could use some help!
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2970
Location: Germany

PostPosted: Fri Dec 14, 2012 2:06 pm    Post subject: Reply with quote

I merged my root partition into my usr partition, and my initramfs only activates and mounts the new rootusr-LV. The other LVs will then be enabled and mounted by the main system after Initramfs is done.

Code:

lvm lvchange -a y lvm/root
mount -o ro /dev/mapper/lvm-root /root || mount -o ro /dev/lvm/root /root || rescue_shell
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