Rescshri is a shortcut from the combination of the first four letters of the words “rescue” and “shrink”. It is a Linux initram micro-distribution used to shrink the main system partitions on VPS servers.
Additionally, below, directly from the browser, and only using the Javascript and the resources of your computer, you will create a virtual machine with the full version of this micro-distribution, with a test virtual hard disk residing in RAM, on which you can test the partition shrinking operation. All you have to do is to run the guide with the tutorial command just after the full Linux start-up procedure.
* Waiting time: approx. 1 minute :)
It is possible to shrink the system partition by disabling all services and after transferring the root to RAM using pivot_root – however, this is quite problematic and time-consuming. This is where the rescshri comes in handy.
After restarting the server, we will get access to a smaller version of Linux residing in RAM, containing all the tools necessary to safely reduce/expand the partition and to perform rescue operations on the disks.
Installation of rescshri
- Download amd64 or i686 rescshri mini-distribution.
- Unpack rescshri.img to directory /boot.
- Copy the start entry from grub.cfg to the end of file /etc/grub.d/40_custom.
- Replace the reference at initrd to /boot/rescshri.img and give the name “rescshri” to this menu entry. Example 40_custom:
#!/bin/sh
exec tail -n +3 $0
menuentry 'rescshri' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-f8e7d7ab-ada4-4c98-a73a-450fefb6ff64' {
# other menuentry items here ...
linux /boot/vmlinuz-4.9.0-4-amd64 root=UUID=f8e7d7ab-ada4-4c98-a73a-450fefb6ff64 ro quiet
initrd /boot/rescshri.img
} - Run update-grub.
- Restart the system by holding down the shift key and select rescshri from the list.
- You can use the project on GitHub to add new programs to this mini-distribution.
I used Fabian Hemmer’s x86 software (after slight, innovative modifications) to virtualize Live Demo :)