You are not logged in.

#1 2009-09-05 15:35:14

Nando
Member
From: Belgium
Registered: 2006-03-04
Posts: 14

Issue after kernel compilation

I've compiled my own kernel based on the arch linux default kernel its configuration file. I simply executed  make clean &&  make dep && make modules && make bzImage && make modules_install. Afther the depmod I've built a ramdisk with mkinitcpio.Unfortunately I'm not able to boot into my new self-compiled kernel. Here you can see my /boot/grub/menu.lst:

 # (0) Arch Linux Self-compiled kernel
title   Linux 2.6.30.5 [/boot/vmlinuz-2.6.30.5]
root   (hd0,0)                                 
kernel /vmlinuz-2.6.30.5 root=/dev/sda3 ro
initrd /kerneltest.img

# (0) Arch Linux
title  Arch Linux  [/boot/vmlinuz26]
root   (hd0,0)
kernel /vmlinuz26 root=/dev/sda3 ro
initrd /kernel26.img

While booting into the new kernel the next error message about the root device shows up. I've noticed I'm able to boot the default arch kernel that's using the same root device (=/dev/sda3) on this desktop.

Waiting 10 seconds for device /dev/sda3
Root device /dev/sda3 doesnt exist, attempting to create it
Error: Failed to parse block device ids for /dev/sda3
Error: Unable to detect or create root devide /dev/sda3

If you would like to see my partitions:

/dev/sda1 /boot ext2 defaults 0 1
/dev/sda2 swap swap defaults 0 0
/dev/sda3 / ext4 defaults 0 1
/dev/sda4 /home ext4 defaults 0 1

Who can help me with this issue? Thanks.

Last edited by Nando (2009-09-05 15:40:04)

Offline

#2 2009-09-05 20:23:30

thn81
Member
Registered: 2009-08-27
Posts: 88

Re: Issue after kernel compilation

Hi,
what did you change in your custom kernel configuration (in comparison with arch standard kernel)? Please look at the kernel messages when you boot your new kernel and see if your harddisks are detected. There should be messages starting with "scsi", "sd" and "Direct Access ATA", if you have SATA harddisks.
If your custom kernel cannot find the root filesystem device, the correct SATA driver might be missing or the device names changed.

Bye, thn81

Offline

#3 2009-09-06 02:52:05

djszapi
Member
From: Cambridge, United Kingdom
Registered: 2009-06-14
Posts: 1,439
Website

Re: Issue after kernel compilation

Hello!

"I've noticed I'm able to boot the default arch kernel that's using the same root device (=/dev/sda3) on this desktop." <- Is the menu.lst the same when you try it with your kernel and the default arch kernel ?

Offline

#4 2009-09-06 15:35:03

Nando
Member
From: Belgium
Registered: 2006-03-04
Posts: 14

Re: Issue after kernel compilation

thn81 wrote:

Hi,
what did you change in your custom kernel configuration (in comparison with arch standard kernel)? Please look at the kernel messages when you boot your new kernel and see if your harddisks are detected. There should be messages starting with "scsi", "sd" and "Direct Access ATA", if you have SATA harddisks.
If your custom kernel cannot find the root filesystem device, the correct SATA driver might be missing or the device names changed.

Bye, thn81

Uhm, I've started with:

zcat /proc/config.gz > .config  && mv .config /usr/src/linux-2.6.30

Then I just added a few lines.

I think the device names changed in this new kernel.

Offline

#5 2009-09-06 15:48:59

thn81
Member
Registered: 2009-08-27
Posts: 88

Re: Issue after kernel compilation

You can interrupt the boot process after the kernel and the initrd have been started by adding a "break=y" to your kernel command line in GRUB. One of the last boot bessages then should be a list of disk devices and the partitions on them the kernel has found. One of them is probably your root file system.

Offline

#6 2009-09-06 18:25:11

Nando
Member
From: Belgium
Registered: 2006-03-04
Posts: 14

Re: Issue after kernel compilation

thn81 wrote:

You can interrupt the boot process after the kernel and the initrd have been started by adding a "break=y" to your kernel command line in GRUB. One of the last boot bessages then should be a list of disk devices and the partitions on them the kernel has found. One of them is probably your root file system.

I've booted into my self-compiled kernel with a break=y option and unfortunately nor disk devices or partitions were listed. After a  shell came up I noticed there weren't sda entries in my /dev in my new kernel. I simply executed:

cd /dev
echo * (this is the replacement of `ls`)

I'm comparing the .config files of the two differents kernels now.

5 root@archlinux $ diff /usr/src/linux-2.6.30.5/.config /usr/src/linux-2.6.30-ARCH/.config                                                
3,4c3,4                                                              
< # Linux kernel version: 2.6.30.5                                   
< # Fri Sep  4 00:49:40 2009                                         
---
> # Linux kernel version: 2.6.30
> # Mon Aug 17 16:49:59 2009
4041a4042,4052
> CONFIG_AUFS_FS=m
> CONFIG_AUFS_BRANCH_MAX_127=y
> # CONFIG_AUFS_BRANCH_MAX_511 is not set
> # CONFIG_AUFS_BRANCH_MAX_1023 is not set
> # CONFIG_AUFS_BRANCH_MAX_32767 is not set
> CONFIG_AUFS_HINOTIFY=y
> CONFIG_AUFS_EXPORT=y
> CONFIG_AUFS_SHWH=y
> CONFIG_AUFS_BR_RAMFS=y
> # CONFIG_AUFS_DEBUG is not set
> CONFIG_AUFS_BDEV_LOOP=y

I've posted the kernel .configs on pastebin.

http://pastebin.ca/1556323 Kernel config of my self-compiled kernel that doesn't boot
http://pastebin.ca/1556324: Kernel config of default arch kernel

My self-compiled kernel its .config file is 11 lines (449 lines vs 460 lines) shorter and it doesn't contain anything about "AUFS". (advanced multi layered unification filesystem). I suppose this is causing the issue.

I'm about to compile a new kernel with a modified .config according to this need, but I'm waiting for a confirmation (or a denial?) for the above mentioned statement.
At any rate thanks for the replies.

Last edited by Nando (2009-09-06 18:33:47)

Offline

#7 2009-09-06 18:44:32

Knute
Member
From: Minot, ND
Registered: 2009-03-17
Posts: 604

Re: Issue after kernel compilation

One thing that I noticed is that your EXT4_FS is set as a module rather than being built in.  It's in both configs,  so perhaps, when you were building your initrd, you forgot to have EXT4 loaded.


Knute

Offline

#8 2009-09-06 19:42:21

mntester
Member
Registered: 2007-12-09
Posts: 13

Re: Issue after kernel compilation

Nando, please post your results as I am having a similar issue recompiling with kernel  2.6.30.5. I am using EXT3 FS though and an lvm volume for mounting /.

Offline

#9 2009-09-06 20:18:21

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

Re: Issue after kernel compilation

You could also compare the contents of your custom initramfs image and the stock one - it's a gzipped cpio archive.

Offline

#10 2009-09-07 17:29:59

Nando
Member
From: Belgium
Registered: 2006-03-04
Posts: 14

Re: Issue after kernel compilation

I've compiled a new kernel but the same issue remains. sad I executed some important changes in my kernel config: CONFIG_SCSI=y, CONFIG_ATA=y, CONFIG_EXT4_FS=y  (instead of being modular as in the default arch linux kernel). I also inserted the "aufs" lines, but they were gone in my .config file after the kernel compilation.(I think it was after make dep)

A "diff" of both .config reveals that aufs is almost the only difference. (I've already mentioned the stuff that used to be modular and is now built-in.)


3 root@archlinux $ diff /usr/src/linux-2.6.30.5/.config /usr/src/linux-2.6.30-ARCH/.config                                                
3,4c3,4                                                              
< # Linux kernel version: 2.6.30.5                                   
< # Mon Sep  7 10:35:44 2009                                         
---                                                                  
> # Linux kernel version: 2.6.30                                     
> # Mon Aug 17 16:49:59 2009                                         
1269c1269                                                            
< CONFIG_SCSI=y                                                      
---                                                                  
> CONFIG_SCSI=m                                                      
1418c1418                                                            
< CONFIG_ATA=y                                                       
---                                                                  
> CONFIG_ATA=m                                                       
3905c3905                                                            
< CONFIG_EXT4_FS=y                                                   
---                                                                  
> CONFIG_EXT4_FS=m                                                   
3912c3912                                                            
< CONFIG_JBD2=y                                                      
---                                                                  
> CONFIG_JBD2=m                                                      
3914c3914                                                            
< CONFIG_FS_MBCACHE=y                                                
---                                                                  
> CONFIG_FS_MBCACHE=m                                                
4041a4042,4052                                                       
> CONFIG_AUFS_FS=m
> CONFIG_AUFS_BRANCH_MAX_127=y
> # CONFIG_AUFS_BRANCH_MAX_511 is not set
> # CONFIG_AUFS_BRANCH_MAX_1023 is not set
> # CONFIG_AUFS_BRANCH_MAX_32767 is not set
> CONFIG_AUFS_HINOTIFY=y
> CONFIG_AUFS_EXPORT=y
> CONFIG_AUFS_SHWH=y
> CONFIG_AUFS_BR_RAMFS=y
> # CONFIG_AUFS_DEBUG is not set
> CONFIG_AUFS_BDEV_LOOP=y
4427c4438
< CONFIG_CRC16=y
---
> CONFIG_CRC16=m

I've built an own ramdisk again with mkinitcpio, but I'm using the default kernel26.img

/boot/grub/menu.lst:

# (0) Arch Linux
title  Arch Linux  [/boot/vmlinuz26]
root   (hd0,0)                      
kernel /vmlinuz26 root=/dev/sda3 ro
initrd /kernel26.img

# (0) Arch Linux
title  Arch Linux  [/boot/vmlinuz2-6-30.5]
root   (hd0,0)
kernel /vmlinuz-2.6.30.5-nando root=/dev/sda3 ro
initrd /kernel26.img

Last edited by Nando (2009-09-07 17:38:21)

Offline

#11 2009-09-07 17:43:25

thn81
Member
Registered: 2009-08-27
Posts: 88

Re: Issue after kernel compilation

Setting CONFIG_SCSI=y and CONFIG_ATA=y is not enough, you need at least to say "y" to "SCSI disk support" (CONFIG_BLK_DEV_SD) and pick the appropriate ATA/SATA Driver. That would be CONFIG_SATA_AHCI for generic AHCI support and CONFIG_ATA_PIIX for specific Intel chipset support. You can look up all the required modules when booting the Arch stock kernel, interrupt it with "break=y" and do "lsmod" at the shell prompt. All modules listed there must be built into the kernel if you want to boot without an initrd.

Offline

Board footer

Powered by FluxBB