Quoting Bernard Li <[EMAIL PROTECTED]>:

> Hi Marcelo:
> 
> That is very strange - can you post your image's
> /etc/systemimager/autoinstallscript.conf?
> 
> Cheers,
> 
> Bernard
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] on behalf of
> [EMAIL PROTECTED]
> Sent: Wed 16/08/2006 09:10
> To: [email protected]
> Subject: Re: [Oscar-users] How to re-install just the processing nodes?
>  
> Quoting Bernard Li <[EMAIL PROTECTED]>:
> 
> > Hi Marcelo:
> > 
> > This is actually very easy.  First modify your SystemImager
> > autoinstallscript.conf for that image:
> > 
> >
>
/var/lib/systemimager/images/<image_name>/etc/systemimager/autoinstallscript.conf
> > 
> > Edit it such that you have the correct amount of swap space.
> > 
> > Then reboot your node(s) such that it'll re-install the image.
> > 
> > Re-run the "Complete cluster setup" after the new node is imaged and
> > rebooted.
> > 
> > One trick we often use to force the nodes to re-image is execute a cexec
> > command to corrupt the MBR so that it won't be able to boot from the HD:
> > 
> > cexec 'dd if=/dev/zero of=/dev/???'
> > 
> > Replace '???' with the drive designation.  **Note** Only do this if you
> have
> > backed up everything from your client nodes...
> > 
> > Cheers,
> > 
> > Bernard
> > 
> > 
> > -----Original Message-----
> > From: [EMAIL PROTECTED] on behalf of
> > [EMAIL PROTECTED]
> > Sent: Mon 14/08/2006 13:46
> > To: [email protected]
> > Subject: [Oscar-users] How to re-install just the processing nodes?
> >  
> > Hi.
> > 
> >   I would like to re-install the processing nodes because I thing that the
> > virtual memory (128MB) is to low. Could I just start at step 4 of the
> OSCAR
> > 4.2
> > wizard?
> > 
> >   Thanks 
> > 
> > Marcelo Garcia
> > 
> > 
> > -------------------------------------------------------------------------
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job
> > easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > _______________________________________________
> > Oscar-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/oscar-users
> > 
> > 
> 
> 
> Hi Bernard and Michael.
> 
>   Looking for partition table of the nodes, something curious is that there
> is
> no swap partition. The file in the systemimager directory and
> ${OSCARHOME}/oscarsamples/ide.disk say that /dev/hda5 should be the swap
> partition (id 82).
> 
>   Thanks for your attention
> 
> 
> ==================== Node partition table ======================
> [EMAIL PROTECTED] ~]# fdisk /dev/hda
> 
> The number of cylinders for this disk is set to 4863.
> There is nothing wrong with that, but this is larger than 1024,
> and could in certain setups cause problems with:
> 1) software that runs at boot time (e.g., old versions of LILO)
> 2) booting and partitioning software from other OSs
>    (e.g., DOS FDISK, OS/2 FDISK)
> 
> Command (m for help): p
> 
> Disk /dev/hda: 40.0 GB, 40000000000 bytes
> 255 heads, 63 sectors/track, 4863 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> 
>    Device Boot      Start         End      Blocks   Id  System
> /dev/hda1               1           3       24066   83  Linux
> /dev/hda2               4        4863    39037950    5  Extended
> /dev/hda5               4          19      128488+  83  Linux
> /dev/hda6              20        4863    38909398+  83  Linux
> ==================== Node partition table ======================
> 
> ==================== ide.disk ======================
> [EMAIL PROTECTED] ~]# more /opt/oscar/oscarsamples/ide.disk
> /dev/hda1        24   ext3  /boot      defaults
> /dev/hda5        4096  swap
> /dev/hda6        *    ext3  /          defaults
> nfs_oscar:/home  -    nfs   /home      rw
> nfs_oscar:/opt  -    nfs    /opt       rw
> [EMAIL PROTECTED] ~]#
> ==================== ide.disk ======================
> 
> 
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job
> easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> Oscar-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/oscar-users
> 
> 

