Comment 7 for bug 1736309

Revision history for this message
Jb (jebsolutions) wrote :

Lubuntu Alternate Workaround

... work around..

Basically...you manually replace tar symlink to busybox with real tar

On working *17.10* (18.04's closest relative) system do this BEFORE installing 18.04...

[replace /somewhere with ...a network share]

ldd /bin/tar

 linux-vdso.so.1 (ignore this one)
 cp /lib/x86_64-linux-gnu/libacl.so.1 /somewhere
 cp /lib/x86_64-linux-gnu/libselinux.so.1 /somewhere
 cp /lib/x86_64-linux-gnu/libc.so.6 /somewhere
 cp /lib/x86_64-linux-gnu/libattr.so.1 /somewhere
 cp /lib/x86_64-linux-gnu/libpcre.so.3 /somewhere
 cp /lib/x86_64-linux-gnu/libdl.so.2 /somewhere
 cp /lib/x86_64-linux-gnu/libpthread.so.0 /somewhere
 cp /bin/tar /somewhere

Also copy /somewhere/fix.sh (see end of this message)

Okay...so now /somewhere (i used a network share) has all the .so files and the binaries for tar.

Now boot the regular 18.04 Lubuntu Alternate iso.

When it bombs out Alt-F2 to switch to second console.

Mount /somewhere (I used network share)
mkdir /somewhere
mount -t cifs -ousername=whatever,password=whatever //server/share /somewhere
/somewhere/fix.sh

... script will silently setup everything...

switch back to main console. Control-Alt-f1.

Hit enter about 5 times to ignore errors and then retry the install...works. :)

also copy this script to /somewhere/fix.sh
------------------------------------------
#!/bin/sh
# copy files
cp /somewhere/libacl.so.1 /lib/x86_64-linux-gnu
cp /somewhere/libselinux.so.1 /lib/x86_64-linux-gnu
cp /somewhere/libc.so.6 /lib/x86_64-linux-gnu
cp /somewhere/libattr.so.1 /lib/x86_64-linux-gnu
cp /somewhere/libpcre.so.3 /lib/x86_64-linux-gnu
cp /somewhere/libdl.so.2 /lib/x86_64-linux-gnu
cp /somewhere/libpthread.so.0 /lib/x86_64-linux-gnu

cp /somewhere/libbfd-2.29.1-system.so /usr/lib/x86_64-linux-gnu/
#cp /somewhere/libc.so.6 /lib/x86_64-linux-gnu/
cp /somewhere/libz.so.1 /lib/x86_64-linux-gnu/
cp /somewhere/libdl.so.2 /lib/x86_64-linux-gnu/

# break symlink to ar and replace with real ar
#rm -rf /usr/bin/ar
#cp /somewhere/ar /usr/bin/arcopy
#
#cat <<"EOM_AR" > /bin/ar
##!/bin/sh
#echo $0 $* >> /test.log
#export EXTRACT_UNSAFE_SYMLINKS=1
#/usr/bin/arcopy $*
#EOM_AR
#
#chmod a+x /usr/bin/ar

#ar part works isn't needed

# break symlink to tar and replace with real tar + overwrite
rm -rf /bin/tar
cp /somewhere/tar /bin/tarcopy

cat <<"EOM_TAR" > /bin/tar
#!/bin/sh
echo $0 $* >> /test.log
if [ "$1" = "-k" ]; then
    /bin/tarcopy --overwrite $2 $3 $4 $5 $6 $7 $8 $9
else
 /bin/tarcopy $*
fi

EOM_TAR

chmod a+x /bin/tar

# fix existing /target/dev/* breaking reinstall attempt
rm -rf /target/dev*