Compare commits

..

2 Commits

2 changed files with 19 additions and 10 deletions

View File

@ -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
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
OPTIMAL_BLOCKSIZE="1KB"
echo "Unable to read $PHYSICAL_BLOCK_SIZE_PATH"
OPTIMAL_BLOCKSIZE="4K"
fi
info "Optimal blocksize set to: $OPTIMAL_BLOCKSIZE" ||
error
}
else
OPTIMAL_BLOCKSIZE="4K"
fi
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

View File

@ -58,6 +58,11 @@ case "$operation_system" in
question "Which distribution should be used [arch,moode,retropie,manjaro,torbox...]?" && read -r distribution || error
case "$distribution" in
"android-x86")
base_download_url="https://www.fosshub.com/Android-x86.html?dwl=android-x86_64-9.0-r2.iso";
image_name="android-x86_64-9.0-r2.iso"
image_checksum="f7eb8fc56f29ad5432335dc054183acf086c539f3990f0b6e9ff58bd6df4604e"
;;
"torbox")
base_download_url="https://www.torbox.ch/data/";
image_name="torbox-20220102-v050.gz"
@ -90,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
;;