Hi Bernard.

  In my /etc/systemimager there is no autoinstallscript.conf. There is a
autoinstallscript.template and a systemimager.conf. I will post both below.

Marcelo

======================== autoinstallscript.template ==========================
#!/bin/sh
#
#   "SystemImager"
#
#   Copyright (C) 1999-2004 Brian Elliott Finley
#
#   28.07.2005 Erich Focht : SCSI device detection and generation of
#                            /a/etc/systemconfig/hardware.lst
#
#   David N. Lombard : Disks enumeration and disk editing
#
#   $Id: autoinstallscript.template 3226 2005-08-09 10:24:55Z arighi $
#

##VERSION_INFO##

# Load functions and other variables
. /etc/init.d/functions

get_arch

##NO_LISTING##
if [ -z $NO_LISTING ]; then
    VERBOSE_OPT="v"
else
    VERBOSE_OPT=""
fi

# Pull in variables left behind by the linuxrc script.
# This information is passed from the linuxrc script on the autoinstall media 
# via /tmp/variables.txt.  Apparently the shell we use in BOEL is not 
# intelligent enough to take a "set -a" parameter.
#
. /tmp/variables.txt || shellout

##SET_IMAGENAME##
##SET_OVERRIDES##

### BEGIN Check to be sure this not run from a working machine ###
# Test for mounted SCSI or IDE disks
mount | grep [hs]d[a-z][1-9] > /dev/null 2>&1
[ $? -eq 0 ] &&  logmsg Sorry.  Must not run on a working machine... &&
shellout

# Test for mounted software RAID devices
mount | grep md[0-9] > /dev/null 2>&1
[ $? -eq 0 ] &&  logmsg Sorry.  Must not run on a working machine... &&
shellout

# Test for mounted hardware RAID disks
mount | grep c[0-9]+d[0-9]+p > /dev/null 2>&1
[ $? -eq 0 ] &&  logmsg Sorry.  Must not run on a working machine... &&
shellout
### END Check to be sure this not run from a working machine ###


################################################################################
#
#   Stop RAID devices before partitioning begins
#
# Q1) Why did they get started in the first place?  
# A1) So we can pull a local.cfg file off a root mounted software RAID system.
#     They may not be started on your system -- they would only be started if
#     you did the stuff in Q3 below.
#
# Q2) Why didn't my local.cfg on my root mounted software RAID work for me 
#     with the standard kernel flavour?
# A2) The standard kernel flavour uses modules for the software RAID drivers --
#     therefore, software RAID is not available at the point in the boot
process
#     where BOEL needs to read the local.cfg file.  They are only pulled over 
#     when this script is run, which is, of course, only runnable if it was
#     pulled over the network using the settings that you would have wanted it
#     to get from the local.cfg file, which it couldn't.  Right?
#
# Q3) Whatever.  So how do I make it work with a local.cfg file on my root
#     mounted software RAID?  
# A3) Compile an autoinstall kernel with software RAID, and any other drivers 
#     you might need built in (filesystem, SCSI drivers, etc.).
#
if [ -f /proc/mdstat ]; then
  RAID_DEVICES=` cat /proc/mdstat | grep ^md | sed 's/ .*$//g' `

  # raidstop will not run unless a raidtab file exists
  echo "" >> /etc/raidtab || shellout

  # turn dem pesky raid devices off!
  for RAID_DEVICE in ${RAID_DEVICES}
  do
    DEV="/dev/${RAID_DEVICE}"
    # we don't do a shellout here because, well I forgot why, but we don't.
    logmsg "raidstop ${DEV}" && raidstop ${DEV}
  done
fi
#
################################################################################

