From afcffd6f2208aa241b346c501d749e3edc5d7dd1 Mon Sep 17 00:00:00 2001 From: An-Cheng Huang Date: Thu, 3 Jul 2008 19:18:06 -0700 Subject: fix for bug 3417: use UUID in grub config file --- scripts/install-system | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'scripts') diff --git a/scripts/install-system b/scripts/install-system index 5a9c0309..b5eefe62 100755 --- a/scripts/install-system +++ b/scripts/install-system @@ -479,7 +479,15 @@ install_root_filesystem () { output=$(umount /mnt/squashfs) # create the fstab - echo -e "/dev/$ROOT_PARTITION\t/\text3\tdefaults\t0 1" >> $rootfsdir/etc/fstab + local rootdev="/dev/$ROOT_PARTITION"; + uuid=$(dumpe2fs -h $rootdev 2>/dev/null | awk '/^Filesystem UUID/ {print $3}') + if [ -z "$uuid" ] + then + echo "Unable to read filesystem UUID. Exiting." + exit 1 + else + echo -e "UUID=$uuid\t/\text3\tdefaults\t0 1" >> $rootfsdir/etc/fstab + fi #setup the hostname file cp /etc/hostname $rootfsdir/etc/ @@ -632,9 +640,10 @@ install_grub () { # This allows device to move around and grub will still find it local rootdev="/dev/$ROOT_PARTITION"; uuid=$(dumpe2fs -h $rootdev 2>/dev/null | awk '/^Filesystem UUID/ {print $3}') - if [ -z $uuid ] + if [ -z "$uuid" ] then - GRUB_ROOT="root=$rootdev ro" + echo "Unable to read filesystem UUID. Exiting." + exit 1 else GRUB_ROOT="root=UUID=$uuid ro" fi -- cgit v1.2.3 From 95d9651eb951d10572503d783aea0e02d44e98d5 Mon Sep 17 00:00:00 2001 From: Robert Bays Date: Mon, 7 Jul 2008 14:05:31 -0700 Subject: fix for bug 3095 --- scripts/install-system | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/install-system b/scripts/install-system index b5eefe62..a7a0b066 100755 --- a/scripts/install-system +++ b/scripts/install-system @@ -528,16 +528,19 @@ copy_config () { if [ -z "$config" ]; then config="$fdconfdir/config.boot" else - config="$config\n$fdconfdir/config.boot" + config="$config $fdconfdir/config.boot" fi fi if [ -n "$config" ]; then echo "I found the following configuration files" - echo -e "$config" - default=$(echo -e $config| head -1) + for file in $config + do + echo $file + done + + default=$(echo -e $config | awk '{ print $1 }') - resp='' while [ -z "$configfile" ] do echo -n "Which one should I copy to $INSTALL_DRIVE? [$default]: " -- cgit v1.2.3