Unable to boot Manjaro after removing all orphans

Hello all, I’m fairly new to Manjaro and yesterday after removing all orphan packages (a lot of them were haskell stuff and a nvidia driver), today it’s not working. It shows,

[FAILED] Failed to Load Kernel Modules.
[FAILED] Failed to mount /boot/efi.
[DEPEND] Dependency failed for Local file Systems.

Then I am in emergency mode and unable to login via root password. Things I tried:

  1. chrooting with help of
sudo manjaro-chroot -a

followed by 0 (1 doesn’t work) and updating everything

  1. reworking grub
grub install
update-grub

Now the windows option is also not visible -_-

Output of inxi -Fazy

12System:
  12Kernel 5.6.11-1-MANJARO x86_64 12bits 64 12compiler gcc 12v 9.3.0 
  12parameters BOOT_IMAGE=/boot/vmlinuz-x86_64 lang=en_US keytable=us tz=UTC 
  driver=nonfree nouveau.modeset=0 i915.modeset=1 radeon.modeset=0 
  misobasedir=manjaro misolabel=MANJARO_KDE_2001 quiet systemd.show_status=1 
  apparmor=1 security=apparmor 
  12Console N/A 12wm kwin_x11 12Distro Manjaro Linux 
12Machine:
  12Type Laptop 12System AZOM 12product EXIGO V2 12v N/A 12serial N/A 12Chassis 12type 10 
  12serial N/A 
  12Mobo AZOM 12model EXIGO V2 powered by premamod.com 12serial N/A 12UEFI Prema Mod 
  12v 1.06.09AOM v2 12date 04/12/2017 
12CPU:
  12Topology Quad Core 12model Intel Core i5-7600K 12socket U3E1 12bits 64 12type MCP 
  12arch Kaby Lake 12family 6 12model-id 9E (158) 12stepping 9 12microcode CA 
  12L1 cache 256 KiB 12L2 cache 6144 KiB 12L3 cache 6144 KiB 
  12flags avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx 
  12bogomips 30409 
  12Speed 900 MHz 12min/max 800/4200 MHz 12base/boost 4000/8300 12volts 1.1 V 
  12ext-clock 100 MHz 12Core speeds (MHz) 121 900 122 900 123 900 124 900 
  12Vulnerabilities 12Type itlb_multihit 12status KVM: Split huge pages 
  12Type l1tf 
  12mitigation PTE Inversion; VMX: conditional cache flushes, SMT disabled 
  12Type mds 12mitigation Clear CPU buffers; SMT disabled 
  12Type meltdown 12mitigation PTI 
  12Type spec_store_bypass 
  12mitigation Speculative Store Bypass disabled via prctl and seccomp 
  12Type spectre_v1 
  12mitigation usercopy/swapgs barriers and __user pointer sanitization 
  12Type spectre_v2 12mitigation Full generic retpoline, IBPB: conditional, 
  IBRS_FW, STIBP: disabled, RSB filling 
  12Type tsx_async_abort 12mitigation Clear CPU buffers; SMT disabled 
12Graphics:
  12Device-1 NVIDIA GP106M [GeForce GTX 1060 Mobile] 12vendor CLEVO/KAPOK 
  12driver nvidia 12v 440.82 12bus ID 01:00.0 12chip ID 10de:1c20 
  12Display 12server X.org 1.20.8 12compositor kwin_x11 12driver nvidia 
  12Message Advanced graphics data unavailable for root. 
12Audio:
  12Device-1 Intel 100 Series/C230 Series Family HD Audio 12vendor CLEVO/KAPOK 
  12driver snd_hda_intel 12v kernel 12bus ID 00:1f.3 12chip ID 8086:a170 
  12Device-2 NVIDIA GP106 High Definition Audio 12vendor CLEVO/KAPOK 
  12driver snd_hda_intel 12v kernel 12bus ID 01:00.1 12chip ID 10de:10f1 
  12Sound Server ALSA 12v k5.6.11-1-MANJARO 
12Network:
  12Device-1 Qualcomm Atheros Killer E2400 Gigabit Ethernet 12vendor CLEVO/KAPOK 
  12driver alx 12v kernel 12port d000 12bus ID 6e:00.0 12chip ID 1969:e0a1 
  12IF enp110s0 12state down 12mac <filter> 
  12Device-2 Intel Wireless 8265 / 8275 12driver iwlwifi 12v kernel 12port c000 
  12bus ID 71:00.0 12chip ID 8086:24fd 
  12IF wlp113s0 12state up 12mac <filter> 
