diff --git a/docs/alpine-desktop-setup/installation/installation.md b/docs/alpine-desktop-setup/installation.md similarity index 85% rename from docs/alpine-desktop-setup/installation/installation.md rename to docs/alpine-desktop-setup/installation.md index 1de4ae7..da84478 100644 --- a/docs/alpine-desktop-setup/installation/installation.md +++ b/docs/alpine-desktop-setup/installation.md @@ -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/ /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 # setup-keymap us us-euro -# setup-timezone -i / +# setup-timezone -i / # 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==root root=/dev/vg0/aroot modules=ext4 quiet splash rd.lvm.vg=vg0" +cmdline="rw rd.luks.name==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" diff --git a/docs/alpine-desktop-setup/installation/provisioning.md b/docs/alpine-desktop-setup/installation/provisioning.md deleted file mode 100644 index 1194d55..0000000 --- a/docs/alpine-desktop-setup/installation/provisioning.md +++ /dev/null @@ -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/ -``` - -And the encrypted filesystem on the root partition. - -``` -# cryptsetup luksFormat /dev/ --type luks2 --label luks -# cryptsetup open --type luks /dev/ 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. diff --git a/docs/alpine-desktop-setup/provisioning.md b/docs/alpine-desktop-setup/provisioning.md new file mode 100644 index 0000000..78aeed5 --- /dev/null +++ b/docs/alpine-desktop-setup/provisioning.md @@ -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/ +``` + +And the encrypted filesystem on the root partition. + +``` +# cryptsetup luksFormat /dev/ --type luks2 --label luks +# cryptsetup open --type luks /dev/ 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. \ No newline at end of file diff --git a/docs/javascripts/mathjax.js b/docs/javascripts/mathjax.js new file mode 100644 index 0000000..f0cd770 --- /dev/null +++ b/docs/javascripts/mathjax.js @@ -0,0 +1,14 @@ +window.MathJax = { + tex: { + inlineMath: [["\\(", "\\)"]], + displayMath: [["\\[", "\\]"]], + processEscapes: true, + processEnvironments: true + }, + options: { + ignoreHtmlClass: ".*|", + processHtmlClass: "arithmatex" + } +}; + +document$.subscribe(() => MathJax.typesetPromise()) \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index e519e26..bcf77be 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -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