You are not logged in.

#1 2006-10-19 14:06:17

firedance
Member
From: Stockholm, Sweden
Registered: 2005-04-18
Posts: 131

Self-compiled kernel wont boot [solved]

Hey, I compiled a kernel yesterday using the PKGBUILD from http://wiki.archlinux.org/index.php/Ker … n_with_ABS
All went fine, i made a init thing with mkinitcpio -g /boot/mykernel.img -k 2.6.18.1-mykernel and it went fine, i added it to menu.lst (grub) and rebooted,
at first it says it can't parse block device name for '/dev/sda6' (wich is my root partition) then i added rootfstype=ext3/ext2 (I tried both since i know i have one of them but cfdisk shows amoeba =/ )
but i still get the error 'cannot open root device dev(0,0)' (and also 'kinit: init not found') and then a kernel panic.

This is the boot part of menu.lst for the kernel

title [Arch mykernel]
root (hd0,0)
kernel /vmlinuz-2.6.18.1-mykernel root=/dev/sda6 rootfstype=ext3 ro
initrd /mykernel.img

and this is the hook line from mkinitcpio.conf (all other lines where either comments or ="" so i decided to exclude them).

HOOKS="base udev autodetect usb ide scsi sata filesystems"

also, i have some trouble with ata2.01 "qc timeout (cmd 0xa1)" something, is there a way to save the output of a boot?

--SOLVED--
I forgot -ARCH in the mkinitcpio -k argument.

Offline

#2 2006-10-19 14:56:31

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Self-compiled kernel wont boot [solved]

To use mkinitcpio, your custom kernel should have all the required filesystem and disk controller support compiled as modules, not built in to the kernel. Did you do that?

Offline

#3 2006-10-19 15:25:19

firedance
Member
From: Stockholm, Sweden
Registered: 2005-04-18
Posts: 131

Re: Self-compiled kernel wont boot [solved]

tomk wrote:

To use mkinitcpio, your custom kernel should have all the required filesystem and disk controller support compiled as modules, not built in to the kernel. Did you do that?

I did compile ext2 into the kernel. Is there a way to compile it as a module also?

Offline

#4 2006-10-19 17:16:23

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Self-compiled kernel wont boot [solved]

In the mkinitcpio context, "required" means "required to boot your system". If you need ext2 at boot time, you need to rebuild with ext2 as a module.

Offline

#5 2006-10-19 17:46:40

firedance
Member
From: Stockholm, Sweden
Registered: 2005-04-18
Posts: 131

Re: Self-compiled kernel wont boot [solved]

tomk wrote:

In the mkinitcpio context, "required" means "required to boot your system". If you need ext2 at boot time, you need to rebuild with ext2 as a module.

I do feel as you are treating me like i would treat an idiot  :?

I managed to compile only the ext2 (and usb-storage) as a module by doing make menuconfig and then make modules and make modules_install (I'm not sure if that's so smart tho if i load a module thats also in the kernel)

The problem was that i was using mkinitcpio -k 2.6.18.1-mykernel instead of -k 2.6.18.1-mykernel-ARCH, when i used the right parameter it started complaining about missing modules.

Offline

#6 2006-10-19 17:53:50

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Self-compiled kernel wont boot [solved]

firedance wrote:
tomk wrote:

In the mkinitcpio context, "required" means "required to boot your system". If you need ext2 at boot time, you need to rebuild with ext2 as a module.

I do feel as you are treating me like i would treat an idiot  :?

I didn't get that impression - I took it as him clarifying his own statement... he said "all required modules" and then clarified what he meant by "required modules" - I've never known tomk to be mean-spirited

Offline

#7 2006-10-19 18:13:57

firedance
Member
From: Stockholm, Sweden
Registered: 2005-04-18
Posts: 131

Re: Self-compiled kernel wont boot [solved]

phrakture wrote:
firedance wrote:
tomk wrote:

In the mkinitcpio context, "required" means "required to boot your system". If you need ext2 at boot time, you need to rebuild with ext2 as a module.

I do feel as you are treating me like i would treat an idiot  :?

I didn't get that impression - I took it as him clarifying his own statement... he said "all required modules" and then clarified what he meant by "required modules" - I've never known tomk to be mean-spirited

Okay, then no offence taken  smile
Now i just have to figure how to compile the small hello-world program found at
http://www.faqs.org/docs/kernel/x145.html

Offline

#8 2006-10-19 18:32:51

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Self-compiled kernel wont boot [solved]

firedance wrote:

I do feel as you are treating me like i would treat an idiot  :?

Perhaps somebody else should help you, in that case. roll
I answered you original post with the understanding that you had chosen to use mkinitcpio, and were therefore familiar with the way it worked. Your follow-up suggested that this might not be the case, so I clarified my original answer.

firedance wrote:

I'm not sure if that's so smart tho if i load a module thats also in the kernel

Given your previous reaction, I won't comment on whether it's smart or not - I will simply say that it won't work.

firedance wrote:

when i used the right parameter it started complaining about missing modules.

Which missing modules did it complain about?

Offline

#9 2006-10-19 18:38:56

firedance
Member
From: Stockholm, Sweden
Registered: 2005-04-18
Posts: 131

Re: Self-compiled kernel wont boot [solved]

tomk wrote:
firedance wrote:

I do feel as you are treating me like i would treat an idiot  :?

Perhaps somebody else should help you, in that case. roll
I answered you original post with the understanding that you had chosen to use mkinitcpio, and were therefore familiar with the way it worked. Your follow-up suggested that this might not be the case, so I clarified my original answer.

firedance wrote:

I'm not sure if that's so smart tho if i load a module thats also in the kernel

Given your previous reaction, I won't comment on whether it's smart or not - I will simply say that it won't work.

firedance wrote:

when i used the right parameter it started complaining about missing modules.

Which missing modules did it complain about?

As topic states this is solved, it complained about usb-storage (wich i had compiled into the kernel) It didn't complain about ext2 since i had allready been messing around with the kernel and recompiled it with ext2 as a module. It did work to just do make modules and make modules_install for the usb-storage. But then again, maybe i was very lucky and accedently made it a module on the same time as making ext2 a module  big_smile
I will recompile the kernel tonight so i am sure it is with ext2 and usb-storage only as modules.

Offline

Board footer

Powered by FluxBB