12Drives:
  12Local Storage 12total 245.94 GiB 12used 146.30 GiB (59.5%) 
  12ID-1 /dev/nvme0n1 12vendor Western Digital 12model WDS500G3X0C-00SJG0 
  12size 465.76 GiB 12block size 12physical 512 B 12logical 512 B 12speed 31.6 Gb/s 
  12lanes 4 12serial <filter> 12rev 111110WD 12temp 62 Celsius C 
  12SMART yes 12health PASSED 12on 17d 12h 12cycles 141 12read-units 715,575 [366 GB] 
  12written-units 1,484,226 [759 GB] 
  12ID-2 /dev/nvme1n1 12vendor Samsung 12model MZVPV256HDGL-00000 12size 238.47 GiB 
  12block size 12physical 512 B 12logical 512 B 12speed 31.6 Gb/s 12lanes 4 
  12serial <filter> 12rev BXW7300Q 12temp 49 Celsius C 
  12SMART yes 12health PASSED 12on 1y 115d 3h 12cycles 4,253 
  12read-units 58,856,460 [30.1 TB] 12written-units 94,913,266 [48.5 TB] 
  12ID-3 /dev/sda 12type USB 12vendor Sony 12model Storage Media 12size 7.46 GiB 
  12block size 12physical 512 B 12logical 512 B 12serial <filter> 12rev PMAP 
  12SMART Message Unknown USB bridge. Flash drive/Unsupported enclosure? 
12Partition:
  12ID-1 / 12raw size 75.95 GiB 12size 74.26 GiB (97.77%) 12used 17.21 GiB (23.2%) 
  12fs ext4 12block size 4096 B 12dev /dev/nvme0n1p1 
  12ID-2 /home 12raw size 380.63 GiB 12size 373.64 GiB (98.16%) 
  12used 128.37 GiB (34.4%) 12fs ext4 12block size 4096 B 12dev /dev/nvme0n1p2 
12Swap:
  12Alert No Swap data was found. 
12Sensors:
  12System Temperatures 12cpu 77.0 C 12mobo N/A 
  12Fan Speeds (RPM) N/A 
12Info:
  12Processes 207 12Uptime 44m 12Memory 15.47 GiB 12used 2.27 GiB (14.7%) 12Init systemd 
  12v 246 12Compilers 12gcc 10.2.0 12Packages 12pacman 1261 12lib 352 12flatpak 0 
  12Client Unknown Client: systemd 12inxi 3.1.05 

Output of fdisk -l

Disk /dev/nvme1n1: 238.47 GiB, 256060514304 bytes, 500118192 sectors
Disk model: SAMSUNG MZVPV256HDGL-00000              
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: D790BF78-A12C-401C-A74C-97EC253980A0

Device             Start       End   Sectors  Size Type
/dev/nvme1n1p1      2048   1023999   1021952  499M Windows recovery environment
/dev/nvme1n1p2   1024000   1228799    204800  100M EFI System
/dev/nvme1n1p3   1228800   1261567     32768   16M Microsoft reserved
/dev/nvme1n1p4   1261568 498386670 497125103  237G Microsoft basic data
/dev/nvme1n1p5 498388992 500115455   1726464  843M Windows recovery environment


Disk /dev/nvme0n1: 465.76 GiB, 500107862016 bytes, 976773168 sectors
Disk model: WDS500G3X0C-00SJG0                      
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: 26FD0827-D7DA-4096-85C7-3027E459E792

Device             Start       End   Sectors   Size Type
/dev/nvme0n1p1  19253248 178540543 159287296    76G Linux filesystem
/dev/nvme0n1p2 178540544 976773134 798232591 380.6G Linux filesystem
/dev/nvme0n1p3   1050624  19253247  18202624   8.7G Linux swap
/dev/nvme0n1p4        34   1050623   1050590   513M Microsoft basic data

Partition table entries are not in disk order.


Disk /dev/loop0: 16.95 MiB, 17772544 bytes, 34712 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: 575.17 MiB, 603107328 bytes, 1177944 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.7 GiB, 1821650944 bytes, 3557912 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: 584.46 MiB, 612847616 bytes, 1196968 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: 7.46 GiB, 8011120640 bytes, 15646720 sectors
Disk model: Storage Media   
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: 0x00000000

Device     Boot   Start     End Sectors  Size Id Type
/dev/sda1  *         64 6097383 6097320  2.9G  0 Empty
/dev/sda2       6097384 6105575    8192    4M ef EFI (FAT-12/16/32)

Any help in this matter would be highly appreciated.

Thanks!

Hello,

How did you do that actually? Trough Pamac or a command?

Just updating will not help. U’m sure what you call orphans actually many are not. You will have to reinstall at least some of those packages by checking the pacman log file.

I’m afraid you have to specify the boot partition.


Through Pamac, there was a section of orphans in installed section. I chose remove all multiple times till there were none left.

Guess so, how to install them? In particular how to check the pacman log file?

Output of sudo efibootmgr -v

BootCurrent: 0006
Timeout: 1 seconds
BootOrder: 0002,0000,0001,0005,0006,0007
Boot0000* Windows Boot Manager  HD(2,GPT,e5646996-8725-4a1a-8e46-166ea0cd8006,0xfa000,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...a................
Boot0001* ubuntu        HD(2,GPT,e5646996-8725-4a1a-8e46-166ea0cd8006,0xfa000,0x32000)/File(\EFI\UBUNTU\SHIMX64.EFI)
Boot0002* manjaro       HD(4,GPT,a3995ed7-d1a3-4f47-b001-92a0fb0cc7c5,0x22,0x1007de)/File(\EFI\manjaro\grubx64.efi)
Boot0005* UEFI OS       HD(4,GPT,a3995ed7-d1a3-4f47-b001-92a0fb0cc7c5,0x22,0x1007de)/File(\EFI\BOOT\BOOTX64.EFI)..BO
Boot0006* UEFI: Sony Storage Media PMAP PciRoot(0x0)/Pci(0x14,0x0)/USB(5,0)/CDROM(1,0x5d09e8,0x8000)..BO
Boot0007* UEFI: Sony Storage Media PMAP, Partition 1    PciRoot(0x0)/Pci(0x14,0x0)/USB(5,0)/HD(1,MBR,0x0,0x5d09e8,0x2000)..BO

Also weirdly, os-prober is not detecting windows as well as lsblk -f doesn’t detect it either

lsblk -f
NAME        FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINT
loop0                                              
loop1                                              
loop2                                              
loop3                                              
sda                                                
|-sda1                                             
`-sda2                                             
nvme1n1                                            
|-nvme1n1p1                                        
|-nvme1n1p2                                        
|-nvme1n1p3                                        
|-nvme1n1p4                                        
`-nvme1n1p5                                        
nvme0n1                                            
|-nvme0n1p1                           53.2G    23% /
|-nvme0n1p2                          226.2G    34% /home
|-nvme0n1p3                                        
`-nvme0n1p4                          511.6M     0% /boot/efi

When you’re chrooted issue

cat /var/log/pacman.log

I was about to clear my orphans in pamac and noticed the list was long and included many of my main programs/apps.
Upon searching the forum, I found this thread and another:

This issue was supposedly fixed in Pamac 9.5.8
My version of Pamac is 9.5.10 and the issue is not resolved.
Pamac is showing programs as dependencies of other programs.
Most installed from AUR. But for example my Kvantum themes are showing as orphans and once removing the orphans, I loose programs, dependencies, and several of my system icons.

Timeshift is a blessing!!!
Do not use the GUI Pamac in it’s current release for orphan removals.

Edit: I just checked Pacman and it shows the same orphans list as Pamac. So not removing orphans by either method automatically at present. Manually one at a time after checking using Pamac may be an option.

This was certainly not the command you used. It is missing the name of the partition.

Anyways, I suggest you create a list of all orphans you removed, show us that list and we can eventually help you to identify critical packages you need to reinstall or you could even reinstall all packages you removed.

How to create that list?

First chroot into your installation. And then do

cd /var/log
grep removed pacman.log

This gives you a list of all packages you have removed. This is a full list. Please show us the relevant subset of that list which shows all the orphans you removed. You can eventually identity them by the timestamp.