#199 Issue closed: Problem with chroot into nodev mount

Labels: enhancement, bug, discuss / RFC

semsen opened issue at 2013-02-06 14:43:

Since 1.1x rear mounts the filesystems while the recover with the originated mount options. I have a problem with the final chroots for mkinitrd and grub. I use SLES11 SP2 and mount the "normal" filesystems due to some security advices with the "nodev" option.
So when there is done the chroot to /mnt/local the /dev doesn't work and there are errors from the mkinitrd part (only cosmetic) but also from the part the grub configuration because grub says the device does not exist and he does nothing.

Since I was not able to mount a udev or devfs to /mnt/local/dev quickly like its done for /proc, I solved it by overwriting the "nodev" with "dev" for / in the disklayout.conf

Here's my change in layout/save/GNU/Linux/23_filesystem_layout.sh

    options=${options#(} 
    options=${options%)}
   # Don't mount the original root fs with nodev, chroot for initrd and grub won't work 
   if [[ $mountpoint = "/" ]]; then 
    options=$(echo $options|sed 's/nodev/dev/') 
   fi 
    echo -n " options=$options"

Please feel free to adopt this change. Maybee a better place to solve this problem is not when writing the disklayoutfile, but when reading it. It would also be possible to do a remount before the chroots, but I thought this would be the place nodev is removed thoroughly.

I had an adittional problem.

In my old environment (SELS10, rear 1.7.23, TSM-Backup with TSM-Client 6.2) a rear recover produced a ISO of about 40MB. In my new environment (SLES11, rear 1.14 and TSM Backup with TSM-Client 6.4) the ISO is about 175MB!

Some of the groth is about SLES11, some is about rear (packaging all storage and network drivers into the iso). But most of the growth is caused by the new TSM Client which has a lot of huge libs. I had to enlarge my /tmp and /var filesystems to run rear recover successfully.
Therefor I exclude some files via COPY_AS_IS_EXCLUDE_TSM in my local.conf

COPY_AS_IS_EXCLUDE_TSM=( /opt/tivoli/tsm/client/api/bin64/libTsmViSdk.so /opt/tivoli/tsm/client/ba/bin/libTsmViSdk.so /opt/tivoli/tsm/client/ba/bin/libtypes.so /opt/tivoli/tsm/client/ba/bin/plugins64/libdiskLibPlugin.so )

TSM-Restore works without them and the ISO shrinked to 100MB

Maybee you can add this in the default.conf, (maybee as comment) to give users a hint where to start.

gdha commented at 2013-02-06 15:15:

@dagwieers @jhoekx What are your opinions about the "nodev" issue?

jhoekx commented at 2013-02-06 15:21:

Let's just ignore the nodev option in 13_include_filesystem_code.sh.

jhoekx commented at 2013-02-06 15:29:

Not quite tested the fix. Please reopen if the issue is still present.


[Export of Github issue for rear/rear.]