Find the answer to your Linux question:
Results 1 to 4 of 4
Hi (this is my first post in any forum ever ) i did somethink wrong: i have ubuntu 9.10 with 2 hdd (flash + normal). i did a backup of ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2009
    Location
    Berlin, germany
    Posts
    3

    Exclamation same uuid used twice (accidentally, using dd for backup) ->no warning appears


    Hi
    (this is my first post in any forum ever )
    i did somethink wrong: i have ubuntu 9.10 with 2 hdd (flash + normal).
    i did a backup of / by: dd if=/dev/sda1 of=/dev/sdb1 (both partitions were created before).
    (i know there a better ways to backup a partitiion, but i did it like that)
    then i woundered for some days about strange behaviour (grub, disk noise of the non-flash disk, etc)
    everything was working, but i woundered sometimes - thats why i didnt investigated anything.
    then i found out, that the linux-kernel has choosen the backup-partition as root-partition (same uuid).
    what i want to reach: give a warning if the kernel finds two different partitions using same uuid!
    (there was no hint in the kernel-log about this misconfiguration)
    of course this was a user-mistake, but i think this could happen to someone else again.
    its propably only one line of code, but makes linux a little bit more non-expert-friendly - i think.

  2. #2
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    Welcome to the forums!

    If I'm understanding your post correctly, you might want to take a look at persistent block device naming. The following HowTo was written for Arch Linux but it should work with other distributions with a few minor adjustments, and it certainly helps to prevent confusion between block devices.
    oz

  3. #3
    Just Joined!
    Join Date
    Dec 2009
    Location
    Berlin, germany
    Posts
    3

    Post Simply Check should be done

    thanks for the fast answering.

    Quote Originally Posted by ozar View Post
    it certainly helps to prevent confusion between block devices:
    i know and understand. the think is: using uuid is default in ubuntu.
    if someone is doing what i did, no warning or hint comes up.
    it would be only one line of code to check inside the kernel while scanning all drives for there uuid (which is done anyway) if the neww uuid is already known and post a logmsg. (ok about 4 LoC)

    my philosophy is: if a stupid-user-error can happen, it should be checked for it - at least if it is easy possible!


    Quote Originally Posted by ozar View Post
    Welcome to the forums!

    The following HowTo was written for Arch Linux but it should work with other distributions with a few minor adjustments, ... .
    which HowTo?
    Last edited by aleks-berlin; 12-21-2009 at 09:48 AM. Reason: thanks for answer

  4. #4
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,733
    Quote Originally Posted by aleks-berlin View Post
    which HowTo?
    Oops... sorry, I was in a hurry when I posted and left the link out:

    Persistent block device naming - ArchWiki
    oz

Posting Permissions

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