diff options
-rw-r--r-- | scripts/act-chroot.sh | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/scripts/act-chroot.sh b/scripts/act-chroot.sh new file mode 100644 index 0000000..f07783a --- /dev/null +++ b/scripts/act-chroot.sh @@ -0,0 +1,65 @@ +#!/bin/bash + +ISO_URL="https://serverop.de/crux/crux-3.2/iso/crux-3.2.iso" +ISO_FILE="crux-3.2.iso" + +printf "1.1.1 Path/to crux-3.2.iso (/home/user/Downloads):" +read ISO_PATH + +#prepare_iso() { + + ISO_FILE=$ISO_PATH/$ISO_FILE + + if [ -f $ISO_FILE ]; + then + echo "File $ISO_FILE exists." + else + echo "File $ISO_FILE does not exist." + cd $ISO_PATH && { curl -k -O $ISO_URL ; cd -; } + fi + +#} + +#printf "1.1.2 EFI block; (/dev/sda1):" +#read BLK_EFI +# +printf "1.1.2 boot block; (/dev/sda2):" +read BLK_BOOT +# +printf "1.1.2 root block; (/dev/sda3):" +read BLK_ROOT +# +printf "1.1.2 var block; (/dev/sda5):" +read BLK_VAR +# +printf "1.1.2 usr block; (/dev/sda7):" +read BLK_USR +# +#printf "1.1.2 home block; (/dev/sda8):" +#read BLK_HOME +# +## printf "1.1.2 srv block; (/dev/sda8):" +## read BLK_SRV + +printf "1.1.3 mount point to chroot (/mnt):" +read CHROOT +mount $BLK_ROOT $CHROOT + +mount $BLK_BOOT $CHROOT/boot +##mount $BLK_EFI $CHROOT/boot/efi + +mount $BLK_VAR $CHROOT/var +mount $BLK_USR $CHROOT/usr + +#mount $BLK_HOME $CHROOT/home +#mount $BLK_HOME $CHROOT/usr/ports + +mount --bind /dev $CHROOT/dev +mount -vt devpts devpts $CHROOT/dev/pts +mount -vt tmpfs shm $CHROOT/dev/shm +mount -vt proc proc $CHROOT/proc +mount -vt sysfs sysfs $CHROOT/sys + +modprobe isofs +modprobe loop +mount -o loop $ISO_FILE $CHROOT/media |