Update Arch guide as base for blendOS
This commit is contained in:
parent
c7ad7da6f8
commit
486c7a283e
@ -19,7 +19,7 @@ loadkeys de_CH-latin1
|
|||||||
|
|
||||||
## Check UEFI mode
|
## Check UEFI mode
|
||||||
|
|
||||||
If the following command works, the system is booted in EFI.
|
If the following command works, the system is booted in EFI.
|
||||||
|
|
||||||
[shroot]
|
[shroot]
|
||||||
|
|
||||||
@ -66,7 +66,7 @@ Use `Linux filesystem` for other partitions
|
|||||||
|
|
||||||
_Note: Do not put your /efi partition on an encrypted partition!_
|
_Note: Do not put your /efi partition on an encrypted partition!_
|
||||||
|
|
||||||
Create encrypted Partition with a label. This label will later be used to identified the bootdevice as a simpler alternative to UUIDs.
|
Create encrypted Partition with a label. This label will later be used to identified the bootdevice as a simpler alternative to UUIDs.
|
||||||
|
|
||||||
[shroot]
|
[shroot]
|
||||||
|
|
||||||
@ -76,7 +76,7 @@ cryptsetup luksFormat --label=(label) /dev/(partition)
|
|||||||
|
|
||||||
[/shroot]
|
[/shroot]
|
||||||
|
|
||||||
Open the partition and specify a name
|
Open the partition and specify a name
|
||||||
|
|
||||||
[shroot]
|
[shroot]
|
||||||
|
|
||||||
@ -91,7 +91,9 @@ The name should show up there
|
|||||||
|
|
||||||
## Format partitions
|
## Format partitions
|
||||||
|
|
||||||
Fat 32:
|
### EFI or BIOS partition
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
@ -135,7 +143,7 @@ Be careful in choosing you EFI mountpoint when using full disk encryption.
|
|||||||
Using `/efi` will lead to much longer boot times in GRUB and be completely unsupported in other bootloaders.
|
Using `/efi` will lead to much longer boot times in GRUB and be completely unsupported in other bootloaders.
|
||||||
See [this feature comparison](https://wiki.archlinux.org/title/Arch_boot_process#Boot_loader) for details.
|
See [this feature comparison](https://wiki.archlinux.org/title/Arch_boot_process#Boot_loader) for details.
|
||||||
For `/efi` size really doesn't matter much and can be 1 or 2 megabytes. 16MB is probably a good size.
|
For `/efi` size really doesn't matter much and can be 1 or 2 megabytes. 16MB is probably a good size.
|
||||||
If you're using `/boot`, the kernel and initramfs will also be stored on this partition among others. Recommended sizes range from 256MB to 512MB
|
If you're using `/boot`, the kernel and initramfs will also be stored on this partition among others. Recommended sizes range from 256MB to 512MB
|
||||||
|
|
||||||
```
|
```
|
||||||
Root: /mnt
|
Root: /mnt
|
||||||
@ -146,7 +154,7 @@ etc...
|
|||||||
|
|
||||||
### (BTRFS) Btrfs preparation of subvolumes and mounting
|
### (BTRFS) Btrfs preparation of subvolumes and mounting
|
||||||
|
|
||||||
Mount root partition
|
Mount root partition
|
||||||
|
|
||||||
[shroot]
|
[shroot]
|
||||||
|
|
||||||
@ -156,7 +164,7 @@ mount /dev/(partition) /mnt
|
|||||||
|
|
||||||
[/shroot]
|
[/shroot]
|
||||||
|
|
||||||
Root subvolume
|
Root subvolume
|
||||||
|
|
||||||
[shroot]
|
[shroot]
|
||||||
|
|
||||||
@ -166,7 +174,7 @@ btrfs subv create /mnt/@
|
|||||||
|
|
||||||
[/shroot]
|
[/shroot]
|
||||||
|
|
||||||
Home subvolume
|
Home subvolume
|
||||||
|
|
||||||
[shroot]
|
[shroot]
|
||||||
|
|
||||||
@ -176,7 +184,7 @@ btrfs subv create /mnt/@home
|
|||||||
|
|
||||||
[/shroot]
|
[/shroot]
|
||||||
|
|
||||||
Snapshots subvolume for snapper
|
Snapshots subvolume for snapper
|
||||||
|
|
||||||
[shroot]
|
[shroot]
|
||||||
|
|
||||||
@ -186,7 +194,7 @@ btrfs subv create /mnt/@snapshots
|
|||||||
|
|
||||||
[/shroot]
|
[/shroot]
|
||||||
|
|
||||||
Var subvolume
|
Var subvolume
|
||||||
|
|
||||||
[shroot]
|
[shroot]
|
||||||
|
|
||||||
@ -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,47 +226,15 @@ 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`.
|
||||||
Additional packages might also be necessary, see the list below.
|
Additional packages might also be necessary, see the list below.
|
||||||
|
|
||||||
[shroot]
|
[shroot]
|
||||||
|
|
||||||
@ -389,7 +354,7 @@ pacman -S refind
|
|||||||
|
|
||||||
[/shroot]
|
[/shroot]
|
||||||
|
|
||||||
Use the rEFInd installation script. In most cases no specific configuration is necessary
|
Use the rEFInd installation script. In most cases no specific configuration is necessary
|
||||||
|
|
||||||
[shroot]
|
[shroot]
|
||||||
|
|
||||||
@ -399,22 +364,43 @@ refind-install
|
|||||||
|
|
||||||
[/shroot]
|
[/shroot]
|
||||||
|
|
||||||
**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
|
||||||
|
|
||||||
Some additional settings are necessary in `/etc/mkinitcpio.conf` in order to enable booting from LUKS-encrypted disks.
|
[shroot]
|
||||||
|
|
||||||
Edit the `HOOKS` section in `/etc/mkinitcpio.conf` by adding `encrypt` after `block` and before `filesystems`
|
```
|
||||||
|
pacman -S grub efibootmgr
|
||||||
|
```
|
||||||
|
|
||||||
Also ensure `keyboard keymap` are present before `encrypt` in order to allow the loading of the default keyboard language from `/etc/vconsole.conf` to enter the decryption password.
|
[/shroot]
|
||||||
|
|
||||||
Regenerate all initramfs presets
|
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.
|
||||||
|
|
||||||
|
Edit the `HOOKS` section in `/etc/mkinitcpio.conf` by adding `encrypt` after `block` and before `filesystems`
|
||||||
|
|
||||||
|
Also ensure `keyboard keymap` are present before `encrypt` in order to allow the loading of the default keyboard language from `/etc/vconsole.conf` to enter the decryption password.
|
||||||
|
|
||||||
|
Regenerate all initramfs presets
|
||||||
|
|
||||||
[shroot]
|
[shroot]
|
||||||
|
|
||||||
@ -519,6 +505,8 @@ pacman -S snap-pac
|
|||||||
|
|
||||||
_WIP_
|
_WIP_
|
||||||
|
|
||||||
`paru -S refind-btrfs`
|
`paru -S refind-btrfs`
|
||||||
|
|
||||||
`systemctl enable --now refind-btrfs.service`
|
`systemctl enable --now refind-btrfs.service`
|
||||||
|
|
||||||
|
TODO config
|
||||||
|
Loading…
Reference in New Issue
Block a user