LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 09-12-2008, 04:41 PM   #1
corgi
LQ Newbie
 
Registered: Mar 2006
Location: Norway
Distribution: Debian Etch, HP nc6320 laptop
Posts: 23

Rep: Reputation: 15
Unhappy Custom compiled kernel will not boot


I recently changed from an HP nx6110 laptop to an HP nc6320. On the former I was running etch with a custom compiled 2.6.25 kernel.

I first set up the new laptop with LVM (and root on LVM), which worked fine initially. However, compiling a kernel from source newer than 2.6.18 simply did not work. The kernel would not boot.

I tried using kernel source from www.kernel.org (as I have previously done on a number of occasions), but the new kernel failed to boot with a message about not being able to find the volume group.

After googling around I found no satisfactory remedy and abandoned LVM.

I did a clean install and I now have a static partition scheme. However, compiling a custom kernel from source, either from www.kernel.org or using debian kernel sources, gives a similar result. This time the boot process stalls with a message about "waiting for root file system".

I have tried compiling according to the instructions found here (followed to the letter), but no success.

This is the way I have always done it, only now it doesn't work. What can be the problem?
 
Old 09-12-2008, 04:58 PM   #2
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,549

Rep: Reputation: 180Reputation: 180
One likely cause of the problem may be which modules you have made loadable. If you have made a module loadable which is needed to access / then the kernel cannot finish booting.

Another likely cause is that a module needed to access / is not compiled into the kernel at all, neither fixed nor loadable.

Do you have the proper driver for the HP nc6320 disk controller compiled into the fixed portion of the kernel? Do you have the proper driver for the / filesystem compiled into the fixed portion of the kernel? In reference to your LVM problem did you have the LVM module compiled into the fixed portion of the kernel?

--------------------
Steve Stites
 
Old 09-13-2008, 09:20 AM   #3
corgi
LQ Newbie
 
Registered: Mar 2006
Location: Norway
Distribution: Debian Etch, HP nc6320 laptop
Posts: 23

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by jailbait View Post
One likely cause of the problem may be which modules you have made loadable. If you have made a module loadable which is needed to access / then the kernel cannot finish booting.

Another likely cause is that a module needed to access / is not compiled into the kernel at all, neither fixed nor loadable.

Do you have the proper driver for the HP nc6320 disk controller compiled into the fixed portion of the kernel? Do you have the proper driver for the / filesystem compiled into the fixed portion of the kernel? In reference to your LVM problem did you have the LVM module compiled into the fixed portion of the kernel?
Steve Stites
First, thanks for taking the time to answer!

Well, I started with the standard 2.6.18 config file thinking that it had the right modules compiled in the kernel statically, since it boots painlessly. I tried both going through the 'make oldconfig' followed by 'make menuconfig' sequence, and using 'make menuconfig' alone. But no success.

Now, as I'm no expert with Linux, but do have a bit of experience, I wonder if you could give me a rundown on the basic steps to finding out which modules are needed to access /?

As for your other suggestion, checking whether the proper driver for the HP nc6320 disk controller is compiled into the fixed portion of the kernel. Below is the listing given by 'lspci' on my system:

Code:
00:00.0 Host bridge: Intel Corporation Mobile 945GM/PM/GMS/940GML and 945GT Express Memory Controller Hub (rev 03)
00:02.0 VGA compatible controller: Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation Mobile 945GM/GMS/940GML Express Integrated Graphics Controller (rev 03)
00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01)
00:1c.0 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 1 (rev 01)
00:1c.2 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 3 (rev 01)
00:1c.3 PCI bridge: Intel Corporation 82801G (ICH7 Family) PCI Express Port 4 (rev 01)
00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #3 (rev 01)
00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #4 (rev 01)
00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev e1)
00:1f.0 ISA bridge: Intel Corporation 82801GBM (ICH7-M) LPC Interface Bridge (rev 01)
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller IDE (rev 01)
02:06.0 CardBus bridge: Texas Instruments PCIxx12 Cardbus Controller
02:06.1 FireWire (IEEE 1394): Texas Instruments PCIxx12 OHCI Compliant IEEE 1394 Host Controller
02:06.2 Mass storage controller: Texas Instruments 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)
02:06.3 Generic system peripheral [0805]: Texas Instruments PCIxx12 SDA Standard Compliant SD Host Controller
02:06.4 Communication controller: Texas Instruments PCIxx12 GemCore based SmartCard controller
02:0e.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5788 Gigabit Ethernet (rev 03)
08:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
Is the "IDE interface" the one I'm looking for?
 
Old 09-13-2008, 12:49 PM   #4
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,549

Rep: Reputation: 180Reputation: 180
Quote:
Originally Posted by corgi View Post

Now, as I'm no expert with Linux, but do have a bit of experience, I wonder if you could give me a rundown on the basic steps to finding out which modules are needed to access /?
You need all of the modules necessary to run the hardware where / resides. In your case this is probably an IDE controller and a hard drive module. You may be able to use generic modules for the hardware or you may need a specific driver made for your make and model of the hardware.

You also need the driver for the file system type, such as ext3.

I think that f you are using LVM you need the modules for LVM.

Quote:
Originally Posted by corgi View Post

Is the "IDE interface" the one I'm looking for?
Yes.

-----------------------
Steve Stites
 
Old 09-13-2008, 01:01 PM   #5
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Squeeze 2.6.32.9 SMP AMD64
Posts: 3,245

