From 715dd03ab552c2f12c9afa4e28559b1adbb3c841 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 9 Jul 2021 19:42:57 +0200 Subject: [PATCH] ++ideas for install any linux --- install-any-linux.sh | 41 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/install-any-linux.sh b/install-any-linux.sh index edfb948..eac28b9 100644 --- a/install-any-linux.sh +++ b/install-any-linux.sh @@ -6,16 +6,51 @@ # Requirements: # The OS image needs to be in tar format and needs to contain grub +set -e -if [ $# -ne 2 ]; then - echo "$0 os-image.tar [usb|disk]" +if [ $# -lt 2 ]; then + echo "$0 os-image.tar [usb|disk] [target-usb-disk]" echo "os-image.tar contains the OS" echo "usb mode: create a bootable usb stick including this script to auto install to disk" echo "disk mode: actually install os-image.tar to the first disk" + echo "" + echo "In usb mode, specify the usb disk to install to" exit 1 fi -os=$1; shift +IMAGE=$1; shift mode=$1; shift # isohybrid + +setup_usb() { + rootfs_tmpdir=$(mktemp -d) + + sudo sfdisk "$DISK" <