#865 Issue closed
: EFI bootable ISO image / status - discussion¶
Labels: support / question
, fixed / solved / done
abbbi opened issue at 2016-06-06 12:27:¶
hi guys,
sorry if this is again discussing EFI / UEFI situation. Some of our
customers run systems
on UEFI/EFI hardware, currently im not in the situation to have the
right hardware to test,
(what will change) so i went on with a vmware virtual machine in EFI
mode with SLES12
installed. I just need some input here no real bugs found so far.
How is the general workflow here? I expected a EFI bootable ISO Image to
be created, however
the mkrescue with REAR version 1.18 created a image only bootable in
legacy BIOS. Is there
a configuration value which changes that? I miss to see the whole point
on what is necessary and possible with version 1.18 on hardware or
virtual machines with EFI/UEFI boot, especially with SLES12 based
installations.
jsmeix commented at 2016-06-06 12:44:¶
In short:
To create a EFI bootable ISO image on SLE12 you need the
ebiso
software plus that entry in /etc/rear/local.conf
ISO_MKISOFS_BIN=/usr/bin/ebiso
See the comments in the file
usr/share/rear/conf/examples/SLE11-SLE12-SAP-HANA-UEFI-example.conf
which are a bit outdated because nowadays you do not need
a rear "development snapshot" because rear 1.18 is o.k.
abbbi commented at 2016-06-06 12:45:¶
yes
i just stumbled about the HANA-UEFI example, sorry! I will give it a try
:)
In special, i is mostly SAP HANA customers having this demand currently
:)
jsmeix commented at 2016-06-06 12:52:¶
Regardless that the rear 1.18 release should be o.k.
there are noteworthy enhancements in the current
rear Github master regarding create a EFI bootable
ISO image with ebiso.
In particular the pull request #816 from gozora/master
Now we determine EFI virtual disk size automatically
which greately simplifies and cleanups the code
creating an UEFI bootable iso image.
It was triggered by
https://github.com/rear/rear/issues/810
abbbi commented at 2016-06-06 12:57:¶
hi, thanks but currently i have to go with 1.18 here. I set the
following local.conf for a
STOCK SLES12SP1 default installation on VMWARE with Boot mode EFI
ISO_MKISOFS_BIN=/usr/bin/ebiso
REQUIRED_PROGS=( "${REQUIRED_PROGS[@]}" snapper chattr lsattr )
COPY_AS_IS=( "${COPY_AS_IS[@]}"
/usr/lib/snapper/installation-helper
/etc/snapper/config-templates/default )
BACKUP_PROG_INCLUDE=( '/var/tmp/' '/srv/' '/var/lib/pgsql/'
'/var/spool/' '/var/lib/libvirt/images/' '/var/opt/' '/tmp/'
'/var/lib/named/' '/var/log/' '/boot/grub2/i386/'
'/var/lib/mariadb/' '/home/' '/var/lib/mailman/' '/opt/'
'/usr/local/' '/boot/grub2/x86_64/' )
EXCLUDE_RECREATE=( "${EXCLUDE_RECREATE[@]}" 'fs:/var/tmp' 'fs:/srv'
'fs:/var/lib/pgsql' 'fs:/var/spool' 'fs:/var/lib/libvirt/images'
'fs:/var/opt' 'fs:/tmp' 'fs:/.snapshots' 'fs:/var/lib/named'
'fs:/var/log' 'fs:/boot/grub2/i386' 'fs:/var/lib/mariadb' 'fs:/home'
'fs:/var/crash' 'fs:/var/lib/mailman' 'fs:/opt' 'fs:/usr/local'
'fs:/boot/grub2/x86_64' )
still the iso image is not bootable from the EFI bios. Logfile looks ok, it used ebiso:
++ /usr/bin/ebiso -v -o /var/opt/sesam/var/lib/rear/var/lib/rear/output/rear-rear-test.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -R -J -volid RELAXRECOVER -v -iso-level 3 .
gozora commented at 2016-06-06 13:50:¶
@abbbi something went wrong there. Those options are not valid for ebiso. Maybe something changed in SLES12 and rear did not recognized that this is EFI based system?
There is set of checks in
/usr/share/rear/output/ISO/Linux-i386/25_populate_efibootimg.sh
which
must pass so rear can consider OS EFI based. If all of these checked
pass, variable USING_UEFI_BOOTLOADER
is set to 1.
Can you check what is value of this variable when you run rear on your
system?
gozora commented at 2016-06-06 13:56:¶
@abbbi one more thing that could actually cause the problem.
Do you have ebiso installed on your system?
abbbi commented at 2016-06-06 13:57:¶
hi,
the USING_UEFI_BOOTLOADER was set to 0, also it complained about the SYSFS file structure, i could make it work with the following options set:
USING_UEFI_BOOTLOADER=1
SYSFS_DIR_EFI_VARS=/sys/firmware/efi/vars
ISO_MKISOFS_BIN=/usr/bin/ebiso
REQUIRED_PROGS=( "${REQUIRED_PROGS[@]}" snapper chattr lsattr )
COPY_AS_IS=( "${COPY_AS_IS[@]}"
/usr/lib/snapper/installation-helper
/etc/snapper/config-templates/default )
BACKUP_PROG_INCLUDE=( '/var/tmp/' '/srv/' '/var/lib/pgsql/'
'/var/spool/' '/var/lib/libvirt/images/' '/var/opt/' '/tmp/'
'/var/lib/named/' '/var/log/' '/boot/grub2/i386/'
'/var/lib/mariadb/' '/home/' '/var/lib/mailman/' '/opt/'
'/usr/local/' '/boot/grub2/x86_64/' )
EXCLUDE_RECREATE=( "${EXCLUDE_RECREATE[@]}" 'fs:/var/tmp' 'fs:/srv'
'fs:/var/lib/pgsql' 'fs:/var/spool' 'fs:/var/lib/libvirt/images'
'fs:/var/opt' 'fs:/tmp' 'fs:/.snapshots' 'fs:/var/lib/named'
'fs:/var/log' 'fs:/boot/grub2/i386' 'fs:/var/lib/mariadb' 'fs:/home'
'fs:/var/crash' 'fs:/var/lib/mailman' 'fs:/opt' 'fs:/usr/local'
'fs:/boot/grub2/x86_64' )
~
and was also able boot the REAR iso image (at least with the SAFEBOOT option, in the regular one it couldnt find initrd/kernel)
jsmeix commented at 2016-06-07 08:19:¶
@abbbi attention regarding "EXCLUDE_RECREATE" !
In short:
With rear >= 1.17 do no longer use EXCLUDE_RECREATE
in /etc/rear/local.conf for btrfs subvolumes.
Excluding btrfs subvolumes via EXCLUDE_RECREATE was
only needed in our SLE12-specific RPM package "rear116"
(with SLE12-specific adaptions for btrfs support)
but it leads to falsely excluded btrfs subvolumes from
the backup (and restore) for all newer rear versions
(i.e. since rear 1.17), see
https://github.com/rear/rear/issues/821
in particular see
https://github.com/rear/rear/issues/821#issuecomment-215071027
The SLE* btrfs example config files are fixed in the current
rear Github master, see
https://github.com/rear/rear/pull/824
jsmeix commented at 2016-06-07 08:28:¶
@abbbi
regarding USING_UEFI_BOOTLOADER and SYSFS_DIR_EFI_VARS:
Normally this should be set automatically in the
usr/share/rear/prep/default/32_include_uefi_env.sh
script (note my "FIXME:" therein) - at least in the
current rear GitHub master.
I would really appreciate it if you could at least test
if the current rear GitHub master works better for you.
Can you test the current rear GitHub master?
abbbi commented at 2016-06-07 10:24:¶
@jsmeix : Thanks for all your input.
I have tested it with the actual git and it detects UEFI correctly if local.conf is set to:
OUTPUT=ISO
ISO_MKISOFS_BIN=/usr/bin/ebiso
rear-test:~/rear-git # ./usr/sbin/rear mkrescue -v -D
[..]
Using UEFI Boot Loader for Linux (USING_UEFI_BOOTLOADER=1)
The first boo toption (no Secure boot) is however broken, i will create another issue for that.
jsmeix commented at 2016-06-07 11:50:¶
With https://github.com/rear/rear/issues/865#issuecomment-224240310 I consider the issue sufficiently solved.
Regarding the non-working "no Secure boot" of the
recovery system there is
https://github.com/rear/rear/issues/866
@gozora
many thanks for your help here!
[Export of Github issue for rear/rear.]