Commit 10c16177 authored by Joe Blos's avatar Joe Blos

Only extract boot/kernel partition if required

Skip getting the boot/kernel partition if it won't be installed, as
indicated in the install options. This makes it possible to use the
recovery zip installation method even on devices where parsing the
boot/kernel partition fails, by building a 'no-kernel' recovery zip.
parent 963792e1
......@@ -66,20 +66,23 @@ extract_partition_table() {
echo "Couldn't find $INSTALL_PARTITION partition."
return 1
fi
if [ "$ISOREC" = "true" ]; then
export KERNEL_PARTITION
KERNEL_PARTITION=$(findfs PARTLABEL="$KERNEL_PARTLABEL")
export INITFS_PARTITION
INITFS_PARTITION=$(findfs PARTLABEL="$INITFS_PARTLABEL")
else
dev=$(findfs PARTLABEL="boot") || \
dev=$(readlink -fn "$(get_fstab_device "$fstab_recovery" boot)")
if [ -n "$dev" ]; then
echo "boot partition found at $dev"
export BOOT_PARTITION=$dev
if [ "$FLASH_KERNEL" = "true" ]; then
if [ "$ISOREC" = "true" ]; then
export KERNEL_PARTITION
KERNEL_PARTITION=$(findfs PARTLABEL="$KERNEL_PARTLABEL")
export INITFS_PARTITION
INITFS_PARTITION=$(findfs PARTLABEL="$INITFS_PARTLABEL")
else
echo "Couldn't find boot partition."
return 1
dev=$(findfs PARTLABEL="boot") || \
dev=$(readlink -fn "$(get_fstab_device "$fstab_recovery" boot)")
if [ -n "$dev" ]; then
echo "boot partition found at $dev"
export BOOT_PARTITION=$dev
else
echo "Couldn't find boot partition."
return 1
fi
fi
fi
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment