Re: update-initramfs
On Thu 13 Apr 2023 at 04:14:46 (+0200), Michel Verdier wrote:
> Le 12 avril 2023 David Wright a écrit :
>
> > the menu/ is moot. I would maintain that this failure mode is rare
> > enough for a reasonable penalty of having to type a few characters
> > editing the Grub menu.
> >
> > The last time I booted a kernel that was on a different partition
> > from my installed Grub, it took no more than typing 23 characters
> > and a load of rubouts. (That was after installing bookworm RC1.)
>
> I agree with all you said. But on this point I don't follow you. Yes the
> need is extremely rare. And so I was never able to remember this few
> chars stance and each time rely on rescue boot to do this. So I
> understand that a simple grub menu could be useful.
When I tried installing bookworm RC1, which I reported in:
https://lists.debian.org/debian-user/2023/04/msg00405.html
I was left with a system whose Grub menu only contained entries for
the new system, because os-prober no longer scours all the other
partitions for OSes any more.¹ To get back to booting bullseye by
default, the easiest way was to boot bullseye the once, and then run
install-grub /dev/sda.
So I rebooted, pressed e at the blue Grub screen to edit the first
menuitem, and mangled just these lines:
set root='hd0,gpt4'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4 21c64c1c-2c0c-4376-922e-40ff9d46d08a
else
search --no-floppy --fs-uuid --set=root 21c64c1c-2c0c-4376-922e-40ff9d46d08a
fi
echo 'Loading Linux 6.1.0-7-amd64 ...'
linux /boot/vmlinuz-6.1.0-7-amd64 root=UUID=21c64c1c-2c0c-4376-922e-40ff9d46d08a ro quiet
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-6.1.0-7-amd64
to:
set root='hd0,gpt5'
search --no-floppy --label --set=root ezra05
linux /vmlinuz root=LABEL=ezra05 ro quiet
initrd /initrd.img
which sufficed to boot the default kernel on my bullseye root
partition (via the symlinks, which saves having to know the version).
23 new characters: 5labelezra05LABELezra05, and lots of deletions.
Running install-grub then rewrites the BIOS boot partition (/dev/sda1)
with bullseye's Grub, overwriting bookworm's. (The MBR gets rewritten
too, but it's unchanged.)
¹ I also tested uncommenting GRUB_DISABLE_OS_PROBER=false
in /target/etc/default/grub at the point when the d-i first asks:
┌────────────┤ [!] Install the GRUB boot loader ├─────────────┐
This makes os-prober behave as it has done, up until bullseye.
Cheers,
David.
Reply to: