#3195 Issue closed: rear mkopalpba fails

Labels: bug, fixed / solved / done, won't fix / can't fix / obsolete

edmcman opened issue at 2024-04-04 19:53:

  • ReaR version ("/usr/sbin/rear -V"):

Relax-and-Recover 2.7 / Git

ffdea7e7

  • If your ReaR version is not the current version, explain why you can't upgrade:

  • OS version ("cat /etc/os-release" or "lsb_release -a" or "cat /etc/rear/os.conf"):

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.3 LTS
Release:    22.04
Codename:   jammy
  • ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"):
OUTPUT=RAWDISK
OUTPUT_URL="file:///var/lib/rear/output"
SECURE_BOOT_BOOTLOADER="/boot/efi/EFI/ubuntu/shimx64.efi"
  • Hardware vendor/product (PC or PowerNV BareMetal or ARM) or VM (KVM guest or PowerVM LPAR):

System 76 PC

  • System architecture (x86 compatible or PPC64/PPC64LE or what exact ARM device):

x86

  • Firmware (BIOS or UEFI or Open Firmware) and bootloader (GRUB or ELILO or Petitboot):

Open Firmware, GRUB

  • Storage (local disk or SSD) and/or SAN (FC or iSCSI or FCoE) and/or multipath (DM or NVMe):

NVMe

  • Storage layout ("lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,LABEL,SIZE,MOUNTPOINT"):
/dev/nvme1n1       /dev/nvme1n1                  nvme   disk                         1.9T 
`-/dev/nvme1n1p1   /dev/nvme1n1p1 /dev/nvme1n1   nvme   part  vfat        OPAL PBA    99M 
/dev/nvme0n1       /dev/nvme0n1                  nvme   disk                       465.8G 
|-/dev/nvme0n1p1   /dev/nvme0n1p1 /dev/nvme0n1   nvme   part  vfat        EFI        512M /boot/efi
|-/dev/nvme0n1p2   /dev/nvme0n1p2 /dev/nvme0n1   nvme   part  ext4                   1.7G /boot
`-/dev/nvme0n1p3   /dev/nvme0n1p3 /dev/nvme0n1   nvme   part  crypto_LUKS          463.6G 
  `-/dev/mapper/nvme0n1p3_crypt
                   /dev/dm-0      /dev/nvme0n1p3        crypt LVM2_member          463.6G 
    |-/dev/mapper/vgubuntu-root
    |              /dev/dm-1      /dev/dm-0             lvm   ext4                 461.7G /
    `-/dev/mapper/vgubuntu-swap_1
                   /dev/dm-2      /dev/dm-0             lvm   swap                   1.9G [SWAP]
  • Description of the issue (ideally so that others can reproduce it):

After updating to the latest git head, I get the following error when running rear mkopalpba. Prior to updating, I did not receive this error on eadcc683.

