use UUID of root
This commit is contained in:
fling
2011-04-14 14:02:33 +08:00
parent bb5f324039
commit e854d68b0a

View File

@@ -63,10 +63,16 @@ options:
configure_elilo_cnf()
{
local root_dev
root_dev="/dev/$ROOT_PARTITION"
sed -i "s@root=@root=$root_dev@g" $ELILO_CNF
sed -i -e "/initrd=.*/i\ append=\"$KPARAMETER\"" $ELILO_CNF
local root_dev
by_uuid=$(get_disk_sym $ROOT_PARTITION "by-uuid")
if [ -n "$by_uuid" ];then
root_dev="UUID=$(echo $by_uuid|sed 's/.*\///')"
sed -i -e "/initrd=.*/i\ append=\"$KPARAMETER root=UUID=$by_uuid\"" $ELILO_CNF
else
root_dev="/dev/$ROOT_PARTITION"
sed -i "s@root=@root=$root_dev@g" $ELILO_CNF
sed -i -e "/initrd=.*/i\ append=\"$KPARAMETER\"" $ELILO_CNF
fi
}
configure_grub_cnf ()