-   Linux - Hardware (
-   -   howto boot root filesystem from SATA disk? (

david.skinner 06-16-2004 01:18 AM

howto boot root filesystem from SATA disk?
Configuration is
Mandrake 10 2.6.3 kernel on a Gigabyte GA-7N400 Pro 2 (with additional SIL Sata controller and ITE 8212 raid controller both configured in the bios as standard ATA). Disks are:
crusty old 30G ATA disk with partitions hda1 /boot, hda2 swap, hda3 /windows
existing 80G ATA disk with partitions hdc2 / and hdc3 /home.
and I have just added a
New 160G SATA disk with partitions sda2 / sda3 /home
and mounted these and copied the old / and and /home to them with the intention of recovering the 80G drive for my server raid array (yet to be built).

I've worked out that in order for linux to boot on the SATA drive I somehow have to get the sata_sil driver into the loader before it attempts to mount the new root filesystem.

There 'appears' to me to be two ways of doing this.
1. build the driver into into initrd
2. load the driver at boot time with grub using the module command

And this is where I run out of knowledge in both cases. i do not have sufficient experience to build a new initrd (do I use the standard kernel sata driver or do I have to compile a new one for specifically for initrd?
I have tried the grub option with the line
module (hd0,0)/sata_sil.ko
added between the kernal and initrd lines and I've obviously copied sata_sil.ko from the kernel src to the /boot partition of the primary ATA drive (/dev/hda1). However, the module command seems to have no effect or I'm loading the wrong module as i get a mount failure as the loader hits the root mount.

Any help very much appreciated.


feydrautha 06-16-2004 05:42 AM

hai cu mata
I managed to boot linux normaly with lilo on A7n8x-x with sil 3112 sata controler using gentoo linux with kernel 2.6.5 but not without problems at first. So here is the story

I booted from the linux cd ... my sata was detected as hde - notice that.
Installed all the stuf , compiled the kernel with no ATA suport for Sil because that driver is for pci ata raid cards and works for some sata controler but real bad. In SCSI section at LOW LEVEL DRIVER there is SATA section .where you can find the sil driver.
Copy lilo .. when i tried to install it .. it gave me this error Fatat: raid_setup("stat(/dev/hde") and tainted the mbr.
So i booted with the Linux cd but with my new root file system " some_kernel root=/dev/hde3 noinitrd ro" (some_kernel is the image you have on the cd with sil suport ..
Aftet that i managed to install lilo.
Choose linux .... and i got a kernel panic. unable to mount root file system.
i select the label linux (wich was my new kernel compiled with real sil 3112 suport)
my_kernel root=/dev/sda3 noinitrd ro
i booted
i updated /etc/fstab acordgly from hde to sda
i updated /etc/lilo.conf from hde to hda
install lilo again ( /sbin/lilo)
and boot normaly
I do not know to use grub :) it is a little bit complicated for me but i think you can make a similar trick with grub. The problem is that ATA section driver for sil controler wich should be removed :mad: :mad: :mad: :mad: :mad: :mad: from the kernel i gave me a 2 weeks headache. Or someone to write there "Iou dude .... don't try this at home"

david.skinner 06-16-2004 05:53 AM

Thanks - some similarities and some differences.
My mandrake install does not pick up the sata controller at all. so no /dev/hde equivilient and i have not found a way in the bios to turn this on.
I still do have however another ATA disk that i can access during boot so my hope is to place the sata driver there.
The driver itself when I boot of the existing ATA environment and just mount in the sata disk works very well with very high performance.
So i still suspect I've got to use initrd image with the driver imbedded in it (but I don't know how) or get grub to load it (but I don't know how to do that either).
Thanks for your reply. It seems that your techniques will work but only when the bios translateds the sata drive to an ata equivilent.

feydrautha 06-16-2004 06:48 AM

I compiled the SCSI SATA SIL driver in the kernel . I do not use an initrd. my partition scheme is this
/dev/sda1 (or /dev/hde1 .. using IDE Sil driver) swap
/dev/sda2 (or /dev/hde2 ...............................) boot
/dev/sda3 (or /dev/hde3 ...............................) root

Gentoo linux , kernel 2.6.5. with defsd support compiled in and automounted at boot time.
I installed lilo in the master boot record.

In this moment i'm installing gentoo linux on a epox kt400 mother board with a Via controler and found my sata Seagate disk
as hda !!!!! and a i have a ata disk too .. that one should be hda ... i'll persuade it same way

david.skinner 06-17-2004 01:51 AM

Hmmm - In hindsight quite easy. the problem was that I didn't know that i could compile the SATA drivers into the kernel as opposed to modules. with this and the scsi emulation turned on initrd picks up the relevent drivers and allows a mount of root on the sata drive.

All times are GMT -5. The time now is 01:33 PM.