Arch Linux: August 2021 update (#185)

Signed-off-by: Maurice Zhou <jasper@apvc.uk>
This commit is contained in:
ne9z
2021-08-03 22:44:45 +08:00
committed by GitHub
parent de588ca3d3
commit 6a60717816
6 changed files with 20 additions and 52 deletions

View File

@@ -7,8 +7,8 @@ Preparation
:local: :local:
#. Download #. Download
`2021.06.01 <https://mirrors.ocf.berkeley.edu/archlinux/iso/2021.06.01/archlinux-2021.06.01-x86_64.iso>`__ `2021.08.01 <https://mirrors.ocf.berkeley.edu/archlinux/iso/2021.08.01/archlinux-2021.08.01-x86_64.iso>`__
Live ISO and `signature <https://archlinux.org/iso/2021.06.01/archlinux-2021.06.01-x86_64.iso.sig>`__. Live ISO and `signature <https://archlinux.org/iso/2021.08.01/archlinux-2021.08.01-x86_64.iso.sig>`__.
#. Follow `installation guide on Arch wiki <https://wiki.archlinux.org/title/Installation_guide>`__ #. Follow `installation guide on Arch wiki <https://wiki.archlinux.org/title/Installation_guide>`__
up to **Update the system clock**. up to **Update the system clock**.
@@ -26,10 +26,11 @@ Preparation
#. `Add archzfs repo <../0-archzfs-repo.html>`__. #. `Add archzfs repo <../0-archzfs-repo.html>`__.
#. Install ZFS:: #. Install prebuilt ZFS package, corresponding to
`live image kernel version <https://archlinux.org/download/>`__::
LIVE_ZFS_PKG="zfs-linux-2.0.4_5.12.8.arch1.1-1-x86_64.pkg.tar.zst" LIVE_ZFS_PKG="zfs-linux-2.1.0_5.13.6.arch1.1-1-x86_64.pkg.tar.zst"
LIVE_ZFS_UTILS="zfs-utils-2.0.4-1-x86_64.pkg.tar.zst" LIVE_ZFS_UTILS="zfs-utils-2.1.0-2-x86_64.pkg.tar.zst"
LIVE_ZFS_MIRROR="https://mirror.sum7.eu/archlinux/archzfs" LIVE_ZFS_MIRROR="https://mirror.sum7.eu/archlinux/archzfs"
pacman -U --noconfirm ${LIVE_ZFS_MIRROR}/archzfs/x86_64/${LIVE_ZFS_UTILS} || \ pacman -U --noconfirm ${LIVE_ZFS_MIRROR}/archzfs/x86_64/${LIVE_ZFS_UTILS} || \
pacman -U --noconfirm ${LIVE_ZFS_MIRROR}/archive_archzfs/${LIVE_ZFS_UTILS} pacman -U --noconfirm ${LIVE_ZFS_MIRROR}/archive_archzfs/${LIVE_ZFS_UTILS}

View File

@@ -27,17 +27,7 @@ System Installation
#. Create boot pool:: #. Create boot pool::
zpool create \ zpool create \
-d -o feature@async_destroy=enabled \ -o compatibility=grub2 \
-o feature@bookmarks=enabled \
-o feature@embedded_data=enabled \
-o feature@empty_bpobj=enabled \
-o feature@enabled_txg=enabled \
-o feature@extensible_dataset=enabled \
-o feature@filesystem_limits=enabled \
-o feature@hole_birth=enabled \
-o feature@large_blocks=enabled \
-o feature@lz4_compress=enabled \
-o feature@spacemap_histogram=enabled \
-o ashift=12 \ -o ashift=12 \
-o autotrim=on \ -o autotrim=on \
-O acltype=posixacl \ -O acltype=posixacl \

View File

@@ -97,7 +97,7 @@ System Configuration
sed -i 's/#IgnorePkg/IgnorePkg/' /mnt/etc/pacman.conf sed -i 's/#IgnorePkg/IgnorePkg/' /mnt/etc/pacman.conf
sed -i "/^IgnorePkg/ s/$/ ${INST_LINVAR} ${INST_LINVAR}-headers zfs-${INST_LINVAR} zfs-utils/" /mnt/etc/pacman.conf sed -i "/^IgnorePkg/ s/$/ ${INST_LINVAR} ${INST_LINVAR}-headers zfs-${INST_LINVAR} zfs-utils/" /mnt/etc/pacman.conf
Kernel will be updated manually. See `here <../2-zfs-linux.html>`__. Kernel will be updated manually. See `here <../1-zfs-linux.html#update-kernel>`__.
#. Enable ZFS services:: #. Enable ZFS services::
@@ -112,6 +112,7 @@ System Configuration
INST_VDEV=$INST_VDEV" > /mnt/root/chroot INST_VDEV=$INST_VDEV" > /mnt/root/chroot
echo DISK=\($(for i in ${DISK[@]}; do printf "$i "; done)\) >> /mnt/root/chroot echo DISK=\($(for i in ${DISK[@]}; do printf "$i "; done)\) >> /mnt/root/chroot
arch-chroot /mnt bash --login arch-chroot /mnt bash --login
cd ~
#. Source variables:: #. Source variables::

View File

@@ -61,7 +61,8 @@ Supply password with SSH
Encrypt boot pool Encrypt boot pool
~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~
Note: This will disable password with SSH. Note: This will disable password with SSH. The password previously set for
root pool will be replaced by keyfile, embedded in initrd.
#. LUKS password:: #. LUKS password::
@@ -118,17 +119,7 @@ Note: This will disable password with SSH.
#. Recreate boot pool with mappers as vdev:: #. Recreate boot pool with mappers as vdev::
zpool create \ zpool create \
-d -o feature@async_destroy=enabled \ -o compatibility=grub2 \
-o feature@bookmarks=enabled \
-o feature@embedded_data=enabled \
-o feature@empty_bpobj=enabled \
-o feature@enabled_txg=enabled \
-o feature@extensible_dataset=enabled \
-o feature@filesystem_limits=enabled \
-o feature@hole_birth=enabled \
-o feature@large_blocks=enabled \
-o feature@lz4_compress=enabled \
-o feature@spacemap_histogram=enabled \
-o ashift=12 \ -o ashift=12 \
-o autotrim=on \ -o autotrim=on \
-O acltype=posixacl \ -O acltype=posixacl \
@@ -260,9 +251,9 @@ boot from it. This enables system recovery and re-installation.
mkdir /boot/efi/iso mkdir /boot/efi/iso
cd /boot/efi/iso cd /boot/efi/iso
# select a mirror # curl -O https://mirrors.ocf.berkeley.edu/archlinux/iso/2021.06.01/archlinux-2021.06.01-x86_64.iso # select a mirror # curl -O https://mirrors.ocf.berkeley.edu/archlinux/iso/2021.08.01/archlinux-2021.08.01-x86_64.iso
curl -O https://archlinux.org/iso/2021.06.01/archlinux-2021.06.01-x86_64.iso.sig curl -O https://archlinux.org/iso/2021.08.01/archlinux-2021.08.01-x86_64.iso.sig
gpg --auto-key-retrieve --verify archlinux-2021.06.01-x86_64.iso.sig gpg --auto-key-retrieve --verify archlinux-2021.08.01-x86_64.iso.sig
Additionally you can build your own live image Additionally you can build your own live image
with `archiso package <https://gitlab.archlinux.org/archlinux/archiso>`__. with `archiso package <https://gitlab.archlinux.org/archlinux/archiso>`__.

View File

@@ -132,7 +132,7 @@ Finish Installation
Set up cron job to snapshot user home everyday:: Set up cron job to snapshot user home everyday::
dnf install cronie pacman -S cronie
systemctl enable --now cronie systemctl enable --now cronie
crontab -eu ${myUser} crontab -eu ${myUser}
#@daily zfs snap $(df --output=source /home/${myUser} | tail -n +2)@$(dd if=/dev/urandom of=/dev/stdout bs=1 count=100 2>/dev/null |tr -dc 'a-z0-9' | cut -c-6) #@daily zfs snap $(df --output=source /home/${myUser} | tail -n +2)@$(dd if=/dev/urandom of=/dev/stdout bs=1 count=100 2>/dev/null |tr -dc 'a-z0-9' | cut -c-6)

View File

@@ -21,13 +21,14 @@ This section is also applicable if you are in
#. On another computer, generate rescue image with:: #. On another computer, generate rescue image with::
pacman -S --needed mtools libisoburn grub pacman -S --needed mtools libisoburn grub
grub-install
grub-mkrescue -o grub-rescue.img grub-mkrescue -o grub-rescue.img
dd if=grub-rescue.img of=/dev/your-usb-stick dd if=grub-rescue.img of=/dev/your-usb-stick
Boot computer from the rescue media. Boot computer from the rescue media.
Both legacy and EFI mode are supported. Both legacy and EFI mode are supported.
Skip this step if you are in GRUB rescue. Or `download generated GRUB rescue image <https://gitlab.com/m_zhou/bieaz/uploads/4a1b7cefb42723de6eb04f9dc485be3b/grub-rescue.img.7z>`__.
#. List available disks with ``ls`` command:: #. List available disks with ``ls`` command::
@@ -36,20 +37,6 @@ This section is also applicable if you are in
hd0 hd1 hd2 hd3 hd0 hd1 hd2 hd3
If you are dropped to GRUB rescue instead of
booting from GRUB rescue image, boot disk can be found
out with::
echo $root
# cryto0
# hd0,gpt2
GRUB configuration is loaded from::
echo $prefix
# (crypto0)/sys/BOOT/default@/grub
# (hd0,gpt2)/sys/BOOT/default@/grub
#. List partitions by pressing tab key: #. List partitions by pressing tab key:
.. code-block:: text .. code-block:: text
@@ -94,12 +81,10 @@ This section is also applicable if you are in
grub> ls (crypto0)/sys/BOOT grub> ls (crypto0)/sys/BOOT
@/ default/ be0/ @/ default/ be0/
#. Instruct GRUB to load configuration from ``be0`` boot environment #. Instruct GRUB to load configuration from ``be0`` boot environment::
then enter normal mode::
grub> prefix=(crypto0)/sys/BOOT/be0/@/grub grub> prefix=(crypto0)/sys/BOOT/be0/@/grub
grub> insmod normal grub> configfile $prefix/grub.cfg
grub> normal
#. GRUB menu should now appear. #. GRUB menu should now appear.