LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 11-29-2005, 11:56 AM   #1
vmt1
LQ Newbie
 
Registered: Nov 2005
Distribution: slackware 11
Posts: 18

Rep: Reputation: 0
Kernel panic - SATA support in 2.6 and slackware


Hi,

I'm encountering difficulties in compiling the 2.6 kernel. Specifically, I get the following messages:

VFS: Cannot open root device "302" or unknown blocks 3,2

VFS: Unable to mount root fs on 3,2

I'm pretty sure the second error is a direct product of the first, but I'm including it as a matter of course.

I did some research on the errors, and I strongly suspect this is somehow related to my SATA drives, and may have something to do with either the modules I'm loading, or the parameters I'm using in LILO.

Another post mentioned that SATA drives are referred to with 'sd' rather than 'hd' in the 2.6 kernel, and this does make some sense - when I was using Fedora, my drives were designated scsi, but when I first installed slackware, they were designated IDE drives (although I still needed to load SCSI support when installing). That said, I'm not sure how to make use of that, if that even is the case, or whether this is due to a failure on my part to load a particularly important item.

This is my first time compiling a kernel, so I appreciate any insight into how can I solve this issue.

System information:

Specs:

---
Dual Xeon Processors
Supermicro X6DA8-G2 (E7525 Chipset)

#1 drive: Western Digital 36GB SATA Raptor (WD360GD)
#2 drive: Western Digital 160GB SATA (WD1600SD)

ATI x850 PCI-X
Creative Audigy 2
---

fdisk -l (on kernel 2.4):

---
Disk /dev/hda: 37.0 GB, 37019566080 bytes
255 heads, 63 sectors/track, 4500 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 3874 31117873+ 7 HPFS/NTFS
/dev/hda2 3875 4500 5028345 83 Linux

Disk /dev/hdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 1 255 2048256 b W95 FAT32
/dev/hdb2 256 16907 133757190 7 HPFS/NTFS
/dev/hdb3 * 16908 17108 1614532+ 83 Linux
/dev/hdb4 17109 19457 18868342+ 83 Linux

---
Notes:

/dev/hda2 - /
/dev/hdb3 - /home
/dev/hdb4 - /usr/

---

My LILO is as follows:

~
# Linux bootable partition config begins
image="/boot/vmlinuz"
root="/dev/hda2"
label="Linux"
read-only # Non-UMSDOS filesystems should be mounted read-only for checking
# Linux bootable partition config ends

# Windows bootable partition config begins

other = /dev/hda1
label="Windows"
table = /dev/hda
# Windows bootable partition config ends


# Linux Experimental Kernel

image="/sexy/vmlinuz"
root="/dev/hda2"
label="SexyLinux"
read-only
~

[EDIT 2005-11-29 1135h]

Fstab

/dev/hda2 / ext3 defaults 1 1
/dev/hdb3 /home ext3 defaults 1 2
/dev/hdb4 /usr ext3 defaults 1 2
/dev/hda1 /drv-ntfs-c ntfs ro 1 0
/dev/hdb2 /drv-ntfs-d ntfs ro 1 0
/dev/hdb1 /drv-fat vfat defaults 1 0
/dev/cdrom /mnt/cdrom auto noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0


Regards,

VMT1

Last edited by vmt1; 11-29-2005 at 12:35 PM.
 
Old 11-29-2005, 04:29 PM   #2
vmt1
LQ Newbie
 
Registered: Nov 2005
Distribution: slackware 11
Posts: 18

Original Poster
Rep: Reputation: 0
I thought it may be helpful if I include some things I've tried so far:

Editing lilo.conf and fstab such that they both reference sd* rather than hd*. This also caused a kernel panic, and I was unable to continue.

It seems like SATA support is completely different between kernel 2.4 and 2.6. I'm compiling the appropriate options (adaptec 79xx support and intel scsi support), but I still don't seem able to get them to recognize my drives as scsi rather than ide.

Regards,

vmt1
 
Old 11-30-2005, 09:54 AM   #3
vmt1
LQ Newbie
 
Registered: Nov 2005
Distribution: slackware 11
Posts: 18

Original Poster
Rep: Reputation: 0
I noticed that some other people were having similiar problems, so I'd like to post my partial solution to the problem:

