bkw1a
10-23-2003, 09:54 PM
Hi folks,
I have a server based on LTSP that's running some X terminals. I'd like
to also have this machine serve some "fat" diskless clients by letting
them boot KNOPPIX, a la knoppix-terminalserver.
Things seem pretty straightforward, but I've run into a problem with
creating the boot image (etherboot.nbi). Packed up inside this file
is a syslinux.cfg file that specifies the nfs root host and directory.
If you run KNOPPIX and execute knoppix-terminalserver, an
appropriate syslinux.cfg file is created automatically, and packed into
the etherboot.nbi image. I've grabbed a copy of the knoppix-terminalserver
script (and the template files it uses) from a running KNOPPIX system,
and the steps to create the new etherboot.nbi look pretty straightforward.
For some reason, though, they don't produce a useable image when
I repeat them on my LTSP server. I can create a new etherboot.nbi,
and disnbi tells me it looks OK, but when I try to remote-boot a
machine using it, it fails, telling me "Boot failed" immediately after
it starts the DOS Net Boot Image Loader version 0.8.1. (I'm using
mknbi 1.4.2-1.)
If I copy etherboot.nbi from a running KNOPPIX terminalserver,
it boots fine on the remote machine, but it fails to NFS mount
the root fs, because the IP address of the server is different.
Does anyone have any clue about what special magic is missing?
I've appended a copy of the script I'm using to generate the new
etherboot.nbi file. It's just a cut-down version of the code in
knoppix-terminalserver.
Thanks in advance, and here's the code:
<pre>
#!/bin/sh
NFSROOT=/opt/knoppix
LANGUAGE=en
APPEND=""
SECURE=""
KEYTABLE=""
DEVICE=eth0
IP="$(LANG=C LC_ALL=C ifconfig "$DEVICE" | awk '/[Ii]net [Aa]ddr/{FS="[:
]*"; $0=$0; print $4; exit}')"
cat >/tftpboot/knoppix/templates/syslinux.cfg <<EOT
DEFAULT vmlinuz
APPEND$SECURE nfsdir=${IP}:${NFSROOT} nodhcp lang=$LANGUAGE ramdisk_size=100000
init=/etc/init apm=power-off nomce hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi
hdf=scsi hdg=scsi hdh=scsi vga=791 initrd=miniroot.gz quiet${APPEND:+ $APPEND} B
OOT_IMAGE=knoppix
TIMEOUT 300
$KEYTABLE
PROMPT 1
DISPLAY boot.msg
LABEL knoppix
KERNEL vmlinuz
APPEND$SECURE nfsdir=${IP}:${NFSROOT} nodhcp lang=$LANGUAGE ramdisk_size=100000
init=/etc/init apm=power-off nomce hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi
hdf=scsi hdg=scsi hdh=scsi vga=791 initrd=miniroot.gz quiet${APPEND:+ $APPEND} B
OOT_IMAGE=knoppix
LABEL knoppix-txt
KERNEL vmlinuz
APPEND$SECURE nfsdir=${IP}:${NFSROOT} nodhcp lang=$LANGUAGE ramdisk_size=100000
init=/etc/init apm=power-off nomce hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi
hdf=scsi hdg=scsi hdh=scsi vga=normal initrd=miniroot.gz${APPEND:+ $APPEND} BOOT
_IMAGE=knoppix
LABEL expert
KERNEL vmlinuz
APPEND$SECURE nfsdir=${IP}:${NFSROOT} nodhcp lang=$LANGUAGE ramdisk_size=100000
init=/etc/init apm=power-off nomce hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi
hdf=scsi hdg=scsi hdh=scsi vga=791 initrd=miniroot.gz${APPEND:+ $APPEND} BOOT_IM
AGE=expert
LABEL fb1024x768
KERNEL vmlinuz
APPEND$SECURE nfsdir=${IP}:${NFSROOT} nodhcp lang=$LANGUAGE ramdisk_size=100000
init=/etc/init apm=power-off nomce hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi
hdf=scsi hdg=scsi hdh=scsi vga=791 xmodule=fbdev initrd=miniroot.gz${APPEND:+ $A
PPEND} BOOT_IMAGE=knoppix
LABEL fb800x600
KERNEL vmlinuz
APPEND$SECURE nfsdir=${IP}:${NFSROOT} nodhcp lang=$LANGUAGE ramdisk_size=100000
init=/etc/init apm=power-off nomce hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi
hdf=scsi hdg=scsi hdh=scsi vga=788 xmodule=fbdev initrd=miniroot.gz${APPEND:+ $A
PPEND} BOOT_IMAGE=knoppix
EOT
# Make etherboot image
rm -f /tmp/net-boot.img
drivex='drive x: file="/tmp/net-boot.img"'
( grep -v -i "drive.*x:" ~/.mtoolsrc 2>/dev/null ; echo "$drivex" ) > ~/.mtoolsr
c.new
mv -f ~/.mtoolsrc.new ~/.mtoolsrc
mformat -C -t 80 -s 36 -h 2 x:
mcopy /tftpboot/knoppix/templates/syslinux.cfg x:syslinux.cfg
mcopy /tftpboot/knoppix/current-vmlinuz /tftpboot/knoppix/current-miniroot.gz \
/tftpboot/knoppix/templates/tftpboot/* x:
syslinux /tmp/net-boot.img
mknbi-dos --rdbase=0x220000 /tmp/net-boot.img >/tftpboot/knoppix/etherboot-new.
nbi
rm -f /tmp/net-boot.img
</pre>
I have a server based on LTSP that's running some X terminals. I'd like
to also have this machine serve some "fat" diskless clients by letting
them boot KNOPPIX, a la knoppix-terminalserver.
Things seem pretty straightforward, but I've run into a problem with
creating the boot image (etherboot.nbi). Packed up inside this file
is a syslinux.cfg file that specifies the nfs root host and directory.
If you run KNOPPIX and execute knoppix-terminalserver, an
appropriate syslinux.cfg file is created automatically, and packed into
the etherboot.nbi image. I've grabbed a copy of the knoppix-terminalserver
script (and the template files it uses) from a running KNOPPIX system,
and the steps to create the new etherboot.nbi look pretty straightforward.
For some reason, though, they don't produce a useable image when
I repeat them on my LTSP server. I can create a new etherboot.nbi,
and disnbi tells me it looks OK, but when I try to remote-boot a
machine using it, it fails, telling me "Boot failed" immediately after
it starts the DOS Net Boot Image Loader version 0.8.1. (I'm using
mknbi 1.4.2-1.)
If I copy etherboot.nbi from a running KNOPPIX terminalserver,
it boots fine on the remote machine, but it fails to NFS mount
the root fs, because the IP address of the server is different.
Does anyone have any clue about what special magic is missing?
I've appended a copy of the script I'm using to generate the new
etherboot.nbi file. It's just a cut-down version of the code in
knoppix-terminalserver.
Thanks in advance, and here's the code:
<pre>
#!/bin/sh
NFSROOT=/opt/knoppix
LANGUAGE=en
APPEND=""
SECURE=""
KEYTABLE=""
DEVICE=eth0
IP="$(LANG=C LC_ALL=C ifconfig "$DEVICE" | awk '/[Ii]net [Aa]ddr/{FS="[:
]*"; $0=$0; print $4; exit}')"
cat >/tftpboot/knoppix/templates/syslinux.cfg <<EOT
DEFAULT vmlinuz
APPEND$SECURE nfsdir=${IP}:${NFSROOT} nodhcp lang=$LANGUAGE ramdisk_size=100000
init=/etc/init apm=power-off nomce hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi
hdf=scsi hdg=scsi hdh=scsi vga=791 initrd=miniroot.gz quiet${APPEND:+ $APPEND} B
OOT_IMAGE=knoppix
TIMEOUT 300
$KEYTABLE
PROMPT 1
DISPLAY boot.msg
LABEL knoppix
KERNEL vmlinuz
APPEND$SECURE nfsdir=${IP}:${NFSROOT} nodhcp lang=$LANGUAGE ramdisk_size=100000
init=/etc/init apm=power-off nomce hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi
hdf=scsi hdg=scsi hdh=scsi vga=791 initrd=miniroot.gz quiet${APPEND:+ $APPEND} B
OOT_IMAGE=knoppix
LABEL knoppix-txt
KERNEL vmlinuz
APPEND$SECURE nfsdir=${IP}:${NFSROOT} nodhcp lang=$LANGUAGE ramdisk_size=100000
init=/etc/init apm=power-off nomce hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi
hdf=scsi hdg=scsi hdh=scsi vga=normal initrd=miniroot.gz${APPEND:+ $APPEND} BOOT
_IMAGE=knoppix
LABEL expert
KERNEL vmlinuz
APPEND$SECURE nfsdir=${IP}:${NFSROOT} nodhcp lang=$LANGUAGE ramdisk_size=100000
init=/etc/init apm=power-off nomce hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi
hdf=scsi hdg=scsi hdh=scsi vga=791 initrd=miniroot.gz${APPEND:+ $APPEND} BOOT_IM
AGE=expert
LABEL fb1024x768
KERNEL vmlinuz
APPEND$SECURE nfsdir=${IP}:${NFSROOT} nodhcp lang=$LANGUAGE ramdisk_size=100000
init=/etc/init apm=power-off nomce hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi
hdf=scsi hdg=scsi hdh=scsi vga=791 xmodule=fbdev initrd=miniroot.gz${APPEND:+ $A
PPEND} BOOT_IMAGE=knoppix
LABEL fb800x600
KERNEL vmlinuz
APPEND$SECURE nfsdir=${IP}:${NFSROOT} nodhcp lang=$LANGUAGE ramdisk_size=100000
init=/etc/init apm=power-off nomce hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi
hdf=scsi hdg=scsi hdh=scsi vga=788 xmodule=fbdev initrd=miniroot.gz${APPEND:+ $A
PPEND} BOOT_IMAGE=knoppix
EOT
# Make etherboot image
rm -f /tmp/net-boot.img
drivex='drive x: file="/tmp/net-boot.img"'
( grep -v -i "drive.*x:" ~/.mtoolsrc 2>/dev/null ; echo "$drivex" ) > ~/.mtoolsr
c.new
mv -f ~/.mtoolsrc.new ~/.mtoolsrc
mformat -C -t 80 -s 36 -h 2 x:
mcopy /tftpboot/knoppix/templates/syslinux.cfg x:syslinux.cfg
mcopy /tftpboot/knoppix/current-vmlinuz /tftpboot/knoppix/current-miniroot.gz \
/tftpboot/knoppix/templates/tftpboot/* x:
syslinux /tmp/net-boot.img
mknbi-dos --rdbase=0x220000 /tmp/net-boot.img >/tftpboot/knoppix/etherboot-new.
nbi
rm -f /tmp/net-boot.img
</pre>