You are not logged in.
Hello,
I've been using fedora at work for ~1 year now, so I'm relatively familial with it. I waned to install Arch as a learning process. However, I'm installing in on a KVM VM first and I've run into a problem. I've been using this guide but seem to have done something wrong. I was going to just re-install but the true goal here is the journey not the destination so I wanna see if I can fix it.
After following the guide I rebooted to try to start Arch and receive:
FATAL: Could not load /lib/modules/3.3.4-1-ARCH/modules.dep: No such file of directory
ERROR: Unable to determine major/minor number of root devices '/dev/mapper/vg_arch-lv_arch'.So far by mounting the / and /boot in the live cd I've:
Tried redoing the mkinitcpio.
mkinitcpio -c /mnt/etc/mkinitcpio.cof -g /mnt/boot/initramfs-linux.img
Tried chroot to /mnt and run depmod -a
Checked that modules.dep exist in the listed locatoin
That's about the end of the suggestions I've found so far. Once I have the root mounted I can go to /mnt/lib/modules/3.3.4-1-ARCH and there is a modules.dep. This leads me to believe I've got a problem with reading the LVM root partition during boot. What else can I do from here? I've exhausted google and the Arch Wiki and can't find anything else, though it's very likely I'm just not searching for the right things yet.
Thanks for the help.
Solution
Specifically on chroot check the section on mounting /proc /sys etc.
On mkinitcpio check the -k flag to specify the kernel version.
That has me up and running.
Last edited by CSanders (2012-05-03 12:43:04)
Offline
Did you forget to add the lvm2 hook to the initcpio?
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
I have the following two lines which I edited in /mnt/etc/mkinitcpio.cof before remaking it.
MODULES="virtio virtio_blk virtio_pci virtio_net"
HOOKS="base udev autodetect pata scsi sata filesystems usbinput lvm2"And just to be sure it was really "lvm2" and not "lvm" I tried with lvm and was told there was no such module.
Offline
So far by mounting the / and /boot in the live cd I've:
Tried redoing the mkinitcpio.
mkinitcpio -c /mnt/etc/mkinitcpio.cof -g /mnt/boot/initramfs-linux.img
Tried chroot to /mnt and run depmod -a
Checked that modules.dep exist in the listed locatoin
Initramfs images are kernel specific. What you've described above creates an image for the kernel on the liveCD, not the one in the root at /mnt. You need to chroot before running mkinitcpio (which will require that the API filesystems are mounted as well).
Offline
First you need to chroot into your installation, check the wiki.
After chrooting in, check /mnt/etc/mkinitcpio.conf .
Your hooks= line needs to have the correct hooks for your installation.
it should look similar to this :
HOOKS="base udev autodetect sata lvm2 filesystems fsck"After you checked/corrected that, run mkinitcpio -p linux FROM WITHIN the CHROOT to regenerate the initramfs'es.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
clean chroot building not flexible enough ?
Try clean chroot manager by graysky
Offline
Initramfs images are kernel specific. What you've described above creates an image for the kernel on the liveCD, not the one in the root at /mnt. You need to chroot before running mkinitcpio (which will require that the API filesystems are mounted as well).
So I was curious about this due to some other comments I head read while searching. I've found that in the live CD if I run
uname -rI get "3.0-ARCH", while the boot is properly looking for 3.3.4-1ARCH. Doesn't that indicate that it used the correct kernel?
Just in case it doesn't I tried doing a chroot to /mnt/ but when I try to run mkinitcpio it returns
ERROR: /proc must be mounted. I'm not sure what to do about this b/c /proc exists on the live CD but I'm not clear why my /mnt/proc is empty.
Offline
Offline
Have a read through this.
Actually, turns out I was reading that when you posted.
Here's where I'm stuck.
After mounting proc, sys, and dev I did the mkinitcpio but now I receive:
ERROR: '/lib/modules/3.0-ARCH/' is not a valid kernel module directoryWhich is accurate, because my /lib/modules is 3.3.4-1-ARCH.
So I checked for what could be setting that incorrectly with
grep -r "3.0-ARCH"Only thing I found was in etc/mkinitcpio.d/exmple.preset
But even in that file the line is commented out with #fallback_kver="3.0-ARCH".
I didn't think I was using any defaults since I specify the -c command to mkinitcpio.
Where is it getting this 3.0-ARCH kernel version from?
Offline
Ah HA!
Not done yet, but there is a -k option for mkinitcpio when making for a different kernel than the currently running one. Giving that a shot now, though I thought the chroot would change kernel too. Maybe not?
Offline
I think you're simply not chrooted in. After you've done the necessary mounts, make sure you're in /mnt/arch (or wherever you mounted your root) and then run.
# chroot . /bin/bashOnce you've done that, try regenerating the initramfs again.
PS: once you've chrooted in, you should see "3.3.4-1-ARCH" when running "uname -r"
Last edited by Gcool (2012-05-03 12:38:10)
Burninate!
Offline
Success!
So I did run
# chroot . /bin/bashI still had to use the -k command to mkinitcpio when generating it. But having done that I'm getting to a log in prompt!
Only error I see now is when booting I see this for a few seconds.
Error '/grub/i386-pc/ext4.mod' not foundI think I typed that correctly it moves on and gives a log in prompt from there.
Offline
PS: once you've chrooted in, you should see "3.3.4-1-ARCH" when running "uname -r"
So for some reason I don't.
I've marked this as solved as the issues is fixed, but I would be curious to know why I'm not seeing the expected behavior from chroot. I'm typing exactaly as you describe after mounting everything as in the the wiki. What else could I be missing?
I would also be curious why I'm seeing the grub error message above.
Offline
Don't know what I was thinking there, falconindy is absolutely right. The kernel loaded during boot (from your livecd) won't change all of a sudden because you've chrooted into another environment obviously. While chrooted into your existing install, a "mkinitcpio -p linux" should suffice. But nothing wrong with using the "-k" option to point to the actual kernel image.
As for the error you receive; there simply is no "ext4.mod" module (I take it you're using GRUB2 as your bootloader). Have you somehow specified this module to be loaded in yout bootloader config?
Burninate!
Offline