Discussion:
Bug#1041168: Installation of GRUB failed
Add Reply
Cyril Brulebois
2023-07-15 12:20:02 UTC
Reply
Permalink
Hallo Christof,
Boot method: USB stick (written with usbimager), UEFI
Image version: https://deb.debian.org/debian/dists/bookworm/main/installer-amd64/current/images/netboot/mini.iso
Date: 2023-07-15
Machine: Dell Optiplex 9020 SFF
Partitions: see attached files hardware-summary and partman
[O] = OK, [E] = Error (please elaborate below), [ ] = didn't try it
Initial boot: [O]
Detect network card: [O]
Configure network: [O]
Detect media: [O]
Load installer modules: [O]
Clock/timezone setup: [O]
User/password setup: [O]
Detect hard drives: [O]
Partition hard drives: [O]
Install base system: [O]
Install tasks: [O]
Install boot loader: [E]
Overall install: [E]
I did a pretty minimal installation with the base system but no graphical
environmend. I used the "Guided - use entire disk and set up encrypted LVM"
partitioning scheme. Then I chose the harddisk sdb instead of USB stick sda.
Installing GRUB (more precisely: configuring shim-signed:amd64) failed
with a message complaining that GRUB could not be installed on dummy
(execution of "grub install dummy" failed).
Thanks for sharing all those logs in advance. syslog has:

Jul 15 11:00:47 grub-installer: grub-install: error: cannot copy `/usr/lib/shim/shimx64.efi.signed' to `/boot/efi/EFI/debian/shimx64.efi': No space left on device.

And the ESP is close to 500M, so ENOSPC is very surprising. Any chance
you could check what's inside/what filled it?


Cheers,
--
Cyril Brulebois (***@debian.org) <https://debamax.com/>
D-I release manager -- Release team member -- Freelance Consultant
Pascal Hambourg
2023-07-15 16:50:01 UTC
Reply
Permalink
Hello,
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/debian--vg-root
                     120469224   1379448 112924068   1% /target
/dev/sdb2               466026     88234    352807  20% /target/boot
/dev/sda2                 5062      5062         0 100% /target/boot/efi
(...)
Although I chose sdb as installation target, somehow d-i uses /dev/sda2
instead of /dev/sdb2 as EFI partition.
You mean /dev/sdb1. /dev/sdb2 is the /boot partition.

It looks like bug #1034812 (patches available).
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1034812>
Christof B.
2023-07-15 18:10:02 UTC
Reply
Permalink
Hi!
Post by Pascal Hambourg
Hello,
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/debian--vg-root
                      120469224   1379448 112924068   1% /target
/dev/sdb2               466026     88234    352807  20% /target/boot
/dev/sda2                 5062      5062         0 100% /target/boot/efi
(...)
Although I chose sdb as installation target, somehow d-i uses /dev/sda2
instead of /dev/sdb2 as EFI partition.
You mean /dev/sdb1. /dev/sdb2 is the /boot partition.
Yes.
Post by Pascal Hambourg
It looks like bug #1034812 (patches available).
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1034812>
Probably this is a duplicate.
Are there any (nightly) d-i images available to test these patches,
because otherwise (i. e. building d-i myself) this is over my head.

Cheers,
Christof
Cyril Brulebois
2023-07-15 18:20:01 UTC
Reply
Permalink
Post by Christof B.
Probably this is a duplicate.
Are there any (nightly) d-i images available to test these patches,
because otherwise (i. e. building d-i myself) this is over my head.
Not yet. Speaking only for myself, I'm still in dire need of rest
after the whole Bookworm release marathon over the last few months,
and I haven't been able to dive into those patches just yet.

They're on my list of things to look into on the short term though,
including considering them for some point release.


