Linux installation broken in Dual-Boot system, need help reinstalling Manjaro

Hello, i am new to Linux and after deleting some orphaned packages to make space in root, Manjaro wouldn’t start properly, got a black screen with “[FAILED] Failed to start Load Kernel Modules”, “[Failed] Failed to mount /boot/efi/”.

After checking some other similar topics i tried fixing this by booting from a USB and mounting my root installation and using chroot, i reinstalled the package linux510 thinking it would be enough and rebooted. Obviously i did something wrong since now the GRUB screen is gone and Manjaro is still showing the same error.

To add some info, this doesn’t seem to be an issue related to the latest update(my system wasn’t updated to the latest stable release) or to any Nvidia drivers. I am also dual-booting with Windows10 even though now it boots straight into Manjaro. Last time i made a system update was about two weeks ago.

Is it okay to boot from a USB again and use pacman -Syu or do i need to do something specific to fix GRUB? Or do i need to do something else entirely? Not sure what to do, if someone could help me and give me the steps needed to fix my system, please.

Look at this:

It seems rather obvious that you removed … a little too much.

I’d go and inspect what you did and reinstall that which you removed.
Hopefully these packages are still in the pacman cache
and you can use
pacman -U /var/cache/pacman/pkg/_name_of_package
to reinstall the original
If they are not there anymore - because you needed space and may have removed them:
they can still be had - don’t know from where exactly
The other option would be to do a system update - and reinstall the newer versions of those packages you removed as well.

all this requires booting from USB and chrooting into your system from there

cat /var/log/pacman.log | grep removed
will show you what got removed and when
so you have a reference of what you did and can reverse it

all this requires booting from USB and chrooting into your system from there

In regards to the chrooting, last time i just mounted my root partition manually. But since i got a /boot/efi/ partition and a swap one don’t i need to mount those too? After using pacman -S linux510 there were some messages of GRUB updating near the end.

Here is the output of lsblk -fm:

NAME   FSTYPE    FSVER            LABEL            UUID                                 FSAVAIL FSUSE% MOUNTPOINT                SIZE OWNER GROUP MODE
loop0  squashfs  4.0                                                                          0   100% /run/miso/sfs/livefs     27.5M root  disk  brw-rw----
loop1  squashfs  4.0                                                                          0   100% /run/miso/sfs/mhwdfs    620.5M root  disk  brw-rw----
loop2  squashfs  4.0                                                                          0   100% /run/miso/sfs/desktopfs   1.7G root  disk  brw-rw----
loop3  squashfs  4.0                                                                          0   100% /run/miso/sfs/rootfs    667.8M root  disk  brw-rw----
sda                                                                                                                            238.5G root  disk  brw-rw----
├─sda1 vfat      FAT32            SYSTEM           222B-197E                                                                     260M root  disk  brw-rw----
├─sda2                                                                                                                            16M root  disk  brw-rw----
├─sda3 BitLocker 2                                                                                                             190.4G root  disk  brw-rw----
├─sda4 ntfs                       WinRE_DRV        1E782E0B782DE26F                                                             1000M root  disk  brw-rw----
├─sda5 vfat      FAT32                             A47A-E698                                                                     512M root  disk  brw-rw----
├─sda6 swap      1                                 cbc87e37-4f83-4f21-a23b-bbd2ea05d0b5                                            2G root  disk  brw-rw----
├─sda7 ext4      1.0                               36874956-5802-45b7-b40b-7c47b66fd5ef                                           20G root  disk  brw-rw----
└─sda8 ext4      1.0                               a05618e2-00d7-4b61-bd89-d3eaf4bb50c3                                         24.4G root  disk  brw-rw----
sdb    iso9660   Joliet Extension MANJARO_KDE_2021 2021-01-03-09-07-36-00                     0   100% /run/miso/bootmnt        14.4G root  disk  brw-rw----
├─sdb1 iso9660   Joliet Extension MANJARO_KDE_2021 2021-01-03-09-07-36-00                                                          3G root  disk  brw-rw----
└─sdb2 vfat      FAT12            MISO_EFI         7B2D-7571                                                                       4M root  disk  brw-rw----

Here /dev/sda7 was the one i mounted last time, sda8 is /home or /usr(sorry, i don’t remember). I think i am gonna need a little handholding through the steps to fix this, since i only end up messing things up further by going in alone. Thanks to both for replying.

mounting your partitions - all of them in the correct order, to the correct place - is a requirement
this has to be done - before chroot
simply mounting them … will not do

