diff --git a/lib/debian-finish.sh b/lib/debian-finish.sh index 6f81f4f..499de6e 100644 --- a/lib/debian-finish.sh +++ b/lib/debian-finish.sh @@ -24,18 +24,15 @@ else echo "ERROR: [/sbin/parted /dev/mmcblk0 set 1 boot on] failed" >> /var/log/netinstall.log fi -#FIXME: convert to /proc/mounts #Find Target Partition and FileSystem -if [ -f /etc/mtab ] ; then - FINAL_PART=$(mount | grep /dev/ | grep -v devpts | grep " / " | awk '{print $1}') - FINAL_FSTYPE=$(mount | grep /dev/ | grep -v devpts | grep " / " | awk '{print $5}') +if [ -f /boot/uboot/mounts ] ; then + echo "cat /boot/uboot/mounts..." >> /var/log/netinstall.log + cat /boot/uboot/mounts >> /var/log/netinstall.log + FINAL_PART=$(cat /boot/uboot/mounts | grep /dev/ | grep "/target " | awk '{print $1}') + FINAL_FSTYPE=$(cat /boot/uboot/mounts | grep /dev/ | grep "/target " | awk '{print $3}') else - #Currently only Maverick, but log if something else does it.. - touch /boot/uboot/backup/no_mtab - FINAL_PART=$(cat /mounts | grep /dev/ | grep "/target " | awk '{print $1}') - FINAL_FSTYPE=$(cat /mounts | grep /dev/ | grep "/target " | awk '{print $3}') + echo "ERROR: [/boot/uboot/mounts] was missing..." >> /var/log/netinstall.log fi -mount > /boot/uboot/backup/mount.log #Cleanup: NetInstall Files rm -f /boot/uboot/uInitrd.net || true diff --git a/lib/ubuntu-finish.sh b/lib/ubuntu-finish.sh index e55bd12..aa433f2 100644 --- a/lib/ubuntu-finish.sh +++ b/lib/ubuntu-finish.sh @@ -24,18 +24,15 @@ else echo "ERROR: [/sbin/parted /dev/mmcblk0 set 1 boot on] failed" >> /var/log/netinstall.log fi -#FIXME: convert to /proc/mounts #Find Target Partition and FileSystem -if [ -f /etc/mtab ] ; then - FINAL_PART=$(mount | grep /dev/ | grep -v devpts | grep " / " | awk '{print $1}') - FINAL_FSTYPE=$(mount | grep /dev/ | grep -v devpts | grep " / " | awk '{print $5}') +if [ -f /boot/uboot/mounts ] ; then + echo "cat /boot/uboot/mounts..." >> /var/log/netinstall.log + cat /boot/uboot/mounts >> /var/log/netinstall.log + FINAL_PART=$(cat /boot/uboot/mounts | grep /dev/ | grep "/target " | awk '{print $1}') + FINAL_FSTYPE=$(cat /boot/uboot/mounts | grep /dev/ | grep "/target " | awk '{print $3}') else - #Currently only Maverick, but log if something else does it.. - touch /boot/uboot/backup/no_mtab - FINAL_PART=$(cat /mounts | grep /dev/ | grep "/target " | awk '{print $1}') - FINAL_FSTYPE=$(cat /mounts | grep /dev/ | grep "/target " | awk '{print $3}') + echo "ERROR: [/boot/uboot/mounts] was missing..." >> /var/log/netinstall.log fi -mount > /boot/uboot/backup/mount.log #Cleanup: NetInstall Files rm -f /boot/uboot/uInitrd.net || true diff --git a/mk_mmc.sh b/mk_mmc.sh index a92db96..9c66772 100755 --- a/mk_mmc.sh +++ b/mk_mmc.sh @@ -935,7 +935,9 @@ function finish_installing_device { rm -f /etc/rcn.conf mount -o bind /sys /target/sys - cat /proc/mounts > /target/mounts + + #Needed by finish-install.sh to determine root file system location + cat /proc/mounts > /target/boot/uboot/mounts mkdir -p /target/etc/hwpack/ cp /etc/hwpack/SOC.sh /target/etc/hwpack/