Hi all,

I’m having a bad day and did something colossally stupid, deleting everything from /boot/.

The system is still running. What do you think my best course of action is?

My current idea is to create a timeshift backup, reinstall debian from USB, then restore from backup in timeshift

If this won’t work or you have a better idea I would really appreciate your advice.

Thanks in advance

    • far_university190
      link
      fedilink
      English
      arrow-up
      10
      ·
      edit-2
      4 months ago

      probably something like apt reinstall linux-image-...

      To find …, run apt list --installed | grep linux-image and pick one

      Edit: also if need current kernel, can see booted kernel name using uname -a

    • pastermil@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      5
      ·
      4 months ago

      Can’t find an article for it at the moment, but I can tell you real quick how I would’ve done it.

      Use aptitude and look for linux-image-amd64 or something under Installed -> kernel. The exact name might be a bit different.

      View the package and look under the Version and check out the one that’s marked ‘i’ (for installed). Select that package and mark it to reinstall (shortcut ‘L’).

      Then finally execute it (shortcut ‘g’ and then ‘g’ again).

      • Negligent_Embassy@links.hackliberty.orgOP
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        4 months ago

        Ok thanks again for all the help.

        1. I used aptitude to reinstall the kernel, L, g, g

        2. Ran Grub-install /dev/nvme1n1

        3. Ran update-grub

        4. I installed grub-emu to test and am greeted with this error

        https://dump.li/image/get/16c4f87164d630a5.png

        Brand new to this tool so apologies if I’m interpreting it wrong.

        Still waiting on data to backup but I’m scared to reboot now. Any thoughts?

        The boot drive has LUKS FDE if that could be what’s confusing it

        • pastermil@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          3
          ·
          4 months ago

          Not sure if this is a good way to test as it cannot seem to recognize even the most basic command like linux & initrd.

          If I were you, I’d just restart, with a liveUSB ready in case it turns out to be unbootable.

          Perhaps just a bit to make sure before rebooting:

          • you can see the linux kernel you just installed in the /boot directory
          • /boot/grub/ directory exist
          • you’re using the correct grub-install command, depending on whether you’re using legacy BIOS or UEFI