You are not logged in.

#1 2008-01-13 03:26:48

blu3ness
Member
From: Edmonton, Canada
Registered: 2007-12-28
Posts: 169

[SOLVED] Custom Kernel failed to boot

Hello everyone, this is my first time compiling my own kernel,  I was afraid of breaking the base system so I followed the guides on the wiki

http://wiki.archlinux.org/index.php/Ker … n_with_ABS
http://wiki.archlinux.org/index.php/Cus … n_with_ABS


:: Running Hook [filesystems]
:: Loading root filesystem module...

ERROR: Failed to parse block device name for '/dev/sda4'
ERROR: root fs cannot be detected. Try using the rootfstype= kernel paramter.
ERROR: Unable to create/detect root device '/dev/sda4'

I have tried to make an intrid by makeinitcpio -k <my kernel version> -g kernel-SLAB.img but that didn't really do anything.
So I'm just wondering where I have done wrong, the kernel error messages are pertty cryptic so I have no idea, I would really appreciate any help I can get right now.

Here's a list of the files that I have used or related to this problem. Thanks all!
*PKGBUILD
http://www.ualberta.ca/~blu2/kernel26/PKGBUILD
*kernel config file
http://www.ualberta.ca/~blu2/kernel26/config
*GRUB menu.lst
http://www.ualberta.ca/~blu2/kernel26/menu.lst
*mkinitcpio conf
http://www.ualberta.ca/~blu2/kernel26/mkinitcpio.conf
*RC.conf
http://www.ualberta.ca/~blu2/kernel26/rc.conf

Update, HELP NEEDED

To be on the safe side, I decided not to apply any EXTRA patch at all, so I used the kernel26 from /var/abs/core/base/kernel26, ONLY changing the package name and the features I wanted, (I changed the generic m686 MARCH to MK8 (amd semperon processor) and KEPT everything else as is to the .config file in /usr/src/linux-2.6.23.12-ARCH/.config

The package compiled fine but again, but I can't boot properly, giving the same error as previous attempts. The mkinitcpio generated an image that I can boot with the original kernel that came with Arch, but not the kernel I compiled.

I noticed that during boot, when loading udev, for the original kernel, there's a lot of messages showing modules being detected etc., but for my compiled kernel, there's only one message loading the PS2 keyboard, and nothing else, the HOOK filesystem was ran immediately after that. Is there anyway to capture those initial boot messages? Thanks!

I'm not sure what I am doing wrong. Any help is appreciated.

Update

Kernel sucessfully compiled with the help of fwojciec, thank you. smile

Last edited by blu3ness (2008-01-15 05:42:38)


Archlinux on Compaq Presario v5000 laptop smile

Offline

#2 2008-01-13 03:52:48

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: [SOLVED] Custom Kernel failed to boot

It's difficult to say what is wrong, especially since I don't know how you compiled your kernel, but this error means essentially that the kernel image (the one that is generated by mkinitcpio) is unable to create/detect the root device for your /dev/sda4 partition.  In other words some module that's required in order to create/detect it is not included in the kernel image generated by the mkinitcpio -- that would be my guess.

First of all -- if it's true what you're saying that mkinitcpio command didn't do anything then you're doing something wrong and this is probably the source of the problem.

I don't know if this helps, but I've found that for my reiserfs partitions I need to include the "reiserfs" module in the modules section of mkinitcpio.conf in order for the image to work correctly -- otherwise I get errors that look exactly like the one you're experiencing.  The fix is always to (re)generate a working image using mkinitcpio.

Offline

#3 2008-01-13 04:22:22

blu3ness
Member
From: Edmonton, Canada
Registered: 2007-12-28
Posts: 169

Re: [SOLVED] Custom Kernel failed to boot

Hello, thank you for your input, however, there's no specific instruction on how to compile the img file (mkinitcpio) for custom kernels, I'm not sure if there's an error with how I entered the command for mkinitcpio

so basically, do I just add the modules i need in the conf file and then run mkinitcpio again?

Is there any guideline on this? (yes i have red the wiki, it helped a bit, but not entirely)

Last edited by blu3ness (2008-01-13 04:24:17)


Archlinux on Compaq Presario v5000 laptop smile

Offline

#4 2008-01-13 04:36:04

fwojciec
Member
Registered: 2007-05-20
Posts: 1,411

Re: [SOLVED] Custom Kernel failed to boot

I can only really tell you how I do it -- I'm not exactly an expert with in-depth knowledge of how kernel works wink 

The way I compile the kernel is by adapting the PKGBUILD for the current kernel from the ABS.  I use the script from this thread (http://bbs.archlinux.org/viewtopic.php?id=34815) to rename the kernel and add "make menuconfig" command to the PKGBUILD; I also manually add some patches.  If you want to use this script be careful: is a bit old and last time I've tried it changed "kernel26" to kernel26-[myname] in few some source addresses which obviously was not good but also not really difficult to fix. 

When I compile the kernel like this I can just do "mkinitcpio -p kernel26-[myname]" and this generates the image without any problems.

Sorry -- that's the best answer I can give you.  Perhaps somebody else will have ideas what needs to be done using your method to get the kernel to work.  Maybe just looking at the script will give you some ideas...

Offline

#5 2008-01-13 07:18:54

blu3ness
Member
From: Edmonton, Canada
Registered: 2007-12-28
Posts: 169

Re: [SOLVED] Custom Kernel failed to boot

Hey all tongue, I decided to recompile my kernel with the vanilla ABS kernel (still going right now). Applying those patchsets are a pain in the ass sad, the fallen patchset along with 2.6.22.15 kernel always results in an error in makepkg, which got me wondering, how can I know what error is causing makepkg to fail? is there  a more verbose output?

Thanks!


Archlinux on Compaq Presario v5000 laptop smile

Offline

#6 2008-01-13 18:44:18

blu3ness
Member
From: Edmonton, Canada
Registered: 2007-12-28
Posts: 169

Re: [SOLVED] Custom Kernel failed to boot

Compiled about 3 kernels now, I have also tried to use the /var/abs/core/base/kernel26/ PKGBUILDs, the compiled kernels still won't boot, giving the same error, I included just about every module i can think of in my mkinitcpio.conf just to be safe, it still won't boot, anyone help? sad

here's my mkinitcpio conf file, P.S.: I use ext2 for /boot and ext3 for /.

MODULES="ata_generic ide_disk pata_atiixp reiserfs"
FILES=""
HOOKS="base udev autodetect pata ide usbinput keymap resume filesystems"

Last edited by blu3ness (2008-01-13 18:44:42)


Archlinux on Compaq Presario v5000 laptop smile

Offline

#7 2008-01-13 21:40:51

blu3ness
Member
From: Edmonton, Canada
Registered: 2007-12-28
Posts: 169

Re: [SOLVED] Custom Kernel failed to boot

Any help? still not working sad


Archlinux on Compaq Presario v5000 laptop smile

Offline

#8 2008-01-13 21:48:51

_alexmyself
Member
From: france
Registered: 2005-09-18
Posts: 90

Re: [SOLVED] Custom Kernel failed to boot

you can compile with all needed modules inside the kernel and boot directly from it without using initrd stuff..
sorry, not kernel pro..  smile

Offline

#9 2008-01-13 21:55:52

blu3ness
Member
From: Edmonton, Canada
Registered: 2007-12-28
Posts: 169

Re: [SOLVED] Custom Kernel failed to boot

problem is I don't know why by just changing SLUB to SLAB, and changing the architecture, the kernel fails to boot sad


Archlinux on Compaq Presario v5000 laptop smile

Offline

Board footer

Powered by FluxBB