LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Kernel panic - SATA support in 2.6 and slackware (https://www.linuxquestions.org/questions/slackware-14/kernel-panic-sata-support-in-2-6-and-slackware-387593/)

vmt1 11-29-2005 10:56 AM

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

vmt1 11-29-2005 03:29 PM

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

vmt1 11-30-2005 08:54 AM

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

sithscripter 11-30-2005 12:50 PM

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.

vmt1 11-30-2005 04:20 PM

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

masterross 11-30-2005 05:05 PM

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

sithscripter 11-30-2005 06:25 PM

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? ...

vmt1 12-01-2005 01:55 PM

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


All times are GMT -5. The time now is 10:13 AM.