################################################################################
# BEGIN disk enumeration
#
# Note the kludgey way to get /dev/sd* and /dev/*/c*d* to sort properly...
#
echo DISKORDER=${DISKORDER=sd,cciss,ida,rd,hd}
[ -z $DISKORDER ] || {
  echo enumerate_disks
  order=`echo "$DISKORDER" | sed 's/ /,/g' | sed s/,,*/,/g | sed s/^,//`
  DISKS=0
  while : ; do
    [ -z $order ] && break
    type=`expr $order : '\([^,]*\),' \| $order`
    case $type in
    cciss | ida | rd )
      rest=
      [ $type = rd ] && rest="8 9 10 11 12 13 14 15"
      for c in 0 1 2 3 4 5 6 7 $rest ; do
        for dev in `ls /dev/$type/c${c}d[0-9] 2>/dev/null` ; do
          echo " $dev"
          eval DISK$DISKS=${dev}
          DISKS=`expr $DISKS + 1`
        done
        for dev in `ls /dev/$type/c${c}d[0-9][0-9] 2>/dev/null` ; do
          echo " $dev"
          eval DISK$DISKS=${dev}
          DISKS=`expr $DISKS + 1`
        done
      done
      ;;
    hd )
      for dev in `ls /dev/$type[a-z] 2>/dev/null` ; do
        echo " $dev"
        eval DISK$DISKS=$dev
        DISKS=`expr $DISKS + 1`
      done
      ;;
    sd )
      for dev in `ls /dev/$type[a-z] 2>/dev/null` ; do
        echo " $dev"
        eval DISK$DISKS=$dev
        DISKS=`expr $DISKS + 1`
      done
      for dev in `ls /dev/$type[a-z][a-z] 2>/dev/null` ; do
        echo " $dev"
        eval DISK$DISKS=$dev
        DISKS=`expr $DISKS + 1`
      done
      ;;
    * )
      echo "type='$type'"
      shellout
      ;;
    esac
    order=`expr $order : '[^,]*,\(.*\)'`
  done
  echo DISKS=$DISKS
  [ $DISKS -eq 0 ] && {
    beep
    beep
    echo ""
    echo "NO DISK DEVICE FILES WERE FOUND.  THIS USUALLY MEANS THE KERNEL DID
NOT"
    echo "RECOGNIZE ANY OF THE ATTACHED DISKS."
    echo ""
    echo "The kernel boot messages, which preceded this, may indicate why."
    echo ""
    echo "Reverting to disk configuration specified by image master script."
    DISKORDER=
    echo ""
  }
  echo
  beep
}
#
# END disk enumeration
################################################################################

##PARTITION_DISKS##

logmsg "Load additional filesystem drivers."
modprobe reiserfs
modprobe ext2
modprobe ext3
modprobe jfs
modprobe xfs

logmsg "Load device mapper driver (for LVM)."
modprobe dm-mod

### BEGIN LVM initialization commands -AR- ###
##INITIALIZE_LVM_PARTITIONS##
### END LVM initialization commands ###

### BEGIN LVM groups creation commands -AR- ###
##CREATE_LVM_GROUPS##
### END LVM groups creation commands ###

### BEGIN LVM volumes creation commands -AR- ###
##CREATE_LVM_VOLUMES##
### END LVM volumes creation commands ###

### BEGIN swap and filesystem creation commands ###
##CREATE_FILESYSTEMS##
### END swap and filesystem creation commands ###

### BEGIN mount proc in image for tools like System Configurator ###
logmsg "mkdir -p /a/proc || shellout"
mkdir -p /a/proc || shellout
logmsg "mount proc /a/proc -t proc -o defaults || shellout"
mount proc /a/proc -t proc -o defaults || shellout
### END mount proc in image for tools like System Configurator ###

### BEGIN mount sysfs in image for tools that might be run during chroot ###
logmsg "mkdir -p /a/sys || shellout"
mkdir -p /a/sys || shellout
logmsg "mount sysfs /a/sys -t sysfs -o defaults || shellout"
mount sysfs /a/sys -t sysfs -o defaults || shellout
### END mount sysfs in image for tools that might be run during chroot ###

################################################################################
#
#   Lay the image down on the freshly formatted disk(s)
#
if [ ! -z $MONITOR_SERVER ]; then
    start_report_task
fi

if [ ! -z $FLAMETHROWER_DIRECTORY_PORTBASE ]; then 

    # Use multicast 
    MODULE_NAME="${IMAGENAME}"
    DIR=/a
    RETRY=7
    FLAMETHROWER_TARPIPE=y
    flamethrower_client
else 
    # Use rsync 
    if [ $NO_LISTING ]; then
        logmsg "Quietly installing image... "
        start_spinner
    fi
    if [ "${TMPFS_STAGING}" = "yes" ]; then 

        # Deposit image into tmpfs
        DIR=/tmp/tmpfs_staging
        logmsg
        logmsg "TMPFS_STAGING=${TMPFS_STAGING} -- Staging in ${DIR}"
        mkdir -p ${DIR}

        logmsg "rsync -aHS${VERBOSE_OPT} --exclude=lost+found/ --numeric-ids
${IMAGESERVER}::${IMAGENAME}/ ${DIR}/" 
        rsync -aHS${VERBOSE_OPT} --exclude=lost+found/ --numeric-ids
${IMAGESERVER}::${IMAGENAME}/ ${DIR}/ || shellout 

        # Move from staging in tmpfs to disk
        rsync -aHS${VERBOSE_OPT} --exclude=lost+found/ --numeric-ids ${DIR}/
/a/
    else
        logmsg "rsync -aHS${VERBOSE_OPT} --exclude=lost+found/ --numeric-ids
${IMAGESERVER}::${IMAGENAME}/ /a/" 
        rsync -aHS${VERBOSE_OPT} --exclude=lost+found/ --numeric-ids
${IMAGESERVER}::${IMAGENAME}/ /a/ || shellout 
    fi
fi 

beep

#
################################################################################


if [ $NO_LISTING ]; then
    stop_spinner
fi

# Leave notice of which image is installed on the client
echo $IMAGENAME > /a/etc/systemimager/IMAGE_LAST_SYNCED_TO || shellout

if [ ! -z $MONITOR_SERVER ]; then
    stop_report_task 100
fi

### BEGIN generate new fstab file from autoinstallscript.conf ###
##GENERATE_FSTAB##
### END generate new fstab file from autoinstallscript.conf ###

################################################################################
#
#   Process override directories
#
for OVERRIDE in $OVERRIDES
do
    if [ ! -z $FLAMETHROWER_DIRECTORY_PORTBASE ]; then
        # Use multicast
        MODULE_NAME="override_${OVERRIDE}"
        DIR=/a
        RETRY=7
        FLAMETHROWER_TARPIPE=y
        flamethrower_client
    else
        # Use rsync
        logmsg "rsync -av --numeric-ids $IMAGESERVER::overrides/$OVERRIDE/ /a/"
        rsync -av --numeric-ids $IMAGESERVER::overrides/$OVERRIDE/ /a/ || logmsg
"Override directory $OVERRIDE doesn't seem to exist, but that may be OK."
    fi
done

beep

#
################################################################################

################################################################################
# BEGIN disk edits
#
[ -z $DISKORDER ] || {
  echo "Editing files for actual disk configuration..."
##SHOW_DISK_EDITS##
  for file in /etc/fstab /etc/raidtab /etc/systemconfig/systemconfig.conf; do
    [ -f /a/$file ] || continue
    echo " $file"
    cp /a/$file /a/$file.image
    cat /a/$file.image |
##EDIT_DISK_NAMES##
    cat > /a/$file
  done
  echo
  beep
}
#
# END disk edits
################################################################################


