Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

My Linux box has three devices, sda, sda1 and sda2. How can I find out what each one of these are? I'm running Ubuntu 9.04.

share|improve this question
add comment

3 Answers

sda is the first SATA/SAS/SCSI HDD in the computer. sda1 is the first partition on that disk, sda2 is the second. sudo fdisk -l should show you the info you want.

share|improve this answer
    
I'm going to go out on a limb and say that if that's the only hard drive in your box, then sda1 is your root partition and sdb2 is swap. –  EmmEff Sep 22 '09 at 1:41
    
I've wondered about this too -- so how do you know which storage device is the first? What do you mean by first? –  Nathaniel Sep 22 '09 at 3:25
    
First as detected by the BIOS. Usually its the drive plugged into SATA 0 in a standard desktop. In a server it's the drive attached to bay 0. –  MDMarra Sep 22 '09 at 21:19
1  
Emmeff - If there is only 2 it is probably /boot and a LVM. Usually the default config will provide 3 partitions minimum. One for /boot, one for swap and one for /. So it wouldn't surprise me to find /boot and a LVM with / and swap on it. –  MDMarra Sep 22 '09 at 21:23
1  
Don't forget the sudo. –  KFro Sep 23 '09 at 1:01
show 1 more comment

GParted is a great utility that will tell you graphically what all your hard drives and partitions are.

share|improve this answer
add comment

sda originally referred to a SCSI disk, a being the first drive. There could be sdb, sdc and so on. Now it can refer to SATA or SAS as well as previously mentioned.

  • sda1 - first partition on sda, bootloader/kernel usually.
  • sda2 - second partition, usually swap
  • sda3 - third partition, usually root fs.

That used to be the traditional setup at least if you were using a SATA/SCSI/SAS drive. If it shows up as hda, that means your disk is connected via IDE rather than one of the previously mentioned methods.

share|improve this answer
    
In SATA/SAS there is no master or slave each drive has its own channel. For SCSI it is determined by the device ID as there is no master/slave there either. –  MDMarra Sep 22 '09 at 21:21
    
whoops –  John T Sep 23 '09 at 2:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.