# sata drive won't boot

## cipherus

I've installed gentoo from the liveCD fine, works great.  

Now I am trying to compile a newer kernel and I get trouble where it is unable to boot from my /dev/sda2.  I've followed this guide: 

http://gentoo-wiki.com/HARDWARE_SATA

but I run into problems.  I've tried compiling using genkernel and by going to /usr/src/linux and doing make by hand.  I tried adding everything in menuconfig that seems relevant to SATA drivers and booting (making them all * built into kernel, not M modules), I have also tried using the liveCD config file with no modifications, doesn't work either.

I am trying to diagnose what is happening, the actual error is right after loading modules, it tries to load (I think) mdev and then says /dev/sda2 not a valid boot object (or something like that) then ejects me into Busybox.  I am trying to get the dmesg output but /var/log/dmesg only stores the last good boot info and /var/log/messages seems to only record good boots also.  I tried installing logrotate but I can't even get syslog-ng to run before the system cannot progress any further... so any help with recording the failed dmesg info would be great too.

Also worth noting, I've used lspci to see exactly which driver I need for my SATA:

00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) Serial ATA Storage Controller IDE (rev 02)

So I'm pretty sure I'm including the right driver.

Can't think of what else to try.

----------

## didymos

Do you need an initrd?  There's not much point unless you really can't boot otherwise. I'd just forget genkernel, and avoid the need for the whole busybox/mdev thing.  Even if you're using a start-up splash, genkernel still isn't necessary.  splashutils comes with a command to make an initramfs with only the files needed to have a splash screen.

----------

## cipherus

Bleh, found the answer here: https://forums.gentoo.org/viewtopic-t-576977.html

I believe the popular phrase "lurk moar" applies to my dumb ass.  But who would have thought that you have to disable ATA/ATAPI before it would recognize SATA as a bootable device, that's just kind of silly.

*goes to update the wiki page*

----------

## cipherus

 *didymos wrote:*   

> Do you need an initrd?  There's not much point unless you really can't boot otherwise. I'd just forget genkernel, and avoid the need for the whole busybox/mdev thing.  Even if you're using a start-up splash, genkernel still isn't necessary.  splashutils comes with a command to make an initramfs with only the files needed to have a splash screen.

 

This is a good point and I looked into it right after I finally got a booting kernel.  I used my new .config to do a manual kernel compile and install.  Then changed my grub.conf to just:

root (hd0,1)

kernel /boot/kernel-2.6.22-gentoo-r2

instead of all the garbage that genkernel adds.  Now the kernel boots maybe 40% faster than before without doing any initramfs/busybox/mdev.  Thanks for the tip!

----------

## termite

Ah, someone finally found the answer to the hda/sda issue without me having to post the same instructions!  Thank you!

Genkernel is a little silly, really.  It's not hard to do your own menuconfig and get it working...

----------