##################################################################
#
# Uncomment the line below to leave your hostname blank.
# Certain distributions use this as an indication to take on the
# hostname provided by a DHCP server.  The default is to have
# SystemConfigurator assign your clients the hostname that
# corresponds to the IP address the use during the install.
# (If you used to use the static_dhcp option, this is your man.)
#
#HOSTNAME=""


################################################################################
#
# mount /dev /a/dev -o bind if needed
#
##BOEL_DEVSTYLE##
#
################################################################################


################################################################################
#
#   Detect scsi hardware and include the device IDs into the hardware.lst
#   file used by systemconfigurator. Do nothing if the hardware.lst file
#   already exists (which is a sign that it has been already prepared).
#   Would be shorter if discover could return numerical device IDs...
#
if [ ! -f /a/etc/systemconfig/hardware.lst ]; then
   SCSI_MODS=`discover -f "%m\n" scsi | grep -v ide-scsi | uniq`
   for MOD in $SCSI_MODS; do
      DEVID=`grep $MOD /proc/bus/pci/devices | cut -f 2 | sort | uniq`
      for MYDEV in $DEVID; do
         VENDOR=`echo $MYDEV | cut -b 1-4`
         MODEL=`echo $MYDEV | cut -b 5-8`
         echo "$VENDOR $MODEL scsi $MOD" >> /a/etc/systemconfig/hardware.lst
         echo "Added SCSI device $VENDOR:$MODEL using module $MOD to
hardware.lst"
      done
   done
fi
#
################################################################################

################################################################################
#
#   System Configurator
#
# Configure the client's hardware, network interface, and boot loader.
#
##SYSTEMCONFIGURATOR##
#
################################################################################


################################################################################
#
#   Post Install Scripts
#
run_post_install_scripts
#
################################################################################


################################################################################
#
#   Unmount filesystems
#
##UMOUNT_FILESYSTEMS##
#
################################################################################


################################################################################
#
#   Tell the image server we're done
#   
rsync $IMAGESERVER::scripts/imaging_complete > /dev/null 2>&1
#
################################################################################

# Take network interface down
[ -z $DEVICE ] && DEVICE=eth0
ifconfig $DEVICE down || shellout

# Announce completion (even for non beep-incessantly --post-install options)
beep 3

##POSTINSTALL##
======================== autoinstallscript.template ==========================

======================== systemimager.conf ==========================
#
# "SystemImager"
#
#  Copyright (C) 2002 Bald Guy Software <[EMAIL PROTECTED]>
#
#    $Id: systemimager.conf 2045 2002-10-26 05:19:34Z brianfinley $
#

################################################################################
#
# The directory where images are stored by default.
#
DEFAULT_IMAGE_DIR = /var/lib/systemimager/images

################################################################################
#
# The directory where files needed by autoinstall clients are stored.
#
AUTOINSTALL_SCRIPT_DIR = /var/lib/systemimager/scripts

################################################################################
#
# The directory which contains the architecture specific directories where 
# files needed by autoinstall clients are stored.
#
AUTOINSTALL_BOOT_DIR = /usr/share/systemimager/boot

################################################################################
#
# SystemImager's rsyncd.conf file.
#
RSYNCD_CONF = /etc/systemimager/rsyncd.conf

################################################################################
#
# The path to the directory where rsync stub files are stored.
#
RSYNC_STUB_DIR = /etc/systemimager/rsync_stubs

################################################################################
#
# Directory where tftp and net-boot files are stored
#
TFTP_DIR = /tftpboot

################################################################################
#
# This setting affects netbootmond.  If set to LOCAL, then after successful
# completion of an install, a client's net boot configuration is modified to
# ensure future boots will happen from the client's local disk.  
# NET_BOOT_DEFAULT can be set to local or net.  Be sure to restart 
# netbootmond after changing this setting (/etc/init.d/netbootmond restart).
#
NET_BOOT_DEFAULT = net
======================== systemimager.conf ==========================


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Oscar-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oscar-users

Reply via email to