Arch Linux: Multiple fixes for Root on ZFS guides
Signed-off-by: Maurice Zhou <ja@apvc.uk>
This commit is contained in:
committed by
Richard Laager
parent
6ab3d43847
commit
8e2cdf4f58
@@ -133,8 +133,13 @@ Prepare the Live Environment
|
|||||||
|
|
||||||
#. Add archzfs repository::
|
#. Add archzfs repository::
|
||||||
|
|
||||||
tee -a /etc/pacman.conf <<-'EOF'
|
tee -a /etc/pacman.conf <<- 'EOF'
|
||||||
|
|
||||||
[archzfs]
|
[archzfs]
|
||||||
|
Include = /etc/pacman.d/mirrorlist-archzfs
|
||||||
|
|
||||||
|
EOF
|
||||||
|
tee -a /etc/pacman.d/mirrorlist-archzfs <<- 'EOF'
|
||||||
Server = https://archzfs.com/$repo/$arch
|
Server = https://archzfs.com/$repo/$arch
|
||||||
Server = https://mirror.sum7.eu/archlinux/archzfs/$repo/$arch
|
Server = https://mirror.sum7.eu/archlinux/archzfs/$repo/$arch
|
||||||
Server = https://mirror.biocrafting.net/archlinux/archzfs/$repo/$arch
|
Server = https://mirror.biocrafting.net/archlinux/archzfs/$repo/$arch
|
||||||
@@ -149,16 +154,20 @@ Prepare the Live Environment
|
|||||||
|
|
||||||
- Edit the following files::
|
- Edit the following files::
|
||||||
|
|
||||||
/etc/pacman.d/mirrorlist
|
nano /etc/pacman.d/mirrorlist
|
||||||
|
|
||||||
Uncomment and move mirrors to
|
Uncomment and move mirrors to
|
||||||
the beginning of the file.
|
the beginning of the file.
|
||||||
|
|
||||||
|
- Update database::
|
||||||
|
|
||||||
|
pacman -Sy
|
||||||
|
|
||||||
#. Install ZFS in the live environment:
|
#. Install ZFS in the live environment:
|
||||||
|
|
||||||
Check kernel variant::
|
Check kernel variant::
|
||||||
|
|
||||||
LIVE_LINVAR=$(sed 's|.*linux|linux|' /proc/cmdline | awk '{ print $1 }')
|
LIVE_LINVAR=$(sed 's|.*linux|linux|' /proc/cmdline | sed 's|.img||g' | awk '{ print $1 }')
|
||||||
|
|
||||||
Check kernel version::
|
Check kernel version::
|
||||||
|
|
||||||
@@ -170,11 +179,11 @@ Prepare the Live Environment
|
|||||||
|
|
||||||
Expand root filesystem::
|
Expand root filesystem::
|
||||||
|
|
||||||
mount -o remount,size=1G /run/archiso/cowspace
|
mount -o remount,size=2G /run/archiso/cowspace
|
||||||
|
|
||||||
Install archzfs-dkms::
|
Install zfs-dkms::
|
||||||
|
|
||||||
pacman -S archzfs-dkms
|
pacman -S zfs-dkms glibc
|
||||||
|
|
||||||
#. Load kernel module::
|
#. Load kernel module::
|
||||||
|
|
||||||
@@ -653,8 +662,13 @@ System Configuration
|
|||||||
|
|
||||||
#. archzfs repository::
|
#. archzfs repository::
|
||||||
|
|
||||||
tee -a $INST_MNT/etc/pacman.conf <<-'EOF'
|
tee -a $INST_MNT/etc/pacman.conf <<- 'EOF'
|
||||||
|
|
||||||
[archzfs]
|
[archzfs]
|
||||||
|
Include = /etc/pacman.d/mirrorlist-archzfs
|
||||||
|
|
||||||
|
EOF
|
||||||
|
tee -a $INST_MNT/etc/pacman.d/mirrorlist-archzfs <<- 'EOF'
|
||||||
Server = https://archzfs.com/$repo/$arch
|
Server = https://archzfs.com/$repo/$arch
|
||||||
Server = https://mirror.sum7.eu/archlinux/archzfs/$repo/$arch
|
Server = https://mirror.sum7.eu/archlinux/archzfs/$repo/$arch
|
||||||
Server = https://mirror.biocrafting.net/archlinux/archzfs/$repo/$arch
|
Server = https://mirror.biocrafting.net/archlinux/archzfs/$repo/$arch
|
||||||
|
|||||||
@@ -101,6 +101,7 @@ Change the service commands to the equivalent commands.
|
|||||||
|
|
||||||
#. Boot the target computer from the prepared live medium.
|
#. Boot the target computer from the prepared live medium.
|
||||||
|
|
||||||
|
#. At GRUB menu, select "From ISO: artix x86_64".
|
||||||
|
|
||||||
Prepare the Live Environment
|
Prepare the Live Environment
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@@ -150,26 +151,36 @@ Prepare the Live Environment
|
|||||||
|
|
||||||
#. Add archzfs repository::
|
#. Add archzfs repository::
|
||||||
|
|
||||||
tee -a /etc/pacman.conf <<-'EOF'
|
tee -a /etc/pacman.conf <<- 'EOF'
|
||||||
|
|
||||||
[archzfs]
|
[archzfs]
|
||||||
|
Include = /etc/pacman.d/mirrorlist-archzfs
|
||||||
|
|
||||||
|
EOF
|
||||||
|
tee -a /etc/pacman.d/mirrorlist-archzfs <<- 'EOF'
|
||||||
Server = https://archzfs.com/$repo/$arch
|
Server = https://archzfs.com/$repo/$arch
|
||||||
Server = https://mirror.sum7.eu/archlinux/archzfs/$repo/$arch
|
Server = https://mirror.sum7.eu/archlinux/archzfs/$repo/$arch
|
||||||
Server = https://mirror.biocrafting.net/archlinux/archzfs/$repo/$arch
|
Server = https://mirror.biocrafting.net/archlinux/archzfs/$repo/$arch
|
||||||
Server = https://mirror.in.themindsmaze.com/archzfs/$repo/$arch
|
Server = https://mirror.in.themindsmaze.com/archzfs/$repo/$arch
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
#. Select mirror:
|
#. Select mirror:
|
||||||
|
|
||||||
- Edit the following files::
|
- Edit the following files::
|
||||||
|
|
||||||
/etc/pacman.d/mirrorlist
|
nano /etc/pacman.d/mirrorlist
|
||||||
/etc/pacman.d/mirrorlist-arch
|
nano /etc/pacman.d/mirrorlist-arch
|
||||||
|
|
||||||
Uncomment and move mirrors to
|
Uncomment and move mirrors to
|
||||||
the beginning of the file.
|
the beginning of the file.
|
||||||
|
|
||||||
|
- Update database::
|
||||||
|
|
||||||
|
pacman -Sy
|
||||||
|
|
||||||
#. Install ZFS and tools in the live environment::
|
#. Install ZFS and tools in the live environment::
|
||||||
|
|
||||||
pacman -Sy --noconfirm gdisk dosfstools archzfs-dkms
|
pacman -Sy --noconfirm gdisk dosfstools zfs-dkms glibc
|
||||||
|
|
||||||
#. Load kernel module::
|
#. Load kernel module::
|
||||||
|
|
||||||
@@ -539,9 +550,9 @@ Package Installation
|
|||||||
|
|
||||||
#. Install base packages::
|
#. Install base packages::
|
||||||
|
|
||||||
basestrap $INST_MNT base vi mandoc grub connman connman-openrc openrc
|
basestrap $INST_MNT base vi mandoc grub connman connman-openrc openrc elogind-openrc
|
||||||
|
|
||||||
#. Install kernel headers and archzfs-dkms package:
|
#. Install kernel headers and zfs-dkms package:
|
||||||
|
|
||||||
Check kernel version::
|
Check kernel version::
|
||||||
|
|
||||||
@@ -559,10 +570,11 @@ Package Installation
|
|||||||
curl https://github.com/openzfs/zfs/releases/zfs-${DKMS_VER} \
|
curl https://github.com/openzfs/zfs/releases/zfs-${DKMS_VER} \
|
||||||
| grep Linux
|
| grep Linux
|
||||||
# Linux: compatible with 3.10 - 5.10 kernels
|
# Linux: compatible with 3.10 - 5.10 kernels
|
||||||
|
echo $INST_LINVER
|
||||||
|
|
||||||
If the kernel is supported:
|
If the kernel is supported:
|
||||||
|
|
||||||
- Install archzfs-dkms::
|
- Install zfs-dkms::
|
||||||
|
|
||||||
basestrap $INST_MNT zfs-dkms ${INST_LINVAR} ${INST_LINVAR}-headers
|
basestrap $INST_MNT zfs-dkms ${INST_LINVAR} ${INST_LINVAR}-headers
|
||||||
|
|
||||||
@@ -577,7 +589,7 @@ Package Installation
|
|||||||
|
|
||||||
- Check kernel version::
|
- Check kernel version::
|
||||||
|
|
||||||
INST_LINVER=$(curl https://archive.artixlinux.org/repos/${DKMS_DATE}/core/os/x86_64/ \
|
INST_LINVER=$(curl https://archive.artixlinux.org/repos/${DKMS_DATE}/system/os/x86_64/ \
|
||||||
| grep \"${INST_LINVAR}-'[0-9]' \
|
| grep \"${INST_LINVAR}-'[0-9]' \
|
||||||
| grep -v sig \
|
| grep -v sig \
|
||||||
| sed "s|.*$INST_LINVAR-||" \
|
| sed "s|.*$INST_LINVAR-||" \
|
||||||
@@ -586,10 +598,10 @@ Package Installation
|
|||||||
- Install kernel and headers::
|
- Install kernel and headers::
|
||||||
|
|
||||||
basestrap -U $INST_MNT \
|
basestrap -U $INST_MNT \
|
||||||
https://archive.artixlinux.org/packages/l/${INST_LINVAR}/${INST_LINVAR}-${INST_LINVER}-x86_64.pkg.tar.zst
|
https://archive.artixlinux.org/packages/l/${INST_LINVAR}/${INST_LINVAR}-${INST_LINVER}-x86_64.pkg.tar.zst \
|
||||||
https://archive.artixlinux.org/packages/l/${INST_LINVAR}-headers/${INST_LINVAR}-headers-${INST_LINVER}-x86_64.pkg.tar.zst
|
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::
|
||||||
|
|
||||||
basestrap $INST_MNT zfs-dkms
|
basestrap $INST_MNT zfs-dkms
|
||||||
|
|
||||||
@@ -658,8 +670,13 @@ System Configuration
|
|||||||
|
|
||||||
#. archzfs repository::
|
#. archzfs repository::
|
||||||
|
|
||||||
tee -a $INST_MNT/etc/pacman.conf <<-'EOF'
|
tee -a $INST_MNT/etc/pacman.conf <<- 'EOF'
|
||||||
|
|
||||||
[archzfs]
|
[archzfs]
|
||||||
|
Include = /etc/pacman.d/mirrorlist-archzfs
|
||||||
|
|
||||||
|
EOF
|
||||||
|
tee -a $INST_MNT/etc/pacman.d/mirrorlist-archzfs <<- 'EOF'
|
||||||
Server = https://archzfs.com/$repo/$arch
|
Server = https://archzfs.com/$repo/$arch
|
||||||
Server = https://mirror.sum7.eu/archlinux/archzfs/$repo/$arch
|
Server = https://mirror.sum7.eu/archlinux/archzfs/$repo/$arch
|
||||||
Server = https://mirror.biocrafting.net/archlinux/archzfs/$repo/$arch
|
Server = https://mirror.biocrafting.net/archlinux/archzfs/$repo/$arch
|
||||||
@@ -677,8 +694,8 @@ System Configuration
|
|||||||
|
|
||||||
artix-chroot $INST_MNT /usr/bin/env DISK=$DISK INST_UUID=$INST_UUID bash --login
|
artix-chroot $INST_MNT /usr/bin/env DISK=$DISK INST_UUID=$INST_UUID bash --login
|
||||||
|
|
||||||
#. If a swap partition has been created:
|
#. If a swap partition has been created,
|
||||||
Enable cryptsetup services for crypt-swap::
|
enable cryptsetup services for crypt-swap::
|
||||||
|
|
||||||
rc-update add device-mapper boot
|
rc-update add device-mapper boot
|
||||||
rc-update add dmcrypt boot
|
rc-update add dmcrypt boot
|
||||||
|
|||||||
@@ -28,7 +28,12 @@ Import archzfs GPG key::
|
|||||||
Add the archzfs repository::
|
Add the archzfs repository::
|
||||||
|
|
||||||
tee -a /etc/pacman.conf <<- 'EOF'
|
tee -a /etc/pacman.conf <<- 'EOF'
|
||||||
|
|
||||||
[archzfs]
|
[archzfs]
|
||||||
|
Include = /etc/pacman.d/mirrorlist-archzfs
|
||||||
|
|
||||||
|
EOF
|
||||||
|
tee -a /etc/pacman.d/mirrorlist-archzfs <<- 'EOF'
|
||||||
Server = https://archzfs.com/$repo/$arch
|
Server = https://archzfs.com/$repo/$arch
|
||||||
Server = https://mirror.sum7.eu/archlinux/archzfs/$repo/$arch
|
Server = https://mirror.sum7.eu/archlinux/archzfs/$repo/$arch
|
||||||
Server = https://mirror.biocrafting.net/archlinux/archzfs/$repo/$arch
|
Server = https://mirror.biocrafting.net/archlinux/archzfs/$repo/$arch
|
||||||
@@ -51,7 +56,7 @@ 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 | sed 's|.img||g' | awk '{ print $1 }')
|
||||||
|
|
||||||
Check compatible kernel version::
|
Check compatible kernel version::
|
||||||
|
|
||||||
@@ -77,7 +82,7 @@ Check kernel compatibility
|
|||||||
|
|
||||||
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 | sed 's|.img||g' | awk '{ print $1 }')
|
||||||
|
|
||||||
Check kernel version::
|
Check kernel version::
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user