Rep: Reputation: 121Reputation: 121
Somewhere around 2.6.18 is where they changed the naming convention for SATA devices in the .config file. Check your .config and see if it contains lines of this type:
Code:
CONFIG_SCSI_SATA_SIL=m
If so, they all need to be changed to conform to this convention:
Code:
CONFIG_SATA_SIL=m
IOW, all instances of CONFIG_SCSI_SATA need to be changed to CONFIG_SATA.

NOTE: The string "CONFIG_SCSI" is valid for SCSI devices, but "CONFIG_SCSI_SATA" is not, so be careful what you change.

One final question, did you copy a valid .config from /boot/config-`uname -r` (note the back-quotes) before you started your compile?
 
Old 09-13-2008, 05:24 PM   #6
nowshining
Member
 
Registered: Dec 2007
Distribution: Ibex
Posts: 93

Rep: Reputation: 15
well if it helps i can't use any higher kernel than 2.6.24.X on kgutsy
 
Old 09-14-2008, 03:27 PM   #7
corgi
LQ Newbie
 
Registered: Mar 2006
Location: Norway
Distribution: Debian Etch, HP nc6320 laptop
Posts: 23

Original Poster
Rep: Reputation: 15
Thanks for all information and suggestions!

In the meantime googling around a bit turned up a similar problem that was solved by changing /etc/fstab and /boot/grub/menu.lst to use UUID references to partitions instead of the usual '/dev/sda1' and so on.

After doing this my kernel booted, only a lot slower than the stock kernel. The change is explained here and here.

I'll have to stick to the stock 2.6.18 kernel for a while longer, until I get this sorted out... No idea what the problem is, but extremely annoying!
 
Old 09-14-2008, 05:49 PM   #8
radiodee1
Member
 
Registered: Oct 2006
Location: New York
Distribution: Debian
Posts: 673
Blog Entries: 11

Rep: Reputation: 36
I have this problem where I cannot get the 2.6.26-1-686 kernel to boot without putting special options on the 'kernel' line in my menu.lst file. I can either use 'maxcpus=0' or I can use 'noapic nolapic'. With one of these my system boots at normal speed. The downside is that one of the cpu's processors is disabled. It's like using a 486 kernel on a 686 machine (I think). Maybe you'd find this info usefull.

Code:
title		Debian GNU/Linux, kernel 2.6.26-1-686
root		(hd0,6)
kernel		/boot/vmlinuz-2.6.26-1-686 root=/dev/sda7 resume=/dev/sda6 ro maxcpus=0 vga=791 
initrd		/boot/initrd.img-2.6.26-1-686
 
Old 09-17-2008, 06:02 PM   #9
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Rep: Reputation: 45
i found that when i compiled a 2.6.26-5 kernel after a fresh install with 2.6.18 it failed (I used the config file as the reference). I then installed 2.6.26-1 and then used that config and everything worked. I am guessing some changes happened between 2.6.18 and the current kernels which cause some issue.
 
Old 09-20-2008, 10:09 PM   #10
bcwagne
Member
 
Registered: Feb 2008
Distribution: Debian, OSX, PCBSD
Posts: 162

Rep: Reputation: 31
In order to find out the modules I need, I boot with the stock kernel, which automatically detects what I need, then run lsmod to find out what is running. Make a note of it, then do make menuconfig. If I need more clues, I'll use lspci and lsusb.
 
Old 10-13-2008, 11:47 PM   #11
farmerdave
Member
 
Registered: Mar 2008
Location: Adelaide, Australia
Distribution: Arch, Slackware 13.37
Posts: 101
Blog Entries: 1

Rep: Reputation: 16
I'm also having difficulty, i have the stock Debian etch kernel installed on my Lenovo R61 and it works fine. I followed the same guide as Corgi, including loading my previous working configuration as a starting point. I get the same

Waiting for root file system... ...

Alert! /dev/sda1 does not exist. Dropping to a shell!

I have tried replacing /dev/sda1 to the UUID in menu.lst, and no results. I have tried nstalling yaird instead of initramfs-tools, and this didn't work.

Also, once the startup drops to a shell, echo $ROOT gives /dev/sda but if i change directory with cd /dev and then list the contents, there is only hda (sda is not there).

I would really appreciate some help...
 
Old 10-18-2008, 07:36 AM   #12
Jongi
Senior Member
 
Registered: Aug 2003
Distribution: Debian Sid 32/64-bit, F10 32/64-bit
Posts: 1,070

Rep: Reputation: 45
yep I had this problem. It seems that there was a change in how the kernel handle drives. It has moved from all drives being /dev/sdxx to PATA being /dev/hdxx and SATA being /dev/sdxx.

So you need to change the root= part of the kernel line in /boot/grub/menu.lst to reference your drive in the form /dev/hdxx.

When it drops you to the shell, jot down your drive reference by using fdisk -l.
 
  


Reply

Tags
compile, debian, kernel, tip


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
compiled custom kernel, 3 questions Daedra Slackware 5 02-15-2008 06:04 AM
kernel panic while booting custom compiled 2.6.24 kernel on RHEL 4 AS samkraju Red Hat 4 02-10-2008 12:55 AM
custom compiled kernel 2.6.21.1 and rc.modules matters Slackware 14 05-18-2007 08:56 AM
Just compiled a custom kernel no sound. Royle Debian 5 01-23-2005 05:10 AM
Updating a custom-compiled kernel mooreted Linux - Software 2 03-01-2004 09:55 AM


All times are GMT -5. The time now is 02:29 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration