[Fedora-livecd-list] Help with a problem I am seeing when trying to build a liveCD for FC13

Jim Galarowicz jeg at krellinst.org
Wed Jul 14 13:44:51 UTC 2010



Hi,

I've been building a FC13 liveCD to showcase our OpenSpeedShop 
performance tool.

The process was working well and I was creating liveCDs that I could 
boot and exercise our tool.   Then, I'm not sure what happened, as now I 
see this when trying to build the liveCD:

   Installing: libICE                       ################### [  69/1129]
   Installing: info                         ################### [  70/1129]
sh: uname: command not found
   Installing: popt                         ################### [  71/1129]
   Installing: chkconfig                    ################### [  72/1129]
   Installing: libcom_err                   ################### [  73/1129]
   Installing: readline                     ################### [  74/1129]
sh: uname: command not found
   Installing: sqlite                       ################### [  75/1129]

and

   Installing: libdwarf                     ################### [ 239/1129]
sh: uname: command not found
/home/jeg/OpenSpeedShop/liveOSS/INSTALL/rpm-tmp.kepEKp: line 6: chmod: 
command not found
/home/jeg/OpenSpeedShop/liveOSS/INSTALL/rpm-tmp.kepEKp: line 7: chmod: 
command not found
/home/jeg/OpenSpeedShop/liveOSS/INSTALL/rpm-tmp.kepEKp: line 8: chmod: 
command not found
/home/jeg/OpenSpeedShop/liveOSS/INSTALL/rpm-tmp.kepEKp: line 9: chmod: 
command not found
/home/jeg/OpenSpeedShop/liveOSS/INSTALL/rpm-tmp.kepEKp: line 10: chmod: 
command not found
warning: %post(libdwarf-20091230-1.i686) scriptlet failed, exit status 127
   Installing: libtevent                    ################### [ 240/1129]

and
   Installing: coreutils-libs               ################### [ 355/1129]
sh: uname: command not found
   Installing: coreutils                    ################### [ 356/1129]
error: error creating temporary file 
/home/jeg/OpenSpeedShop/liveOSS/INSTALL/localhost.localdomain/rpm-tmp.EGAzFe: 
No such file or directory
error: Couldn't create temporary file for 
%post(coreutils-8.4-6.fc13.i686): No such file or directory
   Installing: pam                          ################### [ 357/1129]
error: error creating temporary file 
/home/jeg/OpenSpeedShop/liveOSS/INSTALL/localhost.localdomain/rpm-tmp.nqKSh7: 
No such file or directory
error: Couldn't create temporary file for %post(pam-1.1.1-4.fc13.i686): 
No such file or directory

Has anyone encountered this?   It seems that the install_root isn't 
getting the coreutils installed correctly or at all?  I don't know if 
something was killed in the middle of building and I'm stuck in some 
intermediate setup state?   I reinstalled the livecd-tools to see if 
that would help, but it didn't.

Any help would be greatly appreciated.

Thanks,
Jim G.

THE DETAILS:

Steps I take to prepare the liveCD rpms:

//****************************************************************************//
//                              Getting 
Started                               //
//                    Preparing The Base System 
Environment                   //
//****************************************************************************//
1. Install Needed Development Packages

Note: Try to start with a base Fedora Core installation that includes 
most development packages.

yum -y install libtool-ltdl-devel livecd-tools createrepo

2. Prepare The Local yum Repository

mkdir -p /var/www/html/yum/{base,updates}

cp /media/Fedora\ 13\ i386\ 
DVD/repodata/fce31f091be8211a394d8942fcf4f6cbeffa3d40d87b61af55a97b1a88b46987-Fedora-13-comps.xml 
/var/www/html/yum/base/.