Manjaro provides a script - called “manjaro-chroot” - which tries to automate the process, so you don’t have to do all the mounting …
This is often, but not always, successful.

Have you tried using that?

Without chroot - it’s not impossible but very much harder
to fix your system.

If manjaro-chroot is not working (try it first):
Can you supply /etc/fstab from your system?
It should be on /dev/sda7

I did use chroot after mounting /dev/sda7/, but yes i did not mount any other partitions.

Just used manjaro-chroot -a and got:

grub-probe: error: cannot find a GRUB drive for  /dev/sdb1. Check your
grub-probe: error: cannot find a GRUB drive for  /dev/sdb1. Check your
==> Detected systems:
 --> 0) ManjaroLinux
==>Select system to mount [0-0]:

Do i select 0 and i am guessing there is a problem with the /boot/efi/ partition or GRUB, so it would not work properly? 0 gives me an ERROR: You can’t mount 0

if you want to chroot using the automated tool:
don’t mount anything - it’ll interfere and prevent it from doing it’s job
it will do the mounting for you

Sorry, that quote was referencing what i did yesterday and the only time i chrooted. I did not mount anything in this session yet.

Now entering manjaro-chroot -a shows what i posted above. Entering 0 throws: ERROR: You can't mount 0.
The output of manjaro-chroot is ERROR: Can't create chroot on non-directory

I don’t know why an earlier version of this tool had this confusing bug:
it asks you to select a system - shows you the system a 0 and asks you to enter 0 to chroot into it
when it actually only works if you say 1
put 1 and try again

Entering 1 worked, it seems.


Mounting (ManjaroLinux) [/dev/sda7]
--> mount: [/mnt]
--> mount: [/mnt/boot/efi]
--> mount: [/mnt/home]

Now i can proceed with what you wrote in your fist post. The grub-probe error can i ignore it or is it serious? Thanks for all the help.

yes - ignore it
but, once you are inside
still check if everything is where it is supposed to be

Your /etc/fstab could help there.

A terminal file-manager like mc would also help if you are not familiar with the command line.
But - it looks ok from here.

You can also access the files from outside the chroot - to look at them.
The whole system is now below /mnt
But the work, the fixing and reinstalling and updating … has to be done from that terminal you used to chroot.

be careful!
inside the chroot - you are root
no sudo protection!

Here is my /etc/fstab:

# <file system>                          <mount point>  <type>  <options>  <dump>  <pass>
UUID=A47A-E698                            /boot/efi      vfat    umask=0077 0 2
UUID=cbc87e37-4f83-4f21-a23b-bbd2ea05d0b5 swap           swap    defaults,noatime 0 2
UUID=36874956-5802-45b7-b40b-7c47b66fd5ef /              ext4    defaults,noatime 0 1
UUID=a05618e2-00d7-4b61-bd89-d3eaf4bb50c3 /home          ext4    defaults,noatime 0 2
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0

Not sure what to check, did there had to be a mount of swap and /tmp? Everything seems fine.

The removed packages are still in the pacman cache, so i guess i am gonna reinstall them and see if it fix things.

Nope - don’t worry about that.
You could try
swapon -a
to use it.
But I wouldn’t bother unless you are low on RAM.
and tmpfs is taken care of by the chroot

It was probably a bit much to ask of you to judge whether the system inside the chroot is indeed assembled fully and correctly.
Let’s just assume it is. :wink:

Just be careful - you are root!
No questions asked, whatever you do.
… but at least I didn’t give you any potentially dangerous commands to try and execute - I’m very sure of that!

Another thing, what about the only package i reinstalled yesterday using pacman -S linux510 i have the old version in the pacman cache. Do i reinstall the old version or let it pass and just try to reinstall all the other packages?

If you installed it yesterday, it is very very unlikely that this is “an old version”
let it pass I’d say

this is Manjaro - not Arch
in Manjaro you normally do not install kernels with:
pacman -S linux510
In Manjaro, there is a tool for that:

Don’t worry - it just takes care of some extra steps that are needed after installing a kernel via pacman … to make it actually usable.
If you are worried nonetheless:
just reinstall it :wink:

I used pacman -U /var/cache/pacman/pkg/_name_of_package to reinstall all the packages i could find that matched the ones i removed. After exiting and rebooting my system is still the same, GRUB won’t show up, it boots directly into the “Emergency Mode” with the same messages as before.

Here is the list of the orphaned packages removed:

[2021-02-12T11:36:56-0300] [ALPM] removed xorg-fonts-alias (1.0.3-3)
[2021-02-12T11:36:56-0300] [ALPM] removed xorg-font-utils (7.6-6)
[2021-02-12T11:36:56-0300] [ALPM] removed xorg-mkfontscale (1.2.1-2)
[2021-02-12T11:36:56-0300] [ALPM] removed xorg-font-util (1.3.2-2)
[2021-02-12T11:36:56-0300] [ALPM] removed xorg-bdftopcf (1.1-2)
[2021-02-12T11:36:56-0300] [ALPM] removed startup-notification (0.12-7) 
[2021-02-12T11:36:56-0300] [ALPM] removed quazip (1.1-1)    
[2021-02-12T11:36:56-0300] [ALPM] removed python-sip4 (4.19.24-1)
[2021-02-12T11:36:56-0300] [ALPM] removed python-pytoml (0.1.21-6)
[2021-02-12T11:36:56-0300] [ALPM] removed opencolorio (1.1.1-6)
[2021-02-12T11:36:56-0300] [ALPM] removed yaml-cpp (0.6.3-2) 
[2021-02-12T11:36:56-0300] [ALPM] removed tinyxml (2.6.2-7) 
[2021-02-12T11:36:56-0300] [ALPM] removed mhwd-nvidia-340xx (340.108-1) 
[2021-02-12T11:36:56-0300] [ALPM] removed lua (5.4.2-1) 
[2021-02-12T11:36:56-0300] [ALPM] removed linux59 (5.9.16-1)
[2021-02-12T11:36:56-0300] [ALPM] removed linux-latest (5.10-1)  
[2021-02-12T11:36:57-0300] [ALPM] removed linux510 (5.10.7-3) 
[2021-02-12T11:36:57-0300] [ALPM] removed linux-firmware (20210109.r1812.d528862-1) 
[2021-02-12T11:36:57-0300] [ALPM] removed libpwquality (1.4.4-3) 
[2021-02-12T11:36:57-0300] [ALPM] removed cracklib (2.9.7-2)    
[2021-02-12T11:36:57-0300] [ALPM] removed lib32-vulkan-icd-loader (1.2.166-1) 
[2021-02-12T11:36:57-0300] [ALPM] removed lib32-openal (1.21.0-1)
[2021-02-12T11:36:57-0300] [ALPM] removed lib32-nss (3.60.1-1) 
[2021-02-12T11:36:57-0300] [ALPM] removed lib32-nspr (4.29-1) 
[2021-02-12T11:36:57-0300] [ALPM] removed lib32-lz4 (1.9.3-1)   
[2021-02-12T11:36:57-0300] [ALPM] removed lib32-libxss (1.2.3-1) 
[2021-02-12T11:36:57-0300] [ALPM] removed lib32-attr (2.4.48-1)  
[2021-02-12T11:36:57-0300] [ALPM] removed lib32-alsa-oss (1.1.8-2) 
[2021-02-12T11:36:57-0300] [ALPM] removed kseexpr ( 
[2021-02-12T11:36:57-0300] [ALPM] removed js68 (68.12.0-1) 
[2021-02-12T11:36:57-0300] [ALPM] removed js60 (60.9.0-2) 
[2021-02-12T11:36:57-0300] [ALPM] removed gtest (1.10.0-3)   
[2021-02-12T11:36:57-0300] [ALPM] removed gsl (2.6-2)   
[2021-02-12T11:36:57-0300] [ALPM] removed gmic (2.9.4-1)   
[2021-02-12T11:36:57-0300] [ALPM] removed opencv (4.5.1-1) 
[2021-02-12T11:36:57-0300] [ALPM] removed tbb (2020.3-1)    
[2021-02-12T11:36:57-0300] [ALPM] removed lapack (3.9.0-3)   
[2021-02-12T11:36:57-0300] [ALPM] removed cblas (3.9.0-3)   
[2021-02-12T11:36:57-0300] [ALPM] removed blas (3.9.0-3)    
[2021-02-12T11:36:57-0300] [ALPM] removed graphicsmagick (1.3.36-1) 
[2021-02-12T11:36:57-0300] [ALPM] removed game-devices-udev (0.10-2) 

And a list of the ones i could not reinstall directly (did not find it, or maybe one passed as a dependency)

[2021-02-12T11:36:56-0300] [ALPM] removed xorg-fonts-alias (1.0.3-3)
[2021-02-12T11:36:56-0300] [ALPM] removed xorg-font-utils (7.6-6)
[2021-02-12T11:36:56-0300] [ALPM] removed xorg-mkfontscale (1.2.1-2)
[2021-02-12T11:36:56-0300] [ALPM] removed xorg-font-util (1.3.2-2)
[2021-02-12T11:36:56-0300] [ALPM] removed xorg-bdftopcf (1.1-2)
[2021-02-12T11:36:56-0300] [ALPM] removed startup-notification (0.12-7) 
[2021-02-12T11:36:56-0300] [ALPM] removed python-pytoml (0.1.21-6)
[2021-02-12T11:36:56-0300] [ALPM] removed opencolorio (1.1.1-6)
[2021-02-12T11:36:56-0300] [ALPM] removed mhwd-nvidia-340xx (340.108-1)  
[2021-02-12T11:36:57-0300] [ALPM] removed lib32-vulkan-icd-loader (1.2.166-1) 
[2021-02-12T11:36:57-0300] [ALPM] removed lib32-openal (1.21.0-1) 
[2021-02-12T11:36:57-0300] [ALPM] removed lib32-libxss (1.2.3-1)
[2021-02-12T11:36:57-0300] [ALPM] removed lib32-attr (2.4.48-1) 
[2021-02-12T11:36:57-0300] [ALPM] removed lib32-alsa-oss (1.1.8-2)
[2021-02-12T11:36:57-0300] [ALPM] removed js68 (68.12.0-1)
[2021-02-12T11:36:57-0300] [ALPM] removed js60 (60.9.0-2) 

After using the exit command it unmounted everything, i don’t think i used the exit command when i chrooted yesterday. Maybe it helps narrow down the problem? Also i used the pacman -Qs _name_of_package to see if some of the packages were already installed and did not need to reinstall, which was the case for linux510 and linux-firmware.

cat /var/log/pacman.log | grep PACMAN
will show the actual commands you ran

From the removed (and now re-installed packages)
I can’t glance anything other than:
with these in the list of packages about to be removed
I’d have at least hesitated to actually do it.

Are you sure that’s all of them?

cat /var/log/pacman.log
will show the whole thing
the grep command is used to filter the output by certain distinctive keywords

and then there is always the possibility of running a full system update/upgrade
if the here attempted reconstruction of the former state didn’t work

I’d try to re install xorg - possibly also your DE
your nvidia driver seems to have been among the victims
or was it even mhwd itself?
… don’t know

Here is the commands from pacman.log:

[2021-02-12T11:36:37-0300] [PACMAN] Running 'pacman -Rs game-devices-udev gm
ic gsl gtest js60 js68 kseexpr lib32-alsa-oss lib32-attr lib32-libxss lib32-
lz4 lib32-nss lib32-openal lib32-vulkan-icd-loader libpwquality linux-latest
linux59 lua mhwd-nvidia-340xx opencolorio python-pytoml python-sip4 quazip
startup-notification xorg-font-utils xorg-fonts-alias'
[2021-02-12T14:03:21-0300] [PACMAN] Running 'pacman -S linux59'
[2021-02-12T14:05:18-0300] [PACMAN] Running 'pacman -S linux 10'
[2021-02-12T14:27:24-0300] [PACMAN] Running 'pacman -S linux510'

Before them the latest is a full system upgrade last month in the 22. After them are the commands for the packages i reinstalled today.

After the first command at least GRUB would boot.

that huge long pacman command was generated by another, previous command
not here recorded

If you are interested what it was:
it is in the file ~/.bash_history
… likely similar if you used zsh as your shell

in the first command, your nvidia driver for your graphics card got removed

with the second command (installing a kernel)
the bootloader was finally updated and probably a new initrd generated
which then failed

You could try a system update/upgrade.

If that doesn’t work out as expected, I would not bother anymore
but backup my files from the /home partition (just in case)
and then re-install

it’s just quicker than trying to sort this out

give yourself some more room in /
or just put everything in one partition instead of separating / and /home
… just a suggestion

I don’t think i can make the system update, the total installed size is about 3.7gb while i only got about 1.5 of free space in root. Already backed up the important things in /home .

Last time i installed Manjaro it was months ago, is there no conflicts with all the partitions already made and windows 10, or do i just follow the same steps as before? I don’t want to break my system any further.

Is there a good guide to reinstall Manjaro? Or a guide to uninstall Manjaro and see if Windows is still intact?