Update-grub cant see manjaro installation

Was messing with partitions and other distros during last 3 days and grub got messed up with syntax errors. After failing to chroot and manjaro-chroot grub I did a system restore from 18/12 which worked great but now sudo update-grub cant see the manjaro install. It only sees a win7 install and some mem something.
Afraid to reboot :astonished:
Please dont link me to chroot pages.
Manjaro-chroot don’t work.

Reinstall Grub on your default /boot/efi partition or / (depending if your system is UEFI or Legacy) then run sudo update-grub

Or maybe here
Also see some related comments here

No need to chroot as im still logged in. afraid to reboot but. :confused:
Im on legacy bios.

[kdf-pc@kdf-hp ~]$ ls -la /boot
total 89440
drwxr-xr-x 4 root root 4096 Nov 28 20:29 .
drwxr-xr-x 18 root root 4096 Nov 24 14:28 …
drwxr-xr-x 6 root root 4096 Dec 24 11:09 grub
-rw-r–r-- 1 root root 25181962 Dec 4 12:00 initramfs-4.9-x86_64-fallback.img
-rw-r–r-- 1 root root 9943294 Dec 4 12:00 initramfs-4.9-x86_64.img
-rw-r–r-- 1 root root 31178203 Dec 4 12:01 initramfs-5.4-x86_64-fallback.img
-rw-r–r-- 1 root root 10062515 Dec 4 12:00 initramfs-5.4-x86_64.img
-rw-r–r-- 1 root root 3621888 Nov 19 07:58 intel-ucode.img
-rw-r–r-- 1 root root 22 Nov 24 13:41 linux49-x86_64.kver
-rw-r–r-- 1 root root 21 Nov 28 09:57 linux54-x86_64.kver
drwxr-xr-x 2 root root 4096 Jun 4 2020 memtest86+
-rw-r–r-- 1 root root 5052160 Nov 27 12:58 vmlinuz-4.9-x86_64
-rw-r–r-- 1 root root 6502720 Nov 28 20:28 vmlinuz-5.4-x86_64

This is what you need, from wiki:

sudo grub-install --force --target=i386-pc --recheck --boot-directory=/boot /dev/sdy

Replace the sdy with your actual decive/disk number. Also make sure the grub configuration is up-to-date

sudo grub-mkconfig -o /boot/grub/grub.cfg

Can i do this from my install instead of usb ?




customizer sees manjaro and update in terminal doesn’t

Seems everything is o.k.
Terminal does not say “Manjaro”, that is normal!
Consider “Boot-Order” in BIOS.
The Grub-Customizer “mostly” works correct.
Manjaro and safe-boot will NOT work!

what do you mean?

@GaVenga was referring to Secure Boot, but that does not apply to you as you are booting in legacy BIOS mode.

However, it must be noted once again that grub-customizer should not be used in Manjaro. Manjaro uses a customized version of GRUB, and grub-customizer cannot handle that.

Its worse than that.
grub-customizer assumes you are using ubuntu.
This is a problem in a lot of situations…
Also its logic and functions are both constructed by what can only be a silly person.
I am sure these things are exacerbated by our modified grub (and why it conflicts with grub in the repos - it will stop you from installing it) … but its not the only reason.

1 Like

so will uninstalling customizer fix my grub update ?

Not necessarily. It depends on what a mess it managed to make out of the contents of /etc/grub.d.

Perhaps it would be best to not only uninstall grub-customizer, but to also wipe the contents of /etc/grub.d and then immediately reinstall grub from the repositories. :thinking:

how to do this step by step ?

First do this… :arrow_down:

sudo pacman -R grub-customizer
sudo rm -f /etc/grub.d/*
sudo pacman -S grub os-prober

os-prober should normally be pulled in as a dependency of grub, but it never hurts to explicitly add it.

Now, an intermediary step may be needed for getting GRUB to display a menu on boot… :arrow_down:

sudo nano /etc/default/grub

If the file contains the line… :arrow_down:


… change that to… :arrow_down:


Save the file with Ctrl+O followed by Enter, and exit nano with Ctrl+X.

Now proceed… :arrow_down:

sudo grub-install --force --recheck --no-rs-codes --modules="part_msdos part_gpt" --target="i386-pc"
sudo update-grub
1 Like

already some issues

[kdf-pc@kdf-hp ~]$ sudo pacman -R grub-customizer
[sudo] password for kdf-pc:
checking dependencies…

Packages (1) grub-customizer-5.1.0-2

Total Removed Size: 3.09 MiB

:: Do you want to remove these packages? [Y/n] y
:: Processing package changes…
(1/1) removing grub-customizer [###############################] 100%
:: Running post-transaction hooks…
(1/3) Arming ConditionNeedsUpdate…
(2/3) Updating icon theme caches…
(3/3) Updating the desktop file MIME type cache…
[kdf-pc@kdf-hp ~]$ sudo rm -f /etc/grub.d/*
rm: cannot remove ‘/etc/grub.d/backup’: Is a directory
rm: cannot remove ‘/etc/grub.d/bin’: Is a directory
rm: cannot remove ‘/etc/grub.d/proxifiedScripts’: Is a directory
[kdf-pc@kdf-hp ~]$

That’s all crud that was added by grub-customizer. But okay, then use this command instead… :arrow_down:

sudo rm -rf /etc/grub.d/*

more help please…

[kdf-pc@kdf-hp ~]$ sudo grub-install --force --recheck --no-rs-codes --modules=“part_msdos part_
gpt” --target=“386-pc” --boot-directory="/boot"
grub-install: error: /usr/lib/grub/386-pc/modinfo.sh doesn’t exist. Please specify --target or -

My apologies; there was a typo in my post, which I’ve corrected now. The command is… :arrow_down:

sudo grub-install --force --recheck --no-rs-codes --modules="part_msdos part_gpt" --target="i386-pc"
sudo update-grub
1 Like

and now ?

[kdf-pc@kdf-hp ~]$ sudo grub-install --force --recheck --no-rs-codes --modules=“part_msdos part_gpt” --target=“i386-pc”
[sudo] password for kdf-pc:
Installing for i386-pc platform.
grub-install: error: install device isn’t specified.

Add your boot device to the command. If your boot drive is /dev/sda, then simply add that to the command, like so… :arrow_down:

sudo grub-install --force --recheck --no-rs-codes --modules="part_msdos part_gpt" --target="i386-pc" /dev/sda
sudo update-grub