diff --git a/debian.sh b/debian.sh index 13a5c50..d2c1bdb 100755 --- a/debian.sh +++ b/debian.sh @@ -175,7 +175,7 @@ live-os-restore() { systemMounts echo "[Copying Boot Files ]" echo - rsync -a --delete /boot/ $TARGET/boot/ + cp -rf /tmp/boot/ $TARGET/boot/ chmod +x $TARGET/usr/bin/debian.sh chroot $TARGET /usr/bin/debian.sh bootloader $1 $5 $2 chroot $TARGET /usr/bin/debian.sh btrfs-tweaks @@ -183,7 +183,8 @@ live-os-restore() { chown -R $USER:$USER $TARGET/home/$USER auto_login cd - unmount + umount /tmp/live + #unmount } os-restore() { @@ -210,7 +211,7 @@ os-restore() { chown -R $USER:$USER $TARGET/home/$USER auto_login rm -f $TARGET/debian.sh - unmount + #unmount } systemMounts() { @@ -281,7 +282,7 @@ make-image() { time tar cpzf $1/$ROOT_NAME.tgz --exclude=proc/* . cd $1 du -h $1/$ROOT_NAME.tgz | tail -1 - unmount + #unmount } install() { @@ -302,7 +303,7 @@ install() { custom_service_files setup_script "$1" echo -e "ALGO=zstd\nPERCENT=60" | tee -a $TARGET/etc/default/zramswap - unmount + #unmount } installStableDiffusion() { @@ -526,21 +527,13 @@ locale() { echo "locale-gen" >>$TARGET/setup.sh } + partitions() { echo echo "Setting Up Partitions....." printf "$DISK_PASSWORD" | cryptsetup open ${BTRFS} $ROOT_MAPPER_NAME if [[ -e "/dev/mapper/$ROOT_MAPPER_NAME" ]]; then - echo - echo "Formatting $EFI" - echo - echo y | mkfs.vfat $EFI - echo "Formatting $BOOT" - echo y | mkfs.ext4 $BOOT - if [[ $SWAP_CHOICE = *y* ]]; then - mkswap -f $SWAP - fi mounts fstab else @@ -674,6 +667,14 @@ initialize-disk() { echo "Formatting....." echo y | mkfs.btrfs /dev/mapper/$ROOT_MAPPER_NAME --force echo + echo "Formatting $EFI" + echo + echo y | mkfs.vfat $EFI + echo "Formatting $BOOT" + echo y | mkfs.ext4 $BOOT + if [[ $SWAP_CHOICE = *y* ]]; then + mkswap -f $SWAP + fi echo "Initialize Complete. Please reboot your machine to avoid any issues" echo } @@ -754,7 +755,7 @@ tweaks() { echo "error: Bash not found!" echo fi - unmount + #unmount elif [[ $choice = 5 ]]; then rm -f /tmp/disk set-devices