diff --git a/41_snapshots-btrfs b/41_snapshots-btrfs index 3fedaf4..88d4a57 100755 --- a/41_snapshots-btrfs +++ b/41_snapshots-btrfs @@ -83,9 +83,11 @@ show_snap_found=${GRUB_BTRFS_SHOW_SNAPSHOTS_FOUND:-"true"} show_total_snap_found=${GRUB_BTRFS_SHOW_TOTAL_SNAPSHOTS_FOUND:-"true"} ## Ignore specific path during run "grub-mkconfig" ignore_specific_path=("${GRUB_BTRFS_IGNORE_SPECIFIC_PATH[@]}") -## snapper's config name +## Snapper's config name snapper_config=${GRUB_BTRFS_SNAPPER_CONFIG:-"root"} - +## Override boot partition detection +override_boot_partition_detection=${GRUB_BTRFS_OVERRIDE_BOOT_PARTITION_DETECTION:-"false"} +## Customize GRUB directory grub_directory=${GRUB_BTRFS_DIRNAME:-"grub"} ######################## @@ -506,12 +508,17 @@ count_limit_snap=0 # detect uuid requirement check_uuid_required # Detects if /boot is a separate partition -if [[ "$root_uuid" != "$boot_uuid" ]]; then - printf "# Info: Separate boot partition detected \n" >&2 ; +if [[ "$override_boot_partition_detection" == "true" ]]; then + printf "# Info: Override boot partition detection : enable \n" >&2 ; boot_separate else - printf "# Info: Separate boot partition not detected \n" >&2 ; - boot_bounded + if [[ "$root_uuid" != "$boot_uuid" ]]; then + printf "# Info: Separate boot partition detected \n" >&2 ; + boot_separate + else + printf "# Info: Separate boot partition not detected \n" >&2 ; + boot_bounded + fi fi # unmounting mount point umount $gbgmp diff --git a/41_snapshots-btrfs_config b/41_snapshots-btrfs_config index 14b02df..dae4c0f 100644 --- a/41_snapshots-btrfs_config +++ b/41_snapshots-btrfs_config @@ -14,4 +14,5 @@ # GRUB_BTRFS_IGNORE_SPECIFIC_PATH=("var/lib/docker") # Ignore specific path during run "grub-mkconfig" # GRUB_BTRFS_SNAPPER_CONFIG="root" # Snapper's config name to use # GRUB_BTRFS_DISABLE="false" # Disable Grub-btrfs -# GRUB_BTRFS_DIRNAME=grub # Might be grub2 on some systems ex. /boot/grub2/... +# GRUB_BTRFS_DIRNAME=grub # Might be grub2 on some systems ex. /boot/grub2/... +# GRUB_BTRFS_OVERRIDE_BOOT_PARTITION_DETECTION="false" # Change to "true" if you have a boot partition in a different subvolume diff --git a/README.md b/README.md index 45b54f3..74999ab 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,8 @@ Add this lines to /etc/default/grub: (Name of the grub folder on /boot/) +* GRUB_BTRFS_OVERRIDE_BOOT_PARTITION_DETECTION="false" + (Change to "true" if you have a boot partition in a different subvolume) Generate grub.cfg (on Arch linux use grub-mkconfig -o /boot/grub/grub.cfg )