Kommentiert und Automatisches Partitionieren eingebaut

This commit is contained in:
eichehome 2023-01-13 00:11:36 +01:00
parent 4f673ef6bb
commit df8d6e34e8

View file

@ -15,18 +15,19 @@ 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 /
parted --script /dev/vda \
mklabel gpt \
mkpart "EFI system partition" 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
cd /mnt
btrfs subvolume create @
@ -37,6 +38,7 @@ 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