ltsp doesn't recognise tftp lts.conf

Bug #1014496 reported by Stefan Breitegger
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ltsp (Ubuntu)
Invalid
Undecided
Unassigned
netkit-tftp (Ubuntu)
New
Undecided
Unassigned

Bug Description

Hi all,

If you see in the /opt/ltsp/i386/usr/share/ltsp/init-ltsp.d/05-getltsconffile:

# default to "/ltsp/i386/lts.conf".
if [ -n "$SERVER" ]; then
    fileonly=${filename##*/}
    pathonly=${filename%$fileonly}
    lts_conf_temp=$(mktemp)
    tftp "$SERVER" -c get ${pathonly:-/ltsp/i386/}lts.conf $lts_conf_temp >/dev/null
    # only overwrite lts.conf if it has non-zero size.
    if [ -s "$lts_conf_temp" ]; then
        mv "$lts_conf_temp" /etc/lts.conf
    else
        rm "$lts_conf_temp"
    fi
fi

# Get the lts.conf vars into the environment
. /usr/share/ltsp/ltsp_config
~

the leading / at "pathonly:-/ltsp/i386/}lts.conf $lts_conf_temp >/dev/null" confuses the netkit-tftp in ubuntu 12.04 amd64

I solved the tftp-problem by editing the /opt/ltsp/i386/usr/share/ltsp/init-ltsp.d/05-getltsconffile:

-- tftp "$SERVER" -c get ${pathonly:-/ltsp/i386/}lts.conf $lts_conf_temp >/dev/null
++ tftp "$SERVER" -c get ${pathonly:-ltsp/i386/}lts.conf $lts_conf_temp >/dev/null

Now the tftp-server I able to push the lts.conf to the clients.

Please fix.

Have fun!

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

Once the LTSP client boots, login, and run:
ltsp-localapps xterm
An xterm will open. Inside it, run:
tftp server -v -c get /ltsp/i386/lts.conf

If your TFTP server has a problem with that, and it wasn't a problem with the LTSP code or with your DHCP configuration (e.g. producing duplicate //ltsp/i386/lts.conf or something), then report the bug to your TFTP server, as other TFTP servers have problems _without_ the leading / (and those should be fixed too btw).

Changed in ltsp (Ubuntu):
status: New → Incomplete
Revision history for this message
Stefan Breitegger (tuxstef) wrote :

Fine!!!

You shouldn't use netkit-tftp with ltsp

Now I've installed the tftpd-hpa and ltsp gets my lts.conf file perfect!

Maybe the wiki writers could notice this on the wiki pages.

Thanks a lot!

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

> as other TFTP servers have problems _without_ the leading / (and those should be fixed too btw).

Ah I think I misread your proposed fix, yours appears to be in that ^ case, not the opposite.

...try with "tftp server -v -c get ltsp/i386/lts.conf" too, both should work, report which one doesn't work in the netkit-tftp package.

Revision history for this message
Stefan Breitegger (tuxstef) wrote :

Hello,

tftpd-hpa: both versions work (ltsp/i386/lts.conf, /ltsp/i386/lts.conf)
tftpd (netkit-tftp): this one works: ltsp/i386/lts.conf

Have fun!

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

> You shouldn't use netkit-tftp with ltsp

Why don't you file a bug against netkit-tftp if it has problems with relative links? I'm sure that problem would affect other software too, not just LTSP.

> Now I've installed the tftpd-hpa and ltsp gets my lts.conf file perfect!
> Maybe the wiki writers could notice this on the wiki pages.

http://packages.ubuntu.com/precise/ltsp-server:
ltsp-server recommends tftpd-hpa or dnsmasq.

And the wiki proposes installing ltsp-server-standalone, which automatically pulls one of those 2 TFTP servers, or using the alternate CD, which does the same thing:
https://help.ubuntu.com/community/UbuntuLTSP/LTSPQuickInstall

Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

> tftpd (netkit-tftp): this one works: ltsp/i386/lts.conf

Then just put that path in your DHCP configuration, the LTSP code then keeps the relative path that netkit-tftp needs:

$ filename=ltsp/i386/lts.conf
$ fileonly=${filename##*/}
$ pathonly=${filename%$fileonly}
$ echo ${pathonly:-/ltsp/i386/}lts.conf
ltsp/i386/lts.conf

I'm marking the bug invalid in LTSP and subscribing netkit-tftp instead, as the problem is there.

Changed in ltsp (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Stefan Breitegger (tuxstef) wrote :
Revision history for this message
Alkis Georgopoulos (alkisg) wrote :

> Then just put that path in your DHCP configuration

I meant, ltsp/i386/pxelinux.0. LTSP then tries to locate lts.conf in the same subdir, either absolute or relative, however it was specified in DHCP.

> tftpd (netkit-tftp): this one works: ltsp/i386/lts.conf

But since `tftp server -v -c get /ltsp/i386/lts.conf` doesn't work, then it's either a problem in netkit-tftp, or in your netkit-tftp configuration.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.