Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
What goes in grub.conf for SATA drives? [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
urbanomad
Tux's lil' helper
Tux's lil' helper


Joined: 04 Aug 2005
Posts: 147
Location: Boston, MA

PostPosted: Thu Jan 12, 2006 2:46 pm    Post subject: What goes in grub.conf for SATA drives? [solved] Reply with quote

I have an Asus A8N-Sli Premium with 1 SATA hd and 1 IDE dvdrw.
Firstly,
When I created partitions on the hard drive, I created them on sda (as opposed to hda, was this correct? I thought sda was only SCSI...)
Secondly,
If that is correct, then what do I put in grub.conf since I created the partitions as sda rather than hda? In grub is the notation for hard drives (hdX,X) whether they are IDE, SATA, or SCSI? If so then how do I know what order they will be in?


Last edited by urbanomad on Fri Jan 20, 2006 1:46 am; edited 1 time in total
Back to top
View user's profile Send private message
SlightlyMiffed
n00b
n00b


Joined: 12 Jan 2006
Posts: 5
Location: UK

PostPosted: Thu Jan 12, 2006 2:52 pm    Post subject: Reply with quote

Yes, the grub notation is the same, and you use /dev/sda instead of /dev/hda.

SATA "appear" as scsi drives so use sda. As for the order if you have a plain IDE as well, I'm not sure!

Here's my basic grub conf...

Code:
# Gentoo Linux 2.6.14
title Gentoo Linux 2.6.14
root (hd0,4)
kernel /kernel-2.6.14-gentoo-r5 root=/dev/sda7
Back to top
View user's profile Send private message
rlittle
Apprentice
Apprentice


Joined: 17 Dec 2003
Posts: 200

PostPosted: Fri Jan 13, 2006 8:07 am    Post subject: Reply with quote

IDE, SATA, and SCSI drives (and even usb keys) are all identified with "hd" in the "grub" format of naming drives. Which one ends up being hd0 is up to your BIOS.

If you're not sure which disk is ending up hd0, hd1 etc, you can boot up via Grub and hit "c" for command-line where you can specify your root disk (root (hd0,1), root (hd1,0) wherever your kernel is hiding) and then type "kernel " (space). At this point, if you hit TAB it will list the files (if any) in the partition you specified as root. This will help you identify the disk. If it's not the right boot parition, you type in the "root" command again and try a different partition.

Note: as Slightly points out, when specifying root=/dev/sda7 (or whatever) in your "kernel" line, you use /dev/sd(x)(n).

..and the SATA disks show up as SCSI disks, as far as their naming anyway (sda1). You have it correct.
_________________
I need a better signature...
Back to top
View user's profile Send private message
ReeferMac
Guru
Guru


Joined: 30 May 2004
Posts: 389

PostPosted: Tue Jan 17, 2006 1:40 am    Post subject: Re: What goes in grub.conf for SATA drives? Reply with quote

urbanomad wrote:
If that is correct, then what do I put in grub.conf since I created the partitions as sda rather than hda? In grub is the notation for hard drives (hdX,X) whether they are IDE, SATA, or SCSI? If so then how do I know what order they will be in?


Here is another example, this is my grub.conf:

Code:

gentooreef grub # cat grub.conf
default 0
timeout 15
splashimage=(hd0,0)/grub/splash.xpm.gz
title=Gentoo Linux 2.6.9r14
root (hd0,0)
kernel /kernel-2.6.9-gentoo root=/dev/sda2


When I tell it my splash-image is on my 'boot' partition - the first partition of the first hard disk (hd0,0), that is separate from me telling it to pass onto the kernel, what kernel version and that the 'root' partition for that install is located on the second partition of the first SCSI or SATA device.

I know, that's wacky, no doubt, but I hope that helps explain it? I had the same problem understanding the symantics, it's weird. The last line in the above grub.conf file is the boot loader pointing to the kernel to boot (2.6.9-gentoo), and that the root partition ( / ) of said install, exists on the second partition of the first SATA disc (/dev/sda2).
It's confusing that you're being generic about the hard disk issue initally (plain 'ol hd), and also that initially you count the first partition as zero (0). It's doubly confusing, that you have to pretend SATA drives are SCSI, suddenly have to care about type, and enumerate your partitions using a different standard. In the same .conf file. :roll:

- Mac
Back to top
View user's profile Send private message
rlittle
Apprentice
Apprentice


Joined: 17 Dec 2003
Posts: 200

PostPosted: Wed Jan 18, 2006 3:52 am    Post subject: Reply with quote

Is any of this helping, or is it all sounding like gobbledy-gook? :lol:
_________________
I need a better signature...
Back to top
View user's profile Send private message
urbanomad
Tux's lil' helper
Tux's lil' helper


Joined: 04 Aug 2005
Posts: 147
Location: Boston, MA

PostPosted: Wed Jan 18, 2006 4:49 am    Post subject: Reply with quote

oops, I forgot about this question.
Yes, grub uses the same language whether it's using IDE or SATA or SCSI.
w00t. Thanks.
Problem solved.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum