minimize setup to bare minimum

This commit is contained in:
Laila van Reenen 2024-09-26 09:09:47 +00:00
parent 859209fb92
commit 464ea52842
2 changed files with 30 additions and 30 deletions

View File

@ -31,43 +31,45 @@ echo
run "applly partion table" "sfdisk $DISK <./elfLaptop.sfdisk"
echo -n "disk encryption password: "
read -s PASS
echo
echo -n "retype password: "
read -s PASSRE
echo
#echo -n "disk encryption password: "
#read -s PASS
#echo
#echo -n "retype password: "
#read -s PASSRE
#echo
if [ "$PASS" != "$PASSRE" ]; then
echo "password do not match"
exit
fi
echo
#if [ "$PASS" != "$PASSRE" ]; then
# echo "password do not match"
# exit
#fi
#echo
run "format boot partition" "mkfs.fat -F 32 ${DISK}1"
run "format swap partition" "mkswap ${DISK}2"
echo -n "$PASS" >keyfile.luks
run "encrypt root partition" "cryptsetup luksFormat --batch-mode --key-file keyfile.luks ${DISK}3" "rm keyfile.luks"
run "map root partitaion" "cryptsetup open --batch-mode --key-file keyfile.luks ${DISK}3 cryptroot" "rm keyfile.luks"
rm keyfile.luks
run "format root partition" "mkfs.btrfs /dev/mapper/cryptroot"
#echo -n "$PASS" >keyfile.luks
#run "encrypt root partition" "cryptsetup luksFormat --batch-mode --key-file keyfile.luks ${DISK}3" "rm keyfile.luks"
#run "map root partitaion" "cryptsetup open --batch-mode --key-file keyfile.luks ${DISK}3 cryptroot" "rm keyfile.luks"
#rm keyfile.luks
#run "format root partition" "mkfs.btrfs /dev/mapper/cryptroot"
run "format root partition" "mkfs.ext4 ${DISK}3"
run "mount root partition" "mount /dev/mapper/cryptroot /mnt"
run "create root btrfs subvolume" "btrfs subvolume create /mnt/@"
run "create home btrfs subvolume" "btrfs subvolume create /mnt/@home"
run "unmount btrfs" "umount /mnt"
run "mount root subvolume" "mount -o subvol=@ /dev/mapper/cryptroot /mnt"
run "make root directorys" "mkdir -p /mnt/boot /mnt/home"
run "mount boot partition" "mount ${DISK}1 /mnt/boot"
run "mount home subvolume" "mount -o subvol=@home /dev/mapper/cryptroot /mnt/home"
#run "mount root partition" "mount /dev/mapper/cryptroot /mnt"
#run "create root btrfs subvolume" "btrfs subvolume create /mnt/@"
#run "create home btrfs subvolume" "btrfs subvolume create /mnt/@home"
#run "unmount btrfs" "umount /mnt"
#run "mount root subvolume" "mount -o subvol=@ /dev/mapper/cryptroot /mnt"
run "mount root partition" "mount ${DISK}3 /mnt"
run "mount boot partition" "mount --mkdir ${DISK}1 /mnt/boot"
#run "mount home subvolume" "mount --mkdir -o subvol=@home /dev/mapper/cryptroot /mnt/home"
run "enable swap" "swapon ${DISK}2"
echo
echo === install arch
echo
run "install base of arch" "pacstrap /mnt base linux linux-firmware grub efibootmgr"
run "intall utitlities" "pacstrap /mnt btrfs-progs man vim"
#run "install base of arch" "pacstrap /mnt base linux linux-firmware grub efibootmgr"
run "install base of arch" "pacstrap /mnt base linux linux-firmware"
#run "intall utitlities" "pacstrap /mnt btrfs-progs man vim"
run "generate fstab" "genfstab -U /mnt >>/mnt/etc/fstab"
run "copy in-root script" "cp in-root.sh /mnt/root"

View File

@ -22,10 +22,8 @@ echo >install.log
run "set timezone" "ln -sf /usr/share/zoneinfo/Europe/Amsterdam /etc/localtime"
run "set hwclock to UTC" "hwclock --systohc"
run "generate locals" "locale-gen"
echo "config locals"
echo "LANG=en_GB.UTF-8" >/etc/locale.conf
run "set hostname"
echo "$HOSTNAME" >/etc/hostname
run "config locals" "echo \"LANG=en_GB.UTF-8\" >/etc/locale.conf"
run "set hostname" "echo \"$HOSTNAME\" >/etc/hostname"
echo "create hosts file"
echo "127.0.0.1 localhost" >/etc/hosts
echo "::1 localhost" >>/etc/hosts