root@banana:~# rear -d mkopalpba
Relax-and-Recover 2.7 / Git
Running rear mkopalpba (PID 110956 date 2024-04-04 15:48:18)
Command line options: /usr/sbin/rear -d mkopalpba
Using log file: /var/log/rear/rear-banana.log
Using build area: /var/tmp/rear.i338ZwpVcBBJ9za
Setting TMPDIR to '/var/tmp/rear.i338ZwpVcBBJ9za/tmp' (was unset when ReaR was launched)
Running 'init' stage ======================
Running workflow mkopalpba on the normal/original system
Running 'prep' stage ======================
Re-configuring Relax-and-Recover to create a TCG Opal pre-boot authentication (PBA) image
Found EFI system partition /dev/nvme0n1p1 on /boot/efi type vfat
Using UEFI Boot Loader for Linux (USING_UEFI_BOOTLOADER=1)
Using autodetected kernel '/boot/vmlinuz-6.5.0-26-generic' as kernel in the recovery system
Modified ReaR recovery system area after 'prep' stage (/var/tmp/rear.i338ZwpVcBBJ9za/rootfs contains regular files)
Running 'rescue' stage ======================
Creating recovery system root filesystem skeleton layout
Skipping 'docker0': not bound to any physical interface.
Skipping 'lo': not bound to any physical interface.
Handling network interface 'wlp0s20f3'
wlp0s20f3 is a physical device
Handled network interface 'wlp0s20f3'
Skipping 'zcctun0': not bound to any physical interface.
Included current keyboard mapping (via 'dumpkeys -f')
No default US keyboard mapping included (no KEYMAPS_DEFAULT_DIRECTORY specified)
No support for different keyboard layouts (neither KEYMAPS_DEFAULT_DIRECTORY nor KEYMAPS_DIRECTORIES specified)
Using '/boot/efi/EFI/ubuntu/shimx64.efi' as UEFI Secure Boot bootloader file
Running 'build' stage ======================
Copying files and directories
Copying binaries and libraries
A list of executables with their dependencies has been stored in /var/tmp/rear.i338ZwpVcBBJ9za/tmp/executable-dependencies
Copying only currently loaded kernel modules (MODULES contains 'loaded_modules') and those in MODULES_LOAD
Omit copying files in /lib*/firmware/ (FIRMWARE_FILES='no')
Skip copying broken symlink '/etc/mtab' target '/proc/126971/mounts' on /proc/ /sys/ /dev/ or /run/
Skip copying broken symlink '/etc/resolv.conf' target '/run/systemd/resolve/stub-resolv.conf' on /proc/ /sys/ /dev/ or /run/
Testing that the recovery system in /var/tmp/rear.i338ZwpVcBBJ9za/rootfs contains a usable system
Testing each binary with 'ldd' and look for 'not found' libraries within the recovery system
Testing that the existing programs in the PROGS array can be found as executable command within the recovery system
Testing that each program in the REQUIRED_PROGS array can be found as executable command within the recovery system
Running 'pack' stage ======================
Creating recovery/rescue system initramfs/initrd initrd.cgz with gzip default compression
Created initrd.cgz with gzip default compression (68896025 bytes) in 5 seconds
Running 'output' stage ======================
ERROR: Creating a raw disk image requires an EFI bootloader or syslinux
You may use debugscript mode '-D' for full debug messages with 'set -x' output
Aborting due to an error, check /var/log/rear/rear-banana.log for details
Exiting rear mkopalpba (PID 110956) and its descendant processes ...
Running exit tasks
To remove the build area you may use (with caution): rm -Rf --one-file-system /var/tmp/rear.i338ZwpVcBBJ9za
Terminated
  • Workaround, if any:

  • Attachments, as applicable ("rear -D mkrescue/mkbackup/recover" debug log files):

rear-banana.log

edmcman commented at 2024-04-04 20:01:

git bisect results

3db2724c7860e38fad96ba4d35c8b174616c1496 is the first bad commit
commit 3db2724c7860e38fad96ba4d35c8b174616c1496
Author: Pavel Cahyna <pcahyna@redhat.com>
Date:   Mon Mar 4 15:56:53 2024 +0100

    Introduce a variable for GRUB image format

    Use it as the argument of the -O option to
    grub-mkstandalone/grub-mkimage instead of the hardcoded x86_64-efi.

    For easier porting to non-x86_64 EFI platforms.

 usr/share/rear/lib/uefi-functions.sh                   | 18 +++++++++---------
 .../Linux-i386/270_create_grub2_efi_bootloader.sh      |  6 +++---
 usr/share/rear/prep/Linux-arm/330_set_efi_arch.sh      |  2 ++
 usr/share/rear/prep/Linux-i386/330_set_efi_arch.sh     |  3 +++
 4 files changed, 17 insertions(+), 12 deletions(-)

edmcman commented at 2024-04-04 20:03:

Looks like this is the problem: https://github.com/rear/rear/commit/3db2724c7860e38fad96ba4d35c8b174616c1496#r140627966

edmcman commented at 2024-04-04 20:13:

Duplicate of #3191

jsmeix commented at 2024-04-05 12:43:

@edmcman
right now I merged
https://github.com/rear/rear/pull/3192

Please test our current ReaR upstream GitHub master code
as described in the section
https://en.opensuse.org/SDB:Disaster_Recovery#Testing_current_ReaR_upstream_GitHub_master_code
and
please provide feedback here whether or not your issue is then fixed.
I depend on your feedback because I am not a "rear mkopalpba" user.
I don't have a TCG Opal 2-compliant self-encrypting disk.

edmcman commented at 2024-04-05 12:54:

@jsmeix I can confirm this fixed the error. I'll just note here for posterity because of #3194 I can't say that the generated PBA works, but there is one generated now :-)

jsmeix commented at 2024-04-05 12:58:

@edmcman
thank you for your prompt feedback - much appreciated!
Have a nice weekend!


[Export of Github issue for rear/rear.]