#886 Issue closed: Tumbleweed did not show up at boot after rear recover

Labels: bug, won't fix / can't fix / obsolete

(unknown) opened issue at 2016-06-18 00:17:

  • rear version: Relax-and-Recover 1.18 / Git
  • OS version:
    OS_VENDOR=SUSE_LINUX
    OS_VERSION=
  • rear configuration files:
OUTPUT=USB
USB_DEVICE=/dev/disk/by-label/REAR-000
BACKUP=NETFS
BACKUP_URL=nfs://192.168.1.86/nfs/LinuxBackup/Tumbleweed
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-pc/*' '/var/lib/mariadb/*' '/home/*' '/var/lib/mailman/*' '/opt/*' '/usr/local/*' '/boot/grub2/x86_64-efi/*' '/var/lib/mysql/*' '/var/cache/*' )
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-pc' 'fs:/var/lib/mariadb' 'fs:/var/crash' 'fs:/var/lib/mailman' 'fs:/opt' 'fs:/usr/local' 'fs:/boot/grub2/x86_64-efi' 'fs:/var/lib/mysql' 'fs:/var/cache' )
  • Brief description of the issue
    After rear recover, I could not find the EFI boot entry for Tumbleweed.
  • Work-around, if any
    Run Tumbleweed installation media using upgrade to have the bootloader installed correctly. Part of the rear recover log are:
dracut: *** Creating image file '/boot/initrd-4.6.2-1-default' ***
dracut: *** Creating initramfs image file '/boot/initrd-4.6.2-1-default' done ***
2016-06-17 16:05:37 Recreated initramfs (mkinitrd).
2016-06-17 16:05:37 Including finalize/Linux-i386/21_install_grub.sh
2016-06-17 16:05:37 Including finalize/Linux-i386/22_install_elilo.sh
2016-06-17 16:05:37 Including finalize/Linux-i386/22_install_grub2.sh
2016-06-17 16:05:37 Including finalize/Linux-i386/23_run_efibootmgr.sh
2016-06-17 16:05:37 efibootmgr --create --gpt --disk /dev/sdb --part 1 --write-signature --label "SUSE_LINUX " --loader "\EFI\opensuse\grubx64.efi"
efibootmgr: EFI variables are not supported on this system.
2016-06-17 16:05:37 Problem occurred with creating an efibootmgr entry

gdha commented at 2016-06-18 07:19:

@jsmeix I think you are in the best position to have this checked internally at SuSe?
@ryan-chow Can you confirm that everything was restored correctly, and that only the efibootmgr command failed?

(unknown) commented at 2016-06-18 08:10:

I believe the restore is good. After running the upgrade with the installation media, it works.

(unknown) commented at 2016-06-18 23:36:

I attempt a few backup and recover today. The same site.conf did not restore everything correctly. /opt/* and /usr/local/* were backup but not restored. Applications compiled from source were not restored as well as google-chrome rpm installation.

gdha commented at 2016-06-20 06:17:

@ryan-chow If you define the following 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-pc' 'fs:/var/lib/mariadb' 'fs:/var/crash' 'fs:/var/lib/mailman' 'fs:/opt' 'fs:/usr/local' 'fs:/boot/grub2/x86_64-efi' 'fs:/var/lib/mysql' 'fs:/var/cache' ) then you explicitly asked for not restoring /opt/ and /usr/local directories (and everything below it).

jsmeix commented at 2016-06-20 10:07:

Regarding EXCLUDE_RECREATE on SUSE systems with btrfs
see https://github.com/rear/rear/issues/821
in particular see https://github.com/rear/rear/issues/821#issuecomment-215071027

Regarding "rear recover" log message

2016-06-17 16:05:37 efibootmgr --create --gpt --disk /dev/sdb --part 1 --write-signature --label "SUSE_LINUX " --loader "\EFI\opensuse\grubx64.efi"
efibootmgr: EFI variables are not supported on this system.
2016-06-17 16:05:37 Problem occurred with creating an efibootmgr entry

I can currently not really help because basically I have
no knowledge in (U)EFI and tools like efibootmgr.

By dumb Googling for
"efibootmgr: EFI variables are not supported on this system"
I found
http://unix.stackexchange.com/questions/91620/arch-linux-grub-install-efi-variables-are-not-supported-on-this-system
that reads (excerpt):

The problem was simply that the efivars kernel module
was not loaded.

which matches what "man efibootmgr" tells
(except on my Leap 42.1 machine):

Note: efibootmgr requires that the kernel support access to
EFI non-volatile variables (through /proc/efi/vars on 2.4 kernels,
/sys/firmware/efi/vars on 2.6 kernels).
modprobe efivars
should do the trick.

@ryan-chow
in the rear recovery system
is the efivars kernel module loaded
and if not does it help to do
"modprobe efivars"
before you run "rear recover"?

As far as I see in the rear code it should do "modprobe efivars"
usually automatically but perhaps something is unusual on
Tumbleweed?

jsmeix commented at 2016-06-20 11:20:

@gdha
as far as I see "modprobe efivars" is only called in
prep/default/32_include_uefi_env.sh
which is run during "rear mkrescue/mkbackup"
but
during "rear recover" it seems there is no script run
where "modprobe efivars" is done.

Accordingly it seems "modprobe efivars" could be
really missing during "rear recover"?

didacog commented at 2016-06-20 11:38:

Hi,

Did you try setting USING_UEFI_BOOTLOADER=1 in /etc/rear/local.conf?
Usually, we set this option on all UEFI based systems.

gdha commented at 2016-06-20 12:15:

@didacog The variable USING_UEFI_BOOTLOADER= is automatically set by rear on UEFI systems.
@jsmeix I am not aware of the fact that modprobe efivars is required during recovery?
If @ryan-chow could test it out then we are sure of it...

didacog commented at 2016-06-20 12:58:

@gdha true, I had problems without forcing it on previous versions of rear :P (rear 1.15 I think).
This is the reason I suggested to force it, but this issue is on rear 1.18.

(unknown) commented at 2016-06-20 21:26:

@gdha @jsmeix removal of EXCLUDE_RECREATE for btrfs subvolumes corrects my restore problem.
@didacog USING_UEFI_BOOTLOADER=1 did not help in ebibootmgr entry creation.
@jsmeix 'modprobe efivars' did not do the trick too.

(unknown) commented at 2016-06-30 04:30:

@gdha @jsmeix efibootmgr demonstrated the same problem on restoring Fedora 24 (LVM default) but could boot with no repair work. The recoverd system has two entries from EFI boot menu, i.e. Fedora and UEFI OS, and they are identiical. Restoring Tumbleweed (LVM default without separate /boot partition) was the same as on btrfs, which could be boot after upgrade with the installation media. I believe 23_run_efibootmgr.sh could be the problem.

gdha commented at 2016-09-22 10:27:

@ryan-chow is there still an issue? Or are we good to close this case?

(unknown) commented at 2016-09-22 20:10:

@gdha : Thank you for asking. I give up already since Jun 29. Please close the case.


[Export of Github issue for rear/rear.]