Ubuntu Linux Terms for your Hard Drive and Devices Explained

Ubuntu Linux Terms for your Hard Drive and Devices Explained



This article provides information on what Hard Drives and Devices and called in Ubuntu Linux and how they are used on your Dell PC.


Table of Contents:

  1. Understanding device naming in Linux
  2. Linux device naming convention
  3. GRUB device naming convention
  4. GRUB2 device naming convention
  5. Summary of device terms and usage in Ubuntu

Understanding device naming in Linux

Understanding device naming and usage is essential if you want to competently install and use Ubuntu Linux. Device naming has changed and evolved over the numerous versions of Linux that are constantly being put out and as the technology changes.

Unfortunately this will not be easily comparable to how Window's or Apple's name and use devices on their systems. You will see some similarities with Google's Android.

Note: The current version of Ubuntu is using GRUB2 - GRand Unified Bootloader. I would recommend sections 4 and 5 as being the most current information.


Back to Top


Linux device naming convention

Linux started off by giving each device a name, then a position and then a partition.

Note: As with any Hard Drive when partitioning up a Master Boot Record (MBR) drive you can have a maximum of 4 Primary Partitions or a combination of Primary and Logical Partitions. Its recommended that you keep to this convention for GUID Partition Table (GPT) drives.

Under Linux the original naming convention was :

  • dev/fd0 - The first floppy drive.
  • dev/fd1 - The second floppy drive.
  • dev/sda - The first SCSI disk SCSI ID address-wise.
  • dev/sdb - The second SCSI disk address-wise and so on.
  • dev/scd0 or /dev/sr0 - The first SCSI CD-ROM.
  • dev/hda - The master disk on IDE primary controller.
  • dev/hdb - The slave disk on IDE primary controller.
  • dev/mmcblk0 - SDHC card on PCMCIA. Special Device Naming.
  • dev/sdb - USB flash Drive against SCSI emulation. However the kernel starts in parallel with several drivers. This doesn't mean that your sda or sdb drive is a USB one, but that the USB module was started at the same time as the drive one and send it's messages simultaneously.
  • dev/hdc and /dev/hdd - The master and slave disks of the secondary controller respectively. Newer IDE controllers have two channels acting like two controllers.


Back to Top


GRUB device naming convention

GRUB changed the convention by adding a partition starting at 0.

The base name for a (E)IDE controlled disk is dev/hd? The ? is a single letter. For GRUB this equals hd? The ? is position 1 through 4.

Naming the devices is quite straightforward, taking the first example below then the first part is the device name hd then the second part is the position it holds a.

Drive Name
  • dev/hda - master disk on first controller
  • dev/hdb - slave disk on first controller
  • dev/hdc - master disk on second controller
  • dev/hdd - slave disk on second controller
GRUB Name
  • hd1 - master disk on first controller
  • hd2 - slave disk on first controller
  • hd3 - master disk on second controller
  • hd4 - slave disk on second controller

Naming the partitions is quite easy as you attach a number to the appropriate device. Look below for some partitions on dev/hda

Note: 0-3 is the 4 possible primary partitions you could choose and then 4 and above for the logical partitions you have set.
Drive Name
  • dev/hda0 - master disk on first controller, first primary partition.
  • dev/hda1 - master disk on first controller, second primary partition.
  • dev/hda4 - master disk on first controller, first logical partition.
  • dev/hda5 - master disk on first controller, second logical partition.
GRUB Name
  • hd1,0 - master disk on first controller, first primary partition.
  • hd1,1 - master disk on first controller, second primary partition.
  • hd1,4 - master disk on first controller, first logical partition.
  • hd1,5 - master disk on first controller, second logical partition.


Back to Top


GRUB2 device naming convention

GRUB2 changed the convention by taking 0 out of the naming convention, this means everything starts at 1.

The base name for a (E)IDE controlled disk is dev/hd? The ? is a single letter. For GRUB2 this equals hd? The ? is position 1 through 4.

Naming the devices is quite straightforward, taking the first example below then the first part is the device name hd then the second part is the position it holds a.

Drive Name
  • dev/hda - master disk on first controller
  • dev/hdb - slave disk on first controller
  • dev/hdc - master disk on second controller
  • dev/hdd - slave disk on second controller
