#1811 Issue closed: /bin/ldd: line 114: /dev/null: Permission denied ( while runing : 980_verify_rootfs.sh)

Labels: support / question, fixed / solved / done

nirmal21s opened issue at 2018-05-17 09:36:

OS Version :Red Hat Enterprise Linux Server release 7.5 (Maipo)
REAR rpm used : rear-2.3-1.el7.x86_64.rpm
Networker client : lgtoclnt-8.2.4.7-1.x86_64

The ISO image has been created sucessfully :

[VIP root@txxxxxxxxx: /tmp]$ rear -v mkrescue
Relax-and-Recover 2.3 / 2017-12-20
Using log file: /var/log/rear/rear-ts.log
Creating disk layout
Using guessed bootloader 'GRUB'
Creating root filesystem layout
Adding net.ifnames=1 to KERNEL_CMDLINE
Adding biosdevname=0 to KERNEL_CMDLINE
Copying logfile /var/log/rear/rear-xxxxxx.log into initramfs as '/tmp/rear-xxxxxx-partial-2018-05-17T11:32:01+0200.log'
Copying files and directories
Copying binaries and libraries
Copying kernel modules
Copying all files in /lib*/firmware/
Creating recovery/rescue system initramfs/initrd initrd.cgz with gzip default compression
Created initrd.cgz with gzip default compression (372195717 bytes) in 45 seconds
Making ISO image
Wrote ISO image: /var/lib/rear/output/rear-nsr-xxxxxxx.iso (363M)
Copying resulting files to file location
Saving /var/log/rear/rear-xxxxxxx.log as rear-xxxxxxxx.log to file location
=========================================================================================================

rear log :

2018-05-17 11:32:16.566046920 Including build/default/980_verify_rootfs.sh
2018-05-17 11:32:16.570772194 Testing that /tmp/rear.pjHKW9ydTePymh9/rootfs contains a usable system
2018-05-17 11:32:16.573951910 Testing 'ldd /bin/bash' to ensure 'ldd' works for the subsequent 'ldd' tests
/bin/ldd: line 114: /dev/null: Permission denied
        linux-vdso.so.1 =>  (0x00007fff9bfca000)
        libtinfo.so.5 => /lib64/libtinfo.so.5 (0x00007f3b7c9af000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f3b7c7ab000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f3b7c3dd000)
        /lib64/ld-linux-x86-64.so.2 (0x0000555b95bec000)
/bin/ldd: line 114: /dev/null: Permission denied
/bin/ldd: line 114: /dev/null: Permission denied
/bin/ldd: line 114: /dev/null: Permission denied
/bin/ldd: line 114: /dev/null: Permission denied
/bin/ldd: line 114: /dev/null: Permission denied
/bin/ldd: line 114: /dev/null: Permission denied
/bin/ldd: line 114: /dev/null: Permission denied
/bin/ldd: line 114: /dev/null: Permission denied
/bin/ldd: line 114: /dev/null: Permission denied
/bin/ldd: line 114: /dev/null: Permission denied
/bin/ldd: line 114: /dev/null: Permission denied
/bin/ldd: line 114: /dev/null: Permission denied
/bin/ldd: line 114: /dev/null: Permission denied
/bin/ldd: line 114: /dev/null: Permission denied
/bin/ldd: line 114: /dev/null: Permission denied
/bin/ldd: line 114: /dev/null: Permission denied

gozora commented at 2018-05-17 10:02:

Just a guess, but this looks like you have your /tmp (TMPDIR) mounted with nodev option.
Try to set export TMPDIR=/var/tmp (or any other file system you like) in your local.conf .

V.

nirmal21s commented at 2018-05-17 11:00:

I have change it.. But still same error :

NRSERVER=xxxxxxx-bar1
NSR_CLIENT_MODE=y
export TMPDIR=/opt/xxxxxxx
OUTPUT=ISO
ISO_PREFIX="rear-nsr-$HOSTNAME"
BACKUP=NSR
OUTPUT_URL=file:///var

# Static IP (no DHCP!)
USE_DHCLIENT=
USE_STATIC_NETWORKING="y"

# NTP
TIMESYNC=NTP


=================================================
Providing the fstab output : 
#
/dev/mapper/VG00-root  /                       ext4    defaults        1 1
/dev/sda1 /boot ext4 rw,relatime,stripe=16,data=ordered,nodev 0 0
/dev/mapper/VG00-home  /home                   ext4    defaults,nodev        1 2
/dev/mapper/VG00-opt /opt ext4 rw,relatime,stripe=16,data=ordered,nodev 0 0
/dev/mapper/VG00-xxxxxx /opt/xxxxxx ext4 rw,relatime,stripe=16,data=ordered,nodev 0 0
/dev/mapper/VG00-tmp /tmp ext4 rw,nosuid,noexec,relatime,stripe=16,data=ordered,nodev 0 0
/dev/mapper/VG00-usr /usr ext4 rw,relatime,stripe=16,data=ordered,nodev 0 0
/dev/mapper/VG00-var /var ext4 rw,relatime,stripe=16,data=ordered,nodev 0 0
/dev/mapper/VG00-log /var/log ext4 rw,relatime,stripe=16,data=ordered,nodev 0 0
/dev/mapper/VG00-audit /var/log/audit ext4 rw,relatime,stripe=16,data=ordered,nodev 0 0
/dev/mapper/VG00-swap  swap                    swap    defaults        0 0
/distrib/rhel7.4/RHEL-7.4-20170810.0-server-x86_64-dvd1.iso /mnt/repo iso9660 defaults 0 0
/tmp /var/tmp none rw,bind,nodev,nosuid,noexec 0 0
none /dev/shm tmpfs nodev,nosuid,noexec 0 0

gozora commented at 2018-05-17 11:34:

Maybe you've noticed that your /opt is mounted with nodev option as well ...

Excerpt from man mount

nodev  Do not interpret character or block special devices on the file system.

Since ReaR needs to execute some commands to do some checks in chrooted environment, you need to place your TMPDIR to location that allows interaction with character or block devices.

V.

nirmal21s commented at 2018-05-17 13:06:

now tried to create directory in "/" and tried again same issue occurred.
Can you correct me if i am specifying the export of TMPDIR correctly in local.conf

 NRSERVER=rXXX-bar1
NSR_CLIENT_MODE=y
OUTPUT=ISO
ISO_PREFIX="rear-nsr-$HOSTNAME"
BACKUP=NSR
OUTPUT_URL=file:///desktop/rear
export TMPDIR=/desktop/tmprear
#
# Static IP (no DHCP!)
USE_STATIC_NETWORKING="y"
# NTP
TIMESYNC=NTP

But when i check the "/desktop/tmprear" no rear tmp file is saved..

Now i am going to create a man mounted FS.

gozora commented at 2018-05-17 13:17:

Is /desktop really in your / ?
What does ls -al /desktop say?

nirmal21s commented at 2018-05-17 13:58:

No.. i have created a dir"desktop"..
Now the permission issue is gone..
The reason should be "nodev"
But new error occurred in the log.Attached the log.
should we consider this as a issue or can be ignored.
sharded_object_not_found.txt

nirmal21s commented at 2018-05-17 15:35:

Thanks for your respond !
Issue has been fixed !!


[Export of Github issue for rear/rear.]