#1689 Issue closed: ReaR recovery system in /tmp/rear.random/rootfs is broken: 'ldd /bin/bash' failed

Labels: support / question, fixed / solved / done

StarT3 opened issue at 2018-01-11 08:05:

Hello

Relax-and-Recover 2.3 / 2017-12-20
Got it from
sh -c "echo 'deb http://download.opensuse.org/repositories/Archiving:/Backup:/Rear/xUbuntu_14.04/ /' > /etc/apt/sources.list.d/rear.list" & apt-get install rear
Ubuntu 14.04.4 LTS
config part mostly default except:

OS_VENDOR=Ubuntu
OS_VERSION=14.04
BACKUP=BAREOS
OUTPUT=ISO
BAREOS_CLIENT="vm544617-fd"
OUTPUT_URL=nfs://"some ip here"/bareos

* Are you using legacy BIOS or UEFI boot? Not sure, vm on hyper-v, should be BIOS as Ubuntu 14 does not support Gen2 VM under Hyper-v.

* Brief description of the issue:
While creating mkrescue, i've got error 'ReaR recovery system in '/tmp/rear.Vg2RenPJRWcnylR/rootfs' is broken: 'ldd /bin/bash' failed' There is no real bug, just misconfiguration of my server. I'm not so familiar with linux.

root@vm544617:~# rear -d -D -v mkrescue
Relax-and-Recover 2.3 / 2017-12-20
Using log file: /var/log/rear/rear-vm544617.log
Creating disk layout
Using guessed bootloader 'GRUB'
Creating root filesystem layout
Copying logfile /var/log/rear/rear-vm544617.log into initramfs as '/tmp/rear-vm544617-partial-2018-01-11T10:36:23+0300.log'
Copying files and directories
Copying binaries and libraries
Copying kernel modules
Copying all files in /lib*/firmware/
ERROR: 
====================
BUG in /usr/share/rear/build/default/980_verify_rootfs.sh line 29:
'ReaR recovery system in '/tmp/rear.Vg2RenPJRWcnylR/rootfs' is broken: 'ldd /bin/bash' failed'
--------------------
Please report this issue at https://github.com/rear/rear/issues
and include the relevant parts from /var/log/rear/rear-vm544617.log
preferably with full debug information via 'rear -d -D mkrescue'
====================
Aborting due to an error, check /var/log/rear/rear-vm544617.log for details
You should also rm -Rf /tmp/rear.Vg2RenPJRWcnylR
Terminated

And here is the part of log file

2018-01-11 10:36:31.589289699 Including build/default/980_verify_rootfs.sh
2018-01-11 10:36:31.591107999 Entering debugscripts mode via 'set -x'.
+ source /usr/share/rear/build/default/980_verify_rootfs.sh
+++ filesystem_name /tmp/rear.Vg2RenPJRWcnylR/rootfs
+++ local path=/tmp/rear.Vg2RenPJRWcnylR/rootfs
++++ awk 'END { print $6 }'
++++ df -Pl /tmp/rear.Vg2RenPJRWcnylR/rootfs
+++ local fs=/tmp
+++ [[ -z /tmp ]]
+++ echo /tmp
++ local rootfs_dir_fs_mountpoint=/tmp
++ grep -qE '^\S+ /tmp \S+ \S*\bnoexec\b\S* ' /proc/mounts
++ Log 'Testing that /tmp/rear.Vg2RenPJRWcnylR/rootfs contains a usable system'
+++ date '+%Y-%m-%d %H:%M:%S.%N '
++ local 'timestamp=2018-01-11 10:36:31.607589799 '
++ test 1 -gt 0
++ echo '2018-01-11 10:36:31.607589799 Testing that /tmp/rear.Vg2RenPJRWcnylR/rootfs contains a usable system'
2018-01-11 10:36:31.607589799 Testing that /tmp/rear.Vg2RenPJRWcnylR/rootfs contains a usable system
++ chroot /tmp/rear.Vg2RenPJRWcnylR/rootfs /bin/bash -c true
++ Log 'Testing '\''ldd /bin/bash'\'' to ensure '\''ldd'\'' works for the subsequent '\''ldd'\'' tests'
+++ date '+%Y-%m-%d %H:%M:%S.%N '
++ local 'timestamp=2018-01-11 10:36:31.612424799 '
++ test 1 -gt 0
++ echo '2018-01-11 10:36:31.612424799 Testing '\''ldd /bin/bash'\'' to ensure '\''ldd'\'' works for the subsequent '\''ldd'\'' tests'
2018-01-11 10:36:31.612424799 Testing 'ldd /bin/bash' to ensure 'ldd' works for the subsequent 'ldd' tests
++ chroot /tmp/rear.Vg2RenPJRWcnylR/rootfs /bin/ldd /bin/bash
chroot: failed to run command '/bin/ldd': No such file or directory
++ KEEP_BUILD_DIR=1
++ BugError 'ReaR recovery system in '\''/tmp/rear.Vg2RenPJRWcnylR/rootfs'\'' is broken: '\''ldd /bin/bash'\'' failed'
+++ CallerSource