cp /media/Fedora\ 13\ i386\ DVD/Packages/*.rpm /var/www/html/yum/base/.

I had to copy these RPMs into /var/www/html/yum/base in order to create 
the live os for OpenSpeedShop

cp /home/jeg/Downloads/anaconda-13.42-1.fc13.i686.rpm 
/var/www/html/yum/base/.
cp /home/jeg/Downloads/binutils-2.20.51.0.2-20.fc13.i686.rpm 
/var/www/html/yum/base/.
cp /home/jeg/Downloads/binutils-devel-2.20.51.0.2-20.fc13.i686.rpm 
/var/www/html/yum/base/.
cp /home/jeg/Downloads/binutils-static-2.20.51.0.2-20.fc13.i686.rpm 
/var/www/html/yum/base/.
cp /home/jeg/Downloads/blas-3.2.1-4.fc13.i686.rpm /var/www/html/yum/base/.
cp /home/jeg/Downloads/makebootfat-1.4-9.fc12.i686.rpm 
/var/www/html/yum/base/.
cp /home/jeg/Downloads/isomd5sum-1.0.5-3.fc12.i686.rpm 
/var/www/html/yum/base/.
cp /home/jeg/Downloads/pykickstart-1.69-1.fc13.noarch.rpm 
/var/www/html/yum/base/.
cp /home/jeg/Downloads/python-cryptsetup-0.0.10-2.fc13.i686.rpm 
/var/www/html/yum/base/.
cp /home/jeg/Downloads/pyparted-3.3-1.fc13.i686.rpm /var/www/html/yum/base/.
cp /home/jeg/Downloads/python-pyblock-0.47-1.fc13.i686.rpm 
/var/www/html/yum/base/.
cp /home/jeg/Downloads/python-nss-0.8-1.fc12.i686.rpm 
/var/www/html/yum/base/.
cp /home/jeg/Downloads/scim-chewing-0.3.3-2.fc12.i686.rpm 
/var/www/html/yum/base/.
cp /home/jeg/Downloads/scim-pinyin-0.5.91-27.fc12.i686.rpm 
/var/www/html/yum/base/.
cp /home/jeg/Downloads/squashfs-tools-4.0-4.fc13.i686.rpm 
/var/www/html/yum/base/.
cp /home/jeg/Downloads/syslinux-3.84-1.fc13.i686.rpm 
/var/www/html/yum/base/.
cp 
/home/jeg/Downloads/tigervnc-server-1.0.90-0.8.20100219svn3993.fc13.i686.rpm 
/var/www/html/yum/base/.
cp /home/jeg/Downloads/tigervnc-1.0.0-1.fc12.i686.rpm 
/var/www/html/yum/base/.
cp /home/jeg/Downloads/perl-5.10.0-82.fc12.i686.rpm /var/www/html/yum/base/.
cp /home/jeg/Downloads/perl-Crypt-PasswdMD5-1.3-5.fc12.noarch.rpm 
/var/www/html/yum/base/.
cp /home/jeg/Downloads/lapack-3.2.1-4.fc13.i686.rpm /var/www/html/yum/base/.
cp /home/jeg/Downloads/xorg-x11-fonts-misc-7.2-9.fc12.noarch.rpm 
/var/www/html/yum/base/.

3. Build Open MPI using provided spec file.

Copy created RPM to /var/www/html/yum/base/

4) Build toyprograms, webtutorials, and optionally the openmpi package using
    the setup_and_build_rpms.sh script

Copy created RPMs to /var/www/html/yum/base/

5. Build OpenSpeedShop prerequisite packages.

Copy created RPMs to /var/www/html/yum/base/

6. Build OpenSpeedShop

Copy created RPM to /var/www/html/yum/base/

7. Create Local yum Repository

createrepo -dg 
/var/www/html/yum/base/fce31f091be8211a394d8942fcf4f6cbeffa3d40d87b61af55a97b1a88b46987-Fedora-13-comps.xml 
/var/www/html/yum/base/

-----------------------------------------------------------------------------------------------------------
then use buildlivecd.sh, the build script I run after the steps above:
-----------------------------------------------------------------------------------------------------------

#!/bin/sh

livecd_label=OpenSpeedShop-Live
livecd_kickstart_file=livecd-fedora-13-openss.ks

#You must run livecd-creator as root...
if [ `whoami` != "root" ]; then
     echo "remember: you must be root to run livecd-creator..."
fi

su -c "livecd-creator --config=$livecd_kickstart_file \
--fslabel=$livecd_label" root


-----------------------------------------------------------------------------------------------------------
cat livecd-fedora-13-base-openss.ks
-----------------------------------------------------------------------------------------------------------
# fedora-live-base.ks
#
# Defines the basics for all kickstarts in the fedora-live branch
# Does not include package selection (other then mandatory)
# Does not include localization packages or configuration
#
# Does includes "default" language configuration (kickstarts including
# this template can override these settings)

lang en_US.UTF-8
keyboard us
timezone US/Eastern
auth --useshadow --enablemd5
selinux --disabled
firewall --enabled --service=mdns
xconfig --startxonboot
part / --size 3072 --fstype ext4
services --enabled=NetworkManager --disabled=network,sshd

repo --name=a-base --baseurl=file:///var/www/html/yum/base

%packages
@base-x
@base
@core
@fonts
@input-methods
# Exclude ibus-pinyin-open-phrase as it's large and somewhat optional
-ibus-pinyin-open-phrase
@admin-tools
@dial-up
@hardware-support
@printing

# Explicitly specified here:
# <notting> walters: because otherwise dependency loops cause yum issues.
kernel

# The point of a live image is to install
anaconda
isomd5sum

#Fix for SELINUX Disabled
/usr/sbin/lokkit

%end

%post
# FIXME: it'd be better to get this installed from a package
cat > /etc/rc.d/init.d/livesys << EOF
#!/bin/bash
#
# live: Init script for live image
#
# chkconfig: 345 00 99
# description: Init script for live image.

. /etc/init.d/functions

if ! strstr "\`cat /proc/cmdline\`" liveimg || [ "\$1" != "start" ]; then
     exit 0
fi

if [ -e /.liveimg-configured ] ; then
     configdone=1
fi

exists() {
     which \$1 >/dev/null 2>&1 || return
     \$*
}

touch /.liveimg-configured

# mount live image
if [ -b \`readlink -f /dev/live\` ]; then
    mkdir -p /mnt/live
    mount -o ro /dev/live /mnt/live 2>/dev/null || mount /dev/live /mnt/live
fi

livedir="LiveOS"
for arg in \`cat /proc/cmdline\` ; do
   if [ "\${arg##live_dir=}" != "\${arg}" ]; then
     livedir=\${arg##live_dir=}
     return
   fi
done

# enable swaps unless requested otherwise
swaps=\`blkid -t TYPE=swap -o device\`
if ! strstr "\`cat /proc/cmdline\`" noswap && [ -n "\$swaps" ] ; then
   for s in \$swaps ; do
     action "Enabling swap partition \$s" swapon \$s
   done
fi
if ! strstr "\`cat /proc/cmdline\`" noswap && [ -f 
/mnt/live/\${livedir}/swap.img ] ; then
   action "Enabling swap file" swapon /mnt/live/\${livedir}/swap.img
fi

mountPersistentHome() {
   # support label/uuid
   if [ "\${homedev##LABEL=}" != "\${homedev}" -o "\${homedev##UUID=}" 
!= "\${homedev}" ]; then
     homedev=\`/sbin/blkid -o device -t "\$homedev"\`
   fi

   # if we're given a file rather than a blockdev, loopback it
   if [ "\${homedev##mtd}" != "\${homedev}" ]; then
     # mtd devs don't have a block device but get magic-mounted with -t 
jffs2
     mountopts="-t jffs2"
   elif [ ! -b "\$homedev" ]; then
     loopdev=\`losetup -f\`
     if [ "\${homedev##/mnt/live}" != "\${homedev}" ]; then
       action "Remounting live store r/w" mount -o remount,rw /mnt/live
     fi
     losetup \$loopdev \$homedev
     homedev=\$loopdev
   fi

   # if it's encrypted, we need to unlock it
   if [ "\$(/sbin/blkid -s TYPE -o value \$homedev 2>/dev/null)" = 
"crypto_LUKS" ]; then
     echo
     echo "Setting up encrypted /home device"
     plymouth ask-for-password --command="cryptsetup luksOpen \$homedev 
EncHome"
     homedev=/dev/mapper/EncHome
   fi

   # and finally do the mount
   mount \$mountopts \$homedev /home
   # if we have /home under what's passed for persistent home, then
   # we should make that the real /home.  useful for mtd device on olpc
   if [ -d /home/home ]; then mount --bind /home/home /home ; fi
   [ -x /sbin/restorecon ] && /sbin/restorecon /home
   if [ -d /home/liveuser ]; then USERADDARGS="-M" ; fi
}

findPersistentHome() {
   for arg in \`cat /proc/cmdline\` ; do
     if [ "\${arg##persistenthome=}" != "\${arg}" ]; then
       homedev=\${arg##persistenthome=}
       return
     fi
   done
}

if strstr "\`cat /proc/cmdline\`" persistenthome= ; then
   findPersistentHome
elif [ -e /mnt/live/\${livedir}/home.img ]; then
   homedev=/mnt/live/\${livedir}/home.img
fi

# if we have a persistent /home, then we want to go ahead and mount it
if ! strstr "\`cat /proc/cmdline\`" nopersistenthome && [ -n "\$homedev" 
] ; then
   action "Mounting persistent /home" mountPersistentHome
fi

# make it so that we don't do writing to the overlay for things which
# are just tmpdirs/caches
mount -t tmpfs -o mode=0755 varcacheyum /var/cache/yum
mount -t tmpfs tmp /tmp
mount -t tmpfs vartmp /var/tmp
[ -x /sbin/restorecon ] && /sbin/restorecon /var/cache/yum /tmp /var/tmp 
 >/dev/null 2>&1

if [ -n "\$configdone" ]; then
   exit 0
fi

# add openssuser user with no passwd
useradd -c "OpenSpeedShop Live User" openssuser
passwd -d openssuser > /dev/null

# turn off firstboot for livecd boots
chkconfig --level 345 firstboot off 2>/dev/null

# don't start yum-updatesd for livecd boots
chkconfig --level 345 yum-updatesd off 2>/dev/null

# turn off mdmonitor by default
chkconfig --level 345 mdmonitor off 2>/dev/null

# turn off setroubleshoot on the live image to preserve resources
chkconfig --level 345 setroubleshoot off 2>/dev/null

# don't do packagekit checking by default
gconftool-2 --direct 
--config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string 
/apps/gnome-packagekit/update-icon/frequency_get_updates never >/dev/null
gconftool-2 --direct 
--config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string 
/apps/gnome-packagekit/update-icon/frequency_get_upgrades never >/dev/null
gconftool-2 --direct 
--config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t string 
/apps/gnome-packagekit/update-icon/frequency_refresh_cache never >/dev/null
gconftool-2 --direct 
--config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool 
/apps/gnome-packagekit/update-icon/notify_available false >/dev/null
gconftool-2 --direct 
--config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool 
/apps/gnome-packagekit/update-icon/notify_distro_upgrades false >/dev/null
gconftool-2 --direct 
--config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool 
/apps/gnome-packagekit/enable_check_firmware false >/dev/null
gconftool-2 --direct 
--config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool 
/apps/gnome-packagekit/enable_check_hardware false >/dev/null
gconftool-2 --direct 
--config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool 
/apps/gnome-packagekit/enable_codec_helper false >/dev/null
gconftool-2 --direct 
--config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool 
/apps/gnome-packagekit/enable_font_helper false >/dev/null
gconftool-2 --direct 
--config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool 
/apps/gnome-packagekit/enable_mime_type_helper false >/dev/null


# don't start cron/at as they tend to spawn things which are
# disk intensive that are painful on a live image
chkconfig --level 345 crond off 2>/dev/null
chkconfig --level 345 atd off 2>/dev/null
chkconfig --level 345 anacron off 2>/dev/null
chkconfig --level 345 readahead_early off 2>/dev/null
chkconfig --level 345 readahead_later off 2>/dev/null

# Stopgap fix for RH #217966; should be fixed in HAL instead
touch /media/.hal-mtab

# workaround clock syncing on shutdown that we don't want (#297421)
sed -i -e 's/hwclock/no-such-hwclock/g' /etc/rc.d/init.d/halt

# and hack so that we eject the cd on shutdown if we're using a CD...
if strstr "\`cat /proc/cmdline\`" CDLABEL= ; then
   cat >> /sbin/halt.local << FOE
#!/bin/bash
# XXX: This often gets stuck during shutdown because /etc/init.d/halt
#      (or something else still running) wants to read files from the block\
#      device that was ejected.  Disable for now.  Bug #531924
# we want to eject the cd on halt, but let's also try to avoid
# io errors due to not being able to get files...
#cat /sbin/halt > /dev/null
#cat /sbin/reboot > /dev/null
#/usr/sbin/eject -p -m \$(readlink -f /dev/live) >/dev/null 2>&1
#echo "Please remove the CD from your drive and press Enter to finish 
restarting"
#read -t 30 < /dev/console
FOE
chmod +x /sbin/halt.local
fi

EOF

# bah, hal starts way too late
cat > /etc/rc.d/init.d/livesys-late << EOF
#!/bin/bash
#
# live: Late init script for live image
#
# chkconfig: 345 99 01
# description: Late init script for live image.

. /etc/init.d/functions

if ! strstr "\`cat /proc/cmdline\`" liveimg || [ "\$1" != "start" ] || [ 
-e /.liveimg-late-configured ] ; then
     exit 0
fi

exists() {
     which \$1 >/dev/null 2>&1 || return
     \$*
}

touch /.liveimg-late-configured

# read some variables out of /proc/cmdline
for o in \`cat /proc/cmdline\` ; do
     case \$o in
     ks=*)
         ks="--kickstart=\${o#ks=}"
         ;;
     xdriver=*)
         xdriver="--set-driver=\${o#xdriver=}"
         ;;
     esac
done

# this is a bad hack to work around #460581 for the geode
# purely to help move testing along for now
if [ \`grep -c Geode /proc/cpuinfo\` -ne 0 ]; then
   cat > /etc/X11/xorg.conf <<FOE
Section "ServerLayout"
     Identifier     "Default Layout"
     Screen      0  "Screen0" 0 0
     InputDevice    "Keyboard0" "CoreKeyboard"
EndSection

Section "InputDevice"
# keyboard added by rhpxl
     Identifier  "Keyboard0"
     Driver      "kbd"
     Option        "XkbModel" "pc105"
     Option        "XkbLayout" "us"
EndSection

Section "Monitor"
     Identifier  "Monitor0"
     HorizSync   30-67
     VertRefresh 48-52
     DisplaySize 152 114
     Mode "1200x900"
         DotClock 57.275
         HTimings 1200 1208 1216 1240
         VTimings 900 905 908 912
         Flags    "-HSync" "-VSync"
     EndMode
EndSection

Section "Device"
     Identifier  "Videocard0"
     Driver      "amd"
     VendorName  "Advanced Micro Devices, Inc."
     BoardName   "AMD Geode GX/LX"

     Option     "AccelMethod" "EXA"
     Option     "NoCompression" "true"
         Option     "MigrationHeuristic" "greedy"
     Option     "PanelGeometry" "1200x900"
EndSection

Section "Screen"
     Identifier "Screen0"
     Device     "Videocard0"
     Monitor    "Monitor0"
     DefaultDepth 16
     SubSection "Display"
         Depth   16
         Modes   "1200x900"
     EndSubSection
EndSection
FOE
fi

# if liveinst or textinst is given, start anaconda
if strstr "\`cat /proc/cmdline\`" liveinst ; then
    plymouth --quit
    /usr/sbin/liveinst \$ks
fi
if strstr "\`cat /proc/cmdline\`" textinst ; then
    plymouth --quit
    /usr/sbin/liveinst --text \$ks
fi

# configure X, allowing user to override xdriver
if [ -n "\$xdriver" ]; then
    exists system-config-display --noui --reconfig --set-depth=24 \$xdriver
fi

EOF

chmod 755 /etc/rc.d/init.d/livesys
/sbin/restorecon /etc/rc.d/init.d/livesys
/sbin/chkconfig --add livesys

chmod 755 /etc/rc.d/init.d/livesys-late
/sbin/restorecon /etc/rc.d/init.d/livesys-late
/sbin/chkconfig --add livesys-late

# work around for poor key import UI in PackageKit
rm -f /var/lib/rpm/__db*
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora
echo "Packages within this LiveCD"
rpm -qa

# go ahead and pre-make the man -k cache (#455968)
/usr/sbin/makewhatis -w

# save a little bit of space at least...
rm -f /boot/initramfs*
# make sure there aren't core files lying around
rm -f /core*

# convince readahead not to collect
rm -f /.readahead_collect
touch /var/lib/readahead/early.sorted

%end


%post --nochroot
cp $INSTALL_ROOT/usr/share/doc/*-release-*/GPL $LIVE_ROOT/GPL
cp 
$INSTALL_ROOT/usr/share/doc/HTML/readme-live-image/en_US/readme-live-image-en_US.txt 
$LIVE_ROOT/README

# only works on x86, x86_64
if [ "$(uname -i)" = "i386" -o "$(uname -i)" = "x86_64" ]; then
   if [ ! -d $LIVE_ROOT/LiveOS ]; then mkdir -p $LIVE_ROOT/LiveOS ; fi
   cp /usr/bin/livecd-iso-to-disk $LIVE_ROOT/LiveOS
fi

# copy some test applications for OpenSpeedShop
# make sure these apps exist on your host machine...and were compiled in
# in the same location.  This makes source mapping easier for OpenSpeedShop.

%end

-----------------------------------------------------------------------------------------------------------
livecd-fedora-13-openss.ks
-----------------------------------------------------------------------------------------------------------

%include livecd-fedora-13-base-openss.ks

%packages
@graphical-internet
@gnome-desktop
NetworkManager-vpnc
NetworkManager-openvpn

# OpenSpeedShop-specific
openmpi
libdwarf
libunwind
sqlite
papi
libmonitor
dyninst
mrnet
openspeedshop
toyprograms
webtutorial

# dictionaries are big
-aspell-*
-man-pages-*
-scim-tables-*
-wqy-bitmap-fonts
-dejavu-fonts-experimental
-dejavu-fonts

# more fun with space saving
-scim-lang-chinese
scim-chewing
scim-pinyin

# save some space
-gnome-user-docs
-gimp-help
-evolution-help
-autofs
-nss_db
-vino
#-evolution TODO: need to mod the gnome panel...
-ekiga
-pidgin
-transmission
-tomboy

%end

%post
cat >> /etc/rc.d/init.d/fedora-live << EOF
# disable screensaver locking
gconftool-2 --direct 
--config-source=xml:readwrite:/etc/gconf/gconf.xml.defaults -s -t bool 
/apps/gnome-screensaver/lock_enabled false >/dev/null
# set up timed auto-login for after 1 second
sed -i -e 
's/\[daemon\]/[daemon]\nTimedLoginEnable=true\nTimedLogin=openssuser\nTimedLoginDelay=1/' 
/etc/gdm/custom.conf
if [ -e /usr/share/icons/hicolor/96x96/apps/fedora-logo-icon.png ] ; then
     cp /usr/share/icons/hicolor/96x96/apps/fedora-logo-icon.png 
/home/openssuser/.face
     chown openssuser:openssuser /home/fedora/.face
     # TODO: would be nice to get e-d-s to pick this one up too... but how?
fi

# add some OpenSpeedShop bashrc goodies...
echo "cat << EOF" > /root/.bashrc.oss
echo "------------------------------" >> /root/.bashrc.oss
echo "Welcome to Open|SpeedShop Live" >> /root/.bashrc.oss
echo "------------------------------" >> /root/.bashrc.oss
echo " " >> /root/.bashrc.oss
echo "To run a sequential experiment:" >> /root/.bashrc.oss
echo " >> cd sequential/smg2000/test" >> /root/.bashrc.oss
echo " >> osspcsamp \"smg2000 -n 50 50 50\" " >> /root/.bashrc.oss
echo " >> openss -f smg2000-pcsamp.openss &" >> /root/.bashrc.oss
echo " " >> /root/.bashrc.oss
echo "To run an MPI experiment:" >> /root/.bashrc.oss
echo " >> cd mpi/smg2000/test" >> /root/.bashrc.oss
echo " >> osspcsamp \"mpirun -np 2 smg2000 -n 50 50 50\" " >> 
/root/.bashrc.oss
echo " >> openss -f smg2000-pcsamp.openss &" >> /root/.bashrc.oss
echo " " >> /root/.bashrc.oss
echo "For more information, please see the included HTML documentation." 
 >> /root/.bashrc.oss
echo "EOF" >> /root/.bashrc.oss

echo "if \[ -f /etc/bashrc \]; then" >> /root/.bashrc.oss
echo "        . /etc/bashrc" >> /root/.bashrc.oss
echo "fi" >> /root/.bashrc.oss
echo "export QTDIR=/usr/lib/qt-3.3" >> /root/.bashrc.oss
echo "export OPENSS_PREFIX=/opt/OSS" >> /root/.bashrc.oss
echo "export OPENSS_PLUGIN_PATH=\\\$OPENSS_PREFIX/lib/openspeedshop" >> 
/root/.bashrc.oss
echo "export OPENSS_INSTRUMENTOR=mrnet" >> /root/.bashrc.oss
echo "export OPENSS_MRNET_TOPOLOGY_FILE=/home/openssuser/.openss.top" >> 
/root/.bashrc.oss
echo "export OPENSS_RAWDATA_DIR=/tmp" >> /root/.bashrc.oss
echo "export OPENSS_MPI_OPENMPI=/opt/openmpi" >> /root/.bashrc.oss
echo "export 
DYNINSTAPI_RT_LIB=\\\$OPENSS_PREFIX/lib/libdyninstAPI_RT.so.1" >> 
/root/.bashrc.oss
echo "export PATH=\\\$OPENSS_PREFIX/bin:/opt/openmpi/bin:\\\$PATH" >> 
/root/.bashrc.oss
echo "export 
LD_LIBRARY_PATH=\\\$OPENSS_PREFIX/lib:/opt/openmpi/lib:\\\$LD_LIBRARY_PATH" 
 >> /root/.bashrc.oss
