Posts RSS Comments RSS 133 Posts and 25 Comments till now

Blog Archives

Flickr

Finally jumped on the Flickr-wagon today.

Despite having ~2500 pictures in my gallery, I decided to put up some of my best pics on flickr.

The interface is quite nice. Lots of AJAX style stuff going on. The functionality to create a buddy icon really stood out for me. You are presented with 4 options:

Where’s the image you’d like to use?

  • In my Flickr photos
  • On my computer
  • On the web

OR If you have a 48×48 icon ready, upload it here.

It’s just so flexible! Anyways, My Flickr site.

Mustache > Beard ?

some dbag

portsnap > cvsup

Updating your FreeBSD ports tree

The common method for updating a FreeBSD ports tree is to use CVSup. CVSup was designed to mirror cvs repositories. This is different than the cvs command which checks out a working copy of some part of a cvs repository. Basically it’s a smart version of rsync that understands and is optimized for cvs backends. It is also common to simply do a cvs checkout of the ports tree. This is helpful for developers that are testing patches to update various ports. CVSup will overwrite any changes you make to the tree each time you update.

Problems with CVSup

From the portsnap homepage:

  • CVSup is insecure. The protocol uses no encryption or signing, and any attacker who can intercept the connection can insert arbitrary data into the tree you are updating.
  • CVSup isn’t end-to-end. Related to the previous point, this means that anyone who can compromise a CVSup mirror can feed arbitrary data to the people who are using that mirror.
  • CVSup isn’t designed for frequent small updates. While CVSup is very good at distributing CVS trees, and is very efficient for updating a tree which has been significantly changed (eg, by a month or more of commits), it has transmits a list of all the files in the tree, which makes it quite inefficient if only a few files have changed.
  • CVSup uses a custom protocol. This can cause problems for people behind firewalls — outgoing connections on port 5999 need to be permitted — and it needs a heavyweight server (cvsupd).

Introducing portsnap

Portsnap has come out of a project to implement binary security updates for FreeBSD. Kind of a backwards idea from the whole philosophy of ‘build everything from source’ but useful none the less for production servers.

Portsnap transmits over HTTP, solving the problem of updating from behind a firewall. Updates are signed for security. But what I really care about, it’s damn fast. And simple. And just feels cleaner.

First time usage

Install:

cd /usr/ports/sysutils/portsnap
make install clean

First time fetch:

portsnap fetch
portsnap extract

(Takes a while, downloads about 30 megs of stuff to /usr/local/portsnap)

Daily portsnap usage

Portsnap is insanely fast if you update your ports tree once a day.

portsnap fetch
portsnap update

(only grabs new patches since your last update, and applies them to your ports tree)

If you are doing this from a cronjob, portsnap has a cron option that will sleep for a random time up to one hour before hitting the mirror.

From cron:

portsnap cron
portsnap update

Portsnap also handles the INDEX files well. There is no need to run the

portsdb -Uu

after updating anymore.

The whole story

Spring break

Me and some of my high school friends wanted to take a trip down the coast to visit some friends that live in the Los Angeles area. So me, Conor, Kelly, Fernando and Will piled into a rented van and leave Redmond to visit Matt and Scott in Thousand Oaks.

Conor and Kelly had come up with an idea to steal a random garden gnome and take pictures of it in various places and then return the gnome with a photo album. We took a picture at the sign leaving Redmond that self proclaims we are the bicycle capitol of the world. We had planned to take a picture at the capitol in Olympia, but it was raining and we didn’t stop.

The drive down took 20 hours. Driving through the night we no sleep put our arival time at about 1pm in LA. We get to Matt and Scott’s place and spend the night. The next day we wanted to check out Hollywood. I’ve been to the LA area many times, but since I was always with my family I had never spent much time in the actual Hollywood area. So we load into the van, and of course we have the gnome in the back seat. Gotta take a picture with the Hollywood sign in the background, right?

As we pull off the freeway and turn onto Sunset Strip we pass by a gas station that has about 6 photographers taking pictures of a really nice Bentley. We circle around the block and park at the gas pump across from the car. Conor gets out in an attempt to “buy a candy bar” and see if there is a celebrity in the store. As he’s walking up, out walks Paris Hilton. After oh-my-goshing in the car for 5 minutes, we start to get out and take pictures with the rest of the paparazzi. Conor sneaks over and sets the gnome down on the ground near Paris’ car in the hopes it will make it in a few pictures. Then Conor has the guts to ask her to hold the gnome for a picture. As we are snapping away pictures, so is the paparazzi photographers.