I think they main difficulty lies in that if you did a normal install of the 2.4 kernel, and did not explicitly set up your sata drives, they default to ide, and are labelled as such (hdX rather than sdX). Thus, when you try to setup sata support when configuring the kernel, you'll probably encounter problems like I did because of the conflicting setups (lilo and fstab will probably both have hdX setups, while your kernel is looking for a sdX setup). I found that simply editing your lilo and fstab files isn't enough (I'm not sure why, but it's not... I suspect it may have something to do with kernel support, but I'm simply not qualified enough to state it with any certainty.

To over come this, I reinstalled slack, but used the 'test26.s' kernel rather than the 'adaptec.s' kernel I was using before. This automagically ensured I got the correct SATA support (and the 2.6 kernel) right off the bat. Recompiling my custom kernel was then made into a trivial operation, and I avoided the previous boot errors.

I hope this is of some use to others experiencing the same problem when trying to compile a custom 2.6 kernel from a 2.4 machine with sata drives.

If anyone would like to add a more technical explanation of what may have happened, I'm all ears.

Regards,

VMT

Last edited by vmt1; 11-30-2005 at 09:58 AM.
 
Old 11-30-2005, 01:50 PM   #4
sithscripter
LQ Newbie
 
Registered: Oct 2004
Distribution: Slackware!
Posts: 10

Rep: Reputation: 0
Did you re-run /sbin/lilo after editing lilo.conf?

If not, the LILO boot loader wasn't updated (reinstalled actually) and still looked for the old /dev/hdX root partition.

One of the nice things about GRUB is that you don't have to reinstall the boot loader for most changes ... but all in all I still prefer LILO. And if you don't feel like overwriting your MBR for little experiments like this it's possible to install LILO to a floppy disk and use that to boot.
 
Old 11-30-2005, 05:20 PM   #5
vmt1
LQ Newbie
 
Registered: Nov 2005
Distribution: slackware 11
Posts: 18

Original Poster
Rep: Reputation: 0
I'm used to grub, which, as you noted, doesn't require a reinstallation after every change. And almost as soon as I rebooted, I realized that I forgot. So I loaded off the source CD and restored my backups of lilo.conf and fstab. I then restarted again, loaded slack, changed lilo.conf, ran lilo, changed fstab, and then rebooted.

Sadly, this didn't change anything - I still got the same error. So I think it's something odd with how 2.4 and 2.6 recognize drives.

Regards,

vmt1
 
Old 11-30-2005, 06:05 PM   #6
masterross
Member
 
Registered: Nov 2005
Distribution: Slack 10.2, CentOS 4.x
Posts: 83

Rep: Reputation: 17
hi,
I have same probs few days ago
but i forgot to recompile kernel with sata.i at the end of instalation process
now all is ok
 
Old 11-30-2005, 07:25 PM   #7
sithscripter
LQ Newbie
 
Registered: Oct 2004
Distribution: Slackware!
Posts: 10

Rep: Reputation: 0
Wild guess ... I'm not sure if this is "shotgun debugging" or "chainsaw debugging" ...

What device name did you use for your root partition under 2.6?
Is the Adaptec driver compiled into the kernel, or as a module?

I wonder if your Adaptec SCSI controller is being detected before your SATA controller ... I have no experience with a SATA + SCSI setup but I'd imagine the Adaptec might bump your SATA drive device names from /dev/sda, etc. to /dev/sd? ...
 
Old 12-01-2005, 02:55 PM   #8
vmt1
LQ Newbie
 
Registered: Nov 2005
Distribution: slackware 11
Posts: 18

Original Poster
Rep: Reputation: 0
Quote:
sithscripter

Wild guess ... I'm not sure if this is "shotgun debugging" or "chainsaw debugging" ...

What device name did you use for your root partition under 2.6?
Is the Adaptec driver compiled into the kernel, or as a module?

I wonder if your Adaptec SCSI controller is being detected before your SATA controller ... I have no experience with a SATA + SCSI setup but I'd imagine the Adaptec might bump your SATA drive device names from /dev/sda, etc. to /dev/sd? ...
It's interesting you mention that. You see, I'm fairly sure there's a kernel option to blame somewhere.

As I previously mentioned, in order for me to compile my kernel to properly boot and provide SATA support (thereby recognizing my drives as sata, and associating them accordingly (/dev/sd*)), it seems I needed to compile the 2.6 kernel in an environment that already supported sata drives and scsi controllers.

Despite testing all the relevant 2.4 kernels (and some irrelevant ones) that are bundled with the slackware 10.2 CD (including, but not limited to: adaptec.s, sata.i, bare.i) all (mis-)recognized my drives as IDE and listed them as /hd*. The only kernel that seemed to support both my sata drives and scsi controller was the test26.s kernel. The first time I did this, I overlooked installing the kernel modules (unlike the 2.4 kernels, the 2.6 kernel modules are stored on the second CD, and must be installed manually. The README helped ).

So far, everything seems to be working nicely.

vmt1
 
  


Reply


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
Slackware 10.1 sata.i dosn't support my sata controller kryptobs2000 Slackware 7 12-05-2007 07:25 PM
kernel panic on SATA paranoyakX Debian 5 07-07-2006 02:45 PM
kernel Panic slackware 10.1 (sata) after upgrading to 2.6.10 pkg in /testing sund00bie Slackware 7 07-25-2005 05:59 AM
slackware 10 SATA support.... zero_copy Slackware 44 08-05-2004 12:33 PM
SATA kernel panic N3K0KUN Slackware 1 02-25-2004 01:22 PM


All times are GMT -5. The time now is 04: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