Commit 223fe903 authored by Ophélie Gagnard's avatar Ophélie Gagnard

installation/install.sh: Set the default boot option number (bootnum) to 100.

parent 041cfc00
......@@ -42,6 +42,7 @@ root_partition_type="Linux filesystem"
efi_partition_type="EFI System"
TARGET_EFI_PARTITION=$(get_partition_path "$efi_partition_type")
ROOT_PARTITION_ID=$(get_partition_id "$root_partition_type")
default_boot_num=100
# Install the module
cd dracut.module
......@@ -56,7 +57,7 @@ sed "s|%PROJECT_DIR%|${PROJECT_DIR}|g;s|%ROOT_PARTITION_ID%|${ROOT_PARTITION_ID}
cd -
# TMP: Delete bootnum 0 so that there is only one boot option for an image created by this script
efibootmgr -b 0 -B || true
efibootmgr -b "$default_boot_num" -B || true
# Create an initramfs image
rm -f $dracut_output_file
......@@ -69,6 +70,6 @@ mkdir -p $TARGET_EFI_DIR
cp -rv $SOURCE_EFI_DIR/* $TARGET_EFI_DIR
# Set the image as a boot option
efibootmgr --create --disk $TARGET_EFI_PARTITION --label "test_deploy" --loader $TARGET_IMAGE_DIR/$uefi_image_name
efibootmgr -b "$default_boot_num" --create --disk $TARGET_EFI_PARTITION --label "test_deploy" --loader $TARGET_IMAGE_DIR/$uefi_image_name
echo "New initramfs image: "$TARGET_IMAGE_DIR/$uefi_image_name
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