You are not logged in.

#1 2014-03-28 19:26:48

kageurufu
Member
Registered: 2013-04-01
Posts: 17

[SOLVED]Custom kernel failing to boot, citing missing modules.devname.

I compiled linux-ck myself, using the PKGBUILD from the aur.

After I build, and install, when I try to boot it fails to mount my LVM, and gives an error stating /lib/modules/3.13.7-1-ck/modules.devname does not exist

That file does exists, it contains

# Device nodes to trigger on-demand module loading.
microcode cpu/microcode c10:184
fuse fuse c10:229
cuse cuse c10:203
btrfs btrfs-control c10:234
loop loop-control c10:237
tun net/tun c10:200
ppp_generic ppp c108:0
uinput uinput c10:223
dm_mod mapper/control c10:236
hci_vhci vhci c10:137
uhid uhid c10:239
vhost_net vhost-net c10:238
snd_timer snd/timer c116:33
snd_seq snd/seq c116:1

It then fails, drops to a recovery console, and does not respond to keyboard.

I dont have anything special in my /etc/mkinitcpio.conf or /etc/mkinitcpio/linux-ck.preset

For posterity, here are some outputs

cat linux-ck.preset
# mkinitcpio preset file for the 'linux-ck' package

ALL_config="/etc/mkinitcpio.conf"
ALL_kver="/boot/vmlinuz-linux-ck"

PRESETS=('default' 'fallback')

#default_config="/etc/mkinitcpio.conf"
default_image="/boot/initramfs-linux-ck.img"
#default_options=""

#fallback_config="/etc/mkinitcpio.conf"
fallback_image="/boot/initramfs-linux-ck-fallback.img"
fallback_options="-S autodetect"
cat /etc/mkinitcpio.conf | grep -v \^#
MODULES="uinput"
BINARIES=""
FILES=""
HOOKS="base udev autodetect modconf block lvm2 filesystems keyboard fsck shutdown efistub-update"
cat /boot/efi/EFI/refind/refind.conf | grep -v \^#
timeout 20
scan_all_linux_kernels

core/linux boots fine

Any ideas?

Last edited by kageurufu (2014-04-09 16:00:54)

Offline

#2 2014-03-28 20:51:05

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: [SOLVED]Custom kernel failing to boot, citing missing modules.devname.

Just out of curiosity, if you use a pre-compiled linux-ck package from my repo, does your system boot?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2014-03-30 15:49:44

kageurufu
Member
Registered: 2013-04-01
Posts: 17

Re: [SOLVED]Custom kernel failing to boot, citing missing modules.devname.

Sorry it took so long, just tested and no. I'm thinking its an issue with rEFInd at this point, I might try switching to grub-efi (or chainloading that from refind to test) to see what happens

Same results

Offline

#4 2014-03-30 16:18:19

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: [SOLVED]Custom kernel failing to boot, citing missing modules.devname.

If it gets past the rEFInd screen, rEFInd is done and out of hte picture.  It has done its job and passed control of the machine on to the kernel.  It is then the kernel's job to reinitialize the necessary hardware to get the root filesystem mounted and run /sbin/init.  In the case of Arch, we use an initramfs to provide the necessary modules for the kernel to find the rootfs and recognize its partition type.

So I think the issue probably exists in your initramfs somehow.  It says that it is looking for /lib/modules... but in your initramfs does /lib point to /usr/lib as it should?  Use lsinitcpio to dump a list of files included in your initramfs.

I also see that you are using mkinitcpio to copy things onto your ESP.  I don't think that you should use this in the main config.  I see there being a potential problem when you update the initramfs and it runs this hook when it hasn't even actually finished generating the initramfs it is trying to copy.  If anything, you should put this addition in /etc/mkinitcpio.d/linux-ck.preset.  Add it to the last line so that it then says:

fallback_options="-S autodetect -A efistub-copy" 

