How to handle large number of disk devices in "arbitrary" order?
Michael Tautschnig
mt at debian.org
Tue Nov 15 12:10:37 CET 2011
Hi Carsten,
[...]
>
> Is there a way to force FAI to use UUID in /etc/fstab as well as for grub?
>
For fstab just use fstabkey:uuid in your disk_config line (which will be the
default 4.0). For grub you will have to use some local hacks AFAIK. I'm using
for grub 1 in boot/grub/menu.lst/preinst
preinst_file=$2
if grep -q "##UUID##" $preinst_file ; then
part="$FAI_ROOT`grep "##UUID##" $preinst_file | perl -p -e 's/^.*##UUID##([^#]*)##.*$/$1/'`"
part="`echo $part | sed 's#//#/#g' | perl -p -e 's#(.)/$#$1#'`"
uuid="`blkid -s UUID -o value \`mount | grep "on $part type" | awk '{ print $1 }'\``"
perl -p -i -e "s/##UUID##[^#]*##/UUID=$uuid/" $preinst_file
fi
with boot/grub/menu.lst/DEFAULT containing
title Debian GNU/Linux
root (hd0,0)
kernel /vmlinuz root=##UUID##/##
initrd /initrd.img
Hope this helps,
Michael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20111115/f08376ab/attachment.bin>
More information about the linux-fai
mailing list