The next 30 minutes are a blur of high pitched excitement, a million cell phone calls, me grumbling about being hungry, and the realization that about 500 pictures were just taken of our encounter.

So the rest of trip consists of an overnight trip to Las Vegas, a day a Six Flags, and eventually we make the 20 hour drive back with a stop in San Fransisco.

Magazine coverage

Due to the million phone calls we made to family and friends in the critical minutes after meeting Paris Hilton, most acquaintances of ours knew the story and had seen the picture of Conor and Paris online.



On the drive back, Conor’s mom calls to inform us that on page 8 of the current People magazine there was a picture of Paris and the gnome. We find a nearby shopping center and bought 5 copies. We tried to explain to our cashier that the heavy gnome sitting on the checkout counter was the same one as the picture in the magazine. She didn’t really get it. Also we were pretty out of breath from running between stores.

Local News

Back in Bellingham, I am forced to return to the regular routine of college. Two weeks go by when my cell phone rings during a work meeting. (First time that ever happened…) The mystery person that actually owned the gnome was interview on the 5 o’clock news by local ABC station KOMO 4 in Seattle. She was also on the 11 o’clock news on NBC station KING 5. Sweet. That was pretty exciting. I told the story to a few more people, trying to convince them that I was somehow involved.

Thursday morning as I am waking up I recieved a text message from my sister Melanie informing me that the clip had made ESPN’s SportCenter video of the week. I spent a few minutes before class searching the “Internet” for any more news articles. I notice one on msnbc that had a new video clip. It turns out the nice lady with the gnome had been live on NBC’s Today show.

OMG New York

//TODO: write this part tomorrow



Waiting for Billy Idol to play. Times Square in the background.



Kelly, Billie, Conor, Me



Diane Sawyer. I don’t appear to be looking at the camera.



Outside of ABC studios, on Times Square.



Met’s game. Cold.



Conor and I blatantly defying NYC street sign near the WTC site.



No joke.



Police presence.

Gnome, gnome, gnome

I found the real gnome thiefs:



Hooligans in Las Vegas

news link
news link
news link
google news

Hard drive errors

While goofing around on our proxy server last night, the system became quite rude.

[USER@SERVERNAME]- sudo rc-update add named default
sudo: /sbin/rc-update: Permission denied
[USER@SERVERNAME]- 

excuse me?

After digging around for a while I decided to perform the usual quick fix operation, a reboot.

[USER@SERVERNAME]- sudo reboot
sudo: /sbin/reboot: Permission denied
[USER@SERVERNAME]- 

um, not cool.

Lets see what the permissions are like in the /sbin directory:

[USER@SERVERNAME]- ls /sbin/
ls: /sbin/rc: Permission denied
ls: /sbin/halt: Permission denied
ls: /sbin/shutdown: Permission denied
ls: /sbin/rc-update: Permission denied
total 6137
-rw-r--r--  1 root root      0 Oct 27 16:29 .keep
-rwxr-xr-x  1 root root  44442 Oct 27 16:29 MAKEDEV
-rwxr-xr-x  1 root root  14960 Dec 24 14:12 agetty
-rwxr-xr-x  1 root root  44268 Oct 18 13:33 arp
... etc

Super weird. Eventually I did a dmesg and found the problem:

hda: dma_intr: status=0x51 { DriveReady SeekComplete Error }
hda: dma_intr: error=0x40 { UncorrectableError }, LBAsect=62589081, sector=62589081
ide: failed opcode was: unknown
end_request: I/O error, dev hda, sector 62589081
ReiserFS: hda3: warning: vs-13070: reiserfs_read_locked_inode: i/o failure occurred trying to find stat data of [236 361555 0x0 SD]
...etc

Managed to copy all the good files off the bad hard drive and get the server back up in about an hour. Thanks ryan! Only about 8 files had read errors when I copied to a new drive, including /sbin/init, /sbin/shutdown, /sbin/halt, /sbin/rc-update. Even if I had managed to reboot the machine, it never would have come back up because init was hosed.

« Prev - Next »