[chroot] "Error: could not open file: etc/mtab: No such file or directory"

Most likely the ISO you boot on is on 5.15

These are packages dropped since a year or more.

Remove these packages, from chroot, then remove kernel 5.10 with mhwd-kernel, then reinstall it or install kernel 5.15 with mhwd-kernel, exit the chroot and reboot, see if that works.

//EDIT: but if you say

then I guess it wouldn’t work anyway.

2 Likes

after removing those packages I was able to successfully remove 5.10, but I have this error when trying to reinstall it by mhwd-kernel -i linux510

error: could not open file /var/lib/pacman/local/xcursor-breeze-5.22.5-1/desc: No such file or directory
:: Synchronizing package databases...
 core                  166.6 KiB  1190 KiB/s 00:00 [######################] 100%
 extra                1859.8 KiB  18.2 MiB/s 00:00 [######################] 100%
 community               7.0 MiB  16.6 MiB/s 00:00 [######################] 100%
 multilib              174.5 KiB  8.52 MiB/s 00:00 [######################] 100%
error: no targets specified (use -h for help)

at this point I may reinstall the whole OS (of course backing up my /home/ folder)

Wrong command I assume. What did you type?

to remove the packages? pacman -R linux-latest linux-latest-headers linux-latest-virtualbox-host-modules

to remove the 5.10 kernel? mhwd-kernel -r linux510

No, obviously what command did you type in the terminal to end up with this error? You removed it from the terminal output you pasted and I don’t know what you typed.

ohhhhh I used this command

I don’t believe you typed that, as the error is saying you didn’t use proper target.

Please type the command once more in the terminal, make sure it is correct. From the error message you have you don’t type the right command. Provide full terminal output. Don’t remove tiny bits that would otherwise show your error, it wastes time for everybody, do full copy paste of code, like that, don’t remove the command you type, or anything.

[omano@omano-nvme ~]$ sudo mhwd-kernel -i linux510
:: Synchronizing package databases...
 core                                                                                 166,6 KiB   188 KiB/s 00:01 [--------------------------------------------------------------------] 100%
 extra                                                                               1859,8 KiB   547 KiB/s 00:03 [--------------------------------------------------------------------] 100%
 community                                                                              7,0 MiB   907 KiB/s 00:08 [--------------------------------------------------------------------] 100%
 multilib                                                                             174,5 KiB   165 KiB/s 00:01 [--------------------------------------------------------------------] 100%
resolving dependencies...
looking for conflicting packages...

Packages (4) linux510-5.10.123-1  linux510-headers-5.10.123-1  linux510-nvidia-515.48.07-6  linux510-virtualbox-host-modules-6.1.34-15

Total Download Size:   138,63 MiB
Total Installed Size:  238,22 MiB

Also I don’t know what’s going on with your other error about the breeze-xcursor package, the path it is referencing is not a file from the package. (//EDIT: probably reinstalling the package would generate this file)

I’m on a live USB right now and chrooting into my main system in order to type these commands

[manjaro-cinnamon /]# mhwd-kernel -i linux510
error: could not open file /var/lib/pacman/local/xcursor-breeze-5.22.5-1/desc: No such file or directory
:: Synchronizing package databases...
 core                  166.6 KiB  1281 KiB/s 00:00 [######################] 100%
 extra                1859.8 KiB  12.4 MiB/s 00:00 [######################] 100%
 community               7.0 MiB  17.5 MiB/s 00:00 [######################] 100%
 multilib              174.5 KiB  10.7 MiB/s 00:00 [######################] 100%
error: no targets specified (use -h for help)

I can reproduce the error only without specifying the kernel version. I tried all “combination” I could think of, and it seems this error message is generated when you type mhwd-kernel -i command like that.

[omano@omano-nvme ~]$ sudo mhwd-kernel    
Error: No arguments given (use -h for help).
[omano@omano-nvme ~]$ sudo mhwd-kernel -i linux5 
Error: Please make sure if the given kernel(s) exist(s).
available kernels:
   * linux419
   * linux510
   * linux515
   * linux517
   * linux518
   * linux519
   * linux54
   * linux515-rt
   * linux518-rt
[omano@omano-nvme ~]$ sudo mhwd-kernel -i        
:: Synchronizing package databases...
 core                                                                                 166,6 KiB   218 KiB/s 00:01 [--------------------------------------------------------------------] 100%
 extra                                                                               1859,8 KiB   402 KiB/s 00:05 [--------------------------------------------------------------------] 100%
 community                                                                              7,0 MiB   907 KiB/s 00:08 [--------------------------------------------------------------------] 100%
 multilib                                                                             174,5 KiB   208 KiB/s 00:01 [--------------------------------------------------------------------] 100%
error: no targets specified (use -h for help)
[omano@omano-nvme ~]$ 

1 Like

I’m confused too since when I list available kernels for install it says that linux510 is available

[manjaro-cinnamon /]# mhwd-kernel -l
available kernels:
   * linux419
   * linux510
   * linux515
   * linux517
   * linux518
   * linux519
   * linux54
   * linux515-rt
   * linux518-rt

Yes but what I’m saying is even without having an existing kernel name/version in the command, if you provide a kernel name/version in the command, this is not the error you should get (see my previous message with my command examples).
Your error I can generate only with the command mhwd-kernel -i, nothing more nothing less (or else I get other error message).

Try 5.15.

weirdly enough I was finally able to install 5.10 by mhwd-kernel -i linux510 after a grub update and mkinitcpio -P, but disappointingly I still have the same kernel panic error relating to init here: