Comment 33 for bug 2051999

Revision history for this message
Mike Ferreira (mafoelffen) wrote (last edit ):

Ir worked to use that PPA without using the sources.list changes to point to Noble for Mantic and Noble... but Jammy still needs the source list from Noble to be able to pull in the needed depends. The needed depends versions are not in the jammy Repo.

The command log for the updated work-around using the "Backports build PPA"
>>>
sudo su -
zpool export -a
zpool import -N -R /mnt rpool
zpool import -N -R /mnt bpool
UUID=$(zfs list | awk '/^bpool\/BOOT\/ubuntu_/ {print $1}' | sed 's/bpool\/BOOT\/ubuntu_//g')
zfs mount rpool/ROOT/ubuntu_$UUID
zfs mount bpool/BOOT/ubuntu_$UUID
zfs mount -a
mount --make-private --rbind /dev /mnt/dev
mount --make-private --rbind /proc /mnt/proc
mount --make-private --rbind /sys /mnt/sys
mount --make-private --rbind /run /mnt/run
chroot /mnt /bin/bash --login
mount -a

# Make backup of the original Jammy sources.list
cp /etc/apt/sources.list /etc/apt/sources.list.jammy

# Create a new Noble sources.list
sudo nano /etc/apt/sources.list.noble

# Fill with these contents:
deb http://us.archive.ubuntu.com/ubuntu/ noble main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ noble-updates main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ noble-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu noble-security main restricted universe multiverse
# Save and exit
cp /etc/apt/sources.list.noble /etc/sources.list
apt update

# Add the "Backports build PPA" for Grub2 2.12
add-apt-repository ppa:ubuntu-uefi-team/backports-build
apt update

# If, for some reason, it gets an error saygn there is not release file, then do this
# Modify the sources.list line of the PPA to work with Jammy
nano /etc/apt/sources.list.d/ubuntu-uefi-team-ubuntu-build-jammy.list

# Change the active line to:
deb [trusted=yes] https://ppa.launchpadcontent.net/ubuntu-uefi-team/build/ubuntu/ noble main
# Save and exit nano
apt update

# Install the Grub2 packages
apt install grub-efi-amd64 grub-efi-amd64-signed

# Reinstall/configure grub
grub-install --target=x86_64-efi --efi-directory=/boot/efi \
    --bootloader-id=ubuntu --recheck --no-floppy

# Update the intramfs images
update-intramfs -c -k all

# Change the repo sources back to Jammy
cp /etc/apt/sources.list.jammy /etc/apt/sources.list
apt update

# Test: (Skip if snapshots already exist...)
zfs snapshot bpool/BOOT/ubuntu_2nlhsy@20230204a
zfs snapshot bpool/BOOT/ubuntu_2nlhsy@20230204b
zfs snapshot bpool/BOOT/ubuntu_2nlhsy@20230204c

zfs list -t snapshot

# Output:
#NAME USED AVAIL REFER MOUNTPOINT
#bpool/BOOT/ubuntu_2nlhsy@20230204a 0B - 298M -
#bpool/BOOT/ubuntu_2nlhsy@20230204b 0B - 298M -
#bpool/BOOT/ubuntu_2nlhsy@20230204c 0B - 298M -

# Exit Gracefully:
exit
mount | grep -v zfs | tac | awk '/\/mnt/ {print $3}' | \
    xargs -i{} umount -lf {}
zpool export -a

reboot
>>>