Updated naming scheme in alpine-desktop.

This commit is contained in:
Luc Bijl 2023-12-27 12:06:05 +01:00
parent 75ba52cf4f
commit bb4130b0eb
5 changed files with 95 additions and 78 deletions
docs
alpine-desktop-setup
javascripts
mkdocs.yml

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/vg0/aroot /mnt -t ext4
# mount /dev/vg1/aroot /mnt -t ext4
# mkdir /mnt/boot/efi -p
# mount /dev/<disk1> /mnt/boot/efi -t vfat
```
@ -22,8 +22,8 @@ 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/vg0/avar /mnt/var
# mount /dev/vg0/atmp /mnt/tmp
# mount /dev/vg1/avar /mnt/var
# mount /dev/vg1/atmp /mnt/tmp
# chroot /mnt
```
@ -32,7 +32,7 @@ The other "setup" scripts can be used to configure key aspects of the system.
```
# setup-hostname <hostname>
# setup-keymap us us-euro
# setup-timezone -i <Area>/<Subarea>
# setup-timezone -i <area>/<subarea>
# setup-ntp openntpd
# rc-update add acpid default
# passwd root
@ -49,11 +49,11 @@ clock_systohc="NO"
Edit `/etc/fstab` for correct mounts.
```
/dev/vg0/aroot / ext4 defaults,noatime 0 1
/dev/vg0/ahome /home ext4 defaults,noatime,nodev 0 1
/dev/vg0/atmp /tmp ext4 defaults,nodev,nosuid,noexec 0 1
/dev/vg0/avar /var ext4 defaults,nodev,nosuid,noexec 0 1
/dev/vg0/anix /nix ext4 defaults,nodev,nosuid 0 1
/dev/vg1/root{n} / ext4 defaults,noatime 0 1
/dev/vg1/home{n} /home ext4 defaults,noatime,nodev 0 1
/dev/vg1/tmp{n} /tmp ext4 defaults,nodev,nosuid,noexec 0 1
/dev/vg1/var{n} /var ext4 defaults,nodev,nosuid,noexec 0 1
/dev/vg1/nix{n} /nix ext4 defaults,nodev,nosuid 0 1
proc /proc proc nosuid,nodev,noexec,hidepid=2 0 0
/dev/disk/by-label/efi /boot/efi vfat defaults 0 2
```
@ -89,7 +89,7 @@ To:
And configure `/etc/kernel-hooks.d/secureboot.conf` for cmdline and secureboot.
```
cmdline="rw rd.luks.name=<uuid>=root root=/dev/vg0/aroot modules=ext4 quiet splash rd.lvm.vg=vg0"
cmdline="rw rd.luks.name=<uuid>=root root=/dev/vg1/root{n} modules=ext4 quiet splash rd.lvm.vg=vg1"
signing_cert="/usr/share/secureboot/keys/db/db.pem"
signing_key="/usr/share/secureboot/keys/db/db.key"

View file

@ -1,66 +0,0 @@
# Provisioning
After flasing the Alpine Extended Iso on a usbdrive, partition a disk. For this internet is required because `gptfdisk` is only available in the repositories and is not included on the extended Iso.
To set it up we'll use `setup-interfaces` and `setup-apkrepos`.
```
# setup-interfaces -ar
# setup-apkrepos -c1
```
Because the Alpine Linux Iso is pretty minimal a few packages will have to be installed first:
```
# apk add cryptsetup lvm2 lsblk e2fsprogs gptfdisk dosfstools
```
The drive should be partitioned using `gdisk` (or `cfdisk`). It should have atleast two partitions with one `EFI System` Partition and one `Linux filesystem` partition and look something like this:
| Number of partition | Size | Type |
|:-----:|:-----:|:-----:|
| 1 | 512 MB or more | EFI System |
| 2 | Rest of the drive | Linux filesystem |
Then to create the filesystem on the efi partition.
```
# mkfs.fat -F 32 -n efi /dev/<disk1>
```
And the encrypted filesystem on the root partition.
```
# cryptsetup luksFormat /dev/<disk2> --type luks2 --label luks
# cryptsetup open --type luks /dev/<disk2> pv0
```
Now to create a new LVM volume group:
```
# vgcreate vg0 /dev/mapper/pv0
```
To create partitions inside the volume group:
```
# lvcreate --name aroot -L 16G vg0
# lvcreate --name avar -L 8G vg0
# lvcreate --name anix -L 32G vg0
# lvcreate --name atmp -L 16G vg0
# lvcreate --name ahome -l 100%FREE vg0
```
Now the home partition fills the entirety of the volume group. These sizes should be changed depending on the needs of the user.
To create the filesystems on the logical partitions:
```
# mkfs.ext4 /dev/vg0/aroot
# mkfs.ext4 /dev/vg0/avar
# mkfs.ext4 /dev/vg0/anix
# mkfs.ext4 /dev/vg0/atmp
# mkfs.ext4 /dev/vg0/ahome
```
Other filesystems can also be used but `ext4` is the standard for most linux distrobutions.

View file

@ -0,0 +1,64 @@
# Provisioning
After flasing the Alpine Linux extended ISO on a usbdrive, partition a disk. For this internet is required because `gptfdisk` is only available in the repositories and is not included on the extended ISO.
To set it up `setup-interfaces` and `setup-apkrepos` will be used.
```
# setup-interfaces -ar
# setup-apkrepos -c1
```
Because the Alpine Linux ISO is pretty minimal a few packages will have to be installed first:
```
# apk add cryptsetup lvm2 lsblk e2fsprogs gptfdisk dosfstools
```
The drive should be partitioned using `gdisk` (or `cfdisk`). It should have atleast two partitions with one `EFI System` partition and one `Linux filesystem` partition and look something like this:
| Number of partition | Size | Type |
|:-----:|:-----:|:-----:|
| 1 | 512 MB or more | EFI System |
| 2 | Rest of the drive | Linux filesystem |
Then to create the filesystem on the efi partition.
```
# mkfs.fat -F 32 -n efi /dev/<disk1>
```
And the encrypted filesystem on the root partition.
```
# cryptsetup luksFormat /dev/<disk2> --type luks2 --label luks
# cryptsetup open --type luks /dev/<disk2> pv1
```
Now to create a new LVM volume group:
```
# vgcreate vg1 /dev/mapper/pv1
```
To create partitions inside the volume group:
```
# lvcreate --name root{n} -L 16G vg1
# lvcreate --name var{n} -L 8G vg1
# lvcreate --name tmp{n} -L 16G vg1
# lvcreate --name nix{n} -L 32G vg1
# lvcreate --name home{n} -l 100%FREE vg1
```
Choose $n \in \mathbb{N}$ accordingly. Now the home partition fills the entirety of the volume group. These sizes should be changed depending on the needs of the user.
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/vg1/$i
> done
```
Other filesystems can also be used but `ext4` is the standard for most Linux distrobutions.

View file

@ -0,0 +1,14 @@
window.MathJax = {
tex: {
inlineMath: [["\\(", "\\)"]],
displayMath: [["\\[", "\\]"]],
processEscapes: true,
processEnvironments: true
},
options: {
ignoreHtmlClass: ".*|",
processHtmlClass: "arithmatex"
}
};
document$.subscribe(() => MathJax.typesetPromise())

View file

@ -30,13 +30,18 @@ theme:
extra:
generator: false
extra_javascript:
- javascripts/mathjax.js
- https://polyfill.io/v3/polyfill.min.js?features=es6
- https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js
nav:
- 'Home': index.md
- 'Alpine-desktop setup':
- 'Start': alpine-desktop-setup/home.md
- 'Provisioning': alpine-desktop-setup/installation/provisioning.md
- 'Installation': alpine-desktop-setup/installation/installation.md
- 'Provisioning': alpine-desktop-setup/provisioning.md
- 'Installation': alpine-desktop-setup/installation.md
- 'Post installation':
- 'Network': alpine-desktop-setup/post-install/network.md
- 'Users': alpine-desktop-setup/post-install/users.md