Results 1 to 4 of 4

Thread: Booting to Random Drives -> Duplicate UUIDS -> How do I change them

  1. #1
    Join Date
    Jul 2010
    Beans
    5

    Arrow Booting to Random Drives -> Duplicate UUIDS -> How do I change them

    I have been using dd (
    Code:
    sudo dd if=/dev/drivetoduplicate of=/dev/backuplocation bs=1M
    ) to create backups of my ubuntu system. My computer has 2 internal drives and 1 external drive.

    I used
    Code:
    sudo blkid
    to find out that all three drives have the exact same UUID which is probably why no matter what is selected in the BIOs it boots to a random drive.

    My hope is someone can give a beginner friendly step by step guide to changing the UUID for the drives in a way that allows them to be uniquely specified in the BIOS.

    Also if anyone forsees any other issues I may run into or anything else I might change from the dd backup process please share.

    Thanks

    Update 1:
    I attempted to the change the UUID using
    Code:
     sudo tune2fs -U random /dev/sdc1
    which worked and I was able to see that it had changed using blkid
    however
    Code:
     sudo tune2fs -U random /dev/sdc5
    didn't work

    and now when I select my external I'm unable to boot to it.
    Last edited by b0ot; January 19th, 2011 at 09:15 PM. Reason: UPDATE

  2. #2
    Join Date
    May 2012
    Beans
    1

    Re: Booting to Random Drives -> Duplicate UUIDS -> How do I change them

    I googled for the answer to this question, and it brought me here. I didn't see a reply, but I found the solution.

    This happened to me recently on my Debian server after I used the "dd" command.

    Try this:

    Code:
    sudo ls -l /dev/disk/by-uuid/
    I got a unique UUID (as I originally expected). Not sure why, but I'm not using "blkid" ever again.

  3. #3
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Booting to Random Drives -> Duplicate UUIDS -> How do I change them

    Your issue is using dd and leaving drives mounted. You can do that if removing drive or copying to a new drive and not using old drive on same system. Each drive is bootable because grub2 & fstab (plus a few more places) have UUIDs embedded.

    Other backup methods would be better. I just back up my data with rsync, but if you want a bootable system there are other ways.

    discussion of alternatives/strategy:
    https://help.ubuntu.com/community/BackupYourSystem


    blkid is not an issue, it normally just shows UUIDs of drives.
    For info on UEFI boot install & repair - Updated Mar 2015:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







  4. #4
    Join Date
    Apr 2008
    Location
    LOCATION=/dev/random
    Beans
    5,767
    Distro
    Ubuntu Development Release

    Re: Booting to Random Drives -> Duplicate UUIDS -> How do I change them

    Quote Originally Posted by Aurabolt View Post
    I googled for the answer to this question, and it brought me here. I didn't see a reply, but I found the solution.

    This happened to me recently on my Debian server after I used the "dd" command.

    Try this:

    Code:
    sudo ls -l /dev/disk/by-uuid/
    I got a unique UUID (as I originally expected). Not sure why, but I'm not using "blkid" ever again.
    By default blkid reads it's data from a cache file not directly from the device. If the two aren't in sync then blkid can give incorrect readings. To read directly from the device you should use:
    Code:
    sudo blkid -c /dev/null
    or
    Code:
    sudo blkid -p /dev/sda1
    See 'man blkid' for more info.
    Cheesemill

Tags for this Thread

Bookmarks

Posting Permissions

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