From ae4285fea005ea8a39c4291ef5d47f6c3cbe6d96 Mon Sep 17 00:00:00 2001 From: Robert Nelson Date: Sat, 13 Apr 2013 14:13:51 -0500 Subject: [PATCH] move: parted set boot flag to finish-install.sh script Signed-off-by: Robert Nelson --- lib/debian-finish.sh | 7 +++++++ lib/oneiric-preseed.cfg | 9 +-------- lib/precise-preseed.cfg | 9 +-------- lib/quantal-preseed.cfg | 9 +-------- lib/raring-preseed.cfg | 9 +-------- lib/squeeze-preseed.cfg | 9 +-------- lib/ubuntu-finish.sh | 7 +++++++ lib/wheezy-preseed.cfg | 14 +------------- 8 files changed, 20 insertions(+), 53 deletions(-) diff --git a/lib/debian-finish.sh b/lib/debian-finish.sh index f284ed0..20d38d1 100644 --- a/lib/debian-finish.sh +++ b/lib/debian-finish.sh @@ -11,6 +11,13 @@ if [ ! -d /boot/uboot/backup/ ] ; then fi ls -lh /boot/uboot/* >/boot/uboot/backup/file_list.log +#Set boot flag on: /dev/mmcblk0: +if [ -f /sbin/parted ] ; then + /sbin/parted /dev/mmcblk0 set 1 boot on || true +else + echo "ERROR: [/sbin/parted /dev/mmcblk0 set 1 boot on] failed" >> /boot/uboot/backup/install.log +fi + #Find Target Partition and FileSystem if [ -f /etc/mtab ] ; then FINAL_PART=$(mount | grep /dev/ | grep -v devpts | grep " / " | awk '{print $1}') diff --git a/lib/oneiric-preseed.cfg b/lib/oneiric-preseed.cfg index f993cb0..df0a30c 100644 --- a/lib/oneiric-preseed.cfg +++ b/lib/oneiric-preseed.cfg @@ -46,7 +46,7 @@ d-i partman-auto/disk string /dev/mmcblk0 d-i partman-auto/expert_recipe_file string /partition_recipe # Individual additional packages to install -d-i pkgsel/include string u-boot-tools pastebinit initramfs-tools wget linux-firmware linux-firmware-nonfree ntpdate bash devmem2 fbset +d-i pkgsel/include string bash devmem2 fbset initramfs-tools ntpdate parted pastebinit u-boot-tools wget # Whether to upgrade packages after debootstrap. # Allowed values: none, safe-upgrade, full-upgrade @@ -65,10 +65,3 @@ d-i finish-install/keep-consoles boolean true # Avoid that last message about the install being complete. d-i finish-install/reboot_in_progress note -# This command is run just before the install finishes, but when there is -# still a usable /target directory. You can chroot to /target and use it -# directly, or use the apt-install and in-target commands to easily install -# packages and run commands in the target system. -d-i preseed/late_command \ -string apt-install parted; in-target /sbin/parted /dev/mmcblk0 set 1 boot on ; - diff --git a/lib/precise-preseed.cfg b/lib/precise-preseed.cfg index f993cb0..df0a30c 100644 --- a/lib/precise-preseed.cfg +++ b/lib/precise-preseed.cfg @@ -46,7 +46,7 @@ d-i partman-auto/disk string /dev/mmcblk0 d-i partman-auto/expert_recipe_file string /partition_recipe # Individual additional packages to install -d-i pkgsel/include string u-boot-tools pastebinit initramfs-tools wget linux-firmware linux-firmware-nonfree ntpdate bash devmem2 fbset +d-i pkgsel/include string bash devmem2 fbset initramfs-tools ntpdate parted pastebinit u-boot-tools wget # Whether to upgrade packages after debootstrap. # Allowed values: none, safe-upgrade, full-upgrade @@ -65,10 +65,3 @@ d-i finish-install/keep-consoles boolean true # Avoid that last message about the install being complete. d-i finish-install/reboot_in_progress note -# This command is run just before the install finishes, but when there is -# still a usable /target directory. You can chroot to /target and use it -# directly, or use the apt-install and in-target commands to easily install -# packages and run commands in the target system. -d-i preseed/late_command \ -string apt-install parted; in-target /sbin/parted /dev/mmcblk0 set 1 boot on ; - diff --git a/lib/quantal-preseed.cfg b/lib/quantal-preseed.cfg index f993cb0..df0a30c 100644 --- a/lib/quantal-preseed.cfg +++ b/lib/quantal-preseed.cfg @@ -46,7 +46,7 @@ d-i partman-auto/disk string /dev/mmcblk0 d-i partman-auto/expert_recipe_file string /partition_recipe # Individual additional packages to install -d-i pkgsel/include string u-boot-tools pastebinit initramfs-tools wget linux-firmware linux-firmware-nonfree ntpdate bash devmem2 fbset +d-i pkgsel/include string bash devmem2 fbset initramfs-tools ntpdate parted pastebinit u-boot-tools wget # Whether to upgrade packages after debootstrap. # Allowed values: none, safe-upgrade, full-upgrade @@ -65,10 +65,3 @@ d-i finish-install/keep-consoles boolean true # Avoid that last message about the install being complete. d-i finish-install/reboot_in_progress note -# This command is run just before the install finishes, but when there is -# still a usable /target directory. You can chroot to /target and use it -# directly, or use the apt-install and in-target commands to easily install -# packages and run commands in the target system. -d-i preseed/late_command \ -string apt-install parted; in-target /sbin/parted /dev/mmcblk0 set 1 boot on ; - diff --git a/lib/raring-preseed.cfg b/lib/raring-preseed.cfg index f993cb0..df0a30c 100644 --- a/lib/raring-preseed.cfg +++ b/lib/raring-preseed.cfg @@ -46,7 +46,7 @@ d-i partman-auto/disk string /dev/mmcblk0 d-i partman-auto/expert_recipe_file string /partition_recipe # Individual additional packages to install -d-i pkgsel/include string u-boot-tools pastebinit initramfs-tools wget linux-firmware linux-firmware-nonfree ntpdate bash devmem2 fbset +d-i pkgsel/include string bash devmem2 fbset initramfs-tools ntpdate parted pastebinit u-boot-tools wget # Whether to upgrade packages after debootstrap. # Allowed values: none, safe-upgrade, full-upgrade @@ -65,10 +65,3 @@ d-i finish-install/keep-consoles boolean true # Avoid that last message about the install being complete. d-i finish-install/reboot_in_progress note -# This command is run just before the install finishes, but when there is -# still a usable /target directory. You can chroot to /target and use it -# directly, or use the apt-install and in-target commands to easily install -# packages and run commands in the target system. -d-i preseed/late_command \ -string apt-install parted; in-target /sbin/parted /dev/mmcblk0 set 1 boot on ; - diff --git a/lib/squeeze-preseed.cfg b/lib/squeeze-preseed.cfg index be21486..3e0b113 100644 --- a/lib/squeeze-preseed.cfg +++ b/lib/squeeze-preseed.cfg @@ -41,7 +41,7 @@ d-i partman-auto/disk string /dev/mmcblk0 d-i partman-auto/expert_recipe_file string /partition_recipe # Individual additional packages to install -d-i pkgsel/include string uboot-mkimage pastebinit initramfs-tools wget firmware-linux ntpdate bash fbset +d-i pkgsel/include string bash fbset initramfs-tools ntpdate pastebinit parted uboot-mkimage wget # Whether to upgrade packages after debootstrap. # Allowed values: none, safe-upgrade, full-upgrade @@ -58,10 +58,3 @@ d-i finish-install/keep-consoles boolean true # Avoid that last message about the install being complete. d-i finish-install/reboot_in_progress note -# This command is run just before the install finishes, but when there is -# still a usable /target directory. You can chroot to /target and use it -# directly, or use the apt-install and in-target commands to easily install -# packages and run commands in the target system. -d-i preseed/late_command \ -string apt-install parted; in-target /sbin/parted /dev/mmcblk0 set 1 boot on ; - diff --git a/lib/ubuntu-finish.sh b/lib/ubuntu-finish.sh index 5701e41..f3a1d59 100644 --- a/lib/ubuntu-finish.sh +++ b/lib/ubuntu-finish.sh @@ -11,6 +11,13 @@ if [ ! -d /boot/uboot/backup/ ] ; then fi ls -lh /boot/uboot/* >/boot/uboot/backup/file_list.log +#Set boot flag on: /dev/mmcblk0: +if [ -f /sbin/parted ] ; then + /sbin/parted /dev/mmcblk0 set 1 boot on || true +else + echo "ERROR: [/sbin/parted /dev/mmcblk0 set 1 boot on] failed" >> /boot/uboot/backup/install.log +fi + #Find Target Partition and FileSystem if [ -f /etc/mtab ] ; then FINAL_PART=$(mount | grep /dev/ | grep -v devpts | grep " / " | awk '{print $1}') diff --git a/lib/wheezy-preseed.cfg b/lib/wheezy-preseed.cfg index 58f39da..2ebdaf2 100644 --- a/lib/wheezy-preseed.cfg +++ b/lib/wheezy-preseed.cfg @@ -3,11 +3,6 @@ d-i apt-setup/non-free boolean true d-i apt-setup/contrib boolean true -#Make sure we get Wheezy as 20120712 was picking up sid... -#This bug, looked like a server issue, so it may just disapear on the next britney run... -d-i mirror/codename string wheezy -d-i mirror/suite string wheezy - #Removes the prompt about missing modules: # Continue without installing a kernel? d-i base-installer/kernel/skip-install boolean true @@ -38,7 +33,7 @@ d-i partman-auto/disk string /dev/mmcblk0 d-i partman-auto/expert_recipe_file string /partition_recipe # Individual additional packages to install -d-i pkgsel/include string uboot-mkimage pastebinit initramfs-tools wget firmware-linux ntpdate bash fbset +d-i pkgsel/include string bash fbset initramfs-tools ntpdate parted pastebinit u-boot-tools wget # Whether to upgrade packages after debootstrap. # Allowed values: none, safe-upgrade, full-upgrade @@ -55,10 +50,3 @@ d-i finish-install/keep-consoles boolean true # Avoid that last message about the install being complete. d-i finish-install/reboot_in_progress note -# This command is run just before the install finishes, but when there is -# still a usable /target directory. You can chroot to /target and use it -# directly, or use the apt-install and in-target commands to easily install -# packages and run commands in the target system. -d-i preseed/late_command \ -string apt-install parted; in-target /sbin/parted /dev/mmcblk0 set 1 boot on ; -