WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: NFS storage base scripts mod for PXE booting [split]  (Read 21368 times)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11041
Re: NFS storage base scripts mod for PXE booting [split]
« Reply #15 on: August 31, 2009, 06:50:01 AM »
As gutmensch, I see no use for the separation in cases other than thin clients with low ram. The ram savings would be negligible if the libs.tczl would be in ram, or worse by 3mb with lib.tcel (of course lib.tcel could be deleted after extraction, to get absolutely the same ram usage as current microcore). It would also bring some overhead, and with a tcz use one loop.

Also, what libraries one's setup considers needed and what are considered extra vary by the setup. For example if one client shows pics, it needs libpng; if another runs a webserver, it needs other libs. There's no general solution.

Being able to do this kind of customization is the forte of TC/MC. However I don't see some separation like this ready-done being useful to very many.
The only barriers that can stop you are the ones you create yourself.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: NFS storage base scripts mod for PXE booting [split]
« Reply #16 on: August 31, 2009, 08:48:39 AM »
With NFS, it loopmounts over NFS, so it does not copy to RAM at all.
Only the TFTP loaded extensions get copied to RAM.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11041
Re: NFS storage base scripts mod for PXE booting [split]
« Reply #17 on: August 31, 2009, 08:57:17 AM »
Indeed, I forgot to take that into account in my post. What I meant was "....ram savings in normal cases would be...".
The only barriers that can stop you are the ones you create yourself.

Offline alu

  • Sr. Member
  • ****
  • Posts: 429
Re: NFS storage base scripts mod for PXE booting [split]
« Reply #18 on: September 01, 2009, 02:34:48 PM »
nevertheless: starting with a microcore at 3.5 mb (or less) would deserve from thin client up to other machines (i did not know that while loading tc/mc from server, you only load the tftp extension in ram, since i ever did it, but want to move to this kind of boot methode; so thanks, i have learnt smthg); curaga, you'r certainly right while saying that it is just little ram saving, but my point is rather: as we have microcore with 7.* mb, why shouldn't we make it smaller (if it is not too much workload; obviously, i don't want to complicate the existing concept)? i did not think to make for each kind of library (or group of libraries) a special extension, rather to package all libraries at the moment in microcore which we could remove into one tcz extension. if you want, it would be a sorte of what gutmensch says, i.e. radicalization of the tcz approach while at the same time a step nearer to a kind of turn key machine. as a result, you have a minimal setting with bzImage and the kernel, and everything else come as a tcz extensions. that way, you would also have an alternative to a tftp/pxe approach for those user wanting to stay with their system on a physicall support. by the way, as we are there, another suggestion (useless these are only personal thoughs in order to share ideas and stimulate the reflection on tc/mc): would it be possible for the TC-Team to provide a kind of NFS-server access in order for us to remote install tc/mc?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11041
Re: NFS storage base scripts mod for PXE booting [split]
« Reply #19 on: September 04, 2009, 03:46:02 PM »
by the way, as we are there, another suggestion (useless these are only personal thoughs in order to share ideas and stimulate the reflection on tc/mc): would it be possible for the TC-Team to provide a kind of NFS-server access in order for us to remote install tc/mc?
There is already such a service: netboot.me (that's the URL as well). It isn't ours, but they offer TC and MC as netbootable images.
The only barriers that can stop you are the ones you create yourself.

Offline alu

  • Sr. Member
  • ****
  • Posts: 429
Re: NFS storage base scripts mod for PXE booting [split]
« Reply #20 on: September 04, 2009, 04:59:00 PM »
thanks, did not see the post of the person loading the service, i shall have a look

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: NFS storage base scripts mod for PXE booting [split]
« Reply #21 on: September 22, 2009, 11:10:31 AM »
New patches for 2.4 ( With suggested function name change. )

Code: [Select]
*** tc-config.orig      2009-09-20 23:48:37.000000000 -0500
--- tc-config   2009-09-20 23:48:37.000000000 -0500
***************
*** 217,222 ****
--- 217,224 ----
           settime*) SETTIME=${i#*=} ;;
           thm*) THEME=${i#*=} ;;
           bkg*) BACKGROUND=${i#*=} ;;
+            nfsmount* ) NFSMOUNT=${i#*=} ;;
+            tftplist* ) TFTPLIST=${i#*=} ;;
          esac
        ;;
        *)
***************
*** 289,294 ****
--- 291,338 ----
  /sbin/ifconfig lo 127.0.0.1 up
  /sbin/route add 127.0.0.1 lo &

+ # dhcp.sh runs udhcpc async, so it exits before network is up
+ wait4Server() {
+    [ -z "$DHCP_RAN" ] && /etc/init.d/dhcp.sh
+    CNT=0
+    until ping -c 1 $1 >/dev/null 2>&1
+    do
+       [ $((CNT++)) -gt 30 ] && break || sleep 1
+    done
+    DHCP_RAN=1
+ }
+
+ # First process tftp entries
+ modprobe -q squashfs 2>/dev/null
+ if [ -n "$TFTPLIST" ]; then
+    SERVER=`echo $TFTPLIST | awk -F\: '{ print $1 }'`
+    FILE=`echo $TFTPLIST | awk -F\: '{ print $2 }'`
+    wait4Server $SERVER
+    (  mkdir /tmp/tftp ; cd /tmp/tftp
+       NAME=`basename $FILE`
+       tftp -g -r $FILE $SERVER
+       echo -ne "${BLUE}TFTP Loading Extensions ${YELLOW}"
+       while read EXTENSION
+       do
+          tftp -g -r $EXTENSION $SERVER
+          EXTNAME=`basename $EXTENSION`
+          echo -ne "$EXTNAME "
+          tcloop_mount "$EXTNAME" $(getbasefile "$EXTNAME" 1)
+       done < $NAME
+       echo "${GREEN} Done.${NORMAL}"
+       rm $NAME
+    )
+ fi
+
+ if [ -n "$NFSMOUNT" ]; then
+    SERVER=`echo $NFSMOUNT | awk -F\: '{ print $1 }'`
+    wait4Server $SERVER
+    echo "$NFSMOUNT /mnt/nfs nfs defaults,nolock 0 0" >> /etc/fstab
+    echo "Mounting $NFSMOUNT"
+    mkdir /mnt/nfs
+    mount /mnt/nfs
+ fi
+
  if [ -n "$CHECKFS" ]; then
     touch /etc/sysconfig/checkfs
     wait $fstab_pid
***************
*** 340,346 ****
  tceSetup

  #
- modprobe -q squashfs 2>/dev/null
  if [ "$(ls -A /opt/tce)" ]; then
     echo "${BLUE}Checking for /opt/tce items... ${NORMAL}"
     gettceapps "/opt/tce"
--- 384,389 ----
***************
*** 588,594 ****
  if [ -n "$NODHCP" ]; then
    echo "${GREEN}Skipping DHCP broadcast/network detection as requested on boot commandline.${NORMAL}"
  else
!   /etc/init.d/dhcp.sh &
  fi

  [ -n "$KEYMAP" ] || KEYMAP="us"
--- 631,637 ----
  if [ -n "$NODHCP" ]; then
    echo "${GREEN}Skipping DHCP broadcast/network detection as requested on boot commandline.${NORMAL}"
  else
!    [ -z "$DHCP_RAN" ] && /etc/init.d/dhcp.sh &
  fi

  [ -n "$KEYMAP" ] || KEYMAP="us"



Code: [Select]
*** tc-functions.orig   2009-09-20 23:48:37.000000000 -0500
--- tc-functions        2009-09-20 23:48:37.000000000 -0500
***************
*** 74,79 ****
--- 74,84 ----
   MOUNTPOINT=""
   MOUNTED="no"
   D2="$1"
+  if [ "$D2" == "nfs" ]; then
+     MOUNTPOINT=/mnt/nfs
+     MOUNTED="yes"
+     return
+  fi
   if [ "${D2:0:5}" == "UUID=" ]; then
     D2=`/sbin/blkid -lt $D2 -o device`
     if [ "$?" != 0 ]; then
***************
*** 111,117 ****

  autoscan(){
  FOUND=""
! for DEVICE in `grep "^/dev/" /etc/fstab | grep -vf /etc/init.d/tc_noscan.lst | awk 'FS="/" { print $3}'`; do
     find_mountpoint $DEVICE
     if [ -n "$MOUNTPOINT" ]; then
       if [ "$MOUNTED" == "no" ]; then
--- 116,122 ----

  autoscan(){
  FOUND=""
! for DEVICE in `grep "/mnt/" /etc/fstab | grep -vf /etc/init.d/tc_noscan.lst | awk 'FS="/" { print $3}'`; do
     find_mountpoint $DEVICE
     if [ -n "$MOUNTPOINT" ]; then
       if [ "$MOUNTED" == "no" ]; then


Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: NFS storage base scripts mod for PXE booting [split]
« Reply #22 on: September 26, 2009, 02:26:53 PM »
Just in case anybody gives a hoot, here are patches for TC 1.4

Code: [Select]
*** tc-config.org       2009-09-26 12:59:32.000000000 -0500
--- tc-config   2009-09-26 12:59:33.000000000 -0500
***************
*** 13,18 ****
--- 13,30 ----
  TCEWBAR="/usr/local/tce.wbar"
  INSTALLED=""

+ tcloop_mount() {
+       [ -d /tmp/tcloop/"$2" ] || mkdir -p /tmp/tcloop/"$2"
+       mount "$1" /tmp/tcloop/"$2" -o loop
+
+         APPNAME=$2 tcz-symlinker --dir > /dev/null 2>&1
+         APPNAME=$2 tcz-symlinker > /dev/null 2>&1
+
+       if [ -f /tmp/tcloop/"$2"/user.tar.gz ]; then
+               tar xzf /tmp/tcloop/"$2"/user.tar.gz -C / > /dev/null 2>&1
+       fi
+ }
+
  gettceapps(){
     for FILE in `ls $1/*.tce* 2>/dev/null`
     do
***************
*** 33,48 ****
        if stringinstring "tcz" "$EXT"; then
          BASE=$(getbasefile "$FILE" 1)
          echo -n " ${YELLOW}$BASE${NORMAL}"
!       [ -d /tmp/tcloop/"$BASE" ] || mkdir -p /tmp/tcloop/"$BASE"
!       mount "$FILE" /tmp/tcloop/"$BASE" -o loop
!
!         APPNAME=$BASE tcz-symlinker --dir > /dev/null 2>&1
!         APPNAME=$BASE tcz-symlinker > /dev/null 2>&1
!
!       if [ -f /tmp/tcloop/"$BASE"/user.tar.gz ]; then
!               tar xzf /tmp/tcloop/"$BASE"/user.tar.gz -C / > /dev/null 2>&1
!       fi
!
          case "$EXT" in *m*) NEW_MODULES=1 ;; esac
          case "$EXT" in *l*) NEW_LIBS=1 ;; esac
          [ -x "$TCEINSTALLED"/"$BASE" ] || touch "$TCEINSTALLED"/"$BASE"
--- 45,51 ----
        if stringinstring "tcz" "$EXT"; then
          BASE=$(getbasefile "$FILE" 1)
          echo -n " ${YELLOW}$BASE${NORMAL}"
!       tcloop_mount "$FILE" "$BASE"
          case "$EXT" in *m*) NEW_MODULES=1 ;; esac
          case "$EXT" in *l*) NEW_LIBS=1 ;; esac
          [ -x "$TCEINSTALLED"/"$BASE" ] || touch "$TCEINSTALLED"/"$BASE"
