Grub miss comfigure after update. Black screen

Hi
I run an update in manjaro and at the end of it the grub was recreated. When I did the update, I forgot that a usb was plugged int eh back. The usb used to be a live Manjaro. I had format the usb, the OS was erased but the efi partition was still there.
When I rebooted, I got the normal efi grub menu for manjaro or windows. If i go into windows it works fine, but if i choose manjaro, I get a black screen. The grub menu is pointing to the wrong place, probably it had used the efi partition in the usb as a misguided pointer.

I tried to update the grub using this article https://wiki.manjaro.org/index.php/Restore_the_GRUB_Bootloader but I get errors. “efi boot not found” “cant find boot partition”
I would really appreciate your help.

sudo fdisk -l

Disk /dev/loop0: 16.6 MiB, 17379328 bytes, 33944 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop1: 273.1 MiB, 286408704 bytes, 559392 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop2: 1.2 GiB, 1266749440 bytes, 2474120 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/loop3: 461.5 MiB, 483946496 bytes, 945208 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x5f5a10d8

Device     Boot      Start        End   Sectors   Size Id Type
/dev/sda1             2048  976762879 976760832 465.8G  7 HPFS/NTFS/exFAT
/dev/sda2        976762880 1043871743  67108864    32G 82 Linux swap / Solaris
/dev/sda3       1043871744 1953519615 909647872 433.8G 83 Linux


Disk /dev/sdb: 28.7 GiB, 30752636928 bytes, 60063744 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x498585f6

Device     Boot   Start     End Sectors Size Id Type
/dev/sdb1  *         64 4132575 4132512   2G cd unknown
/dev/sdb2       4132576 4140767    8192   4M ef EFI (FAT-12/16/32)


Disk /dev/sdc: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 78371044-F159-11E8-B7D7-1C4D7020B7CC

Device         Start       End   Sectors   Size Type
/dev/sdc1       2048   1026047   1024000   500M Microsoft basic data
/dev/sdc2    1026048 335467000 334440953 159.5G Microsoft basic data
/dev/sdc3  335468544 336451583    983040   480M Windows recovery environment
/dev/sdc4  336453632 336658431    204800   100M EFI System
/dev/sdc5  336658432 337068031    409600   200M Microsoft basic data
/dev/sdc6  337068032 404176895  67108864    32G Linux filesystem
/dev/sdc7  404176896 949436415 545259520   260G Linux filesystem

Thank you
Tony


Read this.
But the first part (Simple First Start) won’t work for your case.
And I’ll write for you here what to do.

  1. Boot up livecd in the uefi mode
  2. Do not boot up to live OS, but press ‘c’ at the menu and we’ll get to the grub prompt (grub>).
  3. grub> search.file /etc/manjaro-release root
    grub> probe -u $root --set=abc
    grub> ls ($root)/boot/
  4. copy down kernel and initrd file, say vmlinuz-4.14-x86_64 and initramfs-4.14-x86_64.img
    Use the right kernel below like 4.18 or 4.19 or… (continue…)
  5. grub> linux /boot/vmlinuz-4.19-x86_64 root=UUID=$abc rw
    grub> initrd /boot/initramfs-4.19-x86_64.img
    grub> boot
  6. When booted up to manjaro installed OS, at terminal
    Make sure you have version grub 2.03.2-1 or later (check with pacman -Q grub)
  7. Refresh/update your system
    sudo pacman -Syyuu
  8. In /etc/default/grub, make sure you have one of the following specified.
    GRUB_TIMEOUT_STYLE=menu
    GRUB_TIMEOUT_STYLE=hidden
    GRUB_TIMEOUT_STYLE=countdown
  9. Also in /etc/default/grub, make sure you have
    GRUB_TIMEOUT=5 (or more; suggest 10, change to 5 later on when you feel more confident)
  10. Check your /etc/fstab that you have the correct /boot/efi partition (in fat32) with the right UUID.
    If not, correct the fstab file.
  11. At terminal, check if your /boot/efi is mounted at the wrong partition.
    findmnt /boot/efi
  12. If wrong partition is mounted, unmount /boot/efi and remount to the right partition
    Verify with ‘lslbk -f’, ‘sudo blkid’, sudo parted -l’ - any one of them to be sure you get the right partition identified. Follow with commands below.
    sudo umount /boot/efi
    sudo mount /dev/sdxy /boot/efi
    Use the right /dev/sdxy like… sudo mount /dev/sda1 /boot/efi
  13. Continue with terminal commands
    sudo rm /boot/grub/grubenv
    sudo grub-editenv /boot/grub/grubenv create
    sudo grub-editenv - set boot_success=0
    sudo grub-install
    sudo update-grub
  14. Do this additional uefi commands as well
sudo cp /boot/grub/x86_64-efi/core.efi /boot/efi/EFI/boot/bootx64.efi
sudo efibootmgr -c -d /dev/sda -p 1 -L "manjaro" -l "\EFI\Manjaro\grubx64.efi"

Note the second command above is for $esp in sda1.
Change accordingly if it is not. This command " findmnt /boot/efi " will confirm the $esp partition.

Yup, a real PITA with our new grub. But good luck.

4 Likes

There have been some ‘debate’ over this ‘new’ grub and some workarounds.
A quick search shows (in the comments section) some debate and more ‘polite’ discussions here. Many workarounds have been suggested but this here won’t work. It also needs to use timeout=0 which is, to say the least, makes it ‘inaccessible’ in case we need to add parameters or worse.

As mentioned here, one simple setting change in /default/grub of the upstream unmodified grub will hide the grub menu nicely. But we like things … ‘complicated’ (and like legal and medical jargon - ‘ultra vires’, ‘idiopathic’… perhaps to disguise our cluelessness as ‘cleverness’).

3 Likes

Thank you for the response.
Everything seem fine until it booted in step 6.
No file system specified.
Dropped in to an emergency shell.

Did I do something wrong?
Thanks

You typed
grub> linux /boot/vmlinuz-4.19-x86_64 root=UUID$abc rw

Try again, good luck
but just in case there there are any problem you can try with fall back and hope it’s the modules that wasn’t upgraded or installed well in the last update.
Instead of

grub> initrd /boot/initramfs-4.19-x86_64.img

Use this…and boot to prompt.

grub> linux /boot/vmlinuz-4.19-x86_64 root=UUID=$abc rw 3
grub> initrd /boot/initramfs-4.19-x86_64-fallback.img

ps: lucky you provided screenshots.
Without it, I might have guess there’s something wrong with upgrades as there were some with upgrade problems recently. I do not have much problems myself with upgrades all these while. Lucky me.

ps: Try to have 2 kernels at least, it may help if there are problems with any one kernel, especially with kernel upgrades.

Thank you for the response.
I tried it twice with the original post and one with the fallback but both times it got stuck after the boot in the same place.

Okay, noted.
But I am unable to help further.
I think, but I hope it is not, a system problem with the recent updates itself.
It may be possible to chroot into the system and try to fix it.
But I may not be the best person to help you do it other than when you chroot into it, do
sudo pacman-mirrors -f3
sudo pacman -Syyuu

Hope others here can chime in to help Tonny.
Good luck and hope you fix it. Cheers.

I will try that.
Thank you.

I decided to just reinstall Manjaro.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.