In the previous post I could run Ubuntu 22.04 Jammy Jellyfish booting iso from grub. Then I made persistent Live usb of Jammy Jellyfish using mkusb. I could boot and run Firefox on first boot. But on reboot Firefox refused to run due to following error:
$ firefox
snap-confine has elevated permissions and it is not confined but should
be. Refusing to continue to avoid permission escalation attacks.
This was a show stopper for persistent Live system of Ubuntu 22.04.
On further research I discovered that AppArmor was failing on Live system preventing firefox but how it was running on first boot is still a mystery to me.
Anyway on googling about AppArmor failure on Live System I discovered this page which provides a workaround.
The workaround is as follows:
In Live Persistent mode:
$ sudo mkdir /lib/systemd/system/apparmor.service.d
to create a directory apparmor.service.d in /lib/systemd/system/
sudo gedit /lib/systemd/system/apparmor.service.d/30_live_mode.conf
to create config file in the new directory
Paste
[Unit]
ConditionPathExists=
Save and reboot.
AND Firefox works!
Show must go on for persistent Live system of Ubuntu 22.04.
Update on 22nd April 2022
This workaround was incorporated in mkusb version 12.7.4 on 21st April 2022 just in time before release of Ubuntu 22.04 Jammy Jellyfish.