I might have accidently used rm -rf on the wrong folder

I ehhhh…

What is supposed to be in /boot/ except for grub and efi?

I… I don’t want to talk about it. I was playing around with an sd-card and was supposed to remove from the boot on that folder… DON’T JUDGE ME. :smiling_face: :smiling_face:

Since I am still on the system, I reinstalled grub according to Manjaro wiki

I stricrly recall there should be more stuff in there than just grub and an efi directory.

I have backups done with clonezilla that I can access, but that demands me rebooting… I’m not really sure here guys… DONT JUDGE ME! but please help me… xD

Jokes aside, I kinda have to in this situation. but this is what sudo mkinitcpio -P gives me:

==> Building image from preset: /etc/mkinitcpio.d/linux515.preset: 'default'
  -> -k /boot/vmlinuz-5.15-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.15-x86_64.img --microcode /boot/*-ucode.img
==> ERROR: specified kernel image does not exist: '/boot/vmlinuz-5.15-x86_64'
==> Building image from preset: /etc/mkinitcpio.d/linux515.preset: 'fallback'
  -> -k /boot/vmlinuz-5.15-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.15-x86_64-fallback.img -S autodetect --microcode /boot/*-ucode.img
==> ERROR: specified kernel image does not exist: '/boot/vmlinuz-5.15-x86_64'
==> Building image from preset: /etc/mkinitcpio.d/linux61.preset: 'default'
  -> -k /boot/vmlinuz-6.1-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-6.1-x86_64.img --microcode /boot/*-ucode.img
==> ERROR: specified kernel image does not exist: '/boot/vmlinuz-6.1-x86_64'
==> Building image from preset: /etc/mkinitcpio.d/linux61.preset: 'fallback'
  -> -k /boot/vmlinuz-6.1-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-6.1-x86_64-fallback.img -S autodetect --microcode /boot/*-ucode.img
==> ERROR: specified kernel image does not exist: '/boot/vmlinuz-6.1-x86_64'

I have timeshift and is on btrfs, they should include them right? since the mount is on /boot/efi not /boot
But timeshift also requires reboot, if I recall correctly.

Usually your microcode, kernels and initramfs.
Ex, for me :

$ ls /boot | col

(also note the kver or system.map files that go along with the kernels)

In your case you can probably run dracut or mkinitcpio to get them again. ex:

sudo mkinitcpio -P

And of course run sudo update-grub again.

If you are otherwise missing them still … try to reinstall the according kernel(s) and then attempt above.

You can see in my first comment that all my kernels are gone.

I need to reinstall the kernels, but cant seem to find how.

re install kernels 5.15, 6.1 and XXX-ucode

This is the problem

mhwd-kernel -li                                                                                                                                                                                      ✔ 
Currently running: 6.1.31-2-MANJARO (linux61)
The following kernels are installed in your system:
   * linux515
   * linux61
ls -l /boot                                                                                                                                                                                          ✔ 
total 4
drwx------ 3 root root 4096 Jan  1  1970 efi
drwxr-xr-x 1 root root  112 Jul  2 05:01 grub

Should I just install like I dont have them?

They arent really. Those vmlinuz images are in /usr/lib/modules

But I did suggest to reinstall them first. Simply because of ease-of-use thanks to hooks and such.

But … to further clarify … you could get them manually from … ex:


But … I cant double check the way mkinit does it now as I use dracut … which functionally does just that with some renaming.

Double checking

I should do sudo mhwd-kernel -i linux515 and 61
sudo mhwd-kernel -i linux515 rmc

I like that WAY better
Can I just copy what is in there?

To clarify, only the files in /boot disapeared. The mount reported as “busy” so I think the efi is fine

Your paths may be different … and the resulting files should be something the other tools expect…


Afterwards of course run the mkinitcpio and update-grub.

I have these in //usr/lib/modules

drwxr-xr-x 1 root root 538 Jun  5 20:33 5.15.114-2-MANJARO
drwxr-xr-x 1 root root 538 Jun  4 18:55 6.1.31-2-MANJARO
drwxr-xr-x 1 root root 182 Jun  5 20:33 extramodules-5.15-MANJARO
drwxr-xr-x 1 root root 182 Jun  4 18:54 extramodules-6.1-MANJARO

So you likely have


Which you want to put as


At least thats the nomenclature used here.

Oh yeah. those .kver files. They are just text files with “$kver x64” in them, ex:


6.1.31-2-MANJARO x64

I don’t

I’ll just reinstall and hope for the best, worst case scenario, I use my backup from a few days ago.

But try with another timeshift before ofc.

But should I remove the old kernel when installing, and should I install the older first?

Just do the install.

sudo mhwd-kernel -i linux61
sudo mhwd-kernel -i linux61                                                                                                                                                                          ✔ 
Error: You can't reinstall your current kernel. Please use 'pacman -Syu' instead to update.

Doing that generated nothing, and still cant install. :-S

Then use pacman

sudo pacman -Syu linux61 linux61-headers

OMFG, ofc that’s what they mean. It’s 5.48 am here, and I WAS GOING TO BED, but then I made this !“#!”# mistake, it’s installing. I’ll keep you posted.

Thank god, that worked.
Do I do the same thing for the other LTS kernel? tbh, I have never used it, only have it because I have read that it is recomended to have 2 kernels. Not that that matters if you rm -rf boot thoug… xD

Yeah do the same for any other kernel … or take it as an opportunity to remove it, ex:

sudo mhwd -r linux515

I do suggest people keep more than 1 for just in case.
But if 6.1 is very stable for you … then maybe you would like to consider that your ‘kept LTS’ and add something a little more experimental, ex:

sudo mhwd-kernel -i linux63

Challenge accepted.

But not today, this was adventure enough.
I’ll just uninstall this one and travel the land of dragons tomorrow. xD
You are awesome!

1 Like

Furher information and a thank to @cscs again who held my hand.

I was DEAD tired when this happened.

I have never really used timeshift to restore, I only set it up to do its thing in the background when I installed Manjaro.

When booting up today I realized the mem tester was missing from grub.

So when I was back on my system I checked timeshift and there is a browse button!! :rofl:
I was sniffing on it last night (this morning) but never went deeper, my brain was not working.
But I could have just done that, browse the files in boot and restore them, would not even have to restore the full snapshot.

But thank you again!!!