Ubuntu: Go back to bpool/grub
For a mirror or raidz topology, /boot/grub is on a separate dataset. This was originally bpool/grub, then changed on 2020-05-30 to bpool/BOOT/ubuntu_UUID/grub to work-around zsys setting canmount=off which would result in /boot/grub not mounting. This work-around lead to issues with snapshot restores. The underlying zsys issue ubuntu/zsys#164 was fixed and backported to 20.04, so it is now back to being bpool/grub. This reverts commitb6fd009edd. It conceptually reverts the errata notes from commit04d3c1cee4, but includes new steps for people in the pre-2020-05-30 state. Signed-off-by: Richard Laager <rlaager@wiktel.com> Fixes #55
This commit is contained in:
@@ -15,70 +15,52 @@ applicable:
|
|||||||
/boot/grub Not Mounted
|
/boot/grub Not Mounted
|
||||||
~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
| **Severity:** Grave
|
| **Severity:** Normal (previously Grave)
|
||||||
| **Fixed:** 2020-05-30
|
| **Fixed:** 2020-12-05 (previously 2020-05-30)
|
||||||
|
|
||||||
For a mirror or raidz topology, ``/boot/grub`` is on a separate dataset. This
|
For a mirror or raidz topology, ``/boot/grub`` is on a separate dataset. This
|
||||||
is now ``bpool/BOOT/ubuntu_UUID/grub``, but was previously ``bpool/grub``.
|
was originally ``bpool/grub``, then changed on 2020-05-30 to
|
||||||
Unfortunately, zsys sets ``canmount=off`` on ``bpool/grub``, so it is not
|
``bpool/BOOT/ubuntu_UUID/grub`` to work-around zsys setting ``canmount=off``
|
||||||
mounted. As a result, updates the GRUB configuration will be written to the
|
which would result in ``/boot/grub`` not mounting. This work-around lead to
|
||||||
``/boot`` filesystem and not used by GRUB (because it is still looking in
|
`issues with snapshot restores
|
||||||
``bpool/grub``). Check for ``bpool/grub``::
|
<https://github.com/openzfs/openzfs-docs/issues/55>`__. The underlying `zsys
|
||||||
|
issue <https://github.com/ubuntu/zsys/issues/164>`__ was fixed and backported
|
||||||
|
to 20.04, so it is now back to being ``bpool/grub``.
|
||||||
|
|
||||||
zfs list bpool/grub
|
* If you never applied the 2020-05-30 errata fix, then ``/boot/grub`` is
|
||||||
|
probably not mounting. Check that::
|
||||||
|
|
||||||
If this says “dataset does not exist”, you are good. If it exists, fix it.
|
mount | grep /boot/grub
|
||||||
|
|
||||||
Once you start this process, the system will be unbootable until you have
|
If it is mounted, everything is fine. Stop. Otherwise::
|
||||||
completed it. Do not reboot until you have completed all of the steps.
|
|
||||||
|
|
||||||
#. Rename the dataset::
|
zfs set canmount=on bpool/boot/grub
|
||||||
|
update-initramfs -c -k all
|
||||||
|
update-grub
|
||||||
|
|
||||||
umount /boot/grub
|
grub-install --target=x86_64-efi --efi-directory=/boot/efi \
|
||||||
# Ignore any error about it not being mounted.
|
--bootloader-id=ubuntu --recheck --no-floppy
|
||||||
|
|
||||||
rm -rf /boot/grub
|
Run this for the additional disk(s), incrementing the “2” to “3” and so on
|
||||||
|
for both ``/boot/efi2`` and ``ubuntu-2``::
|
||||||
|
|
||||||
zfs list -r bpool
|
cp -a /boot/efi/EFI /boot/efi2
|
||||||
# Replace UUID below:
|
grub-install --target=x86_64-efi --efi-directory=/boot/efi2 \
|
||||||
zfs rename bpool/grub bpool/BOOT/ubuntu_UUID/grub
|
--bootloader-id=ubuntu-2 --recheck --no-floppy
|
||||||
zfs inherit com.ubuntu.zsys:bootfs bpool/BOOT/ubuntu_UUID/grub
|
|
||||||
zfs set canmount=on bpool/BOOT/ubuntu_UUID/grub
|
|
||||||
zfs mount bpool/BOOT/ubuntu_UUID/grub
|
|
||||||
|
|
||||||
#. Ensure that zed updated the cache to use ``bpool/BOOT/ubuntu_UUID/grub``::
|
Check that these have ``set prefix=($root)'/BOOT/ubuntu_UUID/grub@'``::
|
||||||
|
|
||||||
grep grub /etc/zfs/zfs-list.cache/bpool
|
grep prefix= \
|
||||||
|
/boot/efi/EFI/ubuntu/grub.cfg \
|
||||||
|
/boot/efi2/EFI/ubuntu-2/grub.cfg
|
||||||
|
|
||||||
#. Rebuild the initrd and reinstall GRUB::
|
* If you applied the 2020-05-30 errata fix, then you should revert the dataset
|
||||||
|
rename::
|
||||||
|
|
||||||
update-initramfs -c -k all
|
umount /boot/grub
|
||||||
update-grub
|
zfs rename bpool/BOOT/ubuntu_UUID/grub bpool/grub
|
||||||
grub-install --target=x86_64-efi --efi-directory=/boot/efi \
|
zfs set com.ubuntu.zsys:bootfs=no bpool/grub
|
||||||
--bootloader-id=ubuntu --recheck --no-floppy
|
zfs mount bpool/grub
|
||||||
|
|
||||||
Run this for the additional disk(s), incrementing the “2” to “3” and so on
|
|
||||||
for both ``/boot/efi2`` and ``ubuntu-2``::
|
|
||||||
|
|
||||||
cp -a /boot/efi/EFI /boot/efi2
|
|
||||||
grub-install --target=x86_64-efi --efi-directory=/boot/efi2 \
|
|
||||||
--bootloader-id=ubuntu-2 --recheck --no-floppy
|
|
||||||
|
|
||||||
Check that these have ``set prefix=($root)'/BOOT/ubuntu_UUID/grub@'``::
|
|
||||||
|
|
||||||
grep prefix= \
|
|
||||||
/boot/efi/EFI/ubuntu/grub.cfg \
|
|
||||||
/boot/efi2/EFI/ubuntu-2/grub.cfg
|
|
||||||
|
|
||||||
#. If using encryption, patch a dependency loop::
|
|
||||||
|
|
||||||
sudo apt install --yes curl patch
|
|
||||||
curl https://launchpadlibrarian.net/478315221/2150-fix-systemd-dependency-loops.patch | \
|
|
||||||
sed "s|/etc|/lib|;s|\.in$||" | (cd / ; patch -p1)
|
|
||||||
|
|
||||||
#. Disable grub-initrd-fallback.service::
|
|
||||||
|
|
||||||
systemctl mask grub-initrd-fallback.service
|
|
||||||
|
|
||||||
AccountsService Not Mounted
|
AccountsService Not Mounted
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
@@ -629,7 +611,7 @@ Step 3: System Installation
|
|||||||
|
|
||||||
For a mirror or raidz topology, create a dataset for ``/boot/grub``::
|
For a mirror or raidz topology, create a dataset for ``/boot/grub``::
|
||||||
|
|
||||||
zfs create bpool/BOOT/ubuntu_$UUID/grub
|
zfs create -o com.ubuntu.zsys:bootfs=no bpool/grub
|
||||||
|
|
||||||
A tmpfs is recommended later, but if you want a separate dataset for
|
A tmpfs is recommended later, but if you want a separate dataset for
|
||||||
``/tmp``::
|
``/tmp``::
|
||||||
|
|||||||
Reference in New Issue
Block a user