***************
*** 125,130 ****
--- 128,135 ----
           resume*) RESUME=${i#*=} ;;
           host*) HOST=1 ;;
           settime*) SETTIME=${i#*=} ;;
+            nfsmount* ) NFSMOUNT=${i#*=} ;;
+            tftplist* ) TFTPLIST=${i#*=} ;;
          esac
        ;;
        *)
***************
*** 205,211 ****
  if [ -n "$NODHCP" ]; then
    echo "${GREEN}Skipping DHCP broadcast/network detection as requested on boot commandline.${NORMAL}"
  else
!   /etc/init.d/dhcp.sh &
  fi

  if [ -n "$CHECKFS" ]; then
--- 210,257 ----
  if [ -n "$NODHCP" ]; then
    echo "${GREEN}Skipping DHCP broadcast/network detection as requested on boot commandline.${NORMAL}"
  else
!   [ -z "DHCP_RAN" ] && /etc/init.d/dhcp.sh &
! fi
!
! # dhcp.sh runs udhcpc async, so it exits before network is up
! wait4Server() {
!    [ -z "$DHCP_RAN" ] && /etc/init.d/dhcp.sh
!    CNT=0
!    until ping -c 1 $1 >/dev/null 2>&1
!    do
!       [ $((CNT++)) -gt 30 ] && break || sleep 1
!    done
!    DHCP_RAN=1
! }
!
! # First process tftp entries
! if [ -n "$TFTPLIST" ]; then
!    SERVER=`echo $TFTPLIST | awk -F\: '{ print $1 }'`
!    FILE=`echo $TFTPLIST | awk -F\: '{ print $2 }'`
!    wait4Server $SERVER
!    (  mkdir /tmp/tftp ; cd /tmp/tftp
!       NAME=`basename $FILE`
!       tftp -g -r $FILE -l ./$NAME $SERVER
!       echo -ne "${BLUE}TFTP Loading Extensions ${YELLOW}"
!       while read EXTENSION
!       do
!          EXTNAME=`basename $EXTENSION`
!          tftp -g -r $EXTENSION -l ./$EXTNAME $SERVER
!          echo -ne "$EXTNAME "
!          tcloop_mount "$EXTNAME" $(getbasefile "$EXTNAME" 1)
!       done < $NAME
!       echo "${GREEN} Done.${NORMAL}"
!       rm $NAME
!    )
! fi
!
! if [ -n "$NFSMOUNT" ]; then
!    SERVER=`echo $NFSMOUNT | awk -F\: '{ print $1 }'`
!    wait4Server $SERVER
!    echo "$NFSMOUNT /mnt/nfs nfs defaults,nolock 0 0" >> /etc/fstab
!    echo "Mounting $NFSMOUNT"
!    mkdir /mnt/nfs
!    mount /mnt/nfs
  fi

  if [ -n "$CHECKFS" ]; then


Code: [Select]
*** tc-functions.org    2009-09-26 12:59:32.000000000 -0500
--- tc-functions        2009-09-26 12:59:33.000000000 -0500
***************
*** 80,85 ****
--- 80,90 ----
   MOUNTPOINT=""
   MOUNTED="no"
   D2="$1"
+  if [ "$D2" == "nfs" ]; then
+    MOUNTPOINT=/mnt/nfs
+    MOUNTED="yes"
+    return
+  fi
   if [ "${D2:0:5}" == "UUID=" ]; then
     D2=`/sbin/blkid -lt $D2 -o device`
     if [ "$?" != 0 ]; then
***************
*** 117,123 ****

  autoscan(){
  FOUND=""
! for DEVICE in `grep "^/dev/" /etc/fstab | grep -vf /etc/init.d/tc_noscan.lst | awk 'FS="/" { print $3}'`; do
     find_mountpoint $DEVICE
     if [ -n "$MOUNTPOINT" ]; then
       if [ "$MOUNTED" == "no" ]; then
--- 122,128 ----

  autoscan(){
  FOUND=""
! for DEVICE in `grep "/mnt/" /etc/fstab | grep -vf /etc/init.d/tc_noscan.lst | awk 'FS="/" { print $3}'`; do
     find_mountpoint $DEVICE
     if [ -n "$MOUNTPOINT" ]; then
       if [ "$MOUNTED" == "no" ]; then

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: NFS storage base scripts mod for PXE booting [split]
« Reply #23 on: September 30, 2009, 08:37:33 PM »
Wow. Significant changes to TCL 2.4rc2 cause previous patches to not apply.
Removal of tcloop_mount() requires substitution of tce-load. The current patches are:

Code: [Select]
*** tc-config.orig      2009-09-30 18:34:07.000000000 -0500
--- tc-config   2009-09-30 18:34:08.000000000 -0500
***************
*** 75,80 ****
--- 75,82 ----
           settime*) SETTIME=${i#*=} ;;
           thm*) THEME=${i#*=} ;;
           bkg*) BACKGROUND=${i#*=} ;;
+            nfsmount* ) NFSMOUNT=${i#*=} ;;
+            tftplist* ) TFTPLIST=${i#*=} ;;
          esac
        ;;
        *)
***************
*** 146,151 ****
--- 148,198 ----
  /sbin/ifconfig lo 127.0.0.1 up
  /sbin/route add 127.0.0.1 lo &

+ # dhcp.sh runs udhcpc async, so it exits before network is up
+ wait4Server() {
+    [ -z "$DHCP_RAN" ] && /etc/init.d/dhcp.sh
+    CNT=0
+    until ping -c 1 $1 >/dev/null 2>&1
+    do
+       [ $((CNT++)) -gt 30 ] && break || sleep 1
+    done
+    DHCP_RAN=1
+ }
+
+ # First process tftp entries
+ modprobe -q squashfs 2>/dev/null
+ if [ -n "$TFTPLIST" ]; then
+    SERVER=`echo $TFTPLIST | awk -F\: '{ print $1 }'`
+    FILE=`echo $TFTPLIST | awk -F\: '{ print $2 }'`
+    wait4Server $SERVER
+    (  TMPDIR=/tmp/tftp
+       TCEDIR=/opt/.tce_dir
+       echo > $TCEDIR
+       mkdir $TMPDIR ; cd $TMPDIR
+       NAME=`basename $FILE`
+       tftp -g -r $FILE $SERVER
+       echo -ne "${BLUE}TFTP Loading Extensions ${YELLOW}"
+       while read EXTENSION
+       do
+          tftp -g -r $EXTENSION $SERVER
+          EXTNAME=`basename $EXTENSION`
+          echo -ne "$EXTNAME "
+          /usr/bin/tce-load -i $TMPDIR/$EXTNAME
+       done < $NAME
+       echo "${GREEN} Done.${NORMAL}"
+       rm $NAME $TCEDIR
+    )
+ fi
+
+ if [ -n "$NFSMOUNT" ]; then
+    SERVER=`echo $NFSMOUNT | awk -F\: '{ print $1 }'`
+    wait4Server $SERVER
+    echo "$NFSMOUNT /mnt/nfs nfs defaults,nolock 0 0" >> /etc/fstab
+    echo "Mounting $NFSMOUNT"
+    mkdir /mnt/nfs
+    mount /mnt/nfs
+ fi
+
  if grep -q "^/dev/root" /proc/mounts; then
     INSTALLED=1
     echo "${RED}Detected Traditional (Scatter) Hard drive installation.${NORMAL}"
***************
*** 177,183 ****
     fi
  fi
  #
- modprobe -q squashfs 2>/dev/null

  if [ -n "$USER" ]; then
     if ! grep "$USER" /etc/passwd >/dev/null; then addUser; fi
--- 224,229 ----
***************
*** 367,373 ****
  if [ -n "$NODHCP" ]; then
    echo "${GREEN}Skipping DHCP broadcast/network detection as requested on boot commandline.${NORMAL}"
  else
!   /etc/init.d/dhcp.sh &
  fi

  [ -n "$KEYMAP" ] || KEYMAP="us"
--- 413,419 ----
  if [ -n "$NODHCP" ]; then
    echo "${GREEN}Skipping DHCP broadcast/network detection as requested on boot commandline.${NORMAL}"
  else
!   [ -z "$DHCP_RAN" ] && /etc/init.d/dhcp.sh &
  fi

  [ -n "$KEYMAP" ] || KEYMAP="us"

Code: [Select]
*** tc-functions.orig   2009-09-30 18:34:07.000000000 -0500
--- tc-functions        2009-09-30 18:34:08.000000000 -0500
***************
*** 74,79 ****
--- 74,84 ----
   MOUNTPOINT=""
   MOUNTED="no"
   D2="$1"
+  if [ "$D2" == "nfs" ]; then
+     MOUNTPOINT=/mnt/nfs
+     MOUNTED="yes"
+     return
+  fi
   if [ "${D2:0:5}" == "UUID=" ]; then
     D2=`/sbin/blkid -lt $D2 -o device`
     if [ "$?" != 0 ]; then
***************
*** 111,117 ****

  autoscan(){
  FOUND=""
! for DEVICE in `grep "^/dev/" /etc/fstab | grep -vf /etc/init.d/tc_noscan.lst | awk 'FS="/" { print $3}'`; do
     find_mountpoint $DEVICE
     if [ -n "$MOUNTPOINT" ]; then
       if [ "$MOUNTED" == "no" ]; then
--- 116,122 ----

  autoscan(){
  FOUND=""
! for DEVICE in `grep "/mnt/" /etc/fstab | grep -vf /etc/init.d/tc_noscan.lst | awk 'FS="/" { print $3}'`; do
     find_mountpoint $DEVICE
     if [ -n "$MOUNTPOINT" ]; then
       if [ "$MOUNTED" == "no" ]; then

Offline gutmensch

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 605
  • I can make it disappear, have no fear!
    • remembrance blog
Re: NFS storage base scripts mod for PXE booting [split]
« Reply #24 on: October 01, 2009, 02:13:11 AM »
It's a PITA to rebuild patches for every "maintenance" release... good work, Gerald! For this reason I'll stay with 2.3.1 first ;-)

BTW your patches are working great, using them for a while now :)

Best regards,
Robert
If I seem unduly clear to you, you must have misunderstood what I said. (Alan Greenspan)

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: NFS storage base scripts mod for PXE booting [split]
« Reply #25 on: October 04, 2009, 12:44:35 PM »
Glad to hear that the patches are appreciated.
I have added instructions in the netboot wiki article.
Good news ... The patches will be included in V2.5.
Now that 2.4rc4 is out, I have updated the tc-config patch to honor the 'showapps' boot option.
If you don't care about showapps, the previous patch still applies.

I am only posting the tc-config patch.  The tc-functions patch has not changed, and is still needed.

Code: [Select]
*** tc-config.orig      2009-10-04 11:20:36.000000000 -0500
--- tc-config   2009-10-04 11:20:37.000000000 -0500
***************
*** 81,86 ****
--- 81,88 ----
           settime*) SETTIME=${i#*=} ;;
           thm*) THEME=${i#*=} ;;
           bkg*) BACKGROUND=${i#*=} ;;
+            nfsmount* ) NFSMOUNT=${i#*=} ;;
+            tftplist* ) TFTPLIST=${i#*=} ;;
          esac
        ;;
        *)
***************
*** 153,158 ****
--- 155,205 ----
  /sbin/ifconfig lo 127.0.0.1 up
  /sbin/route add 127.0.0.1 lo &

+ # dhcp.sh runs udhcpc async, so it exits before network is up
+ wait4Server() {
+    [ -z "$DHCP_RAN" ] && /etc/init.d/dhcp.sh
+    CNT=0
+    until ping -c 1 $1 >/dev/null 2>&1
+    do
+       [ $((CNT++)) -gt 30 ] && break || sleep 1
+    done
+    DHCP_RAN=1
+ }
+
+ # First process tftp entries
+ modprobe -q squashfs 2>/dev/null
+ if [ -n "$TFTPLIST" ]; then
+    SERVER=`echo $TFTPLIST | awk -F\: '{ print $1 }'`
+    FILE=`echo $TFTPLIST | awk -F\: '{ print $2 }'`
+    wait4Server $SERVER
+    (  TMPDIR=/tmp/tftp
+       TCEDIR=/opt/.tce_dir
+       echo > $TCEDIR
+       mkdir $TMPDIR ; cd $TMPDIR
+       NAME=${FILE##*/}
+       tftp -g -r $FILE $SERVER
+       [ $SHOWAPPS ] && echo -ne "${BLUE}TFTP Loading Extensions ${YELLOW}"
+       while read EXTENSION
+       do
+          tftp -g -r $EXTENSION $SERVER
+          EXTNAME=${EXTENSION##*/}
+          [ $SHOWAPPS ] && echo -ne "$EXTNAME "
+          /usr/bin/tce-load -i $TMPDIR/$EXTNAME
+       done < $NAME
+       [ $SHOWAPPS ] && echo "${GREEN} Done.${NORMAL}"
+       rm $NAME $TCEDIR
+    )
+ fi
+
+ if [ -n "$NFSMOUNT" ]; then
+    SERVER=`echo $NFSMOUNT | awk -F\: '{ print $1 }'`
+    wait4Server $SERVER
+    echo "$NFSMOUNT /mnt/nfs nfs defaults,nolock 0 0" >> /etc/fstab
+    [ $SHOWAPPS ] && echo "Mounting $NFSMOUNT"
+    mkdir /mnt/nfs
+    mount /mnt/nfs >/dev/null 2>&1
+ fi
+
  if grep -q "^/dev/root" /proc/mounts; then
     INSTALLED=1
     echo "${RED}Detected Traditional (Scatter) Hard drive installation.${NORMAL}"
***************
*** 184,190 ****
     fi
  fi
  #
- modprobe -q squashfs 2>/dev/null

  if [ -n "$USER" ]; then
     if ! grep "$USER" /etc/passwd >/dev/null; then addUser; fi
--- 231,236 ----
***************
*** 403,409 ****
  if [ -n "$NODHCP" ]; then
    echo "${GREEN}Skipping DHCP broadcast/network detection as requested on boot commandline.${NORMAL}"
  else
!   /etc/init.d/dhcp.sh &
  fi

  [ -n "$KEYMAP" ] || KEYMAP="us"
--- 449,455 ----
  if [ -n "$NODHCP" ]; then
    echo "${GREEN}Skipping DHCP broadcast/network detection as requested on boot commandline.${NORMAL}"
  else
!   [ -z "$DHCP_RAN" ] && /etc/init.d/dhcp.sh &
  fi

  [ -n "$KEYMAP" ] || KEYMAP="us"

Offline nsqtr

  • Newbie
  • *
  • Posts: 11
Re: NFS storage base scripts mod for PXE booting [split]
« Reply #26 on: October 18, 2009, 07:28:33 PM »
Gerald,
The patches are much, much appreciated. Without them, I'd not been able to move down my desired path. I have a little LAN of cast-off laptops that I boot as a group of compute nodes. None of the laptops have HDDs and I've max'd out their respective memory capabilities.  The Primary Node must have two network interfaces and must be capable of booting from a CD ROM. Any machine can act as the Primary Node, thus making hardware replacements easy. Since they're all laptops, they are all battery-backed as well, so they act as little UPS-enabled compute nodes.  The non-Primary Nodes must merely be PXE-bootable.

Hence, your patches have been wonderful.

I've not moved up to microcore 2.4 yet and see that your work will be included in 2.,5 so will wait to upgrade.

However, I'm looking for suggestions on how to fix a race condition I have with my laptops that have Intel e10/e100 NICs. They need the firmware extension.  I've tried putting the tcz in the /opt/tce of the pxeimage and I've also tried NFS loop-mounting the TCZ from the primary node but I can't get the firmware tcz to load before DHCP tries to fire up the NIC and fails.  After the  boot dust has settled on the node, I can go in manually and run dhcp.sh and everything works fine.  I've also tried running with the NODHCP bootcode, then running dhcp.sh from within my bootlocal.sh but I find I've got the same problem.  I think it's because bootlocal.sh gets kicked off in a separate process with tc-config runs, hence the seeming race condition.

Any thoughts or ideas are greatly appreciated.

thanks
« Last Edit: October 18, 2009, 11:37:45 PM by nsqtr »

Offline gutmensch

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 605
  • I can make it disappear, have no fear!
    • remembrance blog
Re: NFS storage base scripts mod for PXE booting [split]
« Reply #27 on: October 19, 2009, 09:52:29 AM »
glad to hear that too, I love his solution! :)

@nsqtr:
You could simply remaster the tinycore.gz so that it includes the correct modules and firmware, unpack it like said in the wiki, loop mount the needed modules/firmware extensions and copy the files to lib/modules and lib/firmware. Repack it and you should have a working image with network!
If I seem unduly clear to you, you must have misunderstood what I said. (Alan Greenspan)

Offline nsqtr

  • Newbie
  • *
  • Posts: 11
Re: NFS storage base scripts mod for PXE booting [split]
« Reply #28 on: October 19, 2009, 09:01:44 PM »
Most excellent!  I just remastered and rebooted my Primary Node and Compute Nodes and everybody is happily chunking along.

thanks