GRUB2 Name
  • hd1 - master disk on first controller
  • hd2 - slave disk on first controller
  • hd3 - master disk on second controller
  • hd4 - slave disk on second controller

Naming the partitions is quite easy as you attach a number to the appropriate device. Look below for some partitions on dev/hda

Note: 1-4 is the 4 possible primary partitions you could choose and then 5 and above for the logical partitions you have set.
Drive Name
  • dev/hda1 - master disk on first controller, first primary partition.
  • dev/hda2 - master disk on first controller, second primary partition.
  • dev/hda5 - master disk on first controller, first logical partition.
  • dev/hda6 - master disk on first controller, second logical partition.
GRUB2 Name
  • hd1,1 - master disk on first controller, first primary partition.
  • hd1,2 - master disk on first controller, second primary partition.
  • hd1,5 - master disk on first controller, first logical partition.
  • hd1,6 - master disk on first controller, second logical partition.


Back to Top


Summary of device terms and usage in Ubuntu

Serial Advanced Technology Attachment (SATA) Drives

With the advent of SATA Drives the convention changed and now Hard Drives are mostly referenced as sda instead of hda. Where sd stands for serial drive.

Partition Tables

A partition table shows the partitions of a Hard Drive or any other storage device. There are two standards for the layout of the partition table :

  1. Master Boot Record (MBR) - MBR also know as ms-dos, is what you might call the original standard. MBR is still the most widely used partition table, it comes with two major limitations

    1. It doesn't allow you to create more than four main partitions. Those partitions are called primary partitions.

    2. Disk partitions may not exceed 2TB.

  2. GUID Partition Table (GPT) - GPT came much later. While MBR is still in use, the limitations are what led to the development of GPT. GPT overcomes the two limitations of MBR. You can have multiple primary partitions and the drive sizes can exceed 2TB.

Hard Drive Naming Convention

The first thing you need to know is there is no C drive or E drive in Linux. You will normally see something like /dev/sda, /dev/sdb, /dev/sdc, … etc instead. The dev is short for device. The sd was short for Small Computer System Interface (SCSI) mass-storage driver.

Partitions and Partition Numbering

To install an operating system on a hard drive you have to divide it into distinct storage units. We call those storage units partitions. Under MBR - which is the default on virtually all Linux distributions, there are three different types of partitions – Primary, Extended, and Logical. With MBR any partition that is not explicitly created as an extended or logical partition, is a primary partition. Any unallocated space is shown as Free. While it may be free, you can't use it in that state. As far as the system is concerned that free space does not exist until it's partitioned.

Partition Guide

If you've created the maximum amount of partitions and still have Free Space it will be unusable.

Disk Error Message

Extended Partition

By tagging a partition as an extended partition its possible to create many more partitions under the extended partition. Those partitions are called logical partitions, and there's pretty much no limit to the number of logical partitions that you can create. This means you can have three primary partitions and one extended partition and then create numerous partitions from there.

Note: Only one extended partition may be configured on a single hard drive.

The graphical installation program of Ubuntu is Ubiquity.

Two features have been added which have been available on other Linux distro's for some time.

The two features are :

Full Disk Encryption

Support for encrypting the users’ home directory has been in Ubiquity for a long time, but as a physical security tool. With full disk encryption the system will not boot if the correct disk encryption passphrase is not used. At every reboot, the person sitting in front of the computer with full disk encryption configured, will get a prompt shown.

Linux Logical Volume Manager (LVM)

LVM makes it very easy to manage disk space. Especially when it comes to resizing partitions and adding another hard Drive to the system. LVM does not have redundancy built-in. This means in a multi disk system if one disk fails you will have problems. LVM is only working using the automated scheme at present.


Back to Top


Additional Information :

Note:
Software support is provided by Canonical through the following methods:
Technical Support is provided by Dell :


Back to Top






Article ID: SLN151767

Last Date Modified: 06/01/2018 05:05 AM


Rate this article

Accurate
Useful
Easy to understand
Was this article helpful?
Yes No
Send us feedback
Comments cannot contain these special characters: <>()\
Sorry, our feedback system is currently down. Please try again later.

Thank you for your feedback.