Update Alpine, Arch, Fedora and RHEL root on ZFS guides
Signed-off-by: Maurice Zhou <jasper@apvc.uk>
This commit is contained in:
committed by
George Melikov
parent
a0c149af5b
commit
a69befb2ce
@@ -6,27 +6,6 @@ Bootloader
|
||||
.. contents:: Table of Contents
|
||||
:local:
|
||||
|
||||
|
||||
#. If using virtio disk, add driver to initrd::
|
||||
|
||||
echo 'filesystems+=" virtio_blk "' >> /etc/dracut.conf.d/fs.conf
|
||||
|
||||
#. Create empty cache file and generate initrd::
|
||||
|
||||
rm -f /etc/zfs/zpool.cache
|
||||
touch /etc/zfs/zpool.cache
|
||||
chmod a-w /etc/zfs/zpool.cache
|
||||
chattr +i /etc/zfs/zpool.cache
|
||||
|
||||
for directory in /lib/modules/*; do
|
||||
kernel_version=$(basename $directory)
|
||||
dracut --force --kver $kernel_version
|
||||
done
|
||||
|
||||
#. Load ZFS modules and disable BLS::
|
||||
|
||||
echo 'GRUB_ENABLE_BLSCFG=false' >> /etc/default/grub
|
||||
|
||||
#. Apply GRUB workaround::
|
||||
|
||||
echo 'export ZPOOL_VDEV_NAME_PATH=YES' >> /etc/profile.d/zpool_vdev_name_path.sh
|
||||
@@ -35,41 +14,39 @@ Bootloader
|
||||
# GRUB fails to detect rpool name, hard code as "rpool"
|
||||
sed -i "s|rpool=.*|rpool=rpool|" /etc/grub.d/10_linux
|
||||
|
||||
This workaround needs to be applied for every GRUB update, as the
|
||||
update will overwrite the changes.
|
||||
This ``sed`` workaround needs to be applied for every
|
||||
GRUB update, as the update will overwrite the
|
||||
changes.
|
||||
|
||||
#. Install GRUB::
|
||||
|
||||
export ZPOOL_VDEV_NAME_PATH=YES
|
||||
echo 'GRUB_ENABLE_BLSCFG=false' >> /etc/default/grub
|
||||
mkdir -p /boot/efi/fedora/grub-bootdir/i386-pc/
|
||||
mkdir -p /boot/efi/fedora/grub-bootdir/x86_64-efi/
|
||||
for i in ${DISK}; do
|
||||
grub2-install --target=i386-pc --boot-directory \
|
||||
/boot/efi/fedora/grub-bootdir/i386-pc/ $i
|
||||
done
|
||||
|
||||
cp -r /usr/lib/grub/x86_64-efi/ /boot/efi/EFI/fedora/
|
||||
|
||||
#. Generate GRUB menu::
|
||||
|
||||
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
|
||||
grub2-mkconfig -o /boot/efi/fedora/grub-bootdir/i386-pc/grub2/grub.cfg
|
||||
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
|
||||
grub2-mkconfig -o /boot/efi/fedora/grub-bootdir/i386-pc/grub2/grub.cfg
|
||||
|
||||
#. For both legacy and EFI booting: mirror ESP content::
|
||||
|
||||
ESP_MIRROR=$(mktemp -d)
|
||||
unalias -a
|
||||
ESP_MIRROR=$(mktemp -d)
|
||||
cp -r /boot/efi/EFI $ESP_MIRROR
|
||||
for i in /boot/efis/*; do
|
||||
cp -r $ESP_MIRROR/EFI $i
|
||||
done
|
||||
rm -rf $ESP_MIRROR
|
||||
|
||||
#. Notes for GRUB on RHEL
|
||||
#. Note: you need to regenerate GRUB menu after kernel
|
||||
updates, otherwise computer will still boot old
|
||||
kernel on reboot::
|
||||
|
||||
As bls is disabled, you will need to regenerate GRUB menu after each kernel upgrade.
|
||||
Or else the new kernel will not be recognized and system will boot the old kernel
|
||||
on reboot.
|
||||
grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
|
||||
grub2-mkconfig -o /boot/efi/fedora/grub-bootdir/i386-pc/grub2/grub.cfg
|
||||
|
||||
Finish Installation
|
||||
~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -87,11 +64,6 @@ Finish Installation
|
||||
|
||||
reboot
|
||||
|
||||
#. On first reboot, the boot process will fail, with failure messages such
|
||||
as "You are in Emergency Mode...Press Ctrl-D to continue".
|
||||
|
||||
Wait for the computer to automatically reboot and the problem will be resolved.
|
||||
|
||||
Post installaion
|
||||
~~~~~~~~~~~~~~~~
|
||||
#. Install package groups::
|
||||
@@ -100,3 +72,7 @@ Post installaion
|
||||
dnf group install gnome-desktop
|
||||
|
||||
#. Add new user, configure swap.
|
||||
|
||||
#. You can create a snapshot of the newly installed
|
||||
system for later rollback,
|
||||
see `this page <https://openzfs.github.io/openzfs-docs/Getting%20Started/Arch%20Linux/Root%20on%20ZFS/6-create-boot-environment.html>`__.
|
||||
|
||||
Reference in New Issue
Block a user