#2590 Issue closed: failed to install the boot loader correctly during recovery process on my ubuntu LUKS disk encryption method

Labels: support / question, no-issue-activity

cvijayvinoth opened issue at 2021-03-24 12:18:

Relax-and-Recover (ReaR) Issue Template

Fill in the following items before submitting a new issue
(quick response is not guaranteed with free support):

  • ReaR version ("/usr/sbin/rear -V"):
    Relax-and-Recover 2.6 / Git

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

Distributor ID: Ubuntu
Description:    Ubuntu 20.04.2 LTS
Release:        20.04
Codename:       focal
  • ReaR configuration files ("cat /etc/rear/site.conf" and/or "cat /etc/rear/local.conf"):
OUTPUT=ISO
BACKUP=RSYNC
RSYNC_PREFIX="diskimage_${HOSTNAME}"
OUTPUT_URL=rsync://diskimage@192.168.1.123::rsync_backup
BACKUP_URL=rsync://diskimage@192.168.1.123::rsync_backup
BACKUP_RSYNC_OPTIONS+=(-z --progress --password-file=/var/www/html/imageBackup/user_profile/diskimage/rsync_pass)
ISO_DIR="/var/www/html/imageBackup/iso/$HOSTNAME"
MESSAGE_PREFIX="$$: "
PROGRESS_MODE="plain"
AUTOEXCLUDE_PATH=( /tmp )
PROGRESS_WAIT_SECONDS="1"
export TMPDIR="/var/www/html/imageBackup/iso/"
PXE_RECOVER_MODE=automatic
ISO_FILES=("/var/www/html/imageBackup/rsync")
ISO_PREFIX="${HOSTNAME}"
ISO_DEFAULT="automatic"
REQUIRED_PROGS=( "${REQUIRED_PROGS[@]}" /usr/sbin/dmsetup )
BACKUP_PROG_EXCLUDE=("${BACKUP_PROG_EXCLUDE[@]}" '/var/tmp/*' '/var/crash')
LUKS_CRYPTSETUP_OPTIONS+=" --force-password"
PRE_RECOVERY_SCRIPT="bash /etc/rear/pre_recovery.sh"
  • Hardware (PC or PowerNV BareMetal or ARM) or virtual machine (KVM guest or PoverVM LPAR):
    virtual machine

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

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

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

  • Storage layout ("lsblk -ipo NAME,KNAME,PKNAME,TRAN,TYPE,FSTYPE,SIZE,MOUNTPOINT" or "lsblk" as makeshift):

NAME                  MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
loop0                   7:0    0    55M  1 loop  /snap/core18/1880
loop1                   7:1    0  62.1M  1 loop  /snap/gtk-common-themes/1506
loop2                   7:2    0  64.8M  1 loop  /snap/gtk-common-themes/1514
loop3                   7:3    0  49.8M  1 loop  /snap/snap-store/467
loop4                   7:4    0   219M  1 loop  /snap/gnome-3-34-1804/66
loop5                   7:5    0 255.6M  1 loop  /snap/gnome-3-34-1804/36
loop6                   7:6    0    51M  1 loop  /snap/snap-store/518
loop7                   7:7    0  32.3M  1 loop  /snap/snapd/11107
loop8                   7:8    0  55.5M  1 loop  /snap/core18/1988
loop10                  7:10   0  32.3M  1 loop  /snap/snapd/11402
sda                     8:0    0   100G  0 disk
├─sda1                  8:1    0   512M  0 part  /boot/efi
├─sda2                  8:2    0     1K  0 part
├─sda5                  8:5    0   731M  0 part  /boot
└─sda6                  8:6    0  98.8G  0 part
  └─sda6_crypt        253:0    0  98.8G  0 crypt
    ├─vgubuntu-root   253:1    0  97.8G  0 lvm   /
    └─vgubuntu-swap_1 253:2    0   976M  0 lvm   [SWAP]
sr0                    11:0    1  1024M  0 rom
  • Description of the issue (ideally so that others can reproduce it):
    failed to install the bootloader during the recovery process.
    LUKS disk encryption is there on my ubuntu machine.

  • Workaround, if any:

  • Attachments, as applicable ("rear -D mkrescue/mkbackup/recover" debug log files): rear -D recover
    vijay-ubuntu-20.04.txt

jsmeix commented at 2021-03-24 13:42:

@cvijayvinoth
only a quick first reply (I did not yet look at the details):

I guess Ubuntu 20.04.2 LTS uses LUKS2
but LUKS2 support is not in ReaR 2.6 which was released in June 2020
cf. https://github.com/rear/rear/issues/2204
and https://github.com/rear/rear/pull/2504 which was merged in Oct. 2020

So I would recommend to first and foremost do what is described in the section
"Testing current ReaR upstream GitHub master code" in
https://en.opensuse.org/SDB:Disaster_Recovery

cvijayvinoth commented at 2021-03-25 05:13:

@jsmeix : Yes I am testing with latest build only.

jsmeix commented at 2021-03-26 11:51:

@cvijayvinoth
I am not a Ubuntu user so I cannot reproduce your issue.

Your https://github.com/rear/rear/files/6197025/vijay-ubuntu-20.04.txt
contains (excerpts):

... Determining where to install GRUB2 (no GRUB2_INSTALL_DEVICES specified)
... Found possible boot disk /dev/sda - installing GRUB2 there
grub-install: error: invalid modinfo file `/usr/lib/grub/i386-pc/modinfo.sh'.
... Failed to install GRUB2 on possible boot disk /dev/sda
... Failed to install GRUB2 - you may have to manually install it
...
For this system
Ubuntu/20.04 on Linux-i386 (based on Debian/20.04/i386)
there is no code to install a boot loader on the recovered system
or the code that we have failed to install the boot loader correctly.
...
You can use 'chroot /mnt/local bash --login'
to change into the recovered system and
manually install a boot loader therein.

I think you need to find out the reason why grub-install failed with

error: invalid modinfo file `/usr/lib/grub/i386-pc/modinfo.sh'.

Note that grub-install is run within the restored target system via chroot /mnt/local
so the invalid modinfo file /usr/lib/grub/i386-pc/modinfo.sh
is the one within the restored target system.

Furthermore your https://github.com/rear/rear/files/6197025/vijay-ubuntu-20.04.txt
contains tons of errors like

modinfo: ERROR: could not get modinfo from ... Exec format error

depmod: ERROR: failed to load symbols from ... Exec format error

(there are 530 'Exec format error' messages in your log file)
while /usr/share/rear/finalize/Debian/i386/550_rebuild_initramfs.sh
is run which does not look normal.

cvijayvinoth commented at 2021-03-30 04:42:

ok let me check once.

github-actions commented at 2021-05-30 04:29:

Stale issue message


[Export of Github issue for rear/rear.]