Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm completely new to Linux, and am using Ubuntu 10.04.

I'm confused when to use what (hdx,y) to represent which hard drive.

I have 2 hard drives, the first one is identified as /dev/sda (in Disk Utility) and that's where I installed my old Windows 7 RC (unused). the second one is /dev/sdb where I installed my Ubuntu (in /dev/sdb7 and /dev/sdb8 swap) and XP (in /dev/sdb1).

now if I want to play around with Ubuntu's GRUB, what (hdx,y) should I use? For now, I want to install BURG, and I read the installation step in a website that I have to type burg-install "(hd0)" to install BURG to the hd's MBR, but I'm just unsure, I'm afraid it'll mess everything.

So, how can I know which harddisk is (hd0), (hd1), or (hd0,1), etc.?

share|improve this question
up vote 15 down vote accepted

When GRUB probes devices it makes a file, you can find this in the same directory as your grub.conf. It will look similar to this:

(fd0)   /dev/fd0
(hd0)   /dev/sda
(hd1)   /dev/sdb
(hd2)   /dev/sdc

You are free to modify this as you see fit any time. Read more here.

UPDATE (Oct. 21, 2015) : This answer was originally written for GRUB 0.9x which is not under active development and is now referred to as GRUB Legacy. If you are using a version of GRUB 2.x you want this page with details and advice on device mapping.

share|improve this answer
+1 for map file reference – BloodPhilia Jun 29 '10 at 18:43

I believe that

sda = hd0, 
sdb = hd1, 

so on etc. etc. sdc = hd2 When it says sda1 that would be (hd0, 0) and sda2 (hd0, 1) and sda3 (hd0, 2) and sdb1 (hd1, 0) so on and so forth...

share|improve this answer

Grub device names can be confusing, but you can use the linux device name and let grub figure it out. Like this:

burg-install /dev/sda
share|improve this answer

grub does not make any difference between scsi and ide devices in its naming convention. the difference is only at the operating system level. Infact if you go to the grub command-line mode, you will be able to try the devices available by tabbing. refer this article for a nice grub tutorial

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .