Click to See Complete Forum and Search --> : Can't compile a bootable kernel anymore


Gaccm
08-21-2007, 10:57 PM
I have a SATA harddrive and for some reason I can't compile a kernel that recognizes that, and thus nothing boots. It thinks it's hda when it's really sda.
In LILO I have:
boot=/dev/sda
root=/dev/sda2
but that doesn't seem to be enough.

Here are the relevant options I have under make xconfig, could you please tell me if i'm missing something. (This is for kernel 2.6.22.3, the newest one)

ATA stuff
<*> ATA/ATAPI/MFM/RLL support (IDE)
<*> Include IDE/ATA-2 DISK support (BLK_DEV_IDEDISK)**
<*> Include IDE/ATAPI CDROM support (BLK_DEV_IDECD)
<*> generic/default IDE chipset support (IDE_GENERIC)
<*> Intel PIIXn chipsets support (BLK_DEV_PIIX)

SCSI stuff
<*> SCSI disk support (BLK_DEV_SD)
<*> SCSI generic support (CHR_DEV_SG)
<*> Serial ATA (prod) and Parallel ATA (experimental) drivers (ATA)***
<*> Intel ESB, ICH, PIIX3, PIIX4 PATA/SATA support (ATA_PIIX)


I have Intel 865PE Chipset, so I think my Intel options are right.
Can anyone see what I'm missing?


** do I need this for my cdrom, or is the one below enough?
*** this is marked experimental, do I not want this?

ph34r
08-22-2007, 08:58 AM
If a distributions kernel boots then just get that config file and put it in /usr/src/linux/.config (note the leading . on config) and then start wtih make oldconfig *then* do make xconfig and make your changes

Gaccm
08-22-2007, 06:45 PM
Actually, I based my current .config from my 2.6.17.13 kernel which is what i'm currently running. For some reason though, it's still not working. I could attempt to use Debian's kernel, which is only at 2.6.18, but I have never used a distro's kernel and don't want to mess up more things.

flukshun
08-24-2007, 09:54 PM
hmm, i have a similar setup/config. only relavent difference i can see would be that i also have ATA_GENERIC support defined (under SATA/PATA Drivers).

Gaccm
08-31-2007, 05:00 AM
I think I figured out the problem. When SATA first came out, it was identified as a SCSI drive. My 2.6.17.13 kernel views my drive as /dev/sda. However, my new kernel seems to prefer to use /dev/hda. The problem is that while in 2.6.17.13 lilo wont let me change lilo.conf to /dev/hda since at the time, no such device exists. So, no root=/dev/hda2 commands will be excepted. Anyone have a clue on this one?

--Gabe

flukshun
08-31-2007, 08:18 AM
you mean lilo reports an error when you edit the conf and try to run `lilo` afterward?

i would manually boot to your new kernel (havent used lilo in a while, but you can manually edit your boot command when lilo starts right?) by using the proper root=/dev/hda*

once you're booted, just run lilo again and lock in the new lilo settings.

or...

manually create the block devices while using your old kernel so that lilo wont complain when you change the config and write it to the boot sector. for me, in 2.6.21 the major for hda devices is 3. so you'd probably do:

mknod -m 0660 /dev/hda b 3 0
mknod -m 0660 /dev/hda1 b 3 1
mknod -m 0660 /dev/hda2 b 3 2
...

HOWEVER:

in 2.6.22.2, on my laptop, my sata drives do not get picked up as hda, they get picked up as sda.

technically you dont need "ATA/ATAPI/MFM/RLL support (IDE)" support at all, your drives are handles by libata under SATA/PATA, and your cdrom likely is as well. perhaps if you disabled this support your drives would map as expected?

Gaccm
09-05-2007, 02:45 AM
Woohoo!!! I can finally boot into my new kernel. I think removing the ATA/ATAPI/MFM/RLL support (IDE) helped, but now my CD drives don't work. Anyways, thanks for your help people.