Results 1 to 3 of 3

Thread: What is the difference hd0,2 or sda3 or disk/by-id/... ?

  1. #1
    Join Date
    Oct 2008
    Location
    The Netherlands
    Posts
    121

    Question What is the difference hd0,2 or sda3 or disk/by-id/... ?

    Recently I had to do some editing of /etc/fstab and /boot/grub/menu.lst

    I noticed that there are at least three different ways to define the disk partitions:
    Code:
    (hd0,2)
    /dev/sda3
    /dev/disk/by-id/scsi-SATA_FUJITSU_MHV2040_NT30T5C2AWCT-part3
    I understand that all three lines (above) point to the 3rd partition on my drive. What I don't understand is: why are there three different ways of doing that? Isn't it easier to always use the same notation? I personally like the /dev/sda3 one.

    Probably there is a reason to have these three different ways of notation.
    Can someone explain the philosophy behind it?
    openSUSE 11.0, GNOME
    HP Compaq NC6000, Intel Pentium M Processor 725, ATI Mobility Radeon 9600, Intel PRO 2200BG
    HP Compaq DC7100, Intel Pentium 4 Processor 521, Intel 915G Express, D-Link DWL-510 AirPlus G

  2. #2
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: What is the difference hd0,2 or sda3 or disk/by-id/... ?

    The (hd0,2) notation is only used by GRUB, not Linux. So you can't substitute GRUB notation in /etc/fstab, or use Linux notation in GRUB, except in kernel parameters where they aren't interpreted by GRUB, just passed to the kernel.

    As for the other two on some systems the path depends on the order in which the disks come online. On such a system, you might want to prevent mounting the wrong disk by mounting by-id.

    There are actually two other methods, by-label and by-uuid, look at the directories in /dev/disk/.

  3. #3
    Join Date
    Oct 2008
    Location
    The Netherlands
    Posts
    121

    Smile Re: What is the difference hd0,2 or sda3 or disk/by-id/... ?

    Thanks a lot!
    Things are much clearer now.
    openSUSE 11.0, GNOME
    HP Compaq NC6000, Intel Pentium M Processor 725, ATI Mobility Radeon 9600, Intel PRO 2200BG
    HP Compaq DC7100, Intel Pentium 4 Processor 521, Intel 915G Express, D-Link DWL-510 AirPlus G

Posting Permissions

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