same uuid used twice (accidentally, using dd for backup) ->no warning appears
Hi
(this is my first post in any forum ever :-o )
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.
Simply Check should be done
thanks for the fast answering.
Quote:
Originally Posted by
ozar
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
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?