This site is quite well !!

After a long throcking-session I have finally got me some gps-synced time at baserack1.

I’ve been trying to build a nanobsd-image with NTPns that will fit on a net4501 with 32Megs Ram and 32 Megs Flash. As I have if not an abundance of these – then at least a few that are readily available, specifically because they are not much use in any other capacity.

Not having the greatest success there – I decided to try my luck soldering some larger capacity memory modules – no joy – also down 3 net4501’s

So I went for broke – and broke my wallet ( or sprained it at least ).

Apart from the sundry gps-mice ( without pps ) I have aquired an Oncore UT+, a Garmin GPS17HVS and finally a Sure Electronics GPS Demoboard kit.

It seems that FreeBSD v.8.1, v.9.1 and indeed v. 10.0  are default equipped with an implementation of ntpd that doesn’t react too well to other modemspeeds than 4800bps at least when it comes to the nmea-driver.

I found that the “stty -a -f /dev/cuau1″ gives a useful amount of information regarding the speed at which the pc thinks the serialport is running. This enabled me to see why there was no output from my gps’es – even though “mode 18″  is clearly documented to mean 9600bps and GGA – the default ntpd’s just don’t seem to care –

I ended up using FreeBSD10 and ntp-devel from ports currently /v. 4.2.7p364 – and lo and behold from ntpq -p I now get :

remote                  refid   st  t   when poll reach   delay   offset      jitter
======================================================
xGPS_NMEA(1)   .GPS.  0   l   11        16    377      0.000  -457.92 173.138
xPPS(1)                     .PPS.    0  l   31         64   377      0.000   -0.559    0.038

 

The easiest method was the GPS Demoboard – as for precision time will tell time.

1 comment

  1. pxe based installing :
    get yourself a roomy scratchdisk, mount this as /scratchdisk
    this will enable you to “clean house” with impunity –
    and not risk losing valuable conf-files and setup in the process.
    Setup tftpboot
    uncomment the line :
    #tftp dgram udp wait root /usr/libexec/tftpd tftpd -l -s /usr/tftpboot
    consider changing it to
    tftp dgram udp wait root /usr/libexec/tftpd tftpd -l -s /scratchdisk/tftpboot
    Setup nfs
    edit /etc/exports adding this line :
    /scratchdisk -alldirs
    Setup your dhcp to play along:
    edit /usr/local/etc/dhcpd.conf :
    make a host-entry for your target device, adding these three important lines :
    next-server A.B.C.D; # the ipaddr. of the nfs-server
    filename “./pxeBSD10/boot/pxeboot”; path to pxeboot-file relative to tftpd root dir
    option root-path “/scratchdisk/pxeBSD10”; absolute path to nfs mount as root

    Now begin creating a populating the dirs with needed content
    /scratchdisk/pxeBSD10 # the root of FreeBSD10 installation-disk
    /scratchdisk/pxeBSD10repo # where I’m gonna stick the install files
    first of all get yourself the bootonly-iso image – I decided to go for broke and got :
    FreeBSD-10.0-RELEASE-i386-bootonly.iso
    To get this nfs-readied :
    mdconfig -a -t vnode -f FreeBSD-10.0-RELEASE-i386-bootonly.iso
    mount_cd9660 /dev/md0 /mnt

    All ready to copy in :
    cp -Rv /mnt /scratchdisk/pxeBSD10
    Once that is done – umount and clean up :
    umount /dev/md0
    mdconfig -d -u 0

    Then get the installfiles :
    ftp http://ftp.cc.freebsd.org
    cd pub/FreeBSD/releases/i386/10.0-RELEASE
    bin
    hash
    mget *.txz
    get MANIFEST
    quit

    stick them in the /scratchdisk/pxeBSD10repo –
    and let ftp have anonymous access to that dir.
    Now to edit some boot files :
    edit /scratchdisk/pxeBSD10/etc/fstab :
    uncommenting the first ( and only line ) – otherwise an error will terminate your install attempts, as there will be no cdrom.
    if you boot a serial port — create or edit /scratchdisk/pxeBSD10/boot/loader.conf :
    console=”comconsole”
    boot_serial=”YES”
    comconsole_speed=”115200″

    After restarting all relevant services eg. dhcpd, nfsd, inetd ( or just restarting the server – as nfs can be a bit finicky ) – you should be good to go.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.