mirror of
https://github.com/kevinveenbirkenbach/linux-image-manager.git
synced 2024-11-25 16:31:03 +01:00
Compare commits
2 Commits
5aae1f8a50
...
cd7b58d4fe
Author | SHA1 | Date | |
---|---|---|---|
cd7b58d4fe | |||
4ed8a3468d |
@ -81,15 +81,19 @@ set_device_path(){
|
|||||||
info "Device path set to: $device_path"
|
info "Device path set to: $device_path"
|
||||||
# @see https://www.heise.de/ct/hotline/Optimale-Blockgroesse-fuer-dd-2056768.html
|
# @see https://www.heise.de/ct/hotline/Optimale-Blockgroesse-fuer-dd-2056768.html
|
||||||
PHYSICAL_BLOCK_SIZE_PATH="/sys/block/$device/queue/physical_block_size"
|
PHYSICAL_BLOCK_SIZE_PATH="/sys/block/$device/queue/physical_block_size"
|
||||||
if [ -f "$device_path" ]
|
if [ -f "$PHYSICAL_BLOCK_SIZE_PATH" ]; then
|
||||||
then
|
PHYSICAL_BLOCK_SIZE=$(sudo cat $PHYSICAL_BLOCK_SIZE_PATH)
|
||||||
OPTIMAL_BLOCKSIZE=$(expr 64 \* "$(sudo cat $PHYSICAL_BLOCK_SIZE_PATH)") || error
|
if [ $? -eq 0 ]; then
|
||||||
|
OPTIMAL_BLOCKSIZE=$((64 * PHYSICAL_BLOCK_SIZE)) || error
|
||||||
else
|
else
|
||||||
OPTIMAL_BLOCKSIZE="1KB"
|
echo "Unable to read $PHYSICAL_BLOCK_SIZE_PATH"
|
||||||
|
OPTIMAL_BLOCKSIZE="4K"
|
||||||
fi
|
fi
|
||||||
info "Optimal blocksize set to: $OPTIMAL_BLOCKSIZE" ||
|
else
|
||||||
error
|
OPTIMAL_BLOCKSIZE="4K"
|
||||||
}
|
fi
|
||||||
|
info "Optimal blocksize set to: $OPTIMAL_BLOCKSIZE" || error
|
||||||
|
|
||||||
|
|
||||||
overwritte_device_with_zeros(){
|
overwritte_device_with_zeros(){
|
||||||
question "Should $device_path be overwritten with zeros before copying?(y/N)" && read -r copy_zeros_to_device
|
question "Should $device_path be overwritten with zeros before copying?(y/N)" && read -r copy_zeros_to_device
|
||||||
|
@ -58,6 +58,11 @@ case "$operation_system" in
|
|||||||
question "Which distribution should be used [arch,moode,retropie,manjaro,torbox...]?" && read -r distribution || error
|
question "Which distribution should be used [arch,moode,retropie,manjaro,torbox...]?" && read -r distribution || error
|
||||||
|
|
||||||
case "$distribution" in
|
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")
|
"torbox")
|
||||||
base_download_url="https://www.torbox.ch/data/";
|
base_download_url="https://www.torbox.ch/data/";
|
||||||
image_name="torbox-20220102-v050.gz"
|
image_name="torbox-20220102-v050.gz"
|
||||||
@ -90,8 +95,8 @@ case "$operation_system" in
|
|||||||
image_name="manjaro-gnome-20.0-200426-linux56.iso"
|
image_name="manjaro-gnome-20.0-200426-linux56.iso"
|
||||||
;;
|
;;
|
||||||
"21")
|
"21")
|
||||||
base_download_url="https://download.manjaro.org/gnome/21.3.7/"
|
image_checksum="78b8fa6a5222bc10a2e767485e76f82f3c7b2b59f4a70501b4a9fb846c5ad94987cf8b8ed630a701a8a3386debc0a39fc7363a743df8f13f41d3d8324d74e227"
|
||||||
image_name="manjaro-gnome-21.3.7-220816-linux515.iso"
|
image_name="manjaro-gnome-22.1.3-230529-linux61.iso"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user