Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2009
    Riga, Latvia

    3rd SATA disk becomes the first?

    Xubuntu 8.04.
    Started on a box with IDE CD and one SATA disk (slot 1). Then added another (slot 2). All OK: /dev/sda and /dev/sdb. Now tried to add a 3rd one - taken from a broken Windows box (tried both spare slots: 3 and 4).
    The system boots all right - except now /dev/sda is this new disk. Former sda becomes sdb, and former sdb becomes sdc (so all the links are lost and the 2nd disk is not automounted at all). System boots from sdb nevertheless and shows no warning (graphical mode w/o details).
    Removing the 3rd drive sets the things back old way.
    New to Ubuntu and not that much familiar with Debian (mostly RH and clones so far), so i need advice.

  2. #2
    Linux Guru Jonathan183's Avatar
    Join Date
    Oct 2007
    Use uuid for partition identification, that way it does not matter if partition is sda1 sdb1 or sdc1. Use ls /dev/disk/by-uuid -l to match partition and uuid. You can edit fstab directly or you can do something like
    cat /etc/fstab > new_fstab
    ls /dev/disk/by-uuid -l >> new_fstab
    then edit to suit using
    nano new_fstab
    once you have all info correct use
    sudo mv /etc/fstab /etc/fstab.old
    sudo mv new_fstab /etc/fstab
    If you need more help with this then use the first 2 commands and then post contents of new_fstab here.

  3. #3
    Just Joined!
    Join Date
    May 2009
    Riga, Latvia
    Sorry for delay and thanks for advice. I managed to do that (i.e. to set things more or less right with UUID). Altogether, why the 3rd slot has come forth, is still a puzzle for me
    Thanks once more.

  4. $spacer_open
  5. #4
    Basically it's a bus logic thing that maps according to a first come first serve method. With out using labels or the UUID for your drives to exactly identify and map your drives, the HAL/UDEV will assign /dev/sda to the first bus to come up.

    Generally, if you have IDE0 IDE1 IDE2, during boot it should come up in order as IDE0 then IDE1 then IDE2... however it is entirely possible that IDE2 comes up before IDE0 and IDE1. In a first come first serve method IDE2 will be mapped to /dev/sda in the instance that it comes up before IDE0 and IDE1.

    I'm still new, too... so I hope my explanation doesn't confuse you even more

  6. #5
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    I usually label my drives and mount them using the labels instead of the device id (/dev/sdxN). That way, if the OS changes the id because of this sort of issue, it will still mount correctly. Example from my fstab:

    LABEL=afs-esata-1 /mnt/esata1 ext3 defaults 1 2

    You can add a label to an existing ext2/ext3 file system with the command: mkfs -L <name> /dev/sdxN
    Example: mkfs -L /boot1 /dev/sda1 ; mkfs -L SWAP-sda2 /dev/sda2 ; mkfs -L / /dev/sda3

    Now, you can change your /etc/fstab to mount /, /boot and swap this way:
    LABEL=/                 /                       ext3    defaults        1 1
    LABEL=/boot1            /boot                   ext3    defaults        1 2
    LABEL=SWAP-sda2         swap                    swap    defaults        0 0
    Now, if the system ever changes the partition or drive order, it will continue to boot properly.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

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