LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
LinkBack Search this Thread
Old 06-16-2004, 12:18 AM   #1
david.skinner
Member
 
Registered: Dec 2003
Location: New Zealand
Distribution: Mandriva 2006 64
Posts: 45

Rep: Reputation: 15
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?
OR
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.

Regards
David
 
Old 06-16-2004, 04:42 AM   #2
feydrautha
LQ Newbie
 
Registered: Jun 2004
Distribution: gentoo
Posts: 4

Rep: Reputation: 0
Post 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.
Reboot
Choose linux .... and i got a kernel panic. unable to mount root file system.
Reboot
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)
reboot
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 from the kernel i gave me a 2 weeks headache. Or someone to write there "Iou dude .... don't try this at home"
 
Old 06-16-2004, 04:53 AM   #3
david.skinner
Member
 
Registered: Dec 2003
Location: New Zealand
Distribution: Mandriva 2006 64
Posts: 45

Original Poster
Rep: Reputation: 15
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.
Regards
 
Old 06-16-2004, 05:48 AM   #4
feydrautha
LQ Newbie
 
Registered: Jun 2004
Distribution: gentoo
Posts: 4

Rep: Reputation: 0
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
 
Old 06-17-2004, 12:51 AM   #5
david.skinner
Member
 
Registered: Dec 2003
Location: New Zealand
Distribution: Mandriva 2006 64
Posts: 45

Original Poster
Rep: Reputation: 15
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.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Complete Hard-Disk & Root Filesystem Backup taylor_venable *BSD 1 11-18-2005 02:20 PM
Fedora C4 Kernel Panic root= SATA Hard disk fieldyweb Linux - General 1 08-22-2005 09:09 AM
Encrypted Root Filesystem HOWTO and /dev filesystem tmillard Linux From Scratch 0 10-18-2004 03:58 PM
Installing Slack using Boot Disk (root disk stalls!) guardian653 Slackware 3 10-07-2003 04:03 PM
Read-only root filesystem at the boot karimson Linux - General 0 03-20-2003 05:01 AM


All times are GMT -5. The time now is 02:38 AM.

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