Can’t boot Manjaro after deleting in /var

Windows Manjaro dual boot. /var got too bloated and I did some cleaning up, clearly I’ve deleted important stuff as now Manjaro fails to boot, goes into emergency mode. I have a manjaro usb, if needed. Tried to chroot on my own but I’m clearly too incompetent.

lsblk -f shows this

NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
loop0
squash 4.0 0 100% /run/miso/
loop1
squash 4.0 0 100% /run/miso/
loop2
squash 4.0 0 100% /run/miso/
loop3
squash 4.0 0 100% /run/miso/
sda
├─sda1
│ ntfs DATA 92088B0E088AF111
├─sda2
│ vfat FAT32 1203-2883
├─sda3
│ swap 1 2a33d214-c37a-4001-8ce6-b01e2a6f3cb5
├─sda4
│ ext4 1.0 d01cfe85-73e6-4998-b941-d7011f5477e8
└─sda5
ext4 1.0 0a1e2cd6-60b3-44a2-b1dd-aebc605a5d7e
sdb iso966 Jolie MANJARO_KDE_2003
│ 2020-06-06-08-14-33-00
├─sdb1
│ iso966 Jolie MANJARO_KDE_2003
│ 2020-06-06-08-14-33-00 0 100% /run/miso/
└─sdb2
vfat FAT12 MISO_EFI
F327-8F27

Emergency mode shows:

Failed to start Load Kernel Modules
Failed to mount Mount unit for atom, revision 275
Failed to mount Mount unit for atom, revision 279
Failed to mount Mount unit for core, revision 10908
Failed to mount Mount unit for core, revision 10958
Failed to mount Mount unit for core20, revision 904
Failed to mount Mount unit for core20, revision 975
Failed to mount /boot/efi
Dependency failed for Local File Systems

Would appreciate your help, I’m lost.

adjusted the title accordingly because that is not “cleaning cache”.

You can try:

  • boot from usb
  • manjaro-chroot into your installation
  • check packages for missing files: pacman -Qk
  • and reinstall those
2 Likes

Thank you for correcting the thread name.

I tried sudo
manjaro-chroot -a

Then finding missing files, but it says there is 0 missing files for all.
I also did
pacman -Syu grub
Then
exit
Then tried to restart: manjaro still fails to boot and emergency screen shows the same errors, as though nothing got done at all.

Would appreciate any pointers on how to salvage it or hints on how to reinstall Manjaro in this dual boot.

You could try to reinstall all packages.

chroot again and then

pacman -Qqn | pacman -S -

2 Likes

I sure hope you left /var/lib/pacman/local/out of your “cleaning efforts” as this is the database of all locally installed packages.

These all look like snap packages to me and should not prevent booting.

This is more serious. You might want to check /etc/fstab and the partition/filesystem which should be mounted there.
You can try adding nofail mount option to get the machine to boot up and fix it later.

3 Likes

“cleaning efforts” :joy:

If that is the case and pacman -Q does not show anything @lenab :

https://wiki.archlinux.org/index.php/Pacman/Restore_local_database

2 Likes

for: pacman -Qqn | pacman -S -
some errors came up, like:
ERROR: '/lib/modules/5.9.16-1-MANJARO' is not a valid kernel module directory
and this warning
`28/39) Restore Linux kernel modules
/usr/share/libalpm/scripts/kernel-alive-post: line 21: cd: /lib/modules: No such file or directory
ls: cannot access ‘backup’: No such file or directory

==> Warning:
→ Kernel has been updated. Modules of the current kernel
→ have been backed up so you can continue to use your
→ computer. However, the new kernel will only work
→ at next boot.`
@freggel.doe might be right and I might have noobed out a lot more than anticipated… ahem. I shall restart and report back. Thank you so so much for your help, both of you.

P.S
Still the same, I guess I did delete lib then :confused: couldn’t find /etc/fstab either

linux59 is already gone from the repositories I guess.

Remove that one and install linux510 and 511
sudo pacman -R linux59
sudo pacman -S linux510 linux511

:scream:

Is there still something left in /etc/ at all (you’re chrooted, no ?) or “was the vacuum-cleaner so strong that it sucked in stuff from there as well” ?

1 Like

You should consider this a learning experience, think before you delete, and only delete root/systems files manually if you are 100% absolutely certain of what you are doing

1 Like

Since I’m a newb, can’t be sure I’m checking the right folder, haha.
So I entered
sudo manjaro-chroot -a
Then checked /mnt/etc in dolphin. There are various directories like acpi gdb ssh zsh

Ooohhh fstab file is there. All good. Phew. Good thing you made me recheck it

fstab:

UUID=1203-2883 /boot/efi vfat umask=0077 0 2
UUID=2a33d214-c37a-4001-8ce6-b01e2a6f3cb5 swap swap defaults,noatime 0 2
UUID=0a1e2cd6-60b3-44a2-b1dd-aebc605a5d7e / ext4 defaults,noatime 0 1
UUID=d01cfe85-73e6-4998-b941-d7011f5477e8 /home ext4 defaults,noatime 0 2

I’ll try adding the nofail option

That’s the lesson I’ve learned :frowning:

1 Like