Manjaro XFCE fails to boot after upgrade (maybe TIFU)

Hello everyone

Manjaro has been my daily driver for a long time. I’m really pleased with it, but I think I killed it by accident!

I upgraded my system using the app in XFCE for that kind of thing. However, it kept complaining about a JDK or JRE that was needed for some old version of Electron.

I nuked the orphan packages using this command (I think - can’t remember)

sudo pacman -R $(pacman -Qtdq)

I then updated the system, and it finished with success notifying me that I had to reboot. It was here the trouble started.

When I reboot, the system keeps taking me into the BIOS settings.

Hitting ESC during boot takes me into the GRUB menu that have two entries:

  1. UEFI Firmware Settings
  2. Memory Tester (memtest86+)

Hitting E for Edit boot options revel this content:

setparams 'UEFI Firmware Settings'

                         fwsetup

When following the normal boot sequence I get send into the BIOS right away without any visible errors.

I have a Debian LiveUSB and can see my system files when I mount the partition.

How can I diagnose the problem, with logs and so on, so that I can get a minimal working system?

Any help greatly appriciated!

In the grub command line:

grub> ls
(hd0) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1)

Ok something is there let’s explore!

grub>ls (hd0)/
error: unknown file system (translated from Danish)
grub> ls (hd0,gpt1)/
efi/
grub>ls (hd0,gpt2)/
lost+found/ boot/ dev/ proc/ run/ (cutting it short - this is the partition for the system)
grub>ls (hd0,gpt3)/
error: unknown file system

The efi folder in (hd0,gpt1) is organized like this:

efi/boot/bootx64.efi
efi/boot/Manjaro/grubx64.efi

I then tried this out:

set root=(hd0,gpt1)
insmod linux
insmod normal
normal

And the system booted - directly into the BIOS…

Hello @Markowitch :wink:

For some reason, Grub was not updated on your system. Update once in a Manjaro live session: GRUB/Restore the GRUB Bootloader - Manjaro If you only have a Debian live session available, you will need to chroot (switch to the local installation) manually.

Thanks for the reply @megavolt
I’ll start the Debian LiveUSB

(for some reason I can’t download ISO’s from manjaro.org. Transfers grind to a halt after the first 40MB)

> sudo /sbin/fdisk -l
A lot of text
Disk /dev/nvme0n1
Device  ... Type
/dev/nvme0n1p1  EFI system
/dev/nvme0n1p2  Linux filesystem
/dev/nvme0n1p3  Linux Swap

Skipping info about the LiveUSB which is on /dev/sda

So I will ´chroot´ to the local installation. But I’m not sure how to? I got the chroot command on the LiveUSB, but I guess I should mount the EFI system and the linux filesystem?

The ISO from the website is provided using CDN77.

Perhaps try the manjaro-get-iso script (python) which also pulls the official using CDN but provides also release review and developer preview options.

Applications / Manjaro Get Iso · GitLab
[root tip] [recovery] Basic Manjaro Linux Recovery

1 Like

No, first Linux, then EFI.

sudo mount /dev/nvme0n1p2 /mnt
sudo mount /dev/nvme0n1p1 /mnt/boot/efi
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo mount --bind /run /mnt/run
sudo chroot /mnt /usr/bin/bash 

In chroot:

mkinitcpio -P
grub-mkconfig -o /boot/grub/grub.cfg
exit

Thanks for the details @megavolt
In the meantime I tried the download from cdn77 on another computer, and it worked. So now I’m burning a manjaro XFCE LiveUSB with Rufus on Win.

Rufus is a bit weird. It will not make a bootable LiveUSB from the Manjaro iso
manjaro-xfce-24.2.1-241216-linux612.iso

So I used Ventoy, which makes the USB bootable and lets you copy ISO files to it, that you can choose in the startup menu on boot time.

1 Like

Yes - the rufus developer(s) is not fond of Manjaro - because the team won’t change the ISO layout just to support Rufus tool.

The ISO files have not been made compatible with ISO/File copy mode - #8 by nikgnomic

When I last checked - years ago - Rufus switch to dd mode when the filesystem contains manjaro’s filesystem

Ventoy is the recommended tool - you may have to check if using grub mode is better than default.

Plain old dd also work.

1 Like

Ok @megavolt I’m back with another question.

I’ve booted Manjaro from the USB (using Ventoy to select the ISO)

I got the XFCE desktop and opened a terminal.

> manjaro-chroot -a
==> Mounting (ManjaroLinux) [/dev/nvme0n1p2]
 --> mount: [/mnt]
 --> mount: [/mnt/boot/efi]

root# pacman -Syu grub

// Skipping a lot of output

root# grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck

Installing for x86_64-efi platform.
Intstallation finished. No error reported

Following the how-to I also have to make sure the configuration is up to date

root# grub-mkconfig -o /boot/grub/grub.cfg

Generating grub configuration file ....
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
ERROR: mkdir /var/lock/dmraid
Adding boot menu entry for UEFI Firmware Settings ...
Root filesystem isn't btrfs
If you think an error has occurred, pleas file a bug report at "https://github.com/Antynea/grub-btrfs"
Found memtest86+ image: /boot/memtest86+/memtest.bin
/usr/bin/grub-probe: warning: unknown device type nvme0n1.
Found memtest86+ EFI image /boot/memtest86+/memtest.efi
/usr/bin/grub-probe: warning: unknown device type nvme0n1.
done

I guess it found some strange stuff and bailed. The system still reboots into BIOS.

According to the above how-to the problem could also be resolved by updating GRUB, so that’s what I’ll try.

Boot into the LiveUSB and start a terminal.

> manjaro-chroot -a
==> Mounting (ManjaroLinux) [/dev/nvme0n1p2]
 --> mount: [/mnt]
 --> mount: [/mnt/boot/efi]

root # pacman -Syu install-grub
// skipping output
Packages (1) install-grub-2:2.12-3
// skipping output

root # install-grub
WARNING: EFI directroy not found! Grub couldn't be installed.

I’m a bit lost… maybe I overlooked something in the how-to…

Interesting… what is output of:

Seems like there are no boot images at /boot to boot from.

Ok, let’s try it (did a chroot prior)

root# mkinitcpio -P
==> ERROR: No presets found in /etc/mkinitcpio.d

@megavolt I assume I have an EFI system and not a BIOS system (the how-to mention those) because this path exists /sys/firmware/efi (while chroot).

root# /etc/mkinitcpio.d/linux65.preset.pacsave

# mkinitcpio preset file for the '6.5-x86_64' package

#ALL_config="/etc/mkinitcpio.conf"
ALL_kver="/boot/vmlinuz-6.5-x86_64"
ALL_microcode=(/boot/*-ucode.img)

PRESETS=('default' 'fallback')

#default_config="/etc/mkinitcpio.conf"
default_image="/boot/initramfs-6.5-x86_64.img"
#default_uki="/efi/EFI/Linux/manjaro-6.5-x86_64.efi"
#default_options="--splash /usr/share/systemd/bootctl/splash-manjaro.bmp"

#fallback_config="/etc/mkinitcpio.conf"
fallback_image="/boot/initramfs-6.5-x86_64-fallback.img"
#fallback_uki="/efi/EFI/Linux/manjaro-6.5-x86_64-fallback.efi"
fallback_options="-S autodetect"

I assume there is no kernel installed, Linux 6.5 is long EOL and I suppose it was removed on that upgrade. It was an stable kernel and not a long term support one (LTS). Install linux66 (which is LTS):

mhwd-kernel --install linux66

Take a look here: https://www.kernel.org/

1 Like

Ok, I kept my system updated frequently.

[manjaro /]# mhwd-kernel --install linux66
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 multilib is up to date
error: no targets specified (use -h for help)

Extra info. With manjaro-chroot the content of ls -l /boot is:

drwxr-xr-x 3 root root    4096 Jan  1  1970 efi
drwxr-xr-x 6 root root    4096 Mar  8 13:11 grub
-rw-r--r-- 1 root root 9683968 Feb 11 18:09 intel-ucode.img
drwxr-xr-x 2 root root    4096 Mar  5 17:47 memtest86+

For the record, the command should normally be performed using sudo. :slight_smile:

In a chroot environment, however, commands should be run without sudo.

  • Note that when installing a kernel in a chroot environment, using pacman is usually suggested

Also, in case you missed the previously given link;

On the chance that the update failed in some way the following tutorial might also be useful;

Regards.

2 Likes

Tried with sudo - same result. I am root after i did manjaro-chroot.

And check with regards to the restore GRUB bootloader link. I am reading it forwards and backwards as we speak. :slightly_smiling_face: :upside_down_face:

pacman -Sy linux66

:question:

2 Likes

Going in…

[manjaro /]# pacman -Sy linux66                
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 multilib is up to date
resolving dependencies...
looking for conflicting packages...

Packages (1) linux66-6.6.80-1

Total Download Size:   129.69 MiB
Total Installed Size:  134.81 MiB

:: Proceed with installation? [Y/n]