You are not logged in.

#1 2008-11-16 16:35:40

deepspawn
Member
Registered: 2008-11-16
Posts: 5

Archlinux + LVM2, kinit can't mount root [SOLVED]

Well I have just really broke my slackware install, not unusable but to set it right It would need to install everything
again so I decided to give Arch Linux a try.

My install method was to install using my running slackware install, setup lv, mount, setup the base system using static pacman, and finish the install under
chroot. Everything went fine, I did setup almost everything and I can use my Arch install from the chroot.

Now the problems comes when booting, kinit fails with:

cannot open root device dm-4(254,4)

So here are  what I consider relevant parts of my setup, correct me please if I'm wrong.

GRUB Config

title  Arch Linux  [/boot/vmlinuz26]
root   (hd0,0)
kernel /vmlinuz26 root=/dev/mapper/root-archroot  resume=/dev/mapper/root-swap ro vga=773
initrd /kernel26.img

Now the mkinitcpio.conf

HOOKS="base udev autodetect sata lvm2 filesystems"

I run mkinitcpio like this:

#mkinitcpio -p kernel26

And in rc.conf I have

USELVM="yes"

Now when I  boot with break, everything is there, I even can mount dm-4 and chroot and do some stuff there
I can't be sure, but everything I have done looks like it's some kind of problem with kinit.

I have check all the other threads in the forum and I have checked that my problem while it looks similar it's different.
The filesystems hook does it work and sets the proper values and the kinit call looks how it should look with my setup.

I run pretty much the same setup with Slackware but I don't use initcpio,I use a plainold mkinitrd image but it works perfectly, I would like to solve this otherwise I'm going to be forced to ditch ArchLinux and stick with Slack.


Thank you in advance.

Last edited by deepspawn (2008-11-16 22:47:45)

Offline

#2 2008-11-16 16:56:41

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

Re: Archlinux + LVM2, kinit can't mount root [SOLVED]

You're sure that when you run mkinitcpio is in /etc/mkinitcpio.conf? (If not, use -c to point to the right file).
I've had this in the past when my dm_crypt/lvm did not bring up my volumes correctly (my own mistake), or when I misconfigured grub.  Your menu.lst looks fine though, maybe this can help you: http://wiki.archlinux.org/index.php/Lvm


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#3 2008-11-16 17:09:07

deepspawn
Member
Registered: 2008-11-16
Posts: 5

Re: Archlinux + LVM2, kinit can't mount root [SOLVED]

I'm sure, I have "traced" the boot process and everything looks fine.

What I'm guessing is that the kinit is wrong, I think I'm gonig to recompile it to see what happens.

For the wiki pages around LVM I have read those, also I know my way trough LVM and the kernel boot process, but now I'm kinda lost with
kinit since it's my first time using it.

Well I'll try to solve this the usual way, reading the source and I'll post if I find something.

Thank you anyway for replying

Offline

#4 2008-11-16 22:51:34

deepspawn
Member
Registered: 2008-11-16
Posts: 5

Re: Archlinux + LVM2, kinit can't mount root [SOLVED]

OK, I figured out everything.

Well take a look at my grub config:


kernel /vmlinuz26 root=/dev/mapper/root-archroot  resume=/dev/mapper/root-swap ro vga=773

As you can see my volume group name was "root", big mistake when running arch and kinit.

On some live cd with lvm2

vgchange -an (deactivate)
vgrename root base

Modify the configuration to the new volume group name and that's all.


I hope my experience saves someone time. Just remember to avoid root(I'm sure there are other "reserved" names) as lv or vg name.

Offline

#5 2008-11-17 09:20:27

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

Re: Archlinux + LVM2, kinit can't mount root [SOLVED]

Good catch.  Didn't see that one coming.  And welcome to Arch :-)


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

Board footer

Powered by FluxBB