Sunday, November 1, 2009

install ubuntu without cd

netboot

install bootp
vim /etc/bootptab

client:\
ha="00:22:15:75:BC:B1":\
ip=192.168.3.107:\
gw=192.168.3.1:\
sm=255.255.255.0:\
td=/: hd=/: bf=pxelinux.0


bootp start file


vDaemon=bootpd
vCd=/var/lib/tftpboot

Start () {
echo -n "Starting $vDaemon: default current directory is at $vCd ... :"
/usr/sbin/$vDaemon -d 4 -c $vCd >/tmp/$vDaemon.log 2>/tmp/$vDaemon.err &
sleep 1
Status
}

Stop () {
echo "Stopping $vDaemon ..."
kill `pidof $vDaemon`
}

Reload () {
if [ "`pidof $vDaemon`" ] ; then
echo "Reloading config file for $vDaemon ..."
kill -HUP "`pidof $vDaemon`"
fi
Status
}

Status () {
vPid="`pidof $vDaemon`"
if [ "$vPid" ] ; then
echo "$vDaemon running, pid=$vPid"
else
echo "$vDaemon not running"
fi
}

case "$1" in
start) Start ;;
stop) Stop ;;
reload) Reload ;;
restart) Stop ; sleep 2; Start ;;
status) Status ;;
""|*) echo `basename $0` parameter: start stop status reload or restart ;;
esac

No comments:

Post a Comment