When i manually run

root@vm544617:/var/log/rear# chroot /tmp/rear.Vg2RenPJRWcnylR/rootfs
bash: tty: command not found
RESCUE vm544617:/ #

No other bash commands running - command not found for everyone. ldd /bin/bash - command not found.
Googling does not help. I believe there should be simple solution, however i could not find it yet.

jsmeix commented at 2018-01-11 11:27:

Only a guess:
Try without

OS_VENDOR=Ubuntu
OS_VERSION=14.04

see OS_VENDOR and OS_VERSION in
usr/share/rear/conf/default.conf

gozora commented at 2018-01-11 11:56:

@StarT3 if https://github.com/rear/rear/issues/1689#issuecomment-356907302 does not work for you, please run rear -d -D mkbackup and attach here newly created log (from /var/log/rear/).

V.

StarT3 commented at 2018-01-11 13:32:

rear-vm544617.log
@jsmeix unfortunately default config didn't help.
Attached log files.

jsmeix commented at 2018-01-11 13:55:

Yes, right now I tried "rear mkrescue" with

OS_VENDOR=Ubuntu
OS_VERSION=14.04

and it "just worked" for me on my SLES12 test system.

jsmeix commented at 2018-01-11 14:11:

@StarT3
your manual

root@vm544617:/var/log/rear# chroot /tmp/rear.Vg2RenPJRWcnylR/rootfs
bash: tty: command not found

might indicate that perhaps something in etc/profile
(and etc/bash.bashrc is a link to etc/profile)
does not work in your recovery system?

The etc/profile in the recovery system is a copy
of usr/share/rear/skel/default/etc/profile

E.g. there is a 'tty' call in etc/profile but I also have
a matching bin/tty program in my recovery system.

Somehow your recovery system seems to be messed up
but currently I cannot see what it is and I cannot reproduce it
on my test systems.

jsmeix commented at 2018-01-11 14:29:

@StarT3
in your rear-vm544617.log there is

+ source /etc/rear/local.conf
++ KERNEL_FILE=
++ KERNEL_VERSION=3.13.0-139-generic
++ KERNEL_CMDLINE=
++ COPY_KERNEL_PARAMETERS=('net.ifnames' 'biosdevname')
.
.
.
++ DRLM_ID=vm544617

i.e. your local.conf is like a whole default.conf
and I am sure something therein is not right.

Use a usual (small) local.conf where you only set
what you specifically need, see
usr/share/rear/conf/examples

jsmeix commented at 2018-01-11 14:33:

@StarT3
in general how to set up ReaR you may also have a look at
http://relax-and-recover.org/documentation/
and the section "First steps with Relax-and-Recover" in
https://en.opensuse.org/SDB:Disaster_Recovery

StarT3 commented at 2018-01-11 18:12:

Thank you @jsmeix , you were right about minimal config.

OS_VENDOR=Ubuntu
OS_VERSION=14.04
BACKUP=BAREOS
OUTPUT=ISO
BAREOS_CLIENT='name'
OUTPUT_URL=nfs://someip/bareos
USE_STATIC_NETWORKING=n

did the trick.


[Export of Github issue for rear/rear.]