Cheers,
--
Cyril Brulebois (***@debian.org) <https://debamax.com/>
D-I release manager -- Release team member -- Freelance Consultant
Pascal Hambourg
2023-07-15 19:10:01 UTC
Reply
Permalink
Post by Christof B.
Post by Pascal Hambourg
It looks like bug #1034812 (patches available).
Are there any (nightly) d-i images available to test these patches,
If you are willing to test, I can provide patched files which replace
the original ones in a running d-i.
Christof B.
2023-07-15 19:30:02 UTC
Reply
Permalink
If you are willing to test, I can provide patched files which replace the
original ones in a running d-i.
Yes, I am willing to test this. If it can be patched by replacing some
files at runtime (and not compiling some binaries or images), please
provide me the files with a hint at where (path) and when (at which step
of the installation process) to put them into place.

If technically feasible (if all files can be replaced at once) a tarball
would be best.

Thanks and cheers
Christof
Christof B.
2023-07-17 15:50:01 UTC
Reply
Permalink
Replacing /lib/partman/init.d/50efi with either attached 50efi.1 or
50efi.2 as 50efi should fix the issue in guided partitioning with
encrypted LVM.
cp <source path>/50efi.1 /lib/partman/init.d/50efi
or
cp <source path>/50efi.2 /lib/partman/init.d/50efi
I tried each of them and they both solved my problem. /boot and /boot/efi
were on the same (and correct) disk. The installed system was bootable :-)
Fixing the issue in guided partitioning with unencrypted LVM also
requires replacing /bin/autopartition-lvm with the attached
autopartition-lvm.
cp <source path>/autopartition-lvm /bin/autopartition-lvm
The files can be replaced after "Load installer components" and before
"Partition disks".
I could reproduce the same issue with unencrypted LVM (#1034812) on my
machine with my stock installer image.

Like above, replacing 50efi by 50efi.1 plus the other file in /bin made
the installation work alright. The system was bootable afterwards.

Thanks a lot for the quick fixes!

Cheers
Christof
Pascal Hambourg
2023-07-17 18:20:01 UTC
Reply
Permalink
Post by Christof B.
Replacing /lib/partman/init.d/50efi with either attached 50efi.1 or
50efi.2 as 50efi should fix the issue in guided partitioning with
encrypted LVM.
I tried each of them and they both solved my problem. /boot and
/boot/efi were on the same (and correct) disk. The installed system was
bootable :-)
Fixing the issue in guided partitioning with unencrypted LVM also
requires replacing /bin/autopartition-lvm with the attached
autopartition-lvm.
I could reproduce the same issue with unencrypted LVM (#1034812) on my
machine with my stock installer image.
Like above, replacing 50efi by 50efi.1 plus the other file in /bin made
the installation work alright. The system was bootable afterwards.
Thanks a lot for the quick fixes!
Thanks for testing. Should #1034812 and #1041168 be merged ?
Christof B.
2023-07-17 20:10:01 UTC
Reply
Permalink
Post by Pascal Hambourg
Thanks for testing. Should #1034812 and #1041168 be merged ?
Yes, I think so.
Debian Bug Tracking System
2025-01-17 22:40:02 UTC
Reply
Permalink
Your message dated Fri, 17 Jan 2025 22:37:06 +0000
with message-id <E1tYuxe-002hgh-***@fasolo.debian.org>
and subject line Bug#1034812: fixed in partman-efi 108
has caused the Debian Bug report #1034812,
regarding Installation of GRUB failed
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ***@bugs.debian.org
immediately.)
--
1034812: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1034812
Debian Bug Tracking System
Contact ***@bugs.debian.org with problems
Debian Bug Tracking System
2025-01-17 22:50:03 UTC
Reply
Permalink
Your message dated Fri, 17 Jan 2025 22:37:06 +0000
with message-id <E1tYuxe-002hgh-***@fasolo.debian.org>
and subject line Bug#1034812: fixed in partman-efi 108
has caused the Debian Bug report #1034812,
regarding installation-reports: Unbootable after install: UEFI installed to wrong ESP
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ***@bugs.debian.org
immediately.)
--
1034812: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1034812
Debian Bug Tracking System
Contact ***@bugs.debian.org with problems
Loading...