echo "export XPLAT_RSHCOMMAND=ssh" >> /root/.bashrc.oss
echo "export XPLAT_RSH=ssh" >> /root/.bashrc.oss
echo "export MRNET_RSH=ssh" >> /root/.bashrc.oss
chmod 644 /root/.bashrc.oss
cp /root/.bashrc.oss /home/openssuser/.bashrc
chown openssuser:openssuser /home/openssuser/.bashrc
rm -f /root/.bashrc.oss

# add a MRNet topology file
echo "localhost.localdomain:0 => localhost.localdomain:1 ;" > 
/root/.openss.top
cp /root/.openss.top /home/openssuser/
chown openssuser:openssuser /home/openssuser/.openss.top
rm -f /root/.openss.top

# start some apps...
echo "[Default]" > /root/.session-manual
echo "num_clients=2" >> /root/.session-manual
echo "0,RestartClientHint=3" >> /root/.session-manual
echo "0,Priority=50" >> /root/.session-manual
echo "0,RestartCommand=firefox /opt/doc/index.html" >> /root/.session-manual
echo "1,Program=firefox /opt/doc/index.html" >> /root/.session-manual
echo "1,RestartClientHint=3" >> /root/.session-manual
echo "1,Priority=50" >> /root/.session-manual
echo "1,RestartCommand=gnome-terminal" >> /root/.session-manual
echo "1,Program=gnome-terminal" >> /root/.session-manual
cp /root/.session-manual /home/openssuser/.gnome2/session-manual
chown openssuser:openssuser /home/openssuser/.gnome2/session-manual
rm -f /root/.session-manual

# setup preferences file for new user

mkdir /home/openssuser/.qt
echo "[ManageProcessesPanel]" > /root/.openspeedshoprc
echo "updateDisplayLineEdit=15" >> /root/.openspeedshoprc
echo "updateOnCheckBox=true" >> /root/.openspeedshoprc
echo "" >> /root/.openspeedshoprc
echo "[Source Panel]" >> /root/.openspeedshoprc
echo 
"leftSideLineEdit0=/home/jeg/OpenSpeedShop/liveOSS/toyprograms-0.0.1" >> 
/root/.openspeedshoprc
echo "leftSideLineEdit1=" >> /root/.openspeedshoprc
echo "leftSideLineEdit2=" >> /root/.openspeedshoprc
echo "leftSideLineEdit3=" >> /root/.openspeedshoprc
echo "leftSideLineEdit4=" >> /root/.openspeedshoprc
echo "leftSideLineEdit5=" >> /root/.openspeedshoprc
echo "leftSideLineEdit6=" >> /root/.openspeedshoprc
echo "leftSideLineEdit7=" >> /root/.openspeedshoprc
echo "leftSideLineEdit8=" >> /root/.openspeedshoprc
echo "leftSideLineEdit9=" >> /root/.openspeedshoprc
echo "rightSideLineEdit0=/home/openssuser" >> /root/.openspeedshoprc
echo "rightSideLineEdit1=" >> /root/.openspeedshoprc
echo "rightSideLineEdit2=" >> /root/.openspeedshoprc
echo "rightSideLineEdit3=" >> /root/.openspeedshoprc
echo "rightSideLineEdit4=" >> /root/.openspeedshoprc
echo "rightSideLineEdit5=" >> /root/.openspeedshoprc
echo "rightSideLineEdit6=" >> /root/.openspeedshoprc
echo "rightSideLineEdit7=" >> /root/.openspeedshoprc
echo "rightSideLineEdit8=" >> /root/.openspeedshoprc
echo "rightSideLineEdit9=" >> /root/.openspeedshoprc
echo "showLineNumbersCheckBox=true" >> /root/.openspeedshoprc
echo "showStatisticsCheckBox=false" >> /root/.openspeedshoprc
echo "" >> /root/.openspeedshoprc
echo "[Stats Panel]" >> /root/.openspeedshoprc
echo "advancedToolbarCheckBox=false" >> /root/.openspeedshoprc
echo "chartTypeComboBox=2" >> /root/.openspeedshoprc
echo "focusSourcePanelCheckBox=false" >> /root/.openspeedshoprc
echo "levelsToOpenLineEdit=-1" >> /root/.openspeedshoprc
echo "showMetadataCheckBox=true" >> /root/.openspeedshoprc
echo "showSkylineCheckBox=false" >> /root/.openspeedshoprc
echo "showSkylineLineEdit=25" >> /root/.openspeedshoprc
echo "showTextByLocationCheckBox=false" >> /root/.openspeedshoprc
echo "showTextByPercentCheckBox=true" >> /root/.openspeedshoprc
echo "showTextByValueCheckBox=false" >> /root/.openspeedshoprc
echo "showTextInChartCheckBox=true" >> /root/.openspeedshoprc
echo "showToolbarCheckBox=true" >> /root/.openspeedshoprc
echo "showTopNChartLineEdit=5" >> /root/.openspeedshoprc
echo "showTopNLineEdit=100" >> /root/.openspeedshoprc
echo "sortDecendingCheckBox=true" >> /root/.openspeedshoprc
echo "" >> /root/.openspeedshoprc
echo "[general]" >> /root/.openspeedshoprc
echo "allowPythonCommands=true" >> /root/.openspeedshoprc
echo "askAboutChangingArgs=true" >> /root/.openspeedshoprc
echo "askAboutSavingTheDatabase=true" >> /root/.openspeedshoprc
echo "globalFontFamily=Bitstream Charter" >> /root/.openspeedshoprc
echo "globalFontItalic=false" >> /root/.openspeedshoprc
echo "globalFontPointSize=10" >> /root/.openspeedshoprc
echo "globalFontWeight=75" >> /root/.openspeedshoprc
echo "globalRemoteShell=/usr/bin/rsh" >> /root/.openspeedshoprc
echo "helpLevelDefault=2" >> /root/.openspeedshoprc
echo "historyDefault=24" >> /root/.openspeedshoprc
echo "historyLimit=100" >> /root/.openspeedshoprc
echo "instrumentorIsOffline=true" >> /root/.openspeedshoprc
echo "lessRestrictiveComparisons=true" >> /root/.openspeedshoprc
echo "maxAsyncCommands=20" >> /root/.openspeedshoprc
echo "onRerunSaveCopyOfExperimentDatabase=true" >> /root/.openspeedshoprc
echo "saveExperimentDatabase=true" >> /root/.openspeedshoprc
echo "showGraphics=false" >> /root/.openspeedshoprc
echo "showSplashScreen=true" >> /root/.openspeedshoprc
echo "viewFieldSize=20" >> /root/.openspeedshoprc
echo "viewFullPath=false" >> /root/.openspeedshoprc
echo "viewMangledName=false" >> /root/.openspeedshoprc
echo "viewPrecision=6" >> /root/.openspeedshoprc
mkdir /root/.qt
chmod 644 /root/.openspeedshoprc
cp /root/.openspeedshoprc /root/.qt/openspeedshoprc
cp -r /root/.qt /home/openssuser/.
chown openssuser:openssuser -R /home/openssuser/.qt
rm /root/.openspeedshoprc


echo "localhost.localdomain ssh-rsa 
AAAAB3NzaC1yc2EAAAABIwAAAQEApWX5IL5f9c0tmBbmuj3/+Wx/2s8Nv0eo04gom+46DWNL9OQqiLtzHbqzn6M9WA0500kUsS5ZYxPXAcAo6LtWBpJ8eqVIbgYbwVRf5K2Iprm1irK6gYzBh8+iTPdqyLj4bjVzecxuNDNyD0YJTwB+q84J/linTHKmqdPC4Pzl+bTa+Je9oan9uORe1k5BKKkm8sem6/V39EwlRePiJMuVtZPCwBtLspMgCA+9R2KuvyisnS5vDjwnwcZQaHzCTsi57isk/P//4x1RWX+6KEngjjpp5igjnN1DBaabfIhLTc09z9tDVPcBir7mg0fJ09kckA4BExip1fzVLqmM1NoPgw==" 
 > /root/.known_hosts
mkdir /root/.ssh
chmod 644 /root/.known_hosts
cp /root/.known_hosts /root/.ssh/known_hosts
cp -r /root/.ssh /home/openssuser/.
chown openssuser:openssuser -R /home/openssuser/.ssh
rm /root/.known_hosts


#move apps to /home/openssuser
#mkdir -p /home/openssuser/{mpi,openmp,sequential}
mkdir -p /home/openssuser/{mpi,sequential}
mv /opt/tempapps/mpi/smg2000 /home/openssuser/mpi/.
mv /opt/tempapps/mpi/nbody /home/openssuser/mpi/.
mv /opt/tempapps/sequential/smg2000 /home/openssuser/sequential/.
#mv /opt/tempapps/openmp/smg2000 /home/openssuser/openmp/

mv /opt/tempapps/sequential/forever /home/openssuser/sequential/.
mv /opt/tempapps/sequential/threads /home/openssuser/sequential/.
mv /opt/tempapps/sequential/mutatee /home/openssuser/sequential/.
mv /opt/tempapps/sequential/matmul /home/openssuser/sequential/.

chown openssuser:openssuser -R /home/openssuser/mpi
chown openssuser:openssuser -R /home/openssuser/sequential
rm -rf /opt/tempapps

rm -rf /tmp/*

EOF

%end




More information about the livecd mailing list