# Lenovo T490 boot loop 2025-08-08
Issue caused by:
On NixOS stable (latest), I did a "sudo fwupdmgt update" which showed an intel ME update I ran.
It required a reboot which I confirmed.
Such fw updates typically boot twice or so.
After that, it bootet into BIOS (and not into the installed OS) which was unusual.
Then I was only able to boot into BIOS:
- boots into "Reboot Into Firmware Interface" (countdown)
- followed by black screen for one second or so
- then new reboot into BIOS
Selecting F12 (other boot target) and choosing my NVMe targets (see below) also didn't boot my NixOS anymore.
I may boot from an USB device though. There, I typically use the latest grml live distro for analyzing and fixing things.
**Feedback** via https://graz.social/@publicvoit (Mastodon) or mail: t490loop *at* karl - voit *dot* at
Published also on Mastodon with https://graz.social/@publicvoit/114998152917004378
Here are my approaches and insights: (please **reload** for updates)
---
https://superuser.com/questions/1552127/how-to-delete-extra-os-entries-from-bios
"Open Command Prompt in administrator, then in that type 'bcdedit /enum firmware' this will list a load of entries, find the one that corresponds to your Ubuntu installation and copy the identifier, be careful to copy the correct identifier. Then type 'bcdedit delete {identifier}' where {identifier} is replaced by the identifier of the entry you are trying to remove."
-> no bcdedit in available grml live
---
Let's try to manually select next boot target:
efibootmgr # -> lists all entries
sudo efibootmgr --bootnext XXXX # -> manually select boot target (in case the F12 method does weird things)
executed in grml:
sudo efibootmgr --bootnext XXXX && reboot
... with XXXX as follows:
- 001D = NVMe0 -> boots into "Reboot Into Firmware Interface" (countdown) followed by black screen for 1s, then new reboot into BIOS
- 001E = NVMe1 -> like 001D
- 0003 .. 0008 = "Linux Boot Manager" (same name, multiple entries)
- 0003 like 001D
- 0004 directly into BIOS
- 0005 like 001D
- 0006 directly into BIOS
- 0007 like 001D
- 0008 directly into BIOS
---
https://graz.social/@hans_olo@chaos.social/114998232378599133
"would it be an idea to take out the disk and try a new installation on another one to see if that works? May that FW update has messed with some security keys?"
A different NVMe SSD with an old Xubuntu did boot normally.
I've seen multiple "Linux Boot Manager" entries here as well (at least 4 AFAIR). So that seems normal.
**So it's not the BIOS but something stored on the NVMe**
**I guess this boils down to fixing the boot sector or similar.** Unfortunately, I'm far from being a Linux boot method insider.
---
https://graz.social/@TheSecondVariation/114998238128006836
"I just read on the ubuntu page that it can also make changes to the bios. Maybe it reverted some things in the bios settings such as secure boot legacy uefi and this kind of things?"
- [ ] go through BIOS settings and check
Since a different SSD boots (see above), this is probably not the reason.
---
https://graz.social/@TheSecondVariation/114998247479199081
"Arch wiki https://wiki.archlinux.org/title/Fwupd#Stuck_when_rebooting has under toruble shooting the stuck when rebooting section. I have no idea about the reset button on your device but maybe you can find it"
The page deals with keys (didn't change), Secure Boot (is disabled), ...
I think that those things are not reflecting my situation at hand.
---
Next approach:
- boot grml
- mount NVMe partitions (LVM + LUKS)
- execute:
update-initramfs -c -k all # MUST NOT be sudo
update-grub
grub-install /dev/sdc
Let's do this:
grml:
- Start ssh
- passwd
on other computer:
ssh root@192.168.x.x
blkid:
/dev/nvme0n1p3: UUID="..." TYPE="crypto_LUKS" PARTUUID="..."
/dev/nvme0n1p1: UUID="..." BLOCK_SIZE="512" TYPE="vfat" PARTUUID="..."
/dev/nvme0n1p2: UUID="..." TYPE="crypto_LUKS" PARTLABEL="root" PARTUUID="..."
cryptsetup open /dev/nvme0n1p2 jacksonroot
mkdir /mnt/jacksonroot
mount /dev/mapper/jacksonroot /mnt/jacksonroot
cd /mnt/jacksonroot
mount /dev/nvme0n1p1 ./boot
mount -t proc proc /mnt/jacksonroot/proc
mount -t sysfs sys /mnt/jacksonroot/sys
mount -o bind /dev /mnt/jacksonroot/dev
mount -t devpts pts /mnt/jacksonroot/dev/pts
chroot /mnt/jacksonroot /nix/store/syl4snn859kpqvn9qh91kr7n9i4dws04-bash-5.2p32/bin/bash
at this stage, I'm pretty f***ed because of my decision to run NixOS: no tools are available in my path/environment
What I wanted to execute:
update-initramfs -c -k all # MUST NOT be sudo
update-grub
grub-install /dev/nvme0n1p1
**I gave up**, put my old SSD with Xubuntu 22.04 into the device, updated the data and made the most important apps run again.
PS: https://www.adyxax.org/blog/2023/11/13/recovering-a-nixos-installation-from-a-linux-rescue-image/
... explains how to activate the environments for this last step
2025-08-10: with that information, I gave it another try:
I'm booting UEFI:
```
#+BEGIN_EXAMPLE
root@grml:/]# [ -d /sys/firmware/efi/efivars ] && echo "UEFI" || echo "Legacy"
UEFI
[root@grml:/]#
#+END_EXAMPLE
```
I'm going to try that:
```
#+BEGIN_SRC sh
nixos-enter
NIXOS_INSTALL_BOOTLOADER=1 /nix/var/nix/profiles/system/bin/switch-to-configuration boot
#+END_SRC
```
Fails:
```
#+BEGIN_EXAMPLE
[root@grml:/]# nixos-enter
/run/current-system/sw/bin/nixos-enter: '/mnt' is not a NixOS installation
[root@grml:/]# NIXOS_INSTALL_BOOTLOADER=1 /nix/var/nix/profiles/system/bin/switch-to-configuration boot
efiSysMountPoint = '/boot/efi' is not a mounted partition. Is the path configured correctly?
Traceback (most recent call last):
File "/nix/store/87m7ql4msyanwln9767ig0qnxg9f5dzd-systemd-boot/bin/systemd-boot", line 431, in <module>
main()
File "/nix/store/87m7ql4msyanwln9767ig0qnxg9f5dzd-systemd-boot/bin/systemd-boot", line 411, in main
run([CHECK_MOUNTPOINTS])
File "/nix/store/87m7ql4msyanwln9767ig0qnxg9f5dzd-systemd-boot/bin/systemd-boot", line 58, in run
return subprocess.run(cmd, check=True, text=True, stdout=stdout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/bbyp6vkdszn6a14gqnfx8l5j3mhfcnfs-python3-3.12.11/lib/python3.12/subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/nix/store/rya8pwbkm03zpsy1gh6g85k4fg4gcify-check-mountpoints']' returned non-zero exit status 1.
Failed to install bootloader
[root@grml:/]# cd boot/
[root@grml:/boot]# l
ls: cannot access 'loader': Input/output error
total 12K
drwxr-xr-x 4 root root 4.0K Jan 1 1970 .
drwxr-xr-x 21 root root 4.0K Sep 17 2024 ..
drwxr-xr-x 6 root root 4.0K Sep 4 2023 EFI
d????????? ? ? ? ? ? loader
[root@grml:/boot]#
#+END_EXAMPLE
```
According to https://discourse.nixos.org/t/boot-partition-not-mounted/51234
```
#+BEGIN_QUOTE
Well, your =hardware-configuration.nix= doesn’t contain a
=fileSystems."/boot"= entry. You must have run =nixos-generate-config=
before you had mounted it. You can just mount it, run
=nixos-generate-config= again (it will only regenerate
=hardware-configuration.nix= ), and rebuild.
#+END_QUOTE
```
I don't want to re-generate my hardware-configuration as it didn't change.
This is interesting: https://discourse.nixos.org/t/efisysmountpoint-boot-is-not-a-mounted-partition/61910/3
```
#+BEGIN_QUOTE
You need to set =--root= ,
By default, =nixos-install= assumes =/mnt= is the root of the install, so it would expect =/mnt/boot=, =/mnt/home= , etc.
Your partitions are mounted under =/mnt/nix-root=, so you need to add =--root /mnt/nix-root/= to the =nixos-install= command line.
#+END_QUOTE
```
Yes, I'm not in /mnt but in /mnt/jacksonroot. However, I'm unsure if this is of relevance after doing the chroot ...
OK, so let's try again with /mnt instead:
```
#+begin_example
# (had to reboot since I wasn't able to umount everything which was still in use somehow)
cryptsetup open /dev/nvme0n1p2 jacksonroot
mount /dev/mapper/jacksonroot /mnt
cd /mnt
mount /dev/nvme0n1p1 ./boot
mount -R /dev dev
mount -R /proc proc
mount -R /sys sys
chroot ./ /nix/var/nix/profiles/system/activate
chroot ./ /run/current-system/sw/bin/bash
#+end_example
```
Still an issue:
```
#+BEGIN_EXAMPLE
[root@grml:/]# NIXOS_INSTALL_BOOTLOADER=1 /nix/var/nix/profiles/system/bin/switch-to-configuration boot
efiSysMountPoint = '/boot/efi' is not a mounted partition. Is the path configured correctly?
Traceback (most recent call last):
File "/nix/store/87m7ql4msyanwln9767ig0qnxg9f5dzd-systemd-boot/bin/systemd-boot", line 431, in <module>
main()
File "/nix/store/87m7ql4msyanwln9767ig0qnxg9f5dzd-systemd-boot/bin/systemd-boot", line 411, in main
run([CHECK_MOUNTPOINTS])
File "/nix/store/87m7ql4msyanwln9767ig0qnxg9f5dzd-systemd-boot/bin/systemd-boot", line 58, in run
return subprocess.run(cmd, check=True, text=True, stdout=stdout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/nix/store/bbyp6vkdszn6a14gqnfx8l5j3mhfcnfs-python3-3.12.11/lib/python3.12/subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/nix/store/rya8pwbkm03zpsy1gh6g85k4fg4gcify-check-mountpoints']' returned non-zero exit status 1.
Failed to install bootloader
[root@grml:/]#
#+END_EXAMPLE
```
Well, my options are decreasing rapidly. :-(