From 73eac8ae08357c6cfdfa9c81c5dbd2bd0cd33284 Mon Sep 17 00:00:00 2001 From: Saverio Miroddi Date: Thu, 9 Apr 2020 12:17:28 +0200 Subject: [PATCH 1/3] Refactoring: extract boot partition size to constant --- install-zfs.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install-zfs.sh b/install-zfs.sh index 3e9bd5e..ba90303 100755 --- a/install-zfs.sh +++ b/install-zfs.sh @@ -41,6 +41,7 @@ c_zfs_mount_dir=/mnt c_installed_os_data_mount_dir=/target c_unpacked_subiquity_dir=/tmp/ubiquity_snap_files declare -A c_supported_linux_distributions=([Debian]=10 [Ubuntu]=18.04 [UbuntuServer]=18.04 [LinuxMint]=19 [elementary]=5.1) +c_boot_partition_size=512M c_temporary_volume_size=12G # large enough; Debian, for example, takes ~8 GiB. c_log_dir=$(dirname "$(mktemp)")/zfs-installer @@ -576,8 +577,8 @@ function prepare_disks { # wipefs --all "$selected_disk" - sgdisk -n1:1M:+512M -t1:EF00 "$selected_disk" # EFI boot - sgdisk -n2:0:+512M -t2:BF01 "$selected_disk" # Boot pool + sgdisk -n1:1M:+"$c_boot_partition_size" -t1:EF00 "$selected_disk" # EFI boot + sgdisk -n2:0:+"$c_boot_partition_size" -t2:BF01 "$selected_disk" # Boot pool sgdisk -n3:0:"$tail_space_parameter" -t3:BF01 "$selected_disk" # Root pool done From f134e1a59e44e894bec586316bdddc6f6098b8d7 Mon Sep 17 00:00:00 2001 From: Saverio Miroddi Date: Thu, 9 Apr 2020 12:18:22 +0200 Subject: [PATCH 2/3] Cosmetic change, on partitions creation stage --- install-zfs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-zfs.sh b/install-zfs.sh index ba90303..4b3777e 100755 --- a/install-zfs.sh +++ b/install-zfs.sh @@ -579,7 +579,7 @@ function prepare_disks { sgdisk -n1:1M:+"$c_boot_partition_size" -t1:EF00 "$selected_disk" # EFI boot sgdisk -n2:0:+"$c_boot_partition_size" -t2:BF01 "$selected_disk" # Boot pool - sgdisk -n3:0:"$tail_space_parameter" -t3:BF01 "$selected_disk" # Root pool + sgdisk -n3:0:"$tail_space_parameter" -t3:BF01 "$selected_disk" # Root pool done # The partition symlinks are not immediately created, so we wait. From 5c0a516075293c87bee58dc67235e176152492df Mon Sep 17 00:00:00 2001 From: Saverio Miroddi Date: Thu, 9 Apr 2020 12:19:07 +0200 Subject: [PATCH 3/3] Increase boot partition (pool) size to 768M While 512M are enough for a few kernels, the Ubuntu updater complains after a couple. --- install-zfs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install-zfs.sh b/install-zfs.sh index 4b3777e..49f493a 100755 --- a/install-zfs.sh +++ b/install-zfs.sh @@ -41,7 +41,7 @@ c_zfs_mount_dir=/mnt c_installed_os_data_mount_dir=/target c_unpacked_subiquity_dir=/tmp/ubiquity_snap_files declare -A c_supported_linux_distributions=([Debian]=10 [Ubuntu]=18.04 [UbuntuServer]=18.04 [LinuxMint]=19 [elementary]=5.1) -c_boot_partition_size=512M +c_boot_partition_size=768M # while 512M are enough for a few kernels, the Ubuntu updater complains after a couple c_temporary_volume_size=12G # large enough; Debian, for example, takes ~8 GiB. c_log_dir=$(dirname "$(mktemp)")/zfs-installer