archinstall/prep-BTRFS-UEFI.sh

55 lines
1.5 KiB
Bash
Raw Normal View History

# Vor Reboot
# Keyboard einstellen
2023-01-12 23:52:51 +00:00
localectl set-keymap de-latin1-nodeadkeys
#ip -c a
# rfkill unblock wifi
# iwctl
#pacman -Sy
# Zeit einstellen
timedatectl set-timezone Europe/Berlin
timedatectl set-ntp true
# Partitionieren
# /dev/vda1 300M EFI
# /dev/vda2 Rest /
parted --script /dev/vda \
mklabel gpt \
2023-01-13 00:14:45 +00:00
mkpart "efi" fat32 1MiB 501MiB \
set 1 esp on \
mkpart "root" btrfs 501MiB 100%
# Filesystem
mkfs.vfat /dev/vda1 -n EFI
mkfs.btrfs /dev/vda2 -L arch
# BTRFS Subvolumes
mount /dev/vda2 /mnt
2022-03-13 15:27:24 +00:00
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 Volumes
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
2023-01-12 23:52:51 +00:00
# Namensauflösung mit systemd-resolved
ln -sf /run/systemd/resolve/stub-resolv.conf /mnt/etc/resolv.conf
2023-01-12 23:52:51 +00:00
arch-chroot /mnt