Find the answer to your Linux question:
Results 1 to 4 of 4
What is the meaning of these terms? When I do a Code: fdisk -l I get the following output: Code: Device Boot Start End Blocks Id System /dev/sda1 * 1 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2011
    Posts
    12

    Meaning of and difference b/w sda1,sda2,hda,hd(0,1) etc?


    What is the meaning of these terms?
    When I do a
    Code:
    fdisk -l
    I get the following output:
    Code:
     Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *           1        9328    74920960   83  Linux
    /dev/sda2            9328        9730     3227649    5  Extended
    /dev/sda5            9328        9730     3227648   82  Linux swap / Solaris
    What does this mean? Why I didn't get hda in place of sda?
    And what is meant by (hd0,1)?
    I was trying GRUB:
    Code:
    grub> root (hd0,1)
    
    Error 21: Selected disk does not exist
    I tried other combinations and they also didn't work...
    I guess this may sound really lame to more experienced users but I am a newbie and I need help on this topic... so kindly enlighten me. Thank you in advance.

  2. #2
    Linux User
    Join Date
    Dec 2009
    Posts
    264
    Hi there,
    I am also kind of a noob at this, but I can tell you as much as I know:
    System:
    hda - stands for an PATA Hard-disk a
    sda - stands for an SCSI Hard-disk a + SATA + USB

    sda1 for example would mean the first partition of the scsi drive a
    hda1 = first partition of ide drive a

    Boot Loader:
    hd0 - Harddrive (not depending on the Hardware) id 0
    hd0-1 Harddive 0 partition 1

    If I understand that page right:
    https://help.ubuntu.com/community/Grub2
    it's like:
    sda | hda = hd0
    sda1 | hda1 = hd0-1

  3. #3
    Linux Newbie
    Join Date
    Sep 2007
    Posts
    218
    Hello and welcome.
    What is the meaning of these terms?
    Just as a URL is a specific address for a web page, 'sda1' is a specific address on a hard drive. When looking for what's on your HD, say the swap partition, the system reads it as a device (/dev) and then a location on that device... /dev/sda5.

    The last two digits are usually more significant than the first two:
    sda5 = 5th partition on the first HD ('a' is first HD)
    sdc10 = 10th partition on the third HD ('c' is third of three active HDs)
    sdb3 = 3rd partition on the second HD ('b' is second of two or more active HDs)

    And what is meant by (hd0,1)?
    Grub is a bootloader. Here's a short explanation of what it does (copied from the Debian wiki):

    "A bootloader is a program that is found by the system BIOS in the boot sector of your storage device (hard drive's Master boot record), and which locates and starts your operating system for you."

    Grub has its own format/syntax for finding a HD location that's different from the syntax the Linux OS uses:

    (hd0,5) = sda5
    (hd2,10) = sdc10
    (hd1,3) = sdb3

    Not to be confusing, but Grub is still going through a transition from the original grub, Grub legacy, to Grub2, a rewritten and updated version. In the above example, the syntax is correct for Grub2 but incorrect for Grub legacy. Most distros now use grub2 but not all of them.
    Code:
     grub> root (hd0,1)
    Think of Grub as a small system (which it is), which is why the Grub environment is entered through a terminal, or at the grub screen on boot. Further, Grub2 commands (many of them) are not the same as Grub legacy commands.

    In addition to zombykillah's link: Grub 2 Basics - Ubuntu Forums
    Quote Originally Posted by zombykillah View Post
    System:
    hda - stands for an PATA Hard-disk a
    sda - stands for an SCSI Hard-disk a + SATA + USB
    Thanks ... forgot about that

  4. #4
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    Most Linux distributions still use Grub Legacy not Grub2. It is mostly Ubuntu and its derivatives that use Grub2.

    Another point worth making is that both Grub Legacy and Grub2 count hard drive starting with zero (0). Grub Legacy counts partitions beginning with zero (0) while Grub2 counts partitions beginning with one (1).

    Most recent Linux distributions use the sda for any type of drive.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •