LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   LinuxQuestions.org Member Success Stories (https://www.linuxquestions.org/questions/linuxquestions-org-member-success-stories-23/)
-   -   Got SystemRescue installed on a hard drive partition (https://www.linuxquestions.org/questions/linuxquestions-org-member-success-stories-23/got-systemrescue-installed-on-a-hard-drive-partition-4175663955/)

hazel 11-09-2019 04:16 AM

Got SystemRescue installed on a hard drive partition
 
This has been a twinkle in my eye ever since I bought my Lenovo Thinkcentre. The native Windows install included an emergency tools partition, a partition for snapshot storage and one containing a factory version of the system. So a corrupted system could be restored either to a factory reinstall or to a recent snapshot. I thought that was rather cool and wanted to duplicate it on my Linux setup.

The SystemRescue manual gives instructions on how to install to a hard drive, but it assumes GRUB as the bootloader. I am using a mixture of elilo and refind. Grub has the ability to boot files as well as partitions by using a loop device, which isn't surprising because it's basically a cut-down Linux kernel. So you can just copy the whole iso image to the hard drive and boot it from there.

I tried to follow the alternative instructions for installing files from the iso, but they didn't seem to correspond closely to what I found on the disc when I mounted it. You are told to copy over the sysresccd directory but I only found a sysresccd.dat file, which is the squashfs filesystem. So I copied that over along with the kernel (rescue64) and the initrd. Then I tried adapting the command line parameters given in the example to work with refind. No joy! The kernel booted but the init script from the initrd couldn't find the final root partition.

So I unsquashed that squashed filesystem and carefully copied all the toplevel directories over to the root directory of the partition. Then I specified that partition as root in the kernel command line in my refind configuration. And that worked. Now I have built-in rescue tools.

Sometime when I have the energy, I'll try to make them available via Lenovo's emergency boot procedure.

fatmac 11-10-2019 04:32 AM

Think I'll stick to using a rescue pendrive, thankyou. :D

What can be achieved, & what is useful, may not be the same. ;)

hazel 11-10-2019 05:57 AM

Sure, it's not necessary. But I was a bit miffed when I discovered that my new computer came with a built-in rescue and recovery system which only worked in Windows (which of course I had scrubbed). I thought, "You ought to be able to do that in Linux too. It ought to be possible to completely reproduce it in Linux."

I originally wanted to create my own rescue partition using LFS/BLFS. But, as I think I've mentioned in other threads, I've become cheesed off with LFS because of the increasing dependency problems created by the latest software. It just isn't fun any more. That's why I started thinking about installing SystemRescue instead.


All times are GMT -5. The time now is 02:43 AM.