Compiling build 2.6.27.2 from 2.6.18 on SATA drive issues (Debian)
Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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.
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.
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.
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?
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.
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"?
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)
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.