Linux Arch Setup meines UM790 Pro Barebone

Für meinen neuen Minisforum Barebone der Venus Serie UM790 Pro, habe ich mir überlegt, wie ich diesen Nach einem Stromausfall neu aufsetze. Wichtig war mir beim Filesystem, dass es eines ist, welches eigenständig eine Checksumme über die FS legt und damit erkennt, ob die Integrität der Dateien gegeben ist und sie am Besten auch gleich reparieren kann. Die beiden Protagonisten sind dabei ZFS und BTRFS. Da dieses leidige Lizenzthema bei ZFS eine Installation mit Custome-Kernel oder DKMS erzwingen und dieses beide scheue habe ich mich für BTRFS entschieden. Bei der Installation habe ich mal die wesentlichen Befehle mit geschrieben.

Neofetch sieht mein System nach der Installation wie folgt:

loadkeys de-latin1
---
timedatectl
timedatectl show-timesync --all
timedatectl set-ntp true
timedatectl status
timedatectl timesync-status
---
sudo wipefs -a /dev/sdX
---

fdisk -l
Mount point		Partition			Partition type		Suggested size
/mnt/boot		/dev/efi_system_partition	EFI system partition	At least 1GiB.
[SWAP]			/dev/swap_partition		Linux swap		32GiB
/mnt			/dev/root_partition		Linux x86-64 root (/)	Remainder of the device. At least 23–32 GiB.
---
mkfs.fat -F 32 -n UEFI /dev/nvme0n1p1 – Formatieren der EFI-Partition
mkswap -L SWAP /dev/nvme0n1p2 - swap_partition
mkfs.btrfs -L LINUXARCH --csum sha256 /dev/nvme0n1p3
mount /dev/nvme0n1p3 /mnt
-----
btrfs subvolume create /mnt/@
btrfs subvolume create /mnt/@home
btrfs subvolume create /mnt/@snapshots
btrfs subvolume create /mnt/@cache
btrfs subvolume create /mnt/@libvirt
btrfs subvolume create /mnt/@log
btrfs subvolume create /mnt/@tmp
btrfs subvolume list /mnt

umount /mnt

export sv_opts="rw,noatime,ssd,compress=zstd:1,discard=async,space_cache=v2"
mount -o ${sv_opts},subvol=@ /dev/nvme0n1p3 /mnt

mkdir -p /mnt/{boot,home,.snapshots,var/cache,var/lib/libvirt,var/log,var/tmp}
mkdir -p /mnt/boot/efi

mount -o ${sv_opts},subvol=@home /dev/nvme0n1p3 /mnt/home
mount -o ${sv_opts},subvol=@snapshots /dev/nvme0n1p3 /mnt/.snapshots
mount -o ${sv_opts},subvol=@cache /dev/nvme0n1p3 /mnt/var/cache
mount -o ${sv_opts},subvol=@libvirt /dev/nvme0n1p3 /mnt/var/lib/libvirt
mount -o ${sv_opts},subvol=@log /dev/nvme0n1p3 /mnt/var/log
mount -o ${sv_opts},subvol=@tmp /dev/nvme0n1p3 /mnt/var/tmp
mount /dev/nvme0n1p1 /mnt/boot/efi
---
pacman -Syy
pacman -S  --noconfirm --needed reflector
cp /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.bak
reflector --verbose --protocol https --latest 5 --sort rate --country Germany --save /etc/pacman.d/mirrorlist

---
grep vendor_id /proc/cpuinfo
export microcode="amd-ucode"
pacstrap /mnt base base-devel ${microcode} btrfs-progs linux linux-firmware sof-firmware bash-completion htop man-db mlocate neovim nano networkmanager openssh pacman-contrib pkgfile reflector sudo dhcpcd iwd terminus-font tmux man-pages efibootmgr grub grub-btrfs grub-customizer ntfs-3g lm_sensors mesa
---
genfstab -U -p /mnt >> /mnt/etc/fstab
--
arch-chroot /mnt /bin/bash
ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime
hwclock --systohc
echo "Cthulhu" > /etc/hostname
--
cat > /etc/hosts <<EOF
127.0.0.1   localhost
::1         localhost
127.0.1.1   foobox.localdomain foobox
EOF
--
export locale="de_DE.UTF-8"
#sed -i "s/^#\(${locale}\)/\1/" /etc/locale.gen
nano /etc/locale.gen
echo "LANG=${locale}" > /etc/locale.conf
locale-gen
--
echo "FONT=ter-v24n" > /etc/vconsole.conf
echo "KEYMAP=de-latin1" >> /etc/vconsole.conf
echo "EDITOR=nano" > /etc/environment && echo "VISUAL=nano" >> /etc/environment
--
passwd

useradd -m -G wheel -s /bin/bash admin
passwd admin

sed -i "s/# %wheel ALL=(ALL:ALL) ALL/%wheel ALL=(ALL:ALL) ALL/" /etc/sudoers
systemctl enable NetworkManager
systemctl enable sshd.service
---
Set necessary MODULES and HOOKS in /etc/mkinitcpio.conf:
MODULES=(btrfs)
HOOKS=(base udev keyboard autodetect keymap consolefont modconf block btrfs filesystems fsck shutdown)

mkinitcpio -p linux
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB
grub-mkconfig -o /boot/grub/grub.cfg
reboot

--- TRIM
lsblk --discard
The util-linux package provides fstrim.service and fstrim.timer systemd unit files. Enabling the timer will activate the service weekly. The service executes fstrim(8) on all mounted filesystems on devices that support the discard operation.
----

Das könnte dich auch interessieren …

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert