Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
SMS Forum Index » Tips, Tricks & Tutorials

Post new topic   This topic is locked: you cannot edit posts or make replies.
PXE Booting and LTSP-4.2 on SMS
View previous topic :: View next topic  
Author Message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1757
Location: Greece

PostPosted: Sun Jul 04, 2010 3:05 pm    Post subject: PXE Booting and LTSP-4.2 on SMS Reply with quote

1st scenario is to be able to boot SMS.Live.CD over the network or any other linux-live based live cd with kernel 2.6.33.5.

You will need to download the initrd from
http://sms.it-ccs.com/isos/Testing/PXEBoot/initrd.gz

To enable PXE booting we need to uncomment in /etc/inetd.conf
Code:
# tftp  dgram   udp     wait    root    /usr/sbin/in.tftpd  in.tftpd -s /tftpboot -r blksize


Create the dirs
Code:
mkdir -p /tftpboot/sms/pxelinux.cfg


Set our NFS server to export /tftpboot/sms
Add in /etc/exports
Code:
/tftpboot/sms  *(ro,sync,all_squash,no_subtree_check)


Copy pxelinux.0 from syslinux directory
Code:
cp /usr/share/syslinux/pxelinux.0 /tftpboot/sms/


Copy the contents of SMS.Live.CD to /tftpboot/sms (2 folders sms boot)
replacing
/tftpboot/sms/initrd.gz
/tftpboot/sms/boot/initrd.gz
with the provided one on top of this thread.

Under /tftpboot/sms/pxelinux.cfg create a file called default which can be /boot/sms.cfg from SMS.Live.CD.
A simple default file could be
Code:
PROMPT 0
TIMEOUT 70
LABEL sms
KERNEL /boot/vmlinuz
APPEND vga=791 initrd=/boot/initrd.gz ramdisk_size=8888 root=/dev/ram0 rw


To be able all to work we need a dhcp server
Assuming your sms server is 192.168.0.1 and your router 192.168.0.254 add to your /etc/dhcpd.conf
Code:
# Allow bootp requests
allow bootp;

# Point to the TFTP server:
next-server 192.168.0.1;

subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.130 192.168.0.143;
default-lease-time 3600;
max-lease-time 604800;
option routers 192.168.0.254;
option domain-name-servers 192.168.0.1;
option subnet-mask 255.255.255.0;
option domain-name "local.domain";
range dynamic-bootp 192.168.0.150 192.168.0.160;
use-host-decl-names on;
option time-offset -8;
if substring (option vendor-class-identifier, 0, 9) = "PXEClient" {
      filename "/sms/pxelinux.0";
}
}


If you do not have an rc.dhcpd start up script create one
/etc/rc.d/rc.dhcpd
Code:
#!/bin/sh
#
# /etc/rc.d/rc.dhcpd
#      This shell script takes care of starting and stopping
#      the ISC DHCPD service
#

# Put the command line options here that you want to pass to dhcpd:
DHCPD_OPTIONS="-q eth0"

[ -x /usr/sbin/dhcpd ] || exit 0

[ -f /etc/dhcpd.conf ] || exit 0

start() {
      # Start daemons.
      echo -n "Starting dhcpd:  /usr/sbin/dhcpd $DHCPD_OPTIONS "
      /usr/sbin/dhcpd $DHCPD_OPTIONS
      echo
}
stop() {
      # Stop daemons.
      echo -n "Shutting down dhcpd: "
      killall -TERM dhcpd
      echo
}
status() {
  PIDS=$(pidof dhcpd)
  if [ "$PIDS" == "" ]; then
    echo "dhcpd is not running!"
  else
    echo "dhcpd is running at pid(s) ${PIDS}."
  fi
}
restart() {
      stop
      start
}

# See how we were called.
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart)
        stop
        start
        ;;
  status)
        status
        ;;
  *)
        echo "Usage: $0 {start|stop|status|restart}"
        ;;
esac

exit 0


Start/Restart services
Code:
/etc/rc.d/rc.inetd restart
/etc/rc.d/rc.rpc start
/etc/rc.d/rc.nfsd start
/etc/rc.d/rc.dhcpd start


You now ready to boot from network.

2nd scenario is to boot LTSP-4.2.

For that scenario the only thing you have to do is to download and install
http://sms.it-ccs.com/isos/SMS-Current/extra/LTSP/ltsp-4.2-i386-1sms.txz
It will create all appropriate confs and dirs and start LTSP with your current IP address.
Requirements are x-kde-addon package to be installed and will change your default runlevel to 4 (X11 session manager).

LTSP-4.2 provided as is at
http://tp.mirrors.tds.net/pub/ltsp/ltsp-4.2/
with kernel 2.6.20.9-ltsp-1

LTSP demo on action taking 20" to load login manager on virtualbox client.



gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    SMS Forum Index » Tips, Tricks & Tutorials All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

SMS - Superb! Mini Server Project © 2016
Powered by phpBB © 2001, 2002 phpBB Group
iCGstation v1.0 Template By Ray © 2003, 2004 iOptional