/boot grub2 etc. recovery

Hi all,

on my VPS I wanted to delete (as root) alle folders below my working folder, in fact

rm -r ./*

And because I did this on my smartphone via connectBot ssh app while watching television I somehow “managed” to really perform a

rm -r /*

No excuse, my dumb fault :slight_smile:

Immediately pressed a ctrl-c.

And good luck I (always) have a pretty recent rsnapshot based backup of my VPS.

For the VPS my Hoster provides a (Debian 11 based) “rescue system”. Means, if started I’m getting a slim debian system, can connect via ssh, and have virtual hard disk of my “real” VPS available, for mounting.

So I was able to rsync back all lost file.

EXCEPT everything below /boot, as I forgot loooong ago to include it into my rsnapshot backup config, it never has been snapshot-ed (Yes, I know… always test a backup… did of course check the relevant backuped files like databases etc., but never did a full system recovery, blame on me)

So now, when booting the “real” VPS again, I’m getting the to be expected grub2 “can’t find” / “starting rescue mode” error msgs.

Any hints how to recover this?

P.S:

  • Booting from an OpenSUSE ISO and “repair” etc. does not work, no ISO etc. boot offered by Hoster for this VPS
  • FYI as I have a OpenSUSE Leap 15.6 PC at home, currently using it to write this question, cound I maybe use the file I have on my PC’s /boot??

This also means kernel.

If you have the same kernel version(s), you could copy files in /boot except /boot/initrd*. To recover bootloader you will need chroot into your system anyway, then you will also create initrd.

Or simply chroot and install kernel package, then reinstall bootloader.

If I chroot, I would do this on the Debian 11 rescue system.
Would the reinstall bootloader nevertheless be ok?

[SOLVED]

Everything working fine again.

THANKS !!!