You are not logged in.
I want to automate conversion of /dev/mapper/isw_ebaifefjbf_Volume0 to UUID form in fstab.
Arch installer creates fstab with /dev/mapper/ devices.
The problem is /dev/disk/by-uuid/* are symlinks to /dev/dm-* devices .
For example, /dev/dm-6 and /dev/mapper/isw_ebaifefjbf_Volume0p9 refer to the same partition. I tried to use 'readlink -e' but they're both NOT symlinks and have different inode
Last edited by leniviy (2011-04-17 06:33:18)
Arch 64, xfce4
Offline
fn_finduuid() {
can1=`readlink -e "$1"`
majmin1=`stat -c %t-%T "$can1"`
for L in `ls /dev/disk/by-uuid/`; do
can2=`readlink -e "/dev/disk/by-uuid/$L"`
majmin2=`stat -c %t-%T "$can2"`
if [ "$majmin1" = "$majmin2" ]; then
echo "$L"
fi
done
}
hell, why noone ever answers me!
Arch 64, xfce4
Offline