Even then I am not convinced that is the best solution to the issue of getting the kernel and initramfs on the ESP.  Being a rEFInd user, you should know that Rod has included a number of basic filesystem drivers that can be loaded by rEFInd and enable it to find kernels and initramfs' on other partitions.  Making use of that functionality seems like it would be mar more sane than trying to have mkinitcpio copy itself while generating itself.

Offline

#5 2014-03-30 19:43:28

kageurufu
Member
Registered: 2013-04-01
Posts: 17

Re: [SOLVED]Custom kernel failing to boot, citing missing modules.devname.

At this point, I dont even use that hook, i just forgot to take it out. It did wait until the generation was complete though. But I just let rEFInd scan my boot partition and boot directly that way, should I be writing a custom config? What I have at the moment is

cat /boot/refind_linux.conf
"Boot with Boot Screen"        "rw root=/dev/mapper/frank-root quiet splash"
"Boot to single user mode"    "rw root=/dev/mapper/frank-root   single"

lsinitcpio shows the same for output for both initramfs-linux.img and initramfs-linux-ck.img

It shows /lib and /usr/lib, but shows nothing related to linking between them. Here is the output of lsinitcpio initramfs-linux-ck.img
http://pastebin.com/j2rj2JKJ

Offline

#6 2014-04-07 15:56:46

kageurufu
Member
Registered: 2013-04-01
Posts: 17

Re: [SOLVED]Custom kernel failing to boot, citing missing modules.devname.

So, when I extract my initramfs (i've since updated from 3.13.7-1 to 3.13.9-1) I see /lib/modules/3.13.9-1-ck/modules.devname with the following contents

# Device nodes to trigger on-demand module loading.
uinput uinput c10:223
dm_mod mapper/control c10:236

When I extract just initramfs-linux.img, I see 3.13.8-1-ARCH/modules.devname with the exact same contents

/lib and /lib64 both are symlinks to /usr/lib for both kernels.

Offline

#7 2014-04-09 16:21:37

kageurufu
Member
Registered: 2013-04-01
Posts: 17

Re: [SOLVED]Custom kernel failing to boot, citing missing modules.devname.

Found the issue. When you have multiple kernels in your /boot, and you are using scan_all_linux_kernels in rEFInd, it can use the wrong initramfs for the kernel. It was using initramfs-linux.img for both vmlinuz-linux and vmlinuz-linux-ck. By disabling scan_all_linux_kernels and manually writing configuration for boot for each kernel in EFI/refind/refind.conf

menuentry "Arch" {
  icon EFI/refind/icons/os_arch.icns
  ostype Linux
  graphics on
  volume boot
  loader /vmlinuz-linux-ck
  initrd /initramfs-linux-ck.img
  options "rw root=/dev/mapper/frank-root quiet splash elevator=bfq"
  submenuentry "Hide boot splash" {
    options "rw root=/dev/mapper/frank-root"
  }
  submenuentry "Single User Mode" {
    options "rw root=/dev/mapper/frank-root single"
  }
  submenuentry "Fallback Mode" {
    options "rw root=/dev/mapper/frank-root"
    initrd /initramfs-linux-ck-fallback.img
  }
  submenuentry "Default kernel - Normal Boot" {
    options "rw root=/dev/mapper/frank-root quiet splash"
    loader /vmlinuz-linux
    initrd /initramfs-linux.img
  }
  submenuentry "Default kernel - Hide Boot Splash" {
    options "rw root=/dev/mapper/frank-root quiet splash"
    loader /vmlinuz-linux
    initrd /initramfs-linux.img
  }
  submenuentry "Default kernel - Single User Mode" {
    options "rw root=/dev/mapper/frank-root single"
    loader /vmlinuz-linux
    initrd /initramfs-linux.img
  }
  submenuentry "Default kernel - Fallback Mode" {
    options "rw root=/dev/mapper/frank-root"
    loader /vmlinuz-linux
    initrd /initramfs-linux-fallback.img
  }
}

made it work properly. It also gives me a nice single icon on boot with all my possible boot options. I also added scanfor internal,external,optical,manual to my refind.conf to allow it to boot to CDs or USB devices.

Offline

Board footer

Powered by FluxBB