LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 10-23-2008, 11:56 PM   #1
Auxientius
LQ Newbie
 
Registered: Oct 2008
Posts: 16

Rep: Reputation: 0
Compiling build 2.6.27.2 from 2.6.18 on SATA drive issues (Debian)


Hi Guys,
My first post here. Ive been reading the forums here for two days now trying to figure the issue out (I only installed Linux for the first time 3 days ago, to use for a Voice Recording solution). So far I love it. But..

Basically as the subject states, i am compiling the latest build of Debian - 2.6.27.2. I now get a Kernel Panic saying it cannot boot from /dev/sda1 - basically the exact issue is described in this post ((http://www.linuxquestions.org/questi...lock00-509439/)) along with some pretty good solutions. I have tried remaking the menuconfig with the correct SATA options (to my knowledge and from what I read in that forum post) and I have used lspci to identify my controller as an Intel ICH7 one - and then recompiling the kernel with that config. I still have the same issue. I read that in the version from 2.18 to 2.19 the way Sata drives was changed and it was changed from sda to hda - I've tried changing the Grub menu.lst options to point at hda1 sda1 - quite a few things.

My setup is simple - one SATA hard disk and one IDE CDRom. The SATA drive is detected first in the BIOS but from what I understand the CD Rom is ignored anyway.

Any help on this would be extremely appreciated. I will continue to search out a solution to this in the meantime.

Thanks in advance;

Gareth

Last edited by Auxientius; 10-23-2008 at 11:57 PM. Reason: add URL
 
Old 10-24-2008, 12:13 AM   #2
Auxientius
LQ Newbie
 
Registered: Oct 2008
Posts: 16

Original Poster
Rep: Reputation: 0
Also another question - when compiling the Build, how can I know for sure which config file it is looking at? Is it the one selected when I run "make menuconfig"? Because i'm aiming it at the one in /boot/ when running menuconfig and saving it. Sorry if I sound confusing.
 
Old 10-24-2008, 12:21 AM   #3
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Load up a liveCD and do the following:

Assuming a single sda driver, your /boot/grub/device.map needs to be changed to:
Code:
(hd0)	/dev/sda
There are several places in /boot/grub/menu.lst that must be changed:
Code:
# kopt=root=/dev/sda1 ro   (leave the "#" at the beginning!!!)
and
kernel          /boot/vmlinuz-whatever root=/dev/sda1 ro
and for your single user kernel
kernel          /boot/vmlinuz-whatever root=/dev/sda1 ro single
Change /etc/fstab as follows, modified for your situation, of course.
Code:
/dev/sda1       /               ext3    defaults,errors=remount-ro 0       1
/dev/sda5       none            swap    sw              0       0
You are aware that once you make this step, it's a real PITA to go back because you have to undo all the changes. But it's worth it.

I don't remember having to remake the MBR when I went through this. I don't think grub cares what it's called.

I think that covers it.
 
Old 10-24-2008, 12:23 AM   #4
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Quote:
Originally Posted by Auxientius View Post
Also another question - when compiling the Build, how can I know for sure which config file it is looking at? Is it the one selected when I run "make menuconfig"? Because i'm aiming it at the one in /boot/ when running menuconfig and saving it. Sorry if I sound confusing.
You need to get used to using the one in your kernel source tree. Do this to get a copy or the config of the running kernel:
Code:
cp /boot/config-`uname -r` .config
NOTE: those are backquotes, not single quotes.

Then run "make oldconfig" and answer all the questions so that it gets upgraded with any changes to the options.
 
Old 10-24-2008, 12:35 AM   #5
Auxientius
LQ Newbie
 
Registered: Oct 2008
Posts: 16

Original Poster
Rep: Reputation: 0
Hey Quakeboy,
Thanks alot for that. Fortunately it seems I can still boot into my old linux version (as it added it as a second option on the boot screen).

I checked device.map earlier and it contains (hd0) /dev/sda already. I've also already checked menu.lst and it already looks as you stated.

I haven't checked fstab yet (as the box is compiling the kernel again as we speak, I was testing something) but I will check it when done - although I suspect it will be correct.

Also, with the config, I selected "Load previous configuration" in menuconig and pointed it to /boot/2.6.18-6-686.conf - made the changes to the SATA selection - and saved it. Is this the same?
 
Old 10-24-2008, 12:40 AM   #6
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Quote:
Originally Posted by Auxientius View Post
Hey Quakeboy,Also, with the config, I selected "Load previous configuration" in menuconig and pointed it to /boot/2.6.18-6-686.conf - made the changes to the SATA selection - and saved it. Is this the same?
I've never used that, so I don't know.

Can you tell me which sata controller you're actually using? Run "lspci -vv" and give me the output in a code block.
 
Old 10-24-2008, 12:48 AM   #7
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Oh, and can you tell me which method you're using to compile the kernel? Is it the complicated one with "make" and other stuff, or is it the single liner using "fakeroot make-kpkg etc"?
 
Old 10-24-2008, 12:48 AM   #8
Auxientius
LQ Newbie
 
Registered: Oct 2008
Posts: 16

Original Poster
Rep: Reputation: 0
Ok cool, no worries.

Here's my lspci output:

00:1f.1 IDE interface: Intel Corporation 82801G (ICH7 Family) IDE Controller (rev 01) (prog-if 8a [Master SecP PriP])
Subsystem: ASRock Incorporation Unknown device 27df
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0
Interrupt: pin A routed to IRQ 225
Region 0: I/O ports at <unassigned>
Region 1: I/O ports at <unassigned>
Region 2: I/O ports at <ignored>
Region 3: I/O ports at <ignored>
Region 4: I/O ports at ffa0 [size=16]

00:1f.2 IDE interface: Intel Corporation 82801GB/GR/GH (ICH7 Family) Serial ATA Storage Controller IDE (rev 01) (prog-if 8f [Master SecP SecO PriP PriO])
Subsystem: ASRock Incorporation Unknown device 27c0
Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
Status: Cap+ 66MHz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 0
Interrupt: pin B routed to IRQ 217
Region 0: I/O ports at d080 [size=8]
Region 1: I/O ports at d000 [size=4]
Region 2: I/O ports at cc00 [size=8]
Region 3: I/O ports at c880 [size=4]
Region 4: I/O ports at c800 [size=16]
Capabilities: [70] Power Management version 2
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot+,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
 
Old 10-24-2008, 12:50 AM   #9
Auxientius
LQ Newbie
 
Registered: Oct 2008
Posts: 16

Original Poster
Rep: Reputation: 0
And im using:

fakeroot make-kpkg --revision=custom.1.0 kernel_image
 
Old 10-24-2008, 12:57 AM   #10
Auxientius
LQ Newbie
 
Registered: Oct 2008
Posts: 16

Original Poster
Rep: Reputation: 0
And to be clear, the exact message I get on boot is:

VFS: Cannot open root device "sda1" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
 
Old 10-24-2008, 01:00 AM   #11
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
OK, I expected to see which kernel module was controlling each controller. Guess I'm wrong. So, post the output of lsmod, I guess. If I'm right about reading this lspci, then you should have ATA_SFF and ATA_PIIX selected in your .config file.
 
Old 10-24-2008, 01:01 AM   #12
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Quote:
Originally Posted by Auxientius View Post
And im using:

fakeroot make-kpkg --revision=custom.1.0 kernel_image
OK, so if you're not using --initrd, you must have "y" for your controller module, and not "m". On menuconfig I believe a "y" shows up as an "*".

Added:
Actually, I think this may the problem.
 
Old 10-24-2008, 01:03 AM   #13
Auxientius
LQ Newbie
 
Registered: Oct 2008
Posts: 16

Original Poster
Rep: Reputation: 0
Sweet, here's the output:

Module Size Used by
ipv6 226272 14
button 6672 0
ac 5188 0
battery 9636 0
dm_snapshot 15552 0
dm_mirror 19152 0
dm_mod 50232 2 dm_snapshot,dm_mirror
loop 15048 0
serio_raw 6660 0
snd_hda_intel 17332 0
snd_hda_codec 137856 1 snd_hda_intel
snd_pcm 68676 2 snd_hda_intel,snd_hda_codec
snd_timer 20996 1 snd_pcm
i2c_i801 7468 0
i2c_core 19680 1 i2c_i801
pcspkr 3072 0
psmouse 35016 0
intel_agp 22204 1
agpgart 29896 1 intel_agp
snd 47012 4 snd_hda_intel,snd_hda_codec,snd_pcm,snd_timer
soundcore 9248 1 snd
snd_page_alloc 10184 2 snd_hda_intel,snd_pcm
evdev 9088 0
parport_pc 32132 0
parport 33256 1 parport_pc
rtc 12372 0
ext3 119240 1
jbd 52456 1 ext3
mbcache 8356 1 ext3
sd_mod 19040 3
ide_cd 36064 0
cdrom 32544 1 ide_cd
8139cp 21920 0
generic 4868 0 [permanent]
ehci_hcd 28136 0
ata_piix 13896 2
8139too 25120 0
uhci_hcd 21164 0
libata 89396 1 ata_piix
scsi_mod 124168 2 sd_mod,libata
mii 5344 2 8139cp,8139too
piix 9444 0 [permanent]
ide_core 110504 3 ide_cd,generic,piix
usbcore 112644 3 ehci_hcd,uhci_hcd
thermal 13608 0
processor 28840 1 thermal
fan 4804 0
 
Old 10-24-2008, 01:06 AM   #14
Auxientius
LQ Newbie
 
Registered: Oct 2008
Posts: 16

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Quakeboy02 View Post
OK, so if you're not using --initrd, you must have "y" for your controller module, and not "m". On menuconfig I believe a "y" shows up as an "*".

Added:
Actually, I think this may the problem.

When selecting the ATA options, I was using <*> not <m>
 
Old 10-24-2008, 01:23 AM   #15
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
Quote:
Originally Posted by Auxientius View Post
When selecting the ATA options, I was using <*> not <m>
Well, back to the drawing board, then. What exactly is getting put into menu.lst? And can you show the lines for one that works?

There's another possible issue, I guess. In /lib/modules, a directory is created for your kernel such as "/lib/modules/2.6.27.2". You might want to "rm -r" that directory before running "dpkg -i" on the new deb. Be careful you don't remove the wrong one.

I just noticed it's 2:20, and I need to get to bed. I'll catch up to you tomorrow, but I'm starting to run out of ideas.
 
  


Reply



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
debian and SATA drive... insaneavocado Linux - Hardware 4 02-08-2006 07:08 PM
Debian on Sata drive ftenario Debian 4 02-01-2006 06:44 PM
Debian with SATA Hard drive pulse5 Debian 4 01-31-2006 03:45 PM
Debian and an Sata Hard Drive pafinator11 Debian 7 08-29-2005 06:20 PM
Mdk10 install issues with SATA Drive Mike23 Mandriva 28 07-07-2004 06:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 12:49 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration