40 lines
1.2 KiB
Markdown
40 lines
1.2 KiB
Markdown
---
|
|
keywords:
|
|
- IT
|
|
---
|
|
# Archlinux
|
|
### clean system from old files
|
|
```
|
|
paccache -r
|
|
paccache -ruk0
|
|
paccache -rk1
|
|
|
|
yay -Ycc
|
|
flatpak uninstall --unused
|
|
journalctl --disk-usage && journalctl --vacuum-size={size}M
|
|
```
|
|
or prepare the file`/etc/systemd/journald.conf` and this value:`SystemMaxUse=50M`
|
|
|
|
## customize fresh system
|
|
- /etc/mkinitcpio.conf
|
|
- /boot/loader/entries/arch.conf https://wiki.archlinux.org/title/Kernel_parameters#systemd-boot
|
|
- unified kernel image https://wiki.archlinux.org/title/Unified_kernel_image
|
|
- kernel cmdline
|
|
- power state cpu
|
|
- WARNING: do not use the partuuid in the cmdline. check the uuid correctness with the LUKS container, `blkid`
|
|
- root and resume are links to the mapper
|
|
- reboot the system to check if anything is broken
|
|
- add secureboot https://wiki.archlinux.org/title/Unified_Extensible_Firmware_Interface/Secure_Boot#Implementing_Secure_Boot
|
|
|
|
|
|
## failure recovery
|
|
1. boot from archlinux usb stick
|
|
2. mount LUKS Container `cryptsetup luksOpen /dev/nvme0n1pX luksDev`
|
|
3. temporary dir `mkdir tmpmnt`
|
|
4. mount `mount -o subvol=@ /dev/mapper/luksDev tmp`
|
|
5. `arch-chroot tmp bash`
|
|
6. `mount /dev/nmve0n1p1 /boot`
|
|
7. fix stuff
|
|
8. `mkinicpio -p linux`
|
|
9. sync, unmount boot and tmp
|
|
10. `cryptsetup luksClose luksdev` |