You are not logged in.

#1 2011-07-29 23:51:08

Katherine1
Member
Registered: 2011-05-02
Posts: 41

[Solved]Custom Kernel Panicking

I'm upgrading my zen-kernel to the latest revision from 2.6.38. Unfortunately when I try to boot the new kernel, I get:

Kernel Panic - not syncing: VFS: unable to mount root fs on unknown - block (8,8)

That (8,8) is mystifying, as the exact same grub2 settings for the old kernel work perfectly.

menuentry "Arch Linux 2.6.38.6-zen" {
    set root=(hd0,1)
    linux /vmlinuz26-zen root=/dev/sda8 ro rootfstype=ext4
}

I've checked. The SATA drivers are compiled into the kernel, and so are the EXT4 drivers. I'm thinking it has something to do with the fact that the kernel is looking at (8,8) instead of something more like (0,8). I'm not sure why it is doing that and don't know what to change to fix it.

By the way, yes. These kernels are both compiled to work without an initramfs, and all adding that on did was hide the kernel panic to just show an error that it couldn't mount sda8 as root.

Solution: the problem was correctly placing the .config file used in building the kernel.

Last edited by Katherine1 (2011-07-30 20:07:16)

Offline

#2 2011-07-30 00:26:46

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

Re: [Solved]Custom Kernel Panicking

Same problem on my box using linux package... solution, use uuids:

Example:

menuentry 'Arch Linux, with Linux vmlinuz26-ck' --class archlinux --class gnu-linux --class gnu --class os {
  load_video
  set gfxpayload=keep
  insmod gzio
  insmod part_gpt
  insmod ext2
  set root='(hd0,gpt5)'
  search --no-floppy --fs-uuid --set=root 1fc7ed20-0b1e-4e26-860c-6e63dd3a35ea
  echo  'Loading Linux vmlinuz26-ck ...'
  linux /vmlinuz26-ck root=/dev/disk/by-uuid/1f90540d-6153-48e3-a5e7-58f09b65c5cf ro  quiet
  echo  'Loading initial ramdisk ...'
  initrd  /kernel26-ck.img
}

Last edited by graysky (2011-07-30 01:35:06)


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

Offline

#3 2011-07-30 00:59:54

Katherine1
Member
Registered: 2011-05-02
Posts: 41

Re: [Solved]Custom Kernel Panicking

Changed entry to:

menuentry "Arch Linux 2.6.38.6-zen" {
    search --no-floppy --fs-uuid --set=root ecf6541b-4154-4cf7-a6eb-b4493fdd84de
    set root=(hd0,1)
    linux /vmlinuz26-zen root=/dev/sda8 ro rootfstype=ext4
}

Still didn't changed the kernel panic

Offline

#4 2011-07-30 01:35:30

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

Re: [Solved]Custom Kernel Panicking

@kath - sorry, I pasted the wrong line.  I edited by post to show you the correct one.  Hope it works for ya.


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

Offline

#5 2011-07-30 01:55:20

Katherine1
Member
Registered: 2011-05-02
Posts: 41

Re: [Solved]Custom Kernel Panicking

Changed grub to

menuentry "Arch Linux 2.6.38.6-zen" {
    set root=(hd0,1)
    linux /vmlinuz26-zen root=/dev/disk/by-uuid/ecf6541b-4154-4cf7-a6eb-b4493fdd84de rootfstype=ext4
    initrd kernel26-zen.img
}

Neither kernel will boot with that. The error for both kernels is

Kernel Panic - not syncing: VFS: unable to mount root fs on unknown - block (2,0)

EDIT: When the kernel lists the valid blocks, it gives all partition's uuids as all zeros. If that means I need to enable a config option when building the kernel, I'd like to know what it is.

EDIT2: I tried both with and without the initramfs for the working kernel, since that was the initramfs I had ready.

Last edited by Katherine1 (2011-07-30 02:07:04)

Offline

#6 2011-07-30 01:59:05

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

Re: [Solved]Custom Kernel Panicking

Not sure what to tell you hmm


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

Offline

#7 2011-07-30 07:18:25

skodabenz
Banned
From: Tamilnadu, India
Registered: 2010-04-11
Posts: 382

Re: [Solved]Custom Kernel Panicking

Katherine1 wrote:

Changed entry to:

menuentry "Arch Linux 2.6.38.6-zen" {
    search --no-floppy --fs-uuid --set=root ecf6541b-4154-4cf7-a6eb-b4493fdd84de
    set root=(hd0,1)
    linux /vmlinuz26-zen root=/dev/sda8 ro rootfstype=ext4
}

Still didn't changed the kernel panic

Where is the initrd line? Most of the kernels based on Archlinux kernel config do not include the fs modules inside the kernel image itself. You need to boot using a initramfs image which indlues all the required modules. Add the

initrd /kernel26-zen.img

line to the grub2 config.


My new forum user/nick name is "the.ridikulus.rat" .

Offline

#8 2011-07-30 07:21:07

skodabenz
Banned
From: Tamilnadu, India
Registered: 2010-04-11
Posts: 382

Re: [Solved]Custom Kernel Panicking

Katherine1 wrote:

EDIT2: I tried both with and without the initramfs for the working kernel, since that was the initramfs I had ready.

Generate a initramfs specific to kernel26-zen kernel. Initramfs for any one kernel will not work with another kernel. Try (with latest mkinitcpio release)

sudo mkinitcpio -p kernel26-zen

My new forum user/nick name is "the.ridikulus.rat" .

Offline

#9 2011-07-30 13:14:25

Katherine1
Member
Registered: 2011-05-02
Posts: 41

Re: [Solved]Custom Kernel Panicking

I have an initramfs already, and including it did not help. This is a custom kernel, and the fs stuff is compiled directly in the kernel. No modules ever get loaded in the initramfs because there are no modules.

Here's the config: http://pastebin.com/C5MBvVCa

Last edited by Katherine1 (2011-07-30 13:24:53)

Offline

#10 2011-07-30 18:54:00

Katherine1
Member
Registered: 2011-05-02
Posts: 41

Re: [Solved]Custom Kernel Panicking

Okay, the problem is clearly the AUR package. I build the kernel manually and it works perfectly. The problem with this is that without the AUR package, I don't know how to generate the kernel headers package, which I need for some things to work. My guess is that the AUR package replaces my config with the default config, making an unbootable kernel.

Now to figure out how to make the AUR package use my config.

This is the AUR package I'm using: http://aur.archlinux.org/packages.php?ID=49554

EDIT: I think I found the problem. The AUR package doesn't want the config in with the src where it usually resides, but in a different directory altogether. Building the new kernel now.

EDIT2: I can't figure out where to place the config so that it is used during build. It looks like it wants it at src/build/.config, but placing it there does not produce a kernel identical to one manually built with make.

Last edited by Katherine1 (2011-07-30 19:43:57)

Offline

Board footer

Powered by FluxBB