Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.boot > #72423

Bug#1034812: Unbootable after install: UEFI installed to wrong ESP

Path csiph.com!fu-berlin.de!bofh.it!news.nic.it!robomod
From Jmkr <jmkrnet@email.cz>
Newsgroups linux.debian.bugs.dist, linux.debian.maint.boot
Subject Bug#1034812: Unbootable after install: UEFI installed to wrong ESP
Date Thu, 09 May 2024 13:10:01 +0200
Message-ID <IC9Ff-c8OU-3@gated-at.bofh.it> (permalink)
References <GodWN-4hYW-1@gated-at.bofh.it>
X-Original-To <1034812@bugs.debian.org>, <pascal@plouf.fr.eu.org>, <kibi@debian.org>, <debian@jamesie.de>, <adam@hax0rbana.org>
X-Mailbox-Line From debian-bugs-dist-request@lists.debian.org Thu May 9 11:03:11 2024
Old-Return-Path <debbugs@buxtehude.debian.org>
X-Spam-Flag NO
X-Spam-Score 2.448
Reply-To Jmkr <jmkrnet@email.cz>, 1034812@bugs.debian.org
Resent-To debian-bugs-dist@lists.debian.org
Resent-Cc Debian Install Team <debian-boot@lists.debian.org>
X-Debian-Pr-Message followup 1034812
X-Debian-Pr-Package installation-reports
X-Debian-Pr-Keywords patch
MIME-Version 1.0 (szn-mime-2.1.37)
X-Mailer szn-UNKNOWN-unknown
Content-Type multipart/alternative; boundary="=_258ec90e1650fb26437dc858=0c283bd0-d55f-5fbb-98e0-3ec059c218d8_="
X-Greylist delayed 720 seconds by postgrey-1.36 at buxtehude; Thu, 09 May 2024 10:58:05 UTC
X-Debian-Message from BTS
X-Mailing-List <debian-bugs-dist@lists.debian.org> archive/latest/1836945
List-ID <debian-bugs-dist.lists.debian.org>
List-URL <https://lists.debian.org/debian-bugs-dist/>
Approved robomod@news.nic.it
Lines 126
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Date Thu, 09 May 2024 12:42:41 +0200 (CEST)
X-Original-Message-ID <3FJ.7Hm5j.R6WSH9oO3c.1cFAYX@seznam.cz>
X-Original-References <168237896103.1994.6746491645827082699.reportbug@thumbdrive.hax0rbana.org>
Xref csiph.com linux.debian.bugs.dist:1196930 linux.debian.maint.boot:72423

Cross-posted to 2 groups.

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

I had a similar problem with my customized Debian 10 installer. I have not 
customized PARTMAN related UDEB packages yet, so these are at Debian 10 
versions. What I did was I installed my Debian in one of my test laptops 
that also had another SSD with some Windows 11 installation that I plan to 
nuke later:). All was working and booting, but when I added ESP capacity 
monitoring to my CONKY configurations, I noticed that this laptop had 
different ESP space occupied than my other laptops with the same hardware. 
After checking what is going on I found that:

- The ESP created by me during manual disk partitioning on the SSD that is 
used for my Debian system was empty and not used at all (not mounted at "/
boot/efi" and not mentioned in "/etc/fstab").

- Instead the ESP from the other SSD with the Windows 11 installation was 
used. It was mounted at "/boot/efi", its UUID was in "/etc/fstab" and DI/
GRUB installed the "EFI/debian/grubx64.efi" file there right next to the 
"Microsoft" and "Boot" directories that contained the Windows garbage.

Thankfully I did not boot that Windows 11 installation, so Windows were not 
able to mess around with the Debian files that rudely appeared on "their" 
disk. I was able to (hopefully) fix the situation when I noticed it:

- I archived "/boot/efi/EFI/debian/grubx64.efi" from "/dev/sda1" to "/
Archive.tar".

- Then, I unmounted "/dev/sda1" from "/boot/efi" and mounted "/dev/sdb1" to 
"/boot/efi" and extracted "/Archive.tar" in "/boot/efi" again.

- Later I changed UUID of ESP in "/etc/fstab" file to that of ESP on "/dev/
sdb1".

- Finally using EFIBOOTMGR I deleted the EFI boot entry my system used and 
created a new entry for ESP on "/dev/sdb1".

- Then, I tested that the system boots as before using the new EFI and FSTAB
entries and correct ESP.

Did I forget something (that will cause problems in the future) by not 
reinstalling GRUB or some other stuff?

Do the fixes mentioned above also address the manual partitioning case? If 
not perhaps you could check that case also. I will keep the Windows 11 
installation (as this laptop is for testing anyway) = if you want I could 
test the fixed PARTMAN files, if these are provided so that my script for 
customizing the Debian Netinst ISO can include them (after I modify it to 
extract a new PARTMAN TAR or copy new PARTMAN files directly to the 
extracted Debian Netinst ISO). (In the future I plan to learn how to create 
DI ISO from scratch to be able to include modified UDEB packages etc. => if 
that is needed for testing and you can provide some starting instructions 
for me I could try that also.)

Regards,
Jmkr

Back to linux.debian.maint.boot | Previous | NextNext in thread | Find similar


Thread

Bug#1034812: Unbootable after install: UEFI installed to wrong ESP Jmkr <jmkrnet@email.cz> - 2024-05-09 13:10 +0200
  Bug#1034812: Unbootable after install: UEFI installed to wrong ESP Pascal Hambourg <pascal@plouf.fr.eu.org> - 2024-05-09 15:10 +0200
    Bug#1034812: Unbootable after install: UEFI installed to wrong ESP Jmkr <jmkrnet@email.cz> - 2024-05-10 01:00 +0200
      Bug#1034812: Unbootable after install: UEFI installed to wrong ESP Pascal Hambourg <pascal@plouf.fr.eu.org> - 2024-05-10 08:10 +0200
        Bug#1034812: Unbootable after install: UEFI installed to wrong ESP Jmkr <jmkrnet@email.cz> - 2024-05-17 13:30 +0200
          Bug#1034812: Unbootable after install: UEFI installed to wrong ESP Pascal Hambourg <pascal@plouf.fr.eu.org> - 2024-05-17 15:10 +0200
            Bug#1034812: Unbootable after install: UEFI installed to wrong ESP Jmkr <jmkrnet@email.cz> - 2024-05-28 21:20 +0200

csiph-web