From 96a817c86a32a026ca735afd65db3f24109598a2 Mon Sep 17 00:00:00 2001 From: Hal Emmerich Date: Wed, 22 May 2019 11:34:54 -0500 Subject: [PATCH] Added support to install from sd cards, closes #90 --- scripts/InstallScripts/InstallToInternal.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/scripts/InstallScripts/InstallToInternal.sh b/scripts/InstallScripts/InstallToInternal.sh index eb41efe..533c671 100755 --- a/scripts/InstallScripts/InstallToInternal.sh +++ b/scripts/InstallScripts/InstallToInternal.sh @@ -20,6 +20,17 @@ # along with PrawnOS. If not, see . RESOURCES=/InstallResources +# Grab the boot device, which is either /dev/sda for usb or /dev/mmcblk0 for an sd card +# Grab the boot device, which is either /dev/sda for usb or /dev/mmcblk0 for an sd card +# Grab the boot device, which is either /dev/sda for usb or /dev/mmcblk0 for an sd card +# Grab the boot device, which is either /dev/sda for usb or /dev/mmcblk0 for an sd card +# Grab the boot device, which is either /dev/sda for usb or /dev/mmcblk0 for an sd card +# Grab the boot device, which is either /dev/sda for usb or /dev/mmcblk0 for an sd card +# Grab the boot device, which is either /dev/sda for usb or /dev/mmcblk0 for an sd card +# Grab the boot device, which is either /dev/sda for usb or /dev/mmcblk0 for an sd card +# Grab the boot device, which is either /dev/sda for usb or /dev/mmcblk0 for an sd card +BOOT_DEVICE=$(mount | head -n 1 | cut -d '2' -f 1) + read -p "This will ERASE ALL DATA ON THE INTERNAL STORAGE (EMMC) and reboot when finished, do you want to continue? [Y/n]" -n 1 -r echo @@ -53,7 +64,7 @@ then fi dmesg -E echo Writing kernel partition - dd if=/dev/sda1 of=/dev/mmcblk2p1 + dd if="$BOOT_DEVICE"1 of=/dev/mmcblk2p1 echo Writing Filesystem, this will take about 4 minutes... mkfs.ext4 -F -b 1024 -m 0 -O ^has_journal /dev/mmcblk2p2 mkdir -p /mnt/mmc/