|
@@ -83,10 +83,6 @@ then
|
|
|
|
|
|
# Format disks -- pkg: e2fsprogs dosfstools and to file system check
|
|
|
mkfs.ext4 $disk1 && e2fsck $disk1
|
|
|
-
|
|
|
- # Prepare mount points and mount
|
|
|
- mkdir -p $mnt
|
|
|
- mount $disk1 $mnt
|
|
|
fi
|
|
|
|
|
|
if [ "$partition" = "efi-crypt" ]
|
|
@@ -114,32 +110,31 @@ then
|
|
|
mkfs.ext4 $disk1 && fsck $disk1
|
|
|
|
|
|
# Prepare mount points and mount
|
|
|
- mkdir -p $mnt $mnt"/boot/efi"
|
|
|
- mount $disk1 $mnt
|
|
|
+ mkdir $mnt"/boot/efi"
|
|
|
mount $disk0 $mnt"/boot/efi"
|
|
|
+ echo "$disk0 /boot/efi/ vfat rw 0 0" >> $mnt/etc/fstab
|
|
|
fi
|
|
|
|
|
|
-
|
|
|
# Create swapfile
|
|
|
swapfile=$mnt/swapfile
|
|
|
dd if=/dev/zero of=$swapfile bs=1M count=1024 status=progress # create 1GB file
|
|
|
chmod 600 $swapfile #restric permissions
|
|
|
mkswap $swapfile #format file
|
|
|
|
|
|
+# Prepare mount points and mount
|
|
|
+mkdir -p $mnt
|
|
|
+mount $disk1 $mnt
|
|
|
+# Configure disk mounts
|
|
|
+# Or get UUID from blkid...
|
|
|
+echo "/swapfile none swap defaults 0 0" >> $mnt/etc/fstab
|
|
|
+echo "$disk1 / ext4 rw 0 0" >> $mnt/etc/fstab
|
|
|
+# mount for /boot/efi/ set above if neccessary
|
|
|
+
|
|
|
#----------
|
|
|
# Bootstrap -- pkg: debootstrap
|
|
|
# Remark: Debootstrap does not install recommands!!
|
|
|
debootstrap --variant=minbase --arch=amd64 bookworm $mnt http://ftp2.de.debian.org/debian/
|
|
|
|
|
|
-#----------
|
|
|
-# Configuration
|
|
|
-# Configure disk mounts
|
|
|
-# Or get UUID from blkid...
|
|
|
-cat >$mnt/etc/fstab <<EOL
|
|
|
-$disk1 / ext4 rw 0 0
|
|
|
-/swapfile none swap defaults 0 0
|
|
|
-EOL
|
|
|
-
|
|
|
# Configure sources.list
|
|
|
cat >$mnt/etc/apt/sources.list <<EOL
|
|
|
deb http://deb.debian.org/debian bookworm main non-free-firmware
|