archinstall/prep-BTRFS-UEFI.sh

63 lines
1.7 KiB
Bash

# Vor Reboot
# Keyboard einstellen
localectl set-keymap de-latin1
#ip -c a
# rfkill unblock wifi
# iwctl
#pacman -Sy
#pacman -S tamsyn-font
#setfont Tamsyn10x20r
# Zeit einstellen
timedatectl set-timezone Europe/Berlin
timedatectl set-ntp true
# Partitionieren
parted --script /dev/vda \
mklabel gpt \
mkpart fat32 1MiB 501MiB \
mkpart btrfs 501MiB 100%
#echo -n "o\ny\nyn\n\n\n+300M\nef00\nn\n\n\n\n\nw\ny\n" | gdisk /dev/vda #o\n y\n n\n \n \n +300m\n ef00\n n\n \n \n \n \n w\n y\n
#gdisk /dev/vda
# /dev/vda1 300M EFI
# /dev/vda2 Rest /
mkfs.vfat /dev/vda1 -n EFI
mkfs.btrfs /dev/vda2 -L arch
mount /dev/vda2 /mnt
cd /mnt
btrfs subvolume create @
btrfs subvolume create @home
btrfs subvolume create @var
btrfs subvolume create @log
btrfs subvolume create @cache
cd ~
umount -R /mnt
mount -o noatime,compress=zstd,space_cache=v2,discard=async,subvol=@ /dev/vda2 /mnt
mkdir -p /mnt/{home,boot,var}
mount -o noatime,compress=zstd,space_cache=v2,discard=async,subvol=@home /dev/vda2 /mnt/home
mount -o noatime,compress=zstd,space_cache=v2,discard=async,subvol=@var /dev/vda2 /mnt/var
mkdir -p /mnt/var/{cache,log}
mount -o noatime,compress=zstd,space_cache=v2,discard=async,subvol=@log /dev/vda2 /mnt/var/log
mount -o noatime,compress=zstd,space_cache=v2,discard=async,subvol=@cache /dev/vda2 /mnt/var/cache
mount /dev/vda1 /mnt/boot
pacstrap /mnt base linux linux-lts linux-firmware amd-ucode tamsyn-font vim git btrfs-progs
# discoverable-partitions-spec
genfstab -U /mnt >> /mnt/etc/fstab
ln -sf /run/systemd/resolve/stub-resolv.conf /mnt/etc/resolv.conf
arch-chroot /mnt
#############################
# neue Version
localectl set-keymap de-latin1
timedatectl set-timezone Europe/Berlin
timedatectl set-ntp true