0

When i entered #fdisk -l in unbuntu 9.04

following is the result

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xe9ffe9ff

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       10199    81923436    7  HPFS/NTFS
/dev/sda2           10200       19457    74364885    f  W95 Ext'd (LBA)
/dev/sda5           10200       19457    74364853+   7  HPFS/NTFS

Disk /dev/sdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0xf16cf16c

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1       10199    81923436    7  HPFS/NTFS
/dev/sdb2           10200       19457    74364885    f  W95 Ext'd (LBA)
/dev/sdb5           10200       19457    74364853+   7  HPFS/NTFS

But somewhat i can't understand following result.

What is sdb? I searched through internet and knew 'sdb' is the primary slave. What is the primary slave though? What is the primary master? What is different between the two?

and why sda2, sda5 start at same location?

1
  • @Dante Jiang, not at all an Ubuntu question, it'd apply to any Linux distribution, Windows, or the non-slice interfaces of BSD. :)
    – sarnold
    Apr 9, 2011 at 9:39

4 Answers 4

4

sdb is a second disk, given the results I think you have some kind of raid on your computer.

sda2 and sda5 are on the same location because sda2 is an extended partition, it is a special partition which containts the logical partitions of your system. Finally, sda5 is the first and only one logical partition.

More informations about disk partitioning : http://en.wikipedia.org/wiki/Disk_partitioning

4

In Linux, hard drives are listed with a three letter description like this:

Interface Type Identifier

With most disks these days, the interface is always recognized as being SCSI so the first letter is S for SCSI. The second letter D means that it's a drive. The final letter is assigned in alphabetical order from A to Z starting from the first enumerated device on the bus.

The numbers which follow the three letter description indicate the partition number of a logical volume on the drive. All usable hard drives have at least one partition.

An identifier such as /dev/sda5 therefore means it's the first SCSI hard drive, fifth partition.

2
  • The SCSI distinction is a bit archaic, it seems that all sata drives and usb flash drives are recognized as "sdx" desptie having nothing to do with SCSI
    – crasic
    Apr 9, 2011 at 17:57
  • (S)ATA, USB Mass Storage devices, and Firewire devices all use the SCSI command protocol which is why they are recognized as SCSI devices even if they don't actually use a SCSI bus. Apr 9, 2011 at 18:12
1

For details, see: http://en.wikipedia.org/wiki/AT_Attachment

Linux treats even parallel ATA drives as SCSI devices, they're close enough, and the SCSI code was far cleaner than the IDE code, so the change was made from /dev/hd* to /dev/sd* a while back.

ATA only allows two drives per channel, so there's typically four two channels, each with a master and a slave.

And the partition format has extended partitions starting at partition 5. Any non-primary partitions wind up being created 'inside 5', as it were. For full details, you'd probably have to read the source for fdisk or gparted.

1

Well, sda and sdb are two different hard disks in your PC. sda1, sda2 ... are partitions on these disks.

You must log in to answer this question.

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