+ # Pre-seed the debconf database with answers. Each question will be marked
+ # as seen to prevent debconf from asking the question interactively.
+ [ -f /etc/debootstrap/debconf-selections ] && \
+ cat /etc/debootstrap/debconf-selections | debconf-set-selections
+
if [ "$PACKAGES" = 'yes' ] ; then
if ! [ -r /etc/debootstrap/packages ] ; then
echo "Error: /etc/debootstrap/packages not found, exiting."
if [ "$PACKAGES" = 'yes' ] ; then
if ! [ -r /etc/debootstrap/packages ] ; then
echo "Error: /etc/debootstrap/packages not found, exiting."
if [ "$a" != "$b" ] ; then
echo "Sorry, passwords do not match. Retry."
if [ "$a" != "$b" ] ; then
echo "Sorry, passwords do not match. Retry."
-cat > /etc/fstab << EOF
-$TARGET / auto defaults,errors=remount-ro 0 1
+if [ -n "$TARGET_UUID" ] ; then
+ echo "/dev/disk/by-uuid/${TARGET_UUID} / auto defaults,errors=remount-ro 0 1" > /etc/fstab
+else
+ echo "${TARGET} / auto defaults,errors=remount-ro 0 1" > /etc/fstab
+fi
+
+cat >> /etc/fstab << EOF
proc /proc proc defaults 0 0
/sys /sys sysfs noauto,rw,nosuid,nodev,noexec 0 0
/dev/cdrom /mnt/cdrom0 iso9660 ro,user,noauto 0 0
proc /proc proc defaults 0 0
/sys /sys sysfs noauto,rw,nosuid,nodev,noexec 0 0
/dev/cdrom /mnt/cdrom0 iso9660 ro,user,noauto 0 0
- sed -i "s|^# kopt=root=.*|# kopt=root=${TARGET} ro ${BOOT_APPEND}|g" /boot/grub/menu.lst
+ if [ -n "$TARGET_UUID" ] ; then
+ sed -i "s|^# kopt=root=.*|# kopt=root=UUID=${TARGET_UUID} ro ${BOOT_APPEND}|g" /boot/grub/menu.lst
+ else
+ sed -i "s|^# kopt=root=.*|# kopt=root=${TARGET} ro ${BOOT_APPEND}|g" /boot/grub/menu.lst
+ fi
# not sure why savedefault does not work for me; any ideas?
sed -i "s/^savedefault.*/# &/g" /boot/grub/menu.lst
$UPDATEGRUB -y
# not sure why savedefault does not work for me; any ideas?
sed -i "s/^savedefault.*/# &/g" /boot/grub/menu.lst
$UPDATEGRUB -y