6
cat > root/etc/fstab << EOF
7
# /etc/fstab: static file system information.
9
# <file system> <mount point> <type> <options> <dump> <pass>
10
proc /proc proc defaults 0 0
12
for ((i=0;i<${#MOUNTPOINTS[@]};i++)); do
13
if [ "${MOUNTPOINTS[$i]}" = "root" ]; then
14
echo "UUID=$(cat ${MOUNTPOINTS[$i]}.uuid) / ext3 defaults 0 1">>root/etc/fstab
15
elif [ "${MOUNTPOINTS[$i]}" = "swap" ]; then
16
echo "UUID=$(cat ${MOUNTPOINTS[$i]}.uuid) swap swap defaults 0 1">>root/etc/fstab
18
echo "UUID=$(cat ${MOUNTPOINTS[$i]}.uuid) ${MOUNTPOINTS[$i]} ext3 defaults 0 1">>root/etc/fstab
23
common_write_device_map_with_uuids() {
24
echo "(hd0) UUID=$(cat ${MOUNTPOINTS[0]}.uuid)" >> target/boot/grub/device.map
27
common_write_device_map_no_uuids() {
28
echo "(hd0) /dev/sd${letters[0]}" >> target/boot/grub/device.map
31
common_mangle_grub_menu_list_with_uuid() {
32
rep="UUID=$(cat ${MOUNTPOINTS[0]}.uuid)"
33
sed -ie "s/\/dev\/hda1/$rep/g" target/boot/grub/menu.lst