[Rear-users] ReaR and SLES 11

Peter Eckhardt peter at linux-freelancer.net
Wed Sep 2 16:57:43 CEST 2009


Hi

I am currently preparing the release of SLES 11 at a customer site.
Because ReaR is used for disaster recovery on SLES 9 and SLES 10 i gave
ReaR on SLES 11 with Tivoli Storage Manager (TSM) a try.

It looked quite well on first glance. The recovery cd was built without
problems. Unfortunately booting the CD ended up in a kernel panic (no
root filesystem was found). Another colleague tested ReaR on SLES 11 and
HP Data Protector . In that combination the boot CD did actually boot
but had strange problems in recovery.

Today i had some time to look into the problem and figured the recovery
cd wouldn't boot because /bin/init (and several other binaries and
libraries) were missing in the initrd.

After digging a little deeper i found the problem in
build/GNU/Linux/39_copy_binaries_libraries.

In SLES 9 and 10 (bash < 3.2) the expression

c=0
for k in "${PROGS[@]}" "${REQUIRED_PROGS[@]}"; do

iterated over the contents of array PROGS and REQUIRED_PROGS

while in SLES 11 it only iterates over the contents of array
REQUIRED_PROGS. Thus all binaries referenced in PROGS aren't copied to
the initrd image.

The following snipped solves the problem:

c=0
local DEST=( ${PROGS[@]} ${REQUIRED_PROGS[@]} )
for k in ${DEST[@]} ; do


And the following for the libraries:

LIBS64=()
for lib in ${LIBS[@]} $(SharedObjectFiles "${BINARIES[@]}" | sed -e
's#^#/#' ) ; do

will have to be changed to

LIBS64=()
DEST=( ${LIBS[@]} $(SharedObjectFiles "${BINARIES[@]}" | sed -e 's#^#/#' )
)
for lib in ${DEST[@]} ; do

With these changes in place the Recovery CD boots again. I have not yet
been able to test a recovery.


As I am not a shell expert I am not sure why behaviour changed. I am
assuming it might have to do with the new bash version. And i am not
sure wether the current code is flakey or not. At least the quoting
seems weird to me ...


Brgds
Peter





More information about the rear-users mailing list