Revisiting Linux Rescue Partition

In one of my previous posts I discussed how useful it would be to have a partition with an ISO of your operating system on it that you could boot to and “Factory Reset” your Linux PC with.

As it turns out I was greatly overthinking this process, as there’s something out there that can get us partially where we want to be. grml-rescueboot is a script included in a debian (and therefore ubuntu) package by the same name. It provides a script for update-grub which looks for Grml ISO images in /boot/grml and automatically adds an entry for each image.

As it turns out, this script works with any Debian or Ubuntu based ISOs that I’ve tried using so far. Now all you have to do to achieve this rescue partition is:

  1. Install the package with sudo apt install grml-rescueboot
  2. Create an empty partition, and mount it to /boot/grml
  3. Load your ISOs into this partition
  4. run update-grub and watch as new entries magically appear in your grub boot menu!

It’s important to note this script is dynamic and will be run every time update-grub is run, so this partition must be mounted at that time! I would recommend making an fstab entry for this partition and having it be mounted read only so it can’t be tampered with except for the rare occasion you want to update one of the ISOs on it.

Once you finish this process you can now boot into an ISO of your distro if you ever have an emergency (that doesn’t nuke the bootloader) and you can fix things or even reinstall your entire OS right from there!

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.