Update Arch guide as base for blendOS

This commit is contained in:
exu 2024-05-28 18:42:48 +02:00
parent c7ad7da6f8
commit 486c7a283e

View File

@ -91,6 +91,8 @@ The name should show up there
## Format partitions ## Format partitions
### EFI or BIOS partition
Fat 32: Fat 32:
[shroot] [shroot]
@ -101,9 +103,9 @@ mkfs.fat -F32 /dev/(partition)
[/shroot] [/shroot]
_For EFI or BOOT partition_ ### Root and other partitions
Ext4: **Ext4**
[shroot] [shroot]
@ -113,9 +115,7 @@ mkfs.ext4 /dev/(partition)
[/shroot] [/shroot]
_All other partitions_ **Btrfs**
Btrfs:
[shroot] [shroot]
@ -125,7 +125,15 @@ mkfs.btrfs /dev/(partition)
[/shroot] [/shroot]
_All other partitions_ **Bcachefs**
[shroot]
```
bcachefs format /dev/(partition)
```
[/shroot]
## Mounting partitions ## Mounting partitions
@ -196,17 +204,6 @@ btrfs subv create /mnt/@var_log
[/shroot] [/shroot]
_If you want to use a swapfile with Snapper, create a new subvolume now_
Swap subvolume
[shroot]
```
btrfs subv create /mnt/@swap
```
[/shroot]
[shroot] [shroot]
``` ```
@ -219,9 +216,9 @@ Mount root
`mount -o noatime,compress-force=zstd,subvol=@ /dev/(partition) /mnt` `mount -o noatime,compress-force=zstd,subvol=@ /dev/(partition) /mnt`
With /efi With /efi
`mkdir -p /mnt/{efi,home,.snapshots,var/log,swap}` `mkdir -p /mnt/{efi,home,.snapshots,var/log}`
With /boot With /boot
`mkdir -p /mnt/{boot,home,.snapshots,var/log,swap}` `mkdir -p /mnt/{boot,home,.snapshots,var/log}`
Mount home Mount home
`mount -o noatime,compress-force=zstd,subvol=@home /dev/(partition) /mnt/home` `mount -o noatime,compress-force=zstd,subvol=@home /dev/(partition) /mnt/home`
@ -229,43 +226,11 @@ Mount home
Mount snapshots for snapper Mount snapshots for snapper
`mount -o noatime,compress-force=zstd,subvol=@snapshots /dev/(partition) /mnt/.snapshots` `mount -o noatime,compress-force=zstd,subvol=@snapshots /dev/(partition) /mnt/.snapshots`
Mount var Mount var/log
`mount -o noatime,compress-force=zstd,subvol=@var_log /dev/(partition) /mnt/var/log` `mount -o noatime,compress-force=zstd,subvol=@var_log /dev/(partition) /mnt/var/log`
Swap subvolume
`mount -o noatime,subvol=@swap /dev/(partition) /mnt/swap`
**Don't forget mounting other partitions!!** **Don't forget mounting other partitions!!**
## Swap
### Swapfile
#### Normal way
**NOT FOR BTRFS!**
[shroot]
```
dd if=/dev/zero of=/mnt/swapfile bs=1M count=(size) status=progress
```
[/shroot]
#### (BTRFS) Swapfile in btrfs
_Use a separate subvolume to work with snapper_
[shroot]
```
btrfs fi mkswapfile --size [SIZE]g --uuid clear /mnt/swap/swapfile
swapon /mnt/swap/swapfile
```
[/shroot]
## Essential packages ## Essential packages
Install a few essential packages using `pacstrap`. Install a few essential packages using `pacstrap`.
@ -402,11 +367,32 @@ refind-install
**Manual editing of the generated configuration file is necessary when installing rEFInd from the Arch boot ISO** **Manual editing of the generated configuration file is necessary when installing rEFInd from the Arch boot ISO**
_TODO insert config here_ _TODO insert config here_
``` ```
"Boot with standard options" "rw loglevel=3 quiet cryptdevice=LABEL=(label):(name) root=/dev/mapper/(name) rootflags=subvol=@" "Boot with standard options" "rw loglevel=3 quiet cryptdevice=LABEL=(label):(name) root=/dev/mapper/(name) rootflags=subvol=@"
``` ```
### mkinitcpio with LUKS ### GRUB
[shroot]
```
pacman -S grub efibootmgr
```
[/shroot]
Make sure the `/boot` or `/efi` partition is mounted
[shroot]
```
grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
```
[/shroot]
### (LUKS) mkinitcpio with LUKS
Some additional settings are necessary in `/etc/mkinitcpio.conf` in order to enable booting from LUKS-encrypted disks. Some additional settings are necessary in `/etc/mkinitcpio.conf` in order to enable booting from LUKS-encrypted disks.
@ -522,3 +508,5 @@ _WIP_
`paru -S refind-btrfs` `paru -S refind-btrfs`
`systemctl enable --now refind-btrfs.service` `systemctl enable --now refind-btrfs.service`
TODO config