From cd7b58d4fe9e91d7e00ff04ca19eab56628d209a Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Mon, 19 Jun 2023 21:31:42 +0200 Subject: [PATCH] Adapted physical block size and implemented new version of manjaro --- scripts/base.sh | 20 ++++++++++++-------- scripts/image/setup.sh | 4 ++-- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/scripts/base.sh b/scripts/base.sh index 7d94f5b..bc2d0b0 100644 --- a/scripts/base.sh +++ b/scripts/base.sh @@ -81,15 +81,19 @@ set_device_path(){ info "Device path set to: $device_path" # @see https://www.heise.de/ct/hotline/Optimale-Blockgroesse-fuer-dd-2056768.html PHYSICAL_BLOCK_SIZE_PATH="/sys/block/$device/queue/physical_block_size" - if [ -f "$device_path" ] - then - OPTIMAL_BLOCKSIZE=$(expr 64 \* "$(sudo cat $PHYSICAL_BLOCK_SIZE_PATH)") || error - else - OPTIMAL_BLOCKSIZE="1KB" + if [ -f "$PHYSICAL_BLOCK_SIZE_PATH" ]; then + PHYSICAL_BLOCK_SIZE=$(sudo cat $PHYSICAL_BLOCK_SIZE_PATH) + if [ $? -eq 0 ]; then + OPTIMAL_BLOCKSIZE=$((64 * PHYSICAL_BLOCK_SIZE)) || error + else + echo "Unable to read $PHYSICAL_BLOCK_SIZE_PATH" + OPTIMAL_BLOCKSIZE="4K" + fi + else + OPTIMAL_BLOCKSIZE="4K" fi - info "Optimal blocksize set to: $OPTIMAL_BLOCKSIZE" || - error -} + info "Optimal blocksize set to: $OPTIMAL_BLOCKSIZE" || error + overwritte_device_with_zeros(){ question "Should $device_path be overwritten with zeros before copying?(y/N)" && read -r copy_zeros_to_device diff --git a/scripts/image/setup.sh b/scripts/image/setup.sh index b441779..1a38b05 100644 --- a/scripts/image/setup.sh +++ b/scripts/image/setup.sh @@ -95,8 +95,8 @@ case "$operation_system" in image_name="manjaro-gnome-20.0-200426-linux56.iso" ;; "21") - base_download_url="https://download.manjaro.org/gnome/21.3.7/" - image_name="manjaro-gnome-21.3.7-220816-linux515.iso" + image_checksum="78b8fa6a5222bc10a2e767485e76f82f3c7b2b59f4a70501b4a9fb846c5ad94987cf8b8ed630a701a8a3386debc0a39fc7363a743df8f13f41d3d8324d74e227" + image_name="manjaro-gnome-22.1.3-230529-linux61.iso" ;; esac ;;