#!/bin/blog

August 29, 2008

Garmin GPSmap 60C / CS / CSx as an NTP reference clock

Filed under: Hardware, UNIX & Linux — Tags: , , — martin @ 8:06 pm

The bad news first: The Garmin’s USB port is not usable at all with ntpd. Although the USB cable can still be used to supply the unit with power, a serial (RS232) cable is required in order to feed location data into ntpd. Cables are available from Garmin (expensive and slightly hard to find) as well as from pfranc.com, which is by far one of the weirdest business websites I have ever seen. ;-)

The good news: Once you have the serial cable, using the GPSr for ntpd is a matter of seconds.

The Garmin must be instructed to spew out location data on the serial port, which can be accomplished through the interface configuration menu. The default of “GARMIN” for the serial port has to be changed to “NMEA-In / NMEA-Out”. After making this setting, you can use Minicom to connect to the serial port at 4800/8N1 where you will see a constant stream of data. The $GPRMC lines contain the information that is required for NTP. (Click here for details about the format.)

According to the ntpd documentation, the Garmin will be configured as a “generic NMEA GPS receiver“.

ntpd will require a symlink in /dev so it knows where to find the GPSr. In my case, the Garmin is connected to /dev/ttyS0. Hence, the symlink needs to be created as follows:

# ln -s ttyS0 /dev/gps0

ntpd accesses this device through a pseudo IP address that will be used in ntp.conf:

server 127.127.20.0

Behold the NMEA peer:

ntpdc> peers
     remote           local      st poll reach  delay   offset    disp
=======================================================================
*GPS_NMEA(0)     127.0.0.1        0   64  377 0.00000  0.001443 0.03511

Be advised that it will take a few minutes until ntpd has synchronized with the GPSr. If you can’t get your NTP clients to synchronize with your NTP server, leave it alone for a while and try again later. Synchronization with the GPSr is complete as soon as the output from “peers” no longer starts with “=” but with an asterisk (as above). I learned this the hard way during Y2K testing in 1999 when an NTP server just wouldn’t synchronize. I restarted it over and over again. At the end of my tether, I went out for lunch and left the defunct server behind. When I came back, everything had just fallen into place, the clock was synchronized and so were the clients. :-)

Funktion

Filed under: Misc — martin @ 5:08 am

“Du hast nicht funktioniert”, sagt Detlef Soost zu irgendeinem 16-jährigen Mädchen. “Als es drauf ankam, hast Du nicht funktioniert.”

Nur ganz kurz habe ich den Kopf ins Wohnzimmer gesteckt, wo “Popstars” lief. Und gleich so eine Scheiße aufgeschnappt.

So redet man vielleicht mit seinem Laptop, seinem Auto oder der Zentralheizung. Aber nicht mit einem Menschen.

Resizing Boot Camp Partitions

Filed under: Software — Tags: , , , — martin @ 4:48 am

When I had initially installed Microsoft Vista in a dual-boot configuration on my Macbook using Bootcamp, my 250 GB harddisk was shared in an even 120GB/120GB fashion between MacOS and Vista. After moving all my multimedia goods from the Mac to the “Windows” side, this turned out to not be an optimal solution anymore. So I set out to shrink the Mac partition and to grow the Vista Partition.

Changing the proportions of both partitions is somewhat straightforward, as long as you have the following available:
- Lots of time for the resizing process.
- Basic knowledge of how to boot your Mac (Alt-boot, C-boot).
- A working and reliable backup of both systems. I found this very helpful in oder to keep me from paNicKInG!!!1!
- The PartEdMagic Live CD
- The rEFIt boot CD
- The Vista Installation DVD

First, I used SuperDuper! and Vista’s backup facility (I believe this is an “Ultimate” only feature) for creating backups of both systems.

After making backups, I started the system from the PartEdMagic CD. I resized the partititions and started the actual resizing process. Then I went to bed. After coming back to my Macbook, I found that Gparted had produced lots of warnings while shrinking the HFS+ partition (mostly due to some file system operations that Gparted isn’t capable of) and lots of green checkmarks while growing the NTFS partition. Deceptively promising.

A reboot came up with a black screen and the warning “No bootable device — insert boot disk and press any key” from the default mode of booting into Vista. Alt-booting allowed me to select the MacOS partition and, much to my surprise, MacOS came up flawlessly, despite all the warnings from Gparted.

A hint from the Ubuntu Wiki brought me to the rEFIt bootable CD. After booting rEFIt, I selected the “Partitioning Tool” from the menu, to find that the NTFS partition was marked as “Data”, with rEFIt already offering to fix things: “MBR table must be updated. May I update the MBR as printed above?” – Yes, please. (I’m not sure whether rEFIt really was the key here, or if I could have changed the partition type using fdisk from any other Live CD. But why bother?)

After another reboot, the Vista partition came up with a message about the hardware configuration having changed and that the system needed to be repaired from the installation DVD. So I booted from the DVD again. I found it exceptionally hard to find the right split second where I could press the “any key” for instructing the DVD to not chainload the Vista partition from the harddisk, but in the end, I made it (after pressing F5, out of some long-forgotten DOS habit).

After following the “repair” process (really just one or two mouse clicks), a quick file system check and yet another reboot, the system was in great condition again.

August 28, 2008

Dieter/Birgit/Kevin

Filed under: Internet — martin @ 7:27 am

SpON über Wer-Kennt-Wen: “Wer darüber lacht, hat den Knall noch nicht gehört.”

August 27, 2008

Der böse Nachbar

Filed under: Metablogging — martin @ 8:22 am

Nachdem wordpress.com hier Links zu einem “Josef-Fritzl-Blog” einstreute, habe ich mal gesucht, wo man das abschalten kann. Es geht tatsächlich, unter den Einstellungen fürs Theme. Puh.

August 26, 2008

Bloß nichts dazulernen

Filed under: Misc — martin @ 8:01 am

Aus einer Mailingliste, sinngemäß:

“Tutorials in englischer Sprache sind für mich leider unverständlich.”

Tut mir leid, aber das ist mir unverständlich. Ich kenne persönlich mehrere Leute, die im “fortgeschrittenen” Alter von 30-40 Jahren innerhalb von 2-3 Jahren noch Englisch gelernt haben. Es soll ja, wie ich gehört habe, sogar professionelle Sprachkurse für diese exotische Sprache geben.

August 25, 2008

Intervall

Filed under: Egoblogging — Tags: — martin @ 7:58 pm

Nach nur 12 Jahren habe ich heute mein ICQ-Kennwort geändert. Aber sagt’s keinem weiter. ;-)

August 24, 2008

Port 80 und 443 unter Windows Vista

Filed under: Security — Tags: , — martin @ 8:19 am

Irritation beim Portscan:

$ nmap macbook

Starting Nmap 4.11 ( http://www.insecure.org/nmap/ ) at 2008-08-24 09:08 CEST
Interesting ports on macbook (192.168.1.207):
Not shown: 1678 filtered ports
PORT    STATE SERVICE
80/tcp  open  http
443/tcp open  https

Nmap finished: 1 IP address (1 host up) scanned in 31.606 seconds

Und der Verursacher:

Ächz!™

August 23, 2008

Scirocco ‘08

Filed under: Hardware — Tags: , — martin @ 8:51 pm

Schön: Auf das allerneueste Auto zuschlendern und vom Verkäufer sofort den Schlüssel in die Hand gedrückt bekommen, auch wenn es heute nur zum Sitzen und nicht zum Fahren gereicht hat. Das hole ich aber auf jeden Fall noch nach.

Der VW Scirocco ist innen sehr geräumig, aber die Sicht nach vorn ist etwas beengt, etwa vergleichbar mit dem BMW Z4, auf jeden Fall schlechter (Herr, vergib mir) als beim Porsche 911. Der Kofferraum ist erwartungsmäß klein, lediglich die Ladekante liegt irgendwie fürchterlich weit oben. Da ich ein heimlicher Fan des Opel Astra GTC bin, ist der Scirocco mit seinem komischen Heck natürlich wie für mich geschaffen. :-)

August 21, 2008

Das geocachende Ich?

Filed under: Egoblogging — martin @ 7:17 am

Uaaah, nee, doch nicht. Das hat man vom eiligen Überfliegen der Überschriften im RSS-Reader. ;-)

Older Posts »

Blog at WordPress.com.