mirror of
https://github.com/kevinveenbirkenbach/linux-image-manager.git
synced 2024-12-22 12:05:04 +01:00
Adapted physical block size and implemented new version of manjaro
This commit is contained in:
parent
4ed8a3468d
commit
cd7b58d4fe
@ -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
|
||||
|
@ -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
|
||||
;;
|
||||
|
Loading…
Reference in New Issue
Block a user