Arch Linux: Remove alternative solutions
The previous approach to installation is: try this easy one first, and if it fails, try the hard one. This commit streamlines the installation experience by minimizing references to such procedures. This commit also removes verbose comments from Root on ZFS installation guides. As the upstream has fixed glibc, its section is also removed. Signed-off-by: Maurice Zhou <ja@apvc.uk>
This commit is contained in:
@@ -154,32 +154,25 @@ Prepare the Live Environment
|
|||||||
Uncomment and move mirrors to
|
Uncomment and move mirrors to
|
||||||
the beginning of the file.
|
the beginning of the file.
|
||||||
|
|
||||||
#. Install ZFS in the live environment::
|
#. Install ZFS in the live environment:
|
||||||
|
|
||||||
pacman -Sy --noconfirm archzfs-linux --ignore=linux
|
Check kernel variant::
|
||||||
|
|
||||||
Ignore ``ERROR: specified kernel image does not exist``.
|
|
||||||
|
|
||||||
If this fails with ``unable to satisfy dependency``,
|
|
||||||
install archzfs-dkms instead:
|
|
||||||
|
|
||||||
- Check kernel variant::
|
|
||||||
|
|
||||||
LIVE_LINVAR=$(sed 's|.*linux|linux|' /proc/cmdline | awk '{ print $1 }')
|
LIVE_LINVAR=$(sed 's|.*linux|linux|' /proc/cmdline | awk '{ print $1 }')
|
||||||
|
|
||||||
- Check kernel version::
|
Check kernel version::
|
||||||
|
|
||||||
LIVE_LINVER=$(pacman -Qi ${LIVE_LINVAR} | grep Version | awk '{ print $3 }')
|
LIVE_LINVER=$(pacman -Qi ${LIVE_LINVAR} | grep Version | awk '{ print $3 }')
|
||||||
|
|
||||||
- Install kernel headers::
|
Install kernel headers::
|
||||||
|
|
||||||
pacman -U https://archive.archlinux.org/packages/l/${LIVE_LINVAR}-headers/${LIVE_LINVAR}-headers-${LIVE_LINVER}-x86_64.pkg.tar.zst
|
pacman -U https://archive.archlinux.org/packages/l/${LIVE_LINVAR}-headers/${LIVE_LINVAR}-headers-${LIVE_LINVER}-x86_64.pkg.tar.zst
|
||||||
|
|
||||||
- Expand root filesystem::
|
Expand root filesystem::
|
||||||
|
|
||||||
mount -o remount,size=1G /run/archiso/cowspace
|
mount -o remount,size=1G /run/archiso/cowspace
|
||||||
|
|
||||||
- Install archzfs-dkms::
|
Install archzfs-dkms::
|
||||||
|
|
||||||
pacman -S archzfs-dkms
|
pacman -S archzfs-dkms
|
||||||
|
|
||||||
@@ -302,7 +295,7 @@ Create Root and Boot Pools
|
|||||||
zpool create \
|
zpool create \
|
||||||
... \
|
... \
|
||||||
mirror \
|
mirror \
|
||||||
/dev/disk/by-id/ata-disk1-part2
|
/dev/disk/by-id/ata-disk1-part2 \
|
||||||
/dev/disk/by-id/ata-disk2-part2
|
/dev/disk/by-id/ata-disk2-part2
|
||||||
|
|
||||||
if needed, replace ``mirror`` with ``raidz1``, ``raidz2`` or ``raidz3``.
|
if needed, replace ``mirror`` with ``raidz1``, ``raidz2`` or ``raidz3``.
|
||||||
@@ -475,19 +468,6 @@ Create Datasets
|
|||||||
zfs create -o mountpoint=legacy -o canmount=noauto bpool_$INST_UUID/BOOT/default
|
zfs create -o mountpoint=legacy -o canmount=noauto bpool_$INST_UUID/BOOT/default
|
||||||
zfs create -o mountpoint=/ -o canmount=noauto rpool_$INST_UUID/ROOT/default
|
zfs create -o mountpoint=/ -o canmount=noauto rpool_$INST_UUID/ROOT/default
|
||||||
|
|
||||||
- ``canmount=noauto`` prevents ZFS from automatically
|
|
||||||
mounting datasets.
|
|
||||||
|
|
||||||
- Root dataset, specified with ``root=ZFS=rpool/ROOT/dataset`` at boot,
|
|
||||||
will be mounted regardless of other properties.
|
|
||||||
|
|
||||||
- Boot dataset is mounted with ``/etc/fstab``.
|
|
||||||
Its ``fstab`` entry will be updated upon the creation of
|
|
||||||
a new boot environment.
|
|
||||||
|
|
||||||
- ``zfs-mount-generator`` does not mount datasets
|
|
||||||
with ``canmount=noauto``.
|
|
||||||
|
|
||||||
#. Mount root and boot filesystem datasets::
|
#. Mount root and boot filesystem datasets::
|
||||||
|
|
||||||
zfs mount rpool_$INST_UUID/ROOT/default
|
zfs mount rpool_$INST_UUID/ROOT/default
|
||||||
@@ -580,7 +560,7 @@ Package Installation
|
|||||||
|
|
||||||
#. Install archzfs package::
|
#. Install archzfs package::
|
||||||
|
|
||||||
pacstrap $INST_MNT archzfs-$INST_LINVAR
|
pacstrap $INST_MNT zfs-$INST_LINVAR
|
||||||
|
|
||||||
#. If your computer has hardware that requires firmware to run::
|
#. If your computer has hardware that requires firmware to run::
|
||||||
|
|
||||||
@@ -690,8 +670,7 @@ System Configuration
|
|||||||
|
|
||||||
#. Chroot::
|
#. Chroot::
|
||||||
|
|
||||||
arch-chroot $INST_MNT /usr/bin/env DISK=$DISK \
|
arch-chroot $INST_MNT /usr/bin/env DISK=$DISK INST_UUID=$INST_UUID bash --login
|
||||||
INST_UUID=$INST_UUID bash --login
|
|
||||||
|
|
||||||
#. Apply locales::
|
#. Apply locales::
|
||||||
|
|
||||||
@@ -703,8 +682,7 @@ System Configuration
|
|||||||
|
|
||||||
#. Enable ZFS services::
|
#. Enable ZFS services::
|
||||||
|
|
||||||
systemctl enable zfs-import-cache zfs-import.target \
|
systemctl enable zfs-import-cache zfs-import.target zfs-mount zfs-zed zfs.target
|
||||||
zfs-mount zfs-zed zfs.target
|
|
||||||
|
|
||||||
#. Generate zpool.cache
|
#. Generate zpool.cache
|
||||||
|
|
||||||
@@ -754,44 +732,6 @@ command::
|
|||||||
|
|
||||||
sed -i "s|rpool=.*|rpool=\`zdb -l \${GRUB_DEVICE} \| grep -E '[[:blank:]]name' \| cut -d\\\' -f 2\`|" /etc/grub.d/10_linux
|
sed -i "s|rpool=.*|rpool=\`zdb -l \${GRUB_DEVICE} \| grep -E '[[:blank:]]name' \| cut -d\\\' -f 2\`|" /etc/grub.d/10_linux
|
||||||
|
|
||||||
**Notes:**
|
|
||||||
|
|
||||||
In ``/etc/grub.d/10_linux``::
|
|
||||||
|
|
||||||
# rpool=`${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true`
|
|
||||||
|
|
||||||
``10_linux`` will return an empty result if the root pool has features
|
|
||||||
not supported by GRUB.
|
|
||||||
|
|
||||||
With this bug, the generated ``grub.cfg`` contains such lines::
|
|
||||||
|
|
||||||
root=ZFS=/ROOT/default # root pool name missing; unbootable
|
|
||||||
|
|
||||||
Rendering the system unbootable.
|
|
||||||
|
|
||||||
This will replace the faulty line in ``10_linux`` with::
|
|
||||||
|
|
||||||
# rpool=`zdb -l ${GRUB_DEVICE} | grep -E '[[:blank:]]name' | cut -d\' -f 2`
|
|
||||||
|
|
||||||
Debian guide chose to hardcode ``root=ZFS=rpool/ROOT/default``
|
|
||||||
in ``GRUB_CMDLINE_LINUX`` in ``/etc/default/grub``
|
|
||||||
This is incompatible with the boot environment utility.
|
|
||||||
The utility also uses this parameter to boot alternative
|
|
||||||
root filesystem datasets.
|
|
||||||
|
|
||||||
A boot environment entry::
|
|
||||||
|
|
||||||
# root=ZFS=rpool_UUID/ROOT/bootenv_after-sysupdate
|
|
||||||
|
|
||||||
``root=ZFS=pool/dataset`` is processed by
|
|
||||||
the ZFS script in initramfs, used to
|
|
||||||
tell the kernel the real root filesystem.
|
|
||||||
|
|
||||||
``zfs=bootfs`` kernel command line
|
|
||||||
and ``zpool set bootfs=pool/dataset pool``
|
|
||||||
is not used due to its inflexibility.
|
|
||||||
|
|
||||||
|
|
||||||
GRUB Installation
|
GRUB Installation
|
||||||
~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ Prepare the Live Environment
|
|||||||
Uncomment and move mirrors to
|
Uncomment and move mirrors to
|
||||||
the beginning of the file.
|
the beginning of the file.
|
||||||
|
|
||||||
#. Install ZFS in the live environment::
|
#. Install ZFS and tools in the live environment::
|
||||||
|
|
||||||
pacman -Sy --noconfirm gdisk dosfstools archzfs-dkms
|
pacman -Sy --noconfirm gdisk dosfstools archzfs-dkms
|
||||||
|
|
||||||
@@ -290,7 +290,7 @@ Create Root and Boot Pools
|
|||||||
zpool create \
|
zpool create \
|
||||||
... \
|
... \
|
||||||
mirror \
|
mirror \
|
||||||
/dev/disk/by-id/ata-disk1-part2
|
/dev/disk/by-id/ata-disk1-part2 \
|
||||||
/dev/disk/by-id/ata-disk2-part2
|
/dev/disk/by-id/ata-disk2-part2
|
||||||
|
|
||||||
if needed, replace ``mirror`` with ``raidz1``, ``raidz2`` or ``raidz3``.
|
if needed, replace ``mirror`` with ``raidz1``, ``raidz2`` or ``raidz3``.
|
||||||
@@ -463,19 +463,6 @@ Create Datasets
|
|||||||
zfs create -o mountpoint=legacy -o canmount=noauto bpool_$INST_UUID/BOOT/default
|
zfs create -o mountpoint=legacy -o canmount=noauto bpool_$INST_UUID/BOOT/default
|
||||||
zfs create -o mountpoint=/ -o canmount=noauto rpool_$INST_UUID/ROOT/default
|
zfs create -o mountpoint=/ -o canmount=noauto rpool_$INST_UUID/ROOT/default
|
||||||
|
|
||||||
- ``canmount=noauto`` prevents ZFS from automatically
|
|
||||||
mounting datasets.
|
|
||||||
|
|
||||||
- Root dataset, specified with ``root=ZFS=rpool/ROOT/dataset`` at boot,
|
|
||||||
will be mounted regardless of other properties.
|
|
||||||
|
|
||||||
- Boot dataset is mounted with ``/etc/fstab``.
|
|
||||||
Its ``fstab`` entry will be updated upon the creation of
|
|
||||||
a new boot environment.
|
|
||||||
|
|
||||||
- ``zfs-mount-generator`` does not mount datasets
|
|
||||||
with ``canmount=noauto``.
|
|
||||||
|
|
||||||
#. Mount root and boot filesystem datasets::
|
#. Mount root and boot filesystem datasets::
|
||||||
|
|
||||||
zfs mount rpool_$INST_UUID/ROOT/default
|
zfs mount rpool_$INST_UUID/ROOT/default
|
||||||
@@ -558,10 +545,7 @@ Package Installation
|
|||||||
|
|
||||||
Check kernel version::
|
Check kernel version::
|
||||||
|
|
||||||
pacman -Syi ${INST_LINVAR} \
|
INST_LINVER=$(pacman -Syi ${INST_LINVAR} | grep Version | awk '{ print $3 }')
|
||||||
| grep 'Version' \
|
|
||||||
| awk '{ print $3 }'
|
|
||||||
# 5.10.1.artix1-1
|
|
||||||
|
|
||||||
Check zfs-dkms package version::
|
Check zfs-dkms package version::
|
||||||
|
|
||||||
@@ -580,7 +564,7 @@ Package Installation
|
|||||||
|
|
||||||
- Install archzfs-dkms::
|
- Install archzfs-dkms::
|
||||||
|
|
||||||
basestrap $INST_MNT archzfs-dkms ${INST_LINVAR} ${INST_LINVAR}-headers
|
basestrap $INST_MNT zfs-dkms ${INST_LINVAR} ${INST_LINVAR}-headers
|
||||||
|
|
||||||
If the kernel is not yet supported, install an older kernel:
|
If the kernel is not yet supported, install an older kernel:
|
||||||
|
|
||||||
@@ -593,15 +577,11 @@ Package Installation
|
|||||||
|
|
||||||
- Check kernel version::
|
- Check kernel version::
|
||||||
|
|
||||||
curl https://archive.artixlinux.org/repos/${DKMS_DATE}/system/os/x86_64/ \
|
INST_LINVER=$(curl https://archive.artixlinux.org/repos/${DKMS_DATE}/core/os/x86_64/ \
|
||||||
| grep \"${INST_LINVAR}-'[0-9]' \
|
| grep \"${INST_LINVAR}-'[0-9]' \
|
||||||
| grep -v sig
|
| grep -v sig \
|
||||||
# <a href="linux-5.10.3.arch1-1-x86_64.pkg.tar.zst">
|
| sed "s|.*$INST_LINVAR-||" \
|
||||||
|
| sed "s|-x86_64.*||")
|
||||||
- Set kernel version in a variable::
|
|
||||||
|
|
||||||
# <a href="linux-5.10.3.arch1-1-x86_64.pkg.tar.zst">
|
|
||||||
INST_LINVER=5.10.3.arch1-1
|
|
||||||
|
|
||||||
- Install kernel and headers::
|
- Install kernel and headers::
|
||||||
|
|
||||||
@@ -611,7 +591,7 @@ Package Installation
|
|||||||
|
|
||||||
- Install archzfs-dkms::
|
- Install archzfs-dkms::
|
||||||
|
|
||||||
basestrap $INST_MNT archzfs-dkms
|
basestrap $INST_MNT zfs-dkms
|
||||||
|
|
||||||
#. Hold kernel package from updates::
|
#. Hold kernel package from updates::
|
||||||
|
|
||||||
@@ -773,43 +753,6 @@ command::
|
|||||||
|
|
||||||
sed -i "s|rpool=.*|rpool=\`zdb -l \${GRUB_DEVICE} \| grep -E '[[:blank:]]name' \| cut -d\\\' -f 2\`|" /etc/grub.d/10_linux
|
sed -i "s|rpool=.*|rpool=\`zdb -l \${GRUB_DEVICE} \| grep -E '[[:blank:]]name' \| cut -d\\\' -f 2\`|" /etc/grub.d/10_linux
|
||||||
|
|
||||||
**Notes:**
|
|
||||||
|
|
||||||
In ``/etc/grub.d/10_linux``::
|
|
||||||
|
|
||||||
# rpool=`${grub_probe} --device ${GRUB_DEVICE} --target=fs_label 2>/dev/null || true`
|
|
||||||
|
|
||||||
``10_linux`` will return an empty result if the root pool has features
|
|
||||||
not supported by GRUB.
|
|
||||||
|
|
||||||
With this bug, the generated ``grub.cfg`` contains such lines::
|
|
||||||
|
|
||||||
root=ZFS=/ROOT/default # root pool name missing; unbootable
|
|
||||||
|
|
||||||
Rendering the system unbootable.
|
|
||||||
|
|
||||||
This will replace the faulty line in ``10_linux`` with::
|
|
||||||
|
|
||||||
# rpool=`zdb -l ${GRUB_DEVICE} | grep -E '[[:blank:]]name' | cut -d\' -f 2`
|
|
||||||
|
|
||||||
Debian guide chose to hardcode ``root=ZFS=rpool/ROOT/default``
|
|
||||||
in ``GRUB_CMDLINE_LINUX`` in ``/etc/default/grub``
|
|
||||||
This is incompatible with the boot environment utility.
|
|
||||||
The utility also uses this parameter to boot alternative
|
|
||||||
root filesystem datasets.
|
|
||||||
|
|
||||||
A boot environment entry::
|
|
||||||
|
|
||||||
# root=ZFS=rpool_UUID/ROOT/bootenv_after-sysupdate
|
|
||||||
|
|
||||||
``root=ZFS=pool/dataset`` is processed by
|
|
||||||
the ZFS script in initramfs, used to
|
|
||||||
tell the kernel the real root filesystem.
|
|
||||||
|
|
||||||
``zfs=bootfs`` kernel command line
|
|
||||||
and ``zpool set bootfs=pool/dataset pool``
|
|
||||||
is not used due to its inflexibility.
|
|
||||||
|
|
||||||
GRUB Installation
|
GRUB Installation
|
||||||
~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ Installation
|
|||||||
If you want to use ZFS as your root filesystem, see the `Root on ZFS`_
|
If you want to use ZFS as your root filesystem, see the `Root on ZFS`_
|
||||||
links below instead.
|
links below instead.
|
||||||
|
|
||||||
Add archzfs repo
|
archzfs repo
|
||||||
~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~
|
||||||
|
|
||||||
ZFS packages are provided by the third-party
|
ZFS packages are provided by the third-party
|
||||||
`archzfs repository <https://github.com/archzfs/archzfs>`__.
|
`archzfs repository <https://github.com/archzfs/archzfs>`__.
|
||||||
@@ -39,38 +39,23 @@ Update pacman database::
|
|||||||
|
|
||||||
pacman -Sy
|
pacman -Sy
|
||||||
|
|
||||||
Prebuilt zfs package
|
archzfs package
|
||||||
~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
This only applies to vanilla Arch Linux kernels.
|
When using unmodified Arch Linux kernels,
|
||||||
For other kernels, use `archzfs-dkms package`_.
|
prebuilt ``archzfs`` packages are available.
|
||||||
You can also switch between DKMS and prebuilt
|
You can also switch between ``archzfs`` and ``zfs-dkms``
|
||||||
packages with instructions on this page.
|
packages later.
|
||||||
|
|
||||||
|
For other kernels or distros, use `archzfs-dkms package`_.
|
||||||
|
|
||||||
Check kernel variant::
|
Check kernel variant::
|
||||||
|
|
||||||
INST_LINVAR=$(sed 's|.*linux|linux|' /proc/cmdline | awk '{ print $1 }')
|
INST_LINVAR=$(sed 's|.*linux|linux|' /proc/cmdline | awk '{ print $1 }')
|
||||||
|
|
||||||
Install compatible package::
|
|
||||||
|
|
||||||
pacman -Sy archzfs-${INST_LINVAR}
|
|
||||||
|
|
||||||
If kernel dependency failed, you can either:
|
|
||||||
|
|
||||||
* Install `archzfs-dkms package`_, or
|
|
||||||
|
|
||||||
* Downgrade kernel
|
|
||||||
to a compatible version:
|
|
||||||
|
|
||||||
Downgrade to compatible kernel
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
Check compatible kernel version::
|
Check compatible kernel version::
|
||||||
|
|
||||||
INST_LINVER=$(pacman -Si zfs-${INST_LINVAR} \
|
INST_LINVER=$(pacman -Si zfs-${INST_LINVAR} | grep 'Depends On' | sed "s|.*${INST_LINVAR}=||" | awk '{ print $1 }')
|
||||||
| grep 'Depends On' \
|
|
||||||
| sed "s|.*${INST_LINVAR}=||" \
|
|
||||||
| awk '{ print $1 }')
|
|
||||||
|
|
||||||
Install compatible kernel::
|
Install compatible kernel::
|
||||||
|
|
||||||
@@ -79,54 +64,16 @@ Install compatible kernel::
|
|||||||
|
|
||||||
Install archzfs::
|
Install archzfs::
|
||||||
|
|
||||||
pacman -Sy archzfs-${INST_LINVAR}
|
pacman -Sy zfs-${INST_LINVAR}
|
||||||
|
|
||||||
Ignore kernel update when dependency fails
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
Sometimes archzfs prebuilt package might lag behind
|
|
||||||
kernel updates::
|
|
||||||
|
|
||||||
pacman -Syu
|
|
||||||
# error: failed to prepare transaction (could not satisfy dependencies)
|
|
||||||
# :: installing linux-lts (5.4.93-2) breaks dependency 'linux-lts=5.4.92-1' required by zfs-linux-lts
|
|
||||||
|
|
||||||
Temporarily ignore kernel update to upgrade other packages::
|
|
||||||
|
|
||||||
pacman -Syu --ignore=linux-lts
|
|
||||||
|
|
||||||
archzfs-dkms package
|
archzfs-dkms package
|
||||||
~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
This package will dynamically build ZFS modules for
|
This package will dynamically build ZFS modules for
|
||||||
supported kernels. Both Arch Linux and derivatives
|
supported kernels.
|
||||||
are supported.
|
|
||||||
|
|
||||||
Check OpenZFS compatibility
|
Check kernel compatibility
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
Check kernel version::
|
|
||||||
|
|
||||||
uname -r
|
|
||||||
# 5.4.92-1-lts
|
|
||||||
|
|
||||||
Check newer archzfs-dkms package version::
|
|
||||||
|
|
||||||
DKMS_VER=$(pacman -Si zfs-dkms \
|
|
||||||
| grep 'Version' \
|
|
||||||
| awk '{ print $3 }' \
|
|
||||||
| sed 's|-.*||')
|
|
||||||
|
|
||||||
Visit OpenZFS release page ::
|
|
||||||
|
|
||||||
curl https://github.com/openzfs/zfs/releases/zfs-${DKMS_VER} \
|
|
||||||
| grep Linux
|
|
||||||
# Linux: compatible with 3.10 - 5.10 kernels
|
|
||||||
|
|
||||||
If it's not supported, see `Install alternative kernel`_.
|
|
||||||
Otherwise, continue to next step.
|
|
||||||
|
|
||||||
Normal installation
|
|
||||||
^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
Check kernel variant::
|
Check kernel variant::
|
||||||
|
|
||||||
@@ -136,39 +83,49 @@ Check kernel version::
|
|||||||
|
|
||||||
INST_LINVER=$(pacman -Qi ${INST_LINVAR} | grep Version | awk '{ print $3 }')
|
INST_LINVER=$(pacman -Qi ${INST_LINVAR} | grep Version | awk '{ print $3 }')
|
||||||
|
|
||||||
|
Check zfs-dkms package version::
|
||||||
|
|
||||||
|
DKMS_VER=$(pacman -Syi zfs-dkms | grep 'Version' | awk '{ print $3 }' | sed 's|-.*||')
|
||||||
|
|
||||||
|
Visit OpenZFS release page ::
|
||||||
|
|
||||||
|
curl https://github.com/openzfs/zfs/releases/zfs-${DKMS_VER} \
|
||||||
|
| grep Linux
|
||||||
|
# Linux: compatible with 3.10 - 5.10 kernels
|
||||||
|
echo $INST_LINVER
|
||||||
|
|
||||||
|
If it's not supported, see `Install zfs-dkms compatible kernel`_.
|
||||||
|
Otherwise, continue to next step.
|
||||||
|
|
||||||
Install kernel headers::
|
Install kernel headers::
|
||||||
|
|
||||||
pacman -U https://archive.archlinux.org/packages/l/${INST_LINVAR}-headers/${INST_LINVAR}-headers-${INST_LINVER}-x86_64.pkg.tar.zst
|
pacman -U \
|
||||||
# for artix
|
https://archive.archlinux.org/packages/l/${INST_LINVAR}-headers/${INST_LINVAR}-headers-${INST_LINVER}-x86_64.pkg.tar.zst
|
||||||
pacman -U https://archive.artixlinux.org/packages/l/${INST_LINVAR}-headers/${INST_LINVAR}-headers-${INST_LINVER}-x86_64.pkg.tar.zst
|
|
||||||
|
|
||||||
Install archzfs-dkms::
|
Install zfs-dkms::
|
||||||
|
|
||||||
pacman -Sy archzfs-dkms
|
pacman -Sy zfs-dkms
|
||||||
|
|
||||||
Hold kernel package from updates::
|
Ignore kernel package from updates::
|
||||||
|
|
||||||
sed -i 's/#.*IgnorePkg/IgnorePkg/' /etc/pacman.conf
|
sed -i 's/#IgnorePkg/IgnorePkg/' /etc/pacman.conf
|
||||||
sed -i "/^IgnorePkg/ s/$/ ${INST_LINVAR} ${INST_LINVAR}-headers/" /etc/pacman.conf
|
sed -i "/^IgnorePkg/ s/$/ ${INST_LINVAR} ${INST_LINVAR}-headers/" /etc/pacman.conf
|
||||||
|
|
||||||
Kernel must be manually updated, see `Kernel update`_.
|
Kernel must be manually updated, see `Kernel update`_.
|
||||||
|
|
||||||
Install alternative kernel
|
Install zfs-dkms compatible kernel
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
If the kernel is not yet supported, install a supported kernel:
|
|
||||||
|
|
||||||
Choose kernel variant. Available variants are:
|
Choose kernel variant. Available variants are:
|
||||||
|
|
||||||
* linux
|
* linux
|
||||||
* linux-lts
|
* linux-lts
|
||||||
|
|
||||||
For Artix, replace ``archlinux.org`` with ``artixlinux.org``.
|
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
INST_LINVAR=linux
|
INST_LINVAR=linux
|
||||||
|
|
||||||
Check build date::
|
Install kernels available when the package was built. Check build date::
|
||||||
|
|
||||||
DKMS_DATE=$(pacman -Syi zfs-dkms \
|
DKMS_DATE=$(pacman -Syi zfs-dkms \
|
||||||
| grep 'Build Date' \
|
| grep 'Build Date' \
|
||||||
@@ -177,25 +134,21 @@ Check build date::
|
|||||||
|
|
||||||
Check kernel version::
|
Check kernel version::
|
||||||
|
|
||||||
curl https://archive.archlinux.org/repos/${DKMS_DATE}/core/os/x86_64/ \
|
INST_LINVER=$(curl https://archive.archlinux.org/repos/${DKMS_DATE}/core/os/x86_64/ \
|
||||||
| grep \"${INST_LINVAR}-'[0-9]' \
|
| grep \"${INST_LINVAR}-'[0-9]' \
|
||||||
| grep -v sig
|
| grep -v sig \
|
||||||
# <a href="linux-5.10.3.arch1-1-x86_64.pkg.tar.zst">
|
| sed "s|.*$INST_LINVAR-||" \
|
||||||
|
| sed "s|-x86_64.*||")
|
||||||
|
|
||||||
Set kernel version in a variable::
|
Install compatible kernel and headers::
|
||||||
|
|
||||||
# <a href="linux-5.10.3.arch1-1-x86_64.pkg.tar.zst">
|
|
||||||
INST_LINVER=5.10.3.arch1-1
|
|
||||||
|
|
||||||
Install kernel and headers::
|
|
||||||
|
|
||||||
pacman -U \
|
pacman -U \
|
||||||
https://archive.archlinux.org/packages/l/${INST_LINVAR}/${INST_LINVAR}-${INST_LINVER}-x86_64.pkg.tar.zst \
|
https://archive.archlinux.org/packages/l/${INST_LINVAR}/${INST_LINVAR}-${INST_LINVER}-x86_64.pkg.tar.zst \
|
||||||
https://archive.archlinux.org/packages/l/${INST_LINVAR}-headers/${INST_LINVAR}-headers-${INST_LINVER}-x86_64.pkg.tar.zst
|
https://archive.archlinux.org/packages/l/${INST_LINVAR}-headers/${INST_LINVAR}-headers-${INST_LINVER}-x86_64.pkg.tar.zst
|
||||||
|
|
||||||
Install archzfs-dkms::
|
Install zfs-dkms::
|
||||||
|
|
||||||
pacman -Sy archzfs-dkms
|
pacman -Sy zfs-dkms
|
||||||
|
|
||||||
Hold kernel package from updates::
|
Hold kernel package from updates::
|
||||||
|
|
||||||
@@ -207,135 +160,56 @@ Kernel must be manually updated, see `Kernel update`_.
|
|||||||
Kernel update
|
Kernel update
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
This applies to archzfs-dkms package.
|
`Check kernel compatibility`_.
|
||||||
|
|
||||||
Check kernel variant::
|
Replace check kernel version with ``-Syi``::
|
||||||
|
|
||||||
INST_LINVAR=$(sed 's|.*linux|linux|' /proc/cmdline | awk '{ print $1 }')
|
INST_LINVER=$(pacman -Syi ${INST_LINVAR} | grep Version | awk '{ print $3 }')
|
||||||
|
|
||||||
Check newer kernel version::
|
If compatible, update kernel and headers with::
|
||||||
|
|
||||||
pacman -Syi $INST_LINVAR \
|
pacman -Sy $INST_LINVAR $INST_LINVAR-headers
|
||||||
| grep 'Version' \
|
|
||||||
| awk '{ print $3 }'
|
|
||||||
# 5.10.1.1-1
|
|
||||||
|
|
||||||
Check newer archzfs-dkms package version::
|
|
||||||
|
|
||||||
DKMS_VER=$(pacman -Si zfs-dkms \
|
|
||||||
| grep 'Version' \
|
|
||||||
| awk '{ print $3 }' \
|
|
||||||
| sed 's|-.*||')
|
|
||||||
|
|
||||||
Visit OpenZFS release page ::
|
|
||||||
|
|
||||||
curl https://github.com/openzfs/zfs/releases/zfs-${DKMS_VER} \
|
|
||||||
| grep Linux
|
|
||||||
# Linux: compatible with 3.10 - 5.10 kernels
|
|
||||||
|
|
||||||
If compatible, update kernel with::
|
|
||||||
|
|
||||||
pacman -S $INST_LINVAR $INST_LINVAR-headers archzfs-dkms
|
|
||||||
|
|
||||||
Do not update if the kernel is not compatible
|
Do not update if the kernel is not compatible
|
||||||
with OpenZFS.
|
with OpenZFS.
|
||||||
|
|
||||||
glibc version mismatch
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
As of Feb 6th, 2021, latest glibc release is ``2.33``.
|
|
||||||
glibc in Arch Linux repo is ``2.32``.
|
|
||||||
|
|
||||||
When updating ``linux-lts (5.4.94-1 -> 5.4.95-1)``,
|
|
||||||
``linux-lts-headers`` will depend on the unavailable glibc ``2.33``
|
|
||||||
|
|
||||||
.. code-block:: none
|
|
||||||
|
|
||||||
# /var/lib/dkms/zfs/2.0.2/build/config.log
|
|
||||||
|
|
||||||
configure:18576: checking whether modules can be built
|
|
||||||
configure:18746:
|
|
||||||
KBUILD_MODPOST_NOFINAL= KBUILD_MODPOST_WARN=
|
|
||||||
make modules -k -j4 -C /usr/lib/modules/5.4.95-1-lts/build
|
|
||||||
M=/var/lib/dkms/zfs/2.0.2/build/build/conftest >build/conftest/build.log 2>&1
|
|
||||||
configure:18749: $? = 2
|
|
||||||
configure:18752: test -f build/conftest/conftest.ko
|
|
||||||
configure:18755: $? = 1
|
|
||||||
configure:18764: result: no
|
|
||||||
configure:18767: error:
|
|
||||||
*** Unable to build an empty module.
|
|
||||||
|
|
||||||
.. code-block:: none
|
|
||||||
|
|
||||||
# /var/lib/dkms/zfs/2.0.2/build/build/conftest/build.log
|
|
||||||
|
|
||||||
make: Entering directory '/usr/lib/modules/5.4.95-1-lts/build'
|
|
||||||
CC [M] /var/lib/dkms/zfs/2.0.2/build/build/conftest/conftest.o
|
|
||||||
scripts/basic/fixdep: /usr/lib/libc.so.6: version `GLIBC_2.33' not found (required by scripts/basic/fixdep)
|
|
||||||
make[1]: *** [scripts/Makefile.build:262: /var/lib/dkms/zfs/2.0.2/build/build/conftest/conftest.o] Error 1
|
|
||||||
make[1]: *** Deleting file '/var/lib/dkms/zfs/2.0.2/build/build/conftest/conftest.o'
|
|
||||||
|
|
||||||
::
|
|
||||||
|
|
||||||
pacman -Qo /usr/lib/modules/5.4.95-1-lts/build/scripts/basic/fixdep
|
|
||||||
/usr/lib/modules/5.4.95-1-lts/build/scripts/basic/fixdep is owned by linux-lts-headers 5.4.95-1
|
|
||||||
|
|
||||||
To solve the problem, rollback kernel update
|
|
||||||
and postpone kernel updates
|
|
||||||
until glibc ``2.33`` becomes available.
|
|
||||||
|
|
||||||
::
|
|
||||||
|
|
||||||
cd /var/cache/pacman/pkg/
|
|
||||||
pacman -U linux-lts-5.4.94-1-x86_64.pkg.tar.zst linux-lts-headers-5.4.94-1-x86_64.pkg.tar.zst
|
|
||||||
|
|
||||||
Check Live Image Compatibility
|
Check Live Image Compatibility
|
||||||
------------------------------
|
------------------------------
|
||||||
#. Choose a mirror:
|
Choose a mirror::
|
||||||
|
|
||||||
.. code-block:: none
|
|
||||||
|
|
||||||
https://archlinux.org/mirrorlist/all/
|
https://archlinux.org/mirrorlist/all/
|
||||||
https://gitea.artixlinux.org/packagesA/artix-mirrorlist/src/branch/master/trunk/mirrorlist
|
https://gitea.artixlinux.org/packagesA/artix-mirrorlist/src/branch/master/trunk/mirrorlist
|
||||||
|
|
||||||
#. Check the build date of the latest Arch Linux live image:
|
Check the build date of the
|
||||||
|
latest Arch Linux live image::
|
||||||
.. code-block:: none
|
|
||||||
|
|
||||||
https://mirrors.dotsrc.org/archlinux/iso/latest/
|
https://mirrors.dotsrc.org/archlinux/iso/latest/
|
||||||
https://mirrors.dotsrc.org/artix-linux/iso/
|
https://mirrors.dotsrc.org/artix-linux/iso/
|
||||||
# archlinux-2021.01.01-x86_64.iso
|
# archlinux-2021.01.01-x86_64.iso
|
||||||
|
|
||||||
#. Check the kernel version of the live image:
|
Check the kernel version of the live image::
|
||||||
|
|
||||||
.. code-block:: none
|
|
||||||
|
|
||||||
https://archive.archlinux.org/repos/2021/01/01/core/os/x86_64
|
https://archive.archlinux.org/repos/2021/01/01/core/os/x86_64
|
||||||
https://archive.artixlinux.org/repos/2021/01/01/system/os/x86_64
|
https://archive.artixlinux.org/repos/2021/01/01/system/os/x86_64
|
||||||
# linux-5.10.3.arch1-1-x86_64.pkg.tar.zst
|
# linux-5.10.3.arch1-1-x86_64.pkg.tar.zst
|
||||||
|
|
||||||
#. Check latest archzfs package version:
|
Check latest archzfs package version::
|
||||||
|
|
||||||
.. code-block:: none
|
|
||||||
|
|
||||||
https://archzfs.com/archzfs/x86_64/
|
https://archzfs.com/archzfs/x86_64/
|
||||||
# zfs-dkms-2.0.1-1-x86_64.pkg.tar.zst
|
# zfs-dkms-2.0.1-1-x86_64.pkg.tar.zst
|
||||||
# zfs-linux-2.0.1_5.10.10.arch1.1-1-x86_64.pkg.tar.zst
|
# zfs-linux-2.0.1_5.10.10.arch1.1-1-x86_64.pkg.tar.zst
|
||||||
|
|
||||||
#. Visit OpenZFS release page: https://github.com/openzfs/zfs/releases/tag/zfs-2.0.1
|
Visit OpenZFS release page https://github.com/openzfs/zfs/releases/tag/zfs-2.0.1::
|
||||||
|
|
||||||
Find the line like: "Linux: compatible with 3.10 - 5.10 kernels"
|
# Linux: compatible with 3.10 - 5.10 kernels
|
||||||
|
|
||||||
- If compatible, download the latest live image:
|
- If compatible, download the latest live image::
|
||||||
|
|
||||||
.. code-block:: none
|
|
||||||
|
|
||||||
https://mirrors.dotsrc.org/archlinux/iso/latest/archlinux-2021.01.01-x86_64.iso
|
https://mirrors.dotsrc.org/archlinux/iso/latest/archlinux-2021.01.01-x86_64.iso
|
||||||
https://mirrors.dotsrc.org/artix-linux/iso/artix-base-openrc-20210101-x86_64.iso
|
https://mirrors.dotsrc.org/artix-linux/iso/artix-base-openrc-20210101-x86_64.iso
|
||||||
|
|
||||||
- If not compatible, use an older live image and verify that it contains
|
- If not compatible, use an older live image and verify that it contains
|
||||||
a supported kernel using the above method:
|
a supported kernel using the above method::
|
||||||
|
|
||||||
.. code-block:: none
|
|
||||||
|
|
||||||
https://mirrors.dotsrc.org/archlinux/iso/
|
https://mirrors.dotsrc.org/archlinux/iso/
|
||||||
https://iso.artixlinux.org/archived-isos.php
|
https://iso.artixlinux.org/archived-isos.php
|
||||||
|
|||||||
Reference in New Issue
Block a user