Home > Computer Science > Install System Rescue CD + rEFInd in an USB Stick for EFI

Install System Rescue CD + rEFInd in an USB Stick for EFI

update: with further reading of rEFInd website, I could find a better way to specify more options with only one menu entry. The configuration section was subsequently updated.


This blogpost comes in handy mostly if you have an EFI system (Apple Macbook, but also some Intel based desktops and laptops), and you need a portable USB stick for emergency booting.
I’ve been using System Rescue CD for a long time now, it’s probably one of the best  rescue tools around.
It’s a live Linux distribution that can help restoring not only Linux installations, but Windows and OSX too, has gparted as a partitioning tool, can restore bootloaders (such as grub), has network support and ssh server (so you can use rsync to copy filesystem, control it remotely, browse the web to search for help if you panic) but being a live linux distro it may be used in almost every way you like. You may give a look to their homepage to see details.
It can also be installed in an USB stick, which comes quite in handy as you don’t have to carry a relatively big support as a CDRom; nowadays usb sticks are cheap, small and fairly reliable, I always carry with me a SystemRescue usb stick for emergency repairs.

It might however be problematic using it if you have an EFI/UEFI based system, since SystemRescue CD doesn’t actively support it.
For instance, in a macbook you can boot a system rescue cd, but not from usb stick, as the EFI system can boot usb sticks only if they contains an EFI bootloader.
Which is just annoying if you have a macbook pro, but becomes a real problem if you have a Macbook Air, as they don’t have a CDROM Reader.

Another tool I’ve recently discovered is rEFInd Boot Manager, which is an EFI bootloader capable of discovering other EFI bootloaders. Beside being an excellent bootloader it can also be used as a rescue tool, since it might boot your system if your installed bootloader has been misconfigured.

Since rEFInd can directly boot Linux kernels too, if they’re compiled using EFISTUB option (version >= 3.4), and since System Rescue CD does itself contain a 3.4 kernel, can this help us, combining both of these tools in a single USB Stick?

Of course the answer is yes!

Let’s see how.

First, download System Rescue CD, and install it on the USB Stick using these  instructions.
Now download rEFInd too, just choose the CD-R Image File on their download page.
Extract rEFInd CD-R Image copying all the files into the USB Stick.
Open/EFI/boot/refind.conf and modify it as follows:

  • find the “scanfor” commented out line, and add this one (uncommented, of course):

  • At the end of the file, add the following lines (you may replace “it” with your favourite keymap):

And… that’s it! We’re done! Just try it out, rEFInd will show you the three System Rescue CD options, and the other installed operating systems.

You may of course customize kernel boot arguments with the options supported by System Recue CD.

As an optional step, since EFI is supported manily on x64 machines (that’s why I’ve only added x64 kernel boot options) you may safetly remove the various “*ia32*” files you may see around, which should be “shellia32.efi”, “refind/drivers_ia32″, “refind/refind_ia32.efi”, “EFI/boot/drivers_ia32″, “EFI/boot/bootia32.efi”.

Note: if you have one of the awful new Macbook pro/retina/air, which have serious problems booting linux, you may want to add the options “add_efi_memmap noapic” to properly boot System Rescue CD with EFI. I have already included it in one of the submenus.

, , , , , , , , , , , , , , ,

Comments:1

Leave a Reply
  1. Rispondi Marcello Barnaba marzo 15, 2014

    Recent versions of sysresccd contain an efi bootx64, so refind is not necessary anymore. I’ve booted a MacbookPro5,5 flawlessly from a USB stick built with ./usb_inst.sh. :)

Rispondi

Trackbacks:0

Listed below are links to weblogs that reference
Install System Rescue CD + rEFInd in an USB Stick for EFI from GuLinux $HOME
TOP
%d blogger cliccano Mi Piace per questo: