#764 Issue closed: Switch to grub2 (grub-mkrescue) for creating the recovery ISO image

Labels: enhancement, cleanup, discuss / RFC, no-issue-activity

jsmeix opened issue at 2016-02-10 09:13:

This is an enhancement request for the future that
rear uses only grub2 (and drop using syslinux/isolinux) for
creating its bootable recovery ISO image.

Excerpts from mails from @schlomo from
the mail thread "Convert ISO to USB" on the
Relax-and-Recover users list rear-users@lists.relax-and-recover.org
on 09. February 2016:

From: Schlomo Schapiro
...
Caveat Emptor. There is a hybrid mode
for BIOS boot and another one for EFI boot 
and probably several ways how to combine them.

I did some experiments in this area some time ago.
Bottom line is that I gave up using syslinux/isolinux
and switched over to use grub 2:

http://blog.schlomo.schapiro.org/2013/11/magic-iso-image-booting-with-gnu-grub-2.html

In more recent experiments I found out that
grub-mkrescue already does everything right.
Put some grub configs and grub modules into a
directory and run "grub-mkrescue -o iso-file.iso dir"
to get an ISO that can boot both from
CD/DVD and from USB drive.
If you use BIOS boot.
With EFI I did not manage to get it to boot from USB.
Booting EFI from CD/DVD was really simple.
I only had to add EFI/BOOT/BOOTX64.EFI to the dir.
...
In general, I think that we should slowly start
to think about moving to grub2 in ReaR.
I think that it will make the entire
boot code much much simpler.
From: Schlomo Schapiro
...
Sorry if I was not clear:
* ReaR supports grub2 as a boot manager
   for the recovered system.
* The boot media it creates uses syslinug/isolinux.

When we started to work on ReaR in 2006
there was nothing better than syslinux/isolinux.

We should switch latest when we drop support
for distros that don't ship grub2.
But this is a bigger project.

didacog commented at 2016-02-12 13:36:

@jsmeix

We are working to provide netboot with GRUB2 in DRLM: https://github.com/brainupdaters/drlm/issues/2
Only the kernel and initrd generated by ReaR are needed, without any changes in ReaR, in order to provide Multiarch netboot with GRUB2.

Maybe is not exactly your point, because you are talking about ISO files created directly by ReaR.

schlomo commented at 2016-02-12 13:38:

@didacog nice! Creating an ISO from a working grub2 setup is simple: grub-mkrescue :-)

didacog commented at 2016-02-12 13:54:

@schlomo
I think the problem come if the system with rear installed is not shipped with grub2 as you said.

This could be the problem to use GRUB2 as defalut by now, I think.

From DRLM will be easier to standarize GRUB2 by now, from netboot perspective, because is not needed grub2 in deployed ReaR systems, just providing, kernel and initrd, rear outputs available to netboot GRUB2 images.

OliverO2 commented at 2017-11-29 10:42:

For Grub 2-related problems see also https://github.com/rear/rear/issues/1601#issuecomment-347821092.

Lukey3332 commented at 2018-10-25 16:22:

Just a note: syslinux ISO's can be made bootable via USB using isohybrid, which on debian is included in the syslinux-utils package. I use this in my post-script and it works fine.

gdha commented at 2018-10-26 08:23:

@Lukey3332 Would be a nice section for our FAQ! Would you be so kind to contribute?

github-actions commented at 2020-07-09 01:33:

Stale issue message


[Export of Github issue for rear/rear.]