[Bug 1922342] Re: Impish live session takes ages to boot on BIOS systems
sudodus
1922342 at bugs.launchpad.net
Sun May 15 10:24:32 UTC 2022
Hi Thomas Schmitt,
> I wonder what is meant by "add some tweaks".
1. Made grub use UUID instead of device name to identify partition where
to find the grub files
---
# create grub.cfg to match iso file's name
echo -e "$inversvid tweak grub ...$resetvid"
# tweak 3: search by UUID
sleep 2
partprobe
sleep 2
targ1=$(mktemp -d --tmpdir dus.XXXXXXXXXX)
uid2=$(lsblk -o uuid,label "$target" |grep -i 'usbboot'|sed "s% *usbboot%%")
uid3=$(lsblk -o uuid,label "$target" |grep 'isodevice'|sed "s% *isodevice%%")
echo "uid2=$uid2"
echo "uid3=$uid3"
mount -U "$uid2" "$targ1"
sleep 2
if [ "$uid3" != "" ]
then
sed -i '/set isofile/'a" search --set=root --fs-uuid $uid3" "$targ1"/boot/grub/grub.cfg
sed -i 's/(hd0,3)/($root)/' "$targ1"/boot/grub/grub.cfg
if [ $? -ne 0 ]
then
error="$error - sed: tweak 3 grub.cfg"
result="target drive might work, but setting 'search by UUID' failed :-("
echo "$result"
fi
fi
umount "$targ1"
rmdir "$targ1"
sleep 2
partprobe
sleep 1
}
---
# tweak 1: maybe modify label of partition for persistence
mntpt=$(mktemp -d --tmpdir dus.XXXXXXXXXX)
mount -o loop "$source" "$mntpt"
syslbl=$(lsblk -o label,mountpoint | grep "$mntpt"|sed "s% *$mntpt%%")
umount "$mntpt"
sleep 2
isover=$(<<< "$syslbl" grep -o ' [0-9]*\.'|grep -o '[0-9]*')
pptarg=$(lsblk -lo name,label "$target" |grep writable|sed -e 's/ .*//' -e 's#^#/dev/#')
if [ $isover -lt 20 ]
then
tune2fs -L casper-rw "$pptarg"
sleep 1
fi
# tweak 2:
# To make Firefox work in Jammy & newer:
# apparmor.service.d/30_live_mode.conf: ConditionPathExists=
if [ $isover -ge 22 ]
then
targ1=$(mktemp -d --tmpdir dus.XXXXXXXXXX)
/bin/echo -e "$inversvid To make Firefox work in Jammy & newer $resetvid
apparmor.service.d/30_live_mode.conf: ConditionPathExists="
umount "$targ1" 2>&1
targ0=$(mktemp -d --tmpdir dus.XXXXXXXXXX)
mount -o loop "$source" "$targ0" 2>&1
echo '$pptarg $targ1'": $pptarg $targ1"
mount "$pptarg" "$targ1" 2>&1
tghme=$(find "$targ0" -name '*ubuntu*.seed')
# echo "$tghme"
tghme=${tghme##*/}
tghme=${tghme%.seed}
if [ "$tghme" == "ubuntustudio" ]
then
tghme='ubuntu-studio'
elif [ "$tghme" == "" ]
then
tghme=$(grep -om1 'ubuntu-kylin' "$targ0"/casper/filesystem.manifest)
fi
echo "target's home directory: /home/$tghme"
mkdir -p "$targ1"/upper/home/"$tghme"/.config/autostart
mkdir -p "$targ1"/upper/usr/local/sbin
cp /usr/share/mkusb/fixfox.desktop "$targ1"/upper/home/"$tghme"/.config/autostart
cp /usr/share/mkusb/fixfox "$targ1"/upper/usr/local/sbin
umount "$targ1" "$targ0" 2>&1
rm -r "$targ1" "$targ0"
# read -p "press Enter to continue"
fi
---
I think tweak 3 is most relevant in this case (of this bug report).
I have also noticed that it is difficult to 'make all computers happy
with the same configuration' even within the group that want an MSDOS
partition table.
The bug of this report seems to be somewhat worked around by the version
in dus-iso2usb version 22.0.1, but I think old HP computers with
core2duo processors want a bootable flag on the partition where grub is
located. However, adding that boot flag seems to stop booting in UEFI
mode. I am trying to make a configuration work for all these test cases
...
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to casper in Ubuntu.
https://bugs.launchpad.net/bugs/1922342
Title:
Impish live session takes ages to boot on BIOS systems
Status in Release Notes for Ubuntu:
Fix Committed
Status in casper package in Ubuntu:
Confirmed
Status in casper source package in Impish:
Confirmed
Status in casper source package in Kinetic:
Confirmed
Bug description:
First of all, I change the description of this bug because, thanks to
Chris Guiver comments, I could check that the live session effectively
works but it takes too long to complete. That's why I change the
description of the bug from live session does not boot to live session
takes ages to boot. I hope this is the best approach to this.
I think the problem is the same as described here:
https://discourse.ubuntubudgie.org/t/20-10-grub-error-can-t-find-
command-grub-platform/4292. I can see prior to grub menu, briefly, the
same error: Error can't find grub_platform. After the solution
described below, this error is not showed and the system is able to
boot.
I try making the live usb using startup disk creator and with gnome-
disks --> Restore disk image and get the same results.
The live-usb has a gpt partition table instead of mbr like 20.04 live-
usb has. That implies, I think, that the first one does not boot on
BIOS systems and the second does.
I try the same live-usb on an EFI laptop and it boots perfectly
(perhaps it takes long time, but more less than in this case.
If I try the solution described here:
https://bugs.launchpad.net/ubuntu/+source/casper/+bug/1905491/comments/8
then it works.
ProblemType: Bug
DistroRelease: Ubuntu 21.04
Package: casper 1.461
ProcVersionSignature: Ubuntu 5.11.0-13.14-generic 5.11.7
Uname: Linux 5.11.0-13-generic x86_64
NonfreeKernelModules: zfs zunicode zavl icp zcommon znvpair
ApportVersion: 2.20.11-0ubuntu61
Architecture: amd64
CasperMD5CheckResult: pass
CasperVersion: 1.461
CurrentDesktop: ubuntu:GNOME
Date: Fri Apr 2 09:55:24 2021
LiveMediaBuild: Ubuntu 21.04 "Hirsute Hippo" - Beta amd64 (20210331.1)
ProcEnviron:
TERM=xterm-256color
PATH=(custom, no user)
XDG_RUNTIME_DIR=<set>
LANG=gl_ES.UTF-8
SHELL=/bin/bash
SourcePackage: casper
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-release-notes/+bug/1922342/+subscriptions
More information about the foundations-bugs
mailing list