The dot in ... --- ...

Chris Gerhard's Weblog

20060125 Wednesday January 25, 2006

OpenSolaris Appliances

The OpenSolaris Appliances community is a go! So now it is time to start building some kit.

First step will be to get some consensus on which motherboards to base this around. I suspect there is also going to be some discussion around what appliances we want to build.

I want to build something that is not dissimilar in function to a Cobalt Qube 3 pro, except OpenSolaris as the base OS rather than Linux. In particular using ZFS to allow snapshots to be widely used and greater confidence in the integrity of the data.

My starting list of services would be:

Tags:

( Jan 25 2006, 10:06:05 AM GMT ) Permalink Comments [3] Trackback

20060124 Tuesday January 24, 2006

It's Official! The biggest annual sporting event is coming to London

I'm over the moon, the widely leaked reports that the 2007 Tour de France will start in London and the first stage will be in Kent. The exact route will be announced in February.

Now if some enterprising cycle event organiser can arrange for an L'Etape style ride of Stage one the week before I'm signing up!

Looks like I will be taking the day off on the First Stage to see the stars ride by. I expect I will not be alone.

Tags:

( Jan 24 2006, 06:45:07 PM GMT ) Permalink Comments [2] Trackback

X11 forwarding 101

I got asked this today:


After I su to root how can I forward an X session over ssh?

This actually hits a huge bug bear of mine, that of people using the xhost command to open up the X server. That is bad but if those same people also have root access well that is just the end. You don't need to open all of X to get this to work. Here is the shell function I use to achieve this:


function xroot
{
        xauth extract ${1:-${TMPDIR:-/tmp}/.Xauthority} :${DISPLAY#*:} && \
        echo export DISPLAY=:${DISPLAY#*:}  && \
        echo export XAUTHORITY=${1:-${TMPDIR:-/tmp}/.Xauthority}
}

This assumes you are using MIT-MAGIC-COOKEI-1 authentication, I dabbled with the SUN-RPC authentication but that requires a fully integrated name space. All the shell function does is use the xauth command to copy the record for the current display from my .Xauthority file into /tmp and then echo the DISPLAY and XAUTHORITY variables so that they can easily be cut and pasted. It does this as typically my .Xauthority file is on an NFS mounted home directory that root can not access.


So here it is in action:

Sun Microsystems Inc.   SunOS 5.11      snv_30  October 2007
: estale.eu FSS 1 $; xroot
export DISPLAY=:30.0
export XAUTHORITY=/tmp/cg13442/636397/.Xauthority
: estale.eu FSS 2 $; su - kroot
Password:
Sun Microsystems Inc.   SunOS 5.11      snv_30  October 2007
estale <kroot> # export DISPLAY=:30.0
estale <kroot> # export XAUTHORITY=/tmp/cg13442/636397/.Xauthority
estale <kroot> # set -o vi
estale <kroot> # xterm -e sleep 10
estale <kroot> #


There is more that the shell function could to to verify that the file it chooses for the .Xauthority is safe, but I don't need that as I have TMPDIR set to be a directory that no one else has access to.


Tags:

( Jan 24 2006, 05:50:40 PM GMT ) Permalink Comments [0] Trackback

20060122 Sunday January 22, 2006

Slightly hilly ride

We set off to ride bits of the route of the Redmon Reliability run which takes place in a fortnight. Six left Molesey heading for Epson but one dropped off the back and then took a wrong turn and was lost, despite someone riding back to the turning. On being reduced to five we regrouped for a cup of tea in Epson and then climbed onto the Downs. Then over Headley heath where one rider turned back leaving four.

We descended through little Switzerland and past Ryker's Cafe where I was shouted at by none other than the rider we had lost. Back being 5 riders through Dorking and up Coldharbour then down via Holbury St Mary to Abinger and then Shere for breakfast.

From here we went home the usual route via Cobham.

Stats:

Distance

61.6 Miles

Average Speed

14.3mph

Next week is supposed to be the first of the escalating last Sunday of the month runs, starting at 70 miles, my plan it to go to the Devil's punch bowl, with a new earlier start time of 7:30am

Tags:

( Jan 22 2006, 10:34:26 PM GMT ) Permalink Comments [0] Trackback

20060120 Friday January 20, 2006

Srange code in ftpd.c if your password begins with a minus

A colleague of mine had a call from a customer who claimed that if their password began with a '-' they could login fine bug could not use ftp(1). Now no sniggering at the back about using sftp(1).

So a few seconds with the source leads me to here and these lines of code in ftpd.c:

	if (*passwd == '-')
	    passwd++;

Now this just smacks of some bizarre UNIX folklore from the dim and distant past, I suspect passing the password on a command line (yuck) but have no idea what it is.

If you know or have a plausible or amusing theory let me know.

Nice simple work around, if your password begins with a "-" enter two "-" at instead of one. Actually using sftp(1) is a much better workaround.

Tags:

( Jan 20 2006, 12:15:34 PM GMT ) Permalink Comments [2] Trackback

20060118 Wednesday January 18, 2006

Envy and the winter tool kit

Today I scored two firsts.

  1. I envied the owner of a deck chair.

  2. I envied the owner of a tricycle. (It is just possible as a young child this has happened before but I don't recall it).

I am of course talking about Alec's Trice which arrived today.

It brings me to the topic of my winter tool kit, since despite Alec's best preparations the chain link tool he had was about as much use as a chocolate tea pot. Luckily I had ridden to work, ok that was not lucky but just what I do, but I had my winter tool kit which contains everything pictured.

Starting at the top left we have a spare folding tyre. I carry this since in the dark it is often impossible to find the thing that has caused the puncture in the tyre so it is easier just to swap tyres and sort it out when you get home.

Moving clockwise we have the very excellent Var tyre lever. Helps fitting as well as removing the tyre.

Then two lengths of chain joined in a circle with those excellent SRAM powerlinks, despite the fact that I have not mastered the knack of opening them. This is more than enough to solve any road side problems with the chain.

Next I have a Topeak Alien multi-tool. This is the tool of the day as it actually has a chain tool that works and works well. I have version one of the tool which you can no longer get. I have found it excellent, the blade has been a great help to break the ice on the cycle lockers when cold.

The I have some cable ties, as I have said before these are just so useful when things have gone pear shaped.

Finally an inner tube. I actually carry three.

Not shown is the pump which is on the bike and is a Zefal HPX, accept no substitute.

Tags:

( Jan 18 2006, 10:55:21 PM GMT ) Permalink Comments [1] Trackback

20060117 Tuesday January 17, 2006

Another Pot hole and the difficulties of reporting it.

Another pot hole reported to Surrey CC. This time the web site claims that the problem has already been reported but how it comes to the conclusion I don't know, and it does not give a reference. I've emailed them to find out. If they have some clever software that can understand the free text I write and match it with an existing report that is very interesting, but if that is the case it should give you the reference number.

My last report apparently I entered my email address incorrectly. They found the report and mailed me back.

Anyway back to the hole:

There is a hole on the Molesey bound side of Molesey Road between Rydens Road and Field Common Lane which is a danger to cyclists travelling along that road.

Tags: ( Jan 17 2006, 12:28:19 PM GMT ) Permalink Comments [0] Trackback

20060116 Monday January 16, 2006

Good Morning Build 31

Another build.

: enoexec.eu FSS 1 $; uname -a
SunOS enoexec 5.11 snv_31 sun4u sparc SUNW,Sun-Fire
: enoexec.eu FSS 2 $;

This one still contains bug 6368386 Updated P2 xserver/font Some fonts have disappeared. which is a huge pain as reading HTML email which I dispise but still get is close to impossible.

(I just tried to preview this post and all the italics that are supposed to be there were not visable so this could end up looking like anything.)

Tags:

( Jan 16 2006, 08:59:15 AM GMT ) Permalink Comments [0] Trackback

20060115 Sunday January 15, 2006

Riding for Rhyl

Todays ride had 8 riders with, as was the case for many cyclists this Sunday wearing black armbands in support of and memory of the tragic events from last week in Rhyl.


After a bit of indecision we decided to to take a flat ride out to Windsor via Windlesham. This turns out to take me along my old route to work. I was on my old tourer so no index gears or shifters on the handlebars. I love this bike despite the lack of modern equipment.


We had a great ride through Ascot where the new Grandstand on the race course looks amazing. Then through Windsor Great Park to the Top Twenty Cafe. Going through the park on the main road was the usual blast and this is why I love this bike. Down on the drops 28 mph on the flat it just flies despite the mudguards and rack.


After the Cafe we went home via the park. I still don't know why the speed limit in the park is 38mph not 30mph or 40mph but 38mph odd.. Then home for what ended up being 57 miles.


We also agreed to start an escalator on the last Sunday of each month. 70 miles in January, 80 in February, 90 in March, 100 in April and 110 in May. What happens after May is a grey area. We will see if we can stick to this as the furthest we have ever gone on a Sunday is 100 miles.


Tags:

( Jan 15 2006, 04:14:56 PM GMT ) Permalink Comments [2] Trackback

20060114 Saturday January 14, 2006

National Identity Card

Now that Gordon Brown has put forward the suggestion that Britain should have a National Identity day this offers the government an easy way to achieve their manifesto pledge of a National Identity Card.

We can all send each other National Identity Cards on National Identity day. Job done.

Tags:

( Jan 14 2006, 12:59:15 PM GMT ) Permalink Comments [0] Trackback

20060111 Wednesday January 11, 2006

Future Proof Installs

Attempting to future-proof an installation. Now that ZFS is upon us I'm beginning to think how to future-proof new installations so that when we get to boot from ZFS I can live upgrade to that and let my existing partitions be absorbed into the zpool. Yes I can just add the partitions to the pools but there should be a better way.

On my next installation I will be putting the two root file systems, one for the boot and one for live upgrade, and swap at the end of the disk rather than at the beginning. Then when they are no longer needed as ZFS can handle all my disk I can grow the ZFS partition and therefore the zpool into each of the old root partitions as and when they are not needed. For the laptops this is not that important as the amount of data is small and by luck rather than judgement I can move all the data using a combination of live upgrade and zfs mirrors. However for the new server I'm going to be building for home this will be crucial as for large amounts of data that would be painful.

Tags:

( Jan 11 2006, 05:17:49 PM GMT ) Permalink Comments [1] Trackback

20060110 Tuesday January 10, 2006

Pot Hole report, dull move along

I have just reported this to Surrey Council, once again their system has failed to send an acknowedgement within 8 hours so when it turns up I add a comment with the number. I've emailed them about this.

Back to the Pot Hole.

Just before the junction with Baker Street in Weybridge going down Monument hill there is a man hole cover which now has a dangerous hole down it's left side. Just big enough to get your wheel and not the kind of thing you want to have to dodge at the same time negotiating the hill and avioding the motor traffic.

Tags:

( Jan 10 2006, 06:20:45 PM GMT ) Permalink Comments [1] Trackback

Who or what deleted /dev/null

Here is one that comes up time and again. Who keeps deleting “/dev/null”?


With dtrace this is a snip to answer:


#!/usr/sbin/dtrace -s

syscall::unlink:entry
/ ((this->x = copyinstr(arg0)) == "null" && cwd == "/dev") ||
        this->x == "/dev/null" /
{
        self->y = 1;
}
syscall::unlink:return
/ self->y && arg0 == 0 /
{
        printf("%s\n", stringof(curthread->t_procp->p_user.u_psargs));
        printf("zone %s UID %d PPID %d %s\n", 
                stringof(curthread->t_procp->p_parent->p_cred->cr_zone->zone_name),
                curthread->t_procp->p_parent->p_cred->cr_uid,
                ppid,
                curthread->t_procp->p_parent->p_user.u_comm);
}

Leave that running and when /dev/null disappears it will output the process that deleted it and it's parent (I always blame the parents). This leaves 2 cases where /dev/null can go missing that are not covered., unlink and rename. In practice I've never seen a case where either was to blame but for completeness it should check them as well. Easier in OpenSolaris than in 10.


Tags:

( Jan 10 2006, 09:15:27 AM GMT ) Permalink Comments [0] Trackback

20060108 Sunday January 08, 2006

Rhyl

My thoughts are with the members, families and friends of Rhyl Cycling Club. This is just a Tragic incident.

Cyclists around the country are thinking of you.

Tags:

( Jan 08 2006, 06:35:46 PM GMT ) Permalink Comments [1] Trackback

To Henfold and a Christmas Tree

First ride of the New Year for Molesey BBT saw six leave Molesey for Epson, with one turning back before Epson then five more continued on over Epson Downs, Headley, down Pebble Coombe, towards Newdigate and Henfold Lakes. The Cafe at Henfold was closed so we pushed on to the Blu Moon Cafe having lost one more rider and gained another.

Then it was back in the very light rain to Molesey shedding riders on the way as they opted for their cars or the short way to their home.

53 miles for me.

On arriving home I just had to pop to the recycling with the Christmas tree, on the triplet which worked really well. Except the recycling centre was not accepting Christmas trees this year. So much for all the radio and TV adverts telling us to recycle the things.

Anyway the site of a Christmas tree on the back of a bike turned a few heads, but the aerodynamics of it left a lot to be desired. At least the car is not full of needles.







Tags:

( Jan 08 2006, 04:17:53 PM GMT ) Permalink Comments [2] Trackback


Valid HTML! Valid CSS!

Except where otherwise noted, this site is
licensed under a Creative Commons License 2.0

This is a personal weblog, I do not speak for my employer.