From 1fe4a8c4eed8a4601d1d59f07eddd18e002c9a24 Mon Sep 17 00:00:00 2001 From: Saverio Miroddi Date: Fri, 27 Dec 2019 10:52:18 +0100 Subject: [PATCH 1/4] Remove print_preset_variables() function It's not working as expected. Currently, when required, variables are set using a template. --- install-zfs.sh | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/install-zfs.sh b/install-zfs.sh index fb926de..8198697 100755 --- a/install-zfs.sh +++ b/install-zfs.sh @@ -171,18 +171,6 @@ function activate_debug { set -x } -function print_preset_variables { - cat < Date: Fri, 27 Dec 2019 10:50:56 +0100 Subject: [PATCH 2/4] Store log(s) into a separate directory --- README.md | 2 +- install-zfs.sh | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3c3fbaf..f64588b 100644 --- a/README.md +++ b/README.md @@ -100,7 +100,7 @@ This project is entirely oriented to community requests, as the target is to fac Both for feature requests and bugs, [open a GitHub issue](https://github.com/saveriomiroddi/zfs-installer/issues/new). -For issues, also attach the file `/tmp/install-zfs.log`. It doesn't contain any information aside what required for performing the installation; it can be trivially inspected, as it's a standard Bash debug output. +For issues, also attach the content of the directory `/tmp/zfs-installer`. It doesn't contain any information aside what required for performing the installation; it can be trivially inspected, as it's a standard Bash debug output. ## Credits diff --git a/install-zfs.sh b/install-zfs.sh index 8198697..5596cd3 100755 --- a/install-zfs.sh +++ b/install-zfs.sh @@ -39,6 +39,7 @@ c_default_bpool_tweaks="-o ashift=12" c_default_rpool_tweaks="-o ashift=12 -O acltype=posixacl -O compression=lz4 -O dnodesize=auto -O relatime=on -O xattr=sa -O normalization=formD" c_zfs_mount_dir=/mnt c_installed_os_data_mount_dir=/target +c_log_dir="$(dirname "$(mktemp)")/zfs-installer" c_unpacked_subiquity_dir=/tmp/ubiquity_snap_files declare -A c_supported_linux_distributions=([Ubuntu]=18.04 [UbuntuServer]=18.04 [LinuxMint]=19 [Debian]=10 [elementary]=5.1) c_temporary_volume_size=12G # large enough; Debian, for example, takes ~8 GiB. @@ -166,7 +167,9 @@ When installing the O/S via $ZFS_OS_INSTALLATION_SCRIPT, the root pool is mounte function activate_debug { print_step_info_header - exec 5> "$(dirname "$(mktemp)")/install-zfs.log" + mkdir -p "$c_log_dir" + + exec 5> "$c_log_dir/install.log" BASH_XTRACEFD="5" set -x } From 2432746ca38268efc632a23f4bc8cf4a8d18959e Mon Sep 17 00:00:00 2001 From: Saverio Miroddi Date: Fri, 27 Dec 2019 10:57:39 +0100 Subject: [PATCH 3/4] Add `lsb_release` information to the debug log --- install-zfs.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/install-zfs.sh b/install-zfs.sh index 5596cd3..7da351a 100755 --- a/install-zfs.sh +++ b/install-zfs.sh @@ -174,6 +174,12 @@ function activate_debug { set -x } +function store_os_distro_information { + print_step_info_header + + lsb_release --all > "$c_log_dir/lsb_release.log" +} + function set_distribution_data { v_linux_distribution="$(lsb_release --id --short)" @@ -1062,6 +1068,7 @@ if [[ $# -ne 0 ]]; then fi activate_debug +store_os_distro_information set_distribution_data check_prerequisites display_intro_banner From 50989b4e4657f5f290eae6653caefb53a0c5ebc9 Mon Sep 17 00:00:00 2001 From: Saverio Miroddi Date: Fri, 27 Dec 2019 11:03:47 +0100 Subject: [PATCH 4/4] Add ZFS updated module version information to debug log --- install-zfs.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/install-zfs.sh b/install-zfs.sh index 7da351a..f00b028 100755 --- a/install-zfs.sh +++ b/install-zfs.sh @@ -438,6 +438,8 @@ function install_host_zfs_module { modprobe zfs systemctl start zfs-zed fi + + zfs --version > "$c_log_dir/zfs_updated_module_version.log" 2>&1 } function install_host_zfs_module_Debian { @@ -454,6 +456,8 @@ function install_host_zfs_module_Debian { modprobe zfs fi + + zfs --version > "$c_log_dir/zfs_updated_module_version.log" 2>&1 } function install_host_zfs_module_elementary {