Cleanup and changed lvm naming scheme

This commit is contained in:
Tastatur 2024-01-01 20:47:20 +01:00
parent 652897f86b
commit 6e9650e483
4 changed files with 21 additions and 23 deletions

View file

@ -3,7 +3,7 @@
To install the Alpine Linux distribution on the system, the encrypted partition and the efi partition have to be mounted to the main system.
```
# mount /dev/vg<m>/root<n> /mnt -t ext4
# mount /dev/vg<n>/alp_root /mnt -t ext4
# mkdir /mnt/boot/efi -p
# mount /dev/<disk1> /mnt/boot/efi -t vfat
```
@ -22,8 +22,6 @@ Now the other directories are going to be mounted so that it's possible to chroo
# for i in dev proc sys run; do
> mount --rbind --make-rslave /$i /mnt/$i
> done
# mount /dev/vg<m>/var<n> /mnt/var
# mount /dev/vg<m>/tmp<n> /mnt/tmp
# chroot /mnt
```
@ -52,11 +50,11 @@ Edit `/etc/fstab` for correct mounts:
```
/dev/disk/by-label/efi /boot/efi vfat defaults,nodev,nosuid,noexec 0 2
/dev/vg<m>/root<n> / ext4 defaults,noatime 0 1
/dev/vg<m>/home<n> /home ext4 defaults,noatime,nosuid,nodev 0 2
/dev/vg<m>/tmp<n> /tmp ext4 defaults,nodev,nosuid,noexec 0 2
/dev/vg<m>/var<n> /var ext4 defaults,nodev,nosuid,noexec 0 2
/dev/vg<m>/nix<n> /nix ext4 defaults,noatime,nodev,nosuid 0 2
/dev/vg<n>/alp_root / ext4 defaults,noatime 0 1
/dev/vg<n>/alp_hom /home ext4 defaults,noatime,nosuid,nodev 0 2
/dev/vg<n>/alp_tmp /tmp ext4 defaults,nodev,nosuid,noexec 0 2
/dev/vg<n>/alp_var /var ext4 defaults,nodev,nosuid,noexec 0 2
/dev/vg<n>/alp_nix /nix ext4 defaults,noatime,nodev,nosuid 0 2
proc /proc proc nosuid,nodev,noexec,hidepid=2 0 0
```
@ -90,7 +88,7 @@ To:
And configure `/etc/kernel-hooks.d/secureboot.conf` for cmdline and secureboot.
```
cmdline="rw rd.luks.name=<uuid>=luks root=/dev/vg<m>/root<n> modules=ext4 quiet splash rd.lvm.vg=vg<m>"
cmdline="rw rd.luks.name=<uuid>=luks root=/dev/vg<n>/alp_root modules=ext4 quiet splash rd.lvm.vg=vg<m>"
signing_cert="/usr/share/secureboot/keys/db/db.pem"
signing_key="/usr/share/secureboot/keys/db/db.key"
@ -139,7 +137,7 @@ And also remove some junk left over by grub.
# rm -rf /boot/efi/EFI/alpine
# rm -rf /boot/grub
# rm -rf /etc/default
# unlink /boot/boot
# cd /boot && unlink boot
```
You can also install `os-prober` which can find operating systems and add them to your bootloader. Besides that `gummiboot` can also be configured with the file `/boot/efi/loader/loader.conf` in which you can specify the timeout and what OS it should load into by default.
@ -160,7 +158,7 @@ Before finishing up the installation `networkmanager` will be installed for netw
Wifi will not yet work but this is will be done later on.
> If internet doesn't work after reboot follow the instructions in the [network section](https://docs.bijl.us/alpine-desktop-setup/post-install/network/).
> If internet doesn't work after reboot create the config file as described in the [wifi section](https://docs.bijl.us/alpine-desktop-setup/post-install/network/) and restart the service.
Now exit out of the chroot and you should be able to reboot into a working Alpine system.

View file

@ -38,7 +38,7 @@ There are different frontends to configure connections but for now lets install
It should be pretty self-explanatory on how to use it.
To make it possible for users to edit connections create the config file `/etc/NetworkManager/conf.d` with:
To make it possible for users to edit connections create the config file `/etc/NetworkManager/conf.d/no-polkit.conf` with:
```
[main]

View file

@ -139,7 +139,7 @@ Improve the security of the system by improving the entropy and thus randomness.
# apk add jitterentropy-library
```
And create a config file in `/usr/lib/modules-load.d/jitterentropy.conf` so that the kernel module gets loaded:
And create a config file in `/etc/modules-load.d/jitterentropy.conf` so that the kernel module gets loaded:
```
jitterentropy_rng
@ -155,7 +155,7 @@ First install PAM through `util-linux-login`:
# apk add util-linux-login
```
Delays can be a deterent against bruteforcing login attempts. Simply add this line to it's corresponding section in `/etc/pam.d/login`:
Delays can be a deterent against bruteforcing login attempts. Simply add this to the line in `/etc/pam.d/login`:
```
auth optional pam_faildelay.so delay=5000000

View file

@ -35,20 +35,20 @@ And the encrypted filesystem on the root partition.
# cryptsetup open --type luks /dev/<disk2> luks
```
Now to create a new LVM volume group (choose $m,n \in \mathbb{N}$ accordingly):
Now to create a new LVM volume group (choose $n \in \mathbb{N}$ accordingly):
```
# vgcreate vg<m> /dev/mapper/luks
# vgcreate vg<n> /dev/mapper/luks
```
To create partitions inside the volume group:
```
# lvcreate --name root<n> -L 16G vg<m>
# lvcreate --name var<n> -L 8G vg<m>
# lvcreate --name tmp<n> -L 16G vg<m>
# lvcreate --name nix<n> -L 32G vg<m>
# lvcreate --name home<n> -l 100%FREE vg<m>
# lvcreate --name alp_root -L 16G vg<n>
# lvcreate --name alp_var -L 8G vg<n>
# lvcreate --name alp_tmp -L 16G vg<n>
# lvcreate --name alp_nix -L 32G vg<n>
# lvcreate --name nix_home -l 100%FREE vg<n>
```
Now the home partition fills the entirety of the volume group. These sizes should be changed depending on the needs of the user.
@ -56,8 +56,8 @@ Now the home partition fills the entirety of the volume group. These sizes shoul
To create the filesystems on the logical partitions:
```
for i in root<n> var<n> tmp<n> nix<n> home<n>; do
> mkfs.ext4 /dev/vg<m>/$i
for i in root var tmp nix home; do
> mkfs.ext4 /dev/vg<n>/alp_$i
> done
```