Monday, December 25, 2006

Christmas 2006



Merry Christmas!

Friday, December 15, 2006

Rain, Wind, Storm ... No Power

I'm in Seattle this week. The rain comes and goes as usual for this time of the year.

Yesterday afternoon a major storm hit the Northwest. At 5pm we decided to shut down the servers and network in the office, since we had ongoing brownouts and briefly lost power. Outside, the wind was howling around the building, the rain blowing accross the street horizontally. Windows were rattling. Lake Washington had a good surf going, you could see it even from the office. Most of the employees went home.

We took off to drive to a co-worker's house in Bellevue. The office parking lot was flooded, the garage was flooded, and the street gutters were full of water. The normally 15 minute drive to Bellevue took us over an hour on the side-streets. Multiple stop lights were out and cars waiting their turn all over the place. Very orderly though, I must say. Once we got there we had good food and lots of fun. I tried playing Tennis on the Wii as well as a few other games.

Here's a picture of a flodded garage. It's hard to see, but water depth was about 1 foot.

11:30pm

I got back to the apartment with light rain and a decent amount of wind. I planned to be in the office early to bring up the infrastructure back up once the storm has blown over. It was supposed to peak at 2am.

5:00am

Well, yeah... I got a call from the local helpdesk manager not to bother. I notice the power is out in my apartment. "The power is out in 90% of western Washington." Oh... Well then, I'm going back to sleep now.

6:00am

"The office building is dead. 3 feet of water in the lower level of the garage" Guess it's unlikely I'm going to work today. I'll see when and where I can find some coffee and breakfast. In an hour I'll call Patricia to find out what's going on at Sea-Tac, and if my flight this afternoon is still on.

8:00am

Power still out. I take a shower in the dark bathroom. The water is lukewarm. I consider myself lucky. After some consideration and looking out of the window, I decide to pack my stuff and get it down to the car. No point hanging out in the apartment with no power or heat. I want some coffee.
The trip down the pitchblack stairwell with no windows was ... interesting. Good thing the display of my cell phone is this bright.

9:00am

Still no power. I stopped by the office to found the building locked with a couple employees outside chatting. The lower level of the garage is still flooded. They are pumping the water out, only making slow progress. I don't envy the owners of the few cars left in there.

The guy stocking our mini-kitchens left some danish and cranberry cake outside the lobby doors. Good. Still craving a coffee. It starts raining again. "All the power is out in the city of Kirkland", a police officer who was checking on one of the local banks tells me. Bellevue may have power, I'm told, so I decide to make my way down I-405 towards the airport.

The floating bridge accross Lake Washington is still closed. They closed it last night before the brunt of the storm came in, since it's unsafe to cross with heavy winds. Which means all the traffic headed to Seattle has to go down to I-90 and across Mercer Island. I'm in the middle of that traffic. Crap.

10:30am

I tried taking side-streets looking for some coffee place and to bypass the mess on I-405. Success for the latter, but still no coffee. Eventually I get south of I-90, make it via Factoria and Coalcreek Parkway back to I-405 and out to the airport.

11:30am

I got to the airport early enough to catch an earlier flight back to San Jose. Phew. Looking forward to see Patricia and the kids.

Lessons learned:


  • Don't expect to be able to get back into the office building the next morning. Take the stuff you might need.
  • Carry a flashlight. I'll get one of those little keychain lights. Way better than nothing.
  • Listen to the news and traffic reports. Find one of those AM news channels. I got a pretty good picture on what's going on. They advised to avoid I-405 between Bellevue and I-90. I should have taken I-405 north to I-5 and on to the airport through Seattle.
  • Always carry some cash. Most ATMs and credit card pay stations don't work without utility power.



Sunday, December 17th:

Power was restored to the office this morning. As I'm writing this there are still over 200,000 people without power in western Washington. Down from over a million Friday morning. I'm just reminded again how much we depend on and are used to the conveniences of modern live. Electricity, clean water, garbage pickup. This was a weather event, people could prepare at least a little bit. However, I'm living in earthquake country. Those things happen without warning. We better get our earthquake kit back together (we had to throw everything out after a rat hit the jackpot and got into the storage box...).

Friday, December 08, 2006

Lucky snapshot



Taken late September in Santa Cruz. Union Pacific freight train returning from the cement plant in Danville.

Saturday, December 02, 2006

Got a transformer

... and the "Krokodil" no longer requires a 9V battery.



Monday, November 27, 2006

cleaning track...

Amazing how grimy old track can be. Yuck. I used a dry scotch brite cloth to wipe off all the dust, oxidation and dirt from these old brass rails. First with the green side to scrape off the big stuff, then with the yellow side to wipe off any leftovers. low and behold, it worked on the first try.

I cleand four straight pieces of track and within minutes the old "Krokodil" was going up and down the track powered by a 9V block battery held right against the rails. HO track is just wide enough for the connectors of the battery to fit.

This worked so well, I cleaned a dozen curves and set up a little oval on the table. After a few rounds of sputtering the track was clean enough that the locomotive was running around in circles just fine. Exciting!

Sunday, November 26, 2006

Model railroading...

So, over the weekend I had a good conversation about model railroading (and railroading in general), which made my heart ache with the thought of the really nice Maerklin layout we have at my parents place back in Germany. I pulled out the only electric train stuff I have in the house here, the "FischerTechnik Bauspielbahn", a Fleischmann track based trainset my father bought for me and my brother a long, long, long time ago. I must have played with this the last time maybe 20 years ago. To my surprise the one motor left in the two locomotives is still working just fine, including the familiar whining sound it always had. No idea what happened to the other motor.

Just the rails ... oh boy. Brass track. No conductivity at all. Zip. I learn from a Google search that brass track is the worst. Lots of oxidation of the non-conducting kind. ok, looks like in order to make this work, I'll have to clean the track ... somehow.

Reading up on cleaning blocks, and various other methods serious railroaders recommend is ... pretty cool. Doesn't really apply to my situation, though. Heck, this is not even a real layout or anything. Either way, I'll give this cleaning idea a shot on a few pieces of track. Just for fun.

Friday, November 24, 2006

Audiotron and smb server on different subnet

What a pain.

The Audiotron appears to be unable to work with a WINS server. There is no way to specify one in the Web UI. I tried various approaches to get this work:


  • force global browse master on gw by running the Samba nmbd server with the appropriate smb.conf file (Audiotron finds the browse master on gw, but apparently ignores the information about hosts in other subnets)
  • limit and eventually turn off the firewall rules dropping packets between the wired and wireless portions of my network (I do have holes for smb traffic, but it doesn't matter. I can get to //chef/media just fine using smbclient via wireless)
  • redirect 137/138/139 tcp/udp from gw to chef (doesn't work because of heavy use of broadcasts in the smb protocol)
  • Allow remote hosts in the Audiotron WebUI (no visible effect)
  • Hardcode the specific share name \\chef\media in the Audiotron WebUI (no visible effect)
  • make heavy use of tcpdump on all systems involved (except the Audiotron which is a closed box)
  • search Google (and this blog is among the first 20 hits when I search for [audiotron browse master]...)
  • make sure all the passwords are right for the media user, both in the Audiotron and on chef (checked)
  • confirmed using nmblookup that I can't see chef, when browsing the wireless broadcast domain (duh, of course not. It's a separate /24.)
  • The Audiotron aborts browsing the subnet, if it can't find a running smbd on gw (how annoying)


In some cases chef shows up in the Audiotron log with "No IP reply". The Turtle Beach docs are fairly unhelpful on this whole thing.

Since WINS is not supported by the Audiotron and hardcoding paths on the Audiotron doesn't seem to have any effect, I'm thinking about bringing the songs closer to the Audiotron: Mount the media partition via NFS from Chef on gw, then export the NFS mount from gw via Samba to the wireless side.

How ugly.

I searched more and found a note in the Audiotron FAQ that the Audiotron does indeed support WINS, but the server information has to come from DHCP. The option for isc-dhcpd is netbios-name-servers in dhcp.conf. That might work. I'll try that when we are back from shopping. It's Black Friday after all.

...

Finally! It's working.

Serving netbios-name-servers via dhcp didn't seem to have any visible effect.
The magic config options that made it work were "dns proxy = yes" and "wins proxy = yes"in smb.conf on gw. Then I went into manual configuration mode on the Audiotron and set it explicitly to get the music from \\chef\media.
Samba on chef was not configured to use the WINS nmbd on gw, so nmbd didn't serve IP information for chef, even though it served the name as part of the list when queried.

So, in the end, as usual, it was operator error. I could have saved myself quite some pain by configuring chef as WINS client of gw, or run a WINS server on chef outright and serve chef's IP as WINS server to the Audiotron via dhcp. Actually, that's not a bad idea, I'd rather not have smbd/nmbd running on gw...
Not tonight, though, now that Patricia is happily listening to music served by this crazy infrastructure.

So, here's what I'm going to try next:
- run WINS server on chef
- serve chef as netbios-name-server in dhcpd.conf for the audiotron
- turn off nmbd and smbd on gw
- Verify I can still listen to music...

Update:
The Audiotron appears to ignore the dhcp option netbios-name-servers. With only nmbd running on gw, being the WINS server, and the Audiotron manually set to go to \\chef\media, it finds my songs just fine. Good enough for me.

A curious note:
When the Audiotron tries to resolve a remote name it queries first for "A? CHEF.", it gets a NXDomain in my network. Then it uses the fully qualified domain name "A? chef.domain.comm". Not a typo, it actually appears to append an 'm' to the query. I couldn't find the source of the extra 'm'. Even reset the Audiotron to factory defaults and started over, still queries an extra 'm'.

Tuesday, November 21, 2006

There ... now it happened

It's my own fault. I connected the serial console of my Net-4801 to chef, started minicom and ... nothing happened. A fatal "Send Break" later, minicom is no longer responding and the userland on chef is dead. No idea _why_ that happened, but it coincided with the break on the serial port. Thankfully, chef's kernel dutifully continued to route traffic, so I could search Google, and openbsd.org, but to no avail. In the end I power-cycled chef and am now waiting for the raid check to complete. *sigh*

On the positive side, my Internet connection is now running through the NET-4801. mail and web will continue to be handled by chef for the time being (once it comes back up), but basic Internet access as well as my private domain server and key-protected ssh are working already. My prep-work from early October paid off. Another 1.5 hours to go until chef is back online. I'm going to bed, but set the alarm early, so I can fix email before Patricia gets up.

Things left to do for chef:
- ifconfig to .10
- connect LAN cable
- reconfigure syslog to use -u and accept syslog from gw
- test mail connectivity (local and remote)
- test web connectivity (local and remote, both sites)

Update:
I also had to add the rdr entries for PF to redirect web/mail connections to chef. Then, my website didn't work anymore from the inside, because the redirect is applied only on traffic that enters gw on the outside interface, so I changed the internal DNS views to resolve my websites straight to chef, instead of going through gw.
Testing the configuration from my workstation at work, it worked right away for web access, but for the heck of it I couldn't get a SMTP connnection going. Everything looked right on my end. Actually, I used the same config options for web as for mail. While thinking about this, I noticed a mail coming in. Huh? ... I remembered we block outbound SMTP from workstations at work. Alright, all good.

Sunday, November 19, 2006

pvr500 and composite input

I'd really like to access DVDs through the MythTV interface, as well as be able to hook up my camcorder and convert analog video to MPEG2 streams. My TV has only one composite input and that's taken by MythTV, so the DVD thing is mostly for convenience. The catch? It doesn't seem to work.

I got the closest today. After scouring Google and reading lots and lots of different How-tos the most promising approach for getting the DVD player/camcorder hooked up was to define a new video source, bind it to the composite input, manually define a channel and off we go. Uhm, yeah. Not quite. The new channel (1001 - DVD) shows up in the channel selection. However, when I do select it, apparently MythTV tries to use the tuner to select it, which doesn't work. Either, the channel doesn't switch, and I continue to see Fox and then roll over to channel 82, or depending on which approach I tried, the channel switches and I won't get out of this mode anymore, and only got a black screen. Even [ESC] didn't work anymore. Couldn't tell whether the front-end or the back-end hung.

What's more frustrating is that even with ivtvctl -p, I can't seem to switch inputs on the PVR500. It does work, however, if I don't start mythbackend at all on boot. I'm suspecting an issue between MythTV, the ivtv driver, and the PVR500 card.


I'm using Linux 2.6.15 with ivtv 0.4.4. Looks like I'm going to sync grumpy to the latest Debian testing, 2.6.18 and ivtv 0.7 (or so). And then rebuild the nvidia driver, and take care of other mayhem that might ensue. I'm hoping this will also fix the problems we have with closed captioning (VBI).

Sunday, November 05, 2006

kde kamera DOES support disconnecting and reconnecting the camera

... it's just not obvious.

I use KDE's kio_kamera to download my photos from our Canon Rebel Digital SLR. Whenever I connect the camera a new USB address gets allocated and we end up with a URL like this:

camera://Canon EOS 300D (normal mode)@[usb:001,006]/

The camera icon on the desktop eventually takes me to camera:/, which is an overview page of configured devices. When I plug in the camera, this page always comes up with links to the usb address when the camera was first plugged in that day (usually usb:001,004), so I can't just click through. Annoying. More annoying is that many pages under camera:/ are cached, so it appears to be working until I get to the actual images folders and then get "port not found".

Solution:
In the camera:/ location, refresh the page, then continue. Simple as that. Now, if I could get kio_kamera to do this for me...

Saturday, October 21, 2006

ATX power supplies

I admit I'm behind the times with PC hardware. That comes with being a bottom feeder. I usually buy technology only when it gets close to be thrown out of the stores. I like special offers, particularly clearances. So, yes, most of my stuff here is on the outdated end. But it's cheap, some of it even free.

So, last weekend when I bought a power supply to replace the rather old power supply in chef, I went for a half-way decent, but relatively cheap power supply from CoolerMaster (400W, reg. $39.90, onsale for $27.50). If only I had paid more attention to the labels.

ATX12V 2.01 actually means not only serial ATA power connectors and this extra 4pin 12V connector for the CPU (which I don't need since I don't have those). It also means that instead of 20 pins the ATX mainboard connector now has 24 pins, apparently to satisfy the power needs of PCI Express (which I don't have either).

The ca. 2001 motherboard in chef has a 20pin connector, and yes the pinout of the lower 20 pins is all backwards compatible to the old socket. However, in their infinite wisdom the Acorp motherboard designers placed a couple capacitors right next to the mainboard power connector. Exactly in the spot where the extra 4 pins would hang over. Ugh.

It's not too bad, though. I was eyeing to upgrade my Linux rackmount upstairs with something more modern anyways (the mainboard of that computer currently does duty in my MythTV box). Might as well keep the new power supply, and move the power supply from the rackmount into Tatjana's computer for now.

Update (Nov 21):
I ended up buying an adapter cable at Central Computer that translates the 24pin ATX powersupply connect to a 20pin connect as needed by my motherboard. The old power supply from chef is going to move to Tatjana's computer. We are not using that computer nearly as often...

Sunday, October 15, 2006

Exploding capacitors

Thursday Patricia calls me with a very alarmed voice, "Hey, it stinks as if something's burning, and there was a loud pop from the computer cabinet". Hmmm, that doesn't sound good. We shut down all the computers in the cabinet until I come home.


Once the kids are in bed, I unrack the firewall machine, open it up, and yes, there is some smell, but not really bad. While I'm looking at the firewall machine, Tatjana's computer turns itself on spontaneously, a loud pop, and electric smell starts to fill the air. "That must be what Patricia meant when she called me."


Nothing out of the ordinary when I open the case, aside from the smell. However, when I open the power supply, the first thing I see are a two capacitor shells sitting oddly in the corner. Also note, how the leftmost capacitor is starting to bend the pressure relief top upwards.


"What is that furry stuff anyways?". The content of the capacitors. Look at the blast marks on the metal heatsink in the background, and the nicely blackend resistor.


As the capacitor on the right blew up it must have hit something in the powersupply (probably the metal heatsink), which dented the top quite a bit.

Saturday, October 14, 2006

Soekris NET4801-60

Having a firewall, mail server, file server, web server, ... all on the same box is just a bad idea. Every sysadmin knows that. I run my firewall on OpenBSD which makes me feel better, but not comfortable. OpenBSD's software RAID (RAIDframe) scares me every time the machine crashes (which happens seldomly, actually only once so far, but that's another story), or loses power (which used to happen more often. Thanks to my UPS that's no longer an issue). I like my firewall to run OpenBSD, but I just don't need yet another computer sucking up power in my living room.

When a co-worker was looking for some more people to join in a bulk-oder for Soekris NET4801 boxes I got in. A few weeks later it was on my desk. Nice box, metal case, AMD Geode 266, 256MB main memory. I have a 1GB CF card (specs as displayed by comBIOS: "SAMSUNG CF/ATA LBA Xlt 1012-32-63 1020 Mbyte"), and a 256MB CF card ("Hitachi XXM2.3.0 LBA 695-15-48 250 Mbyte"). Originally, I wanted to run even my Web server from the Soekris box, but then realized that the photo collection on the Web site alone eats up 3.2GB already. Whoops. Oh well, don't have that much storage, so I put the 1GB CF card into our Canon Rebel Digital SLR, and use the 256MB card for the soekris box.

I replaced FreeBSD on Sneezy with the latest OpenBSD built (and will upgrade again, come 4.0 in November) and started to investigate flashdist.sh, a snazzy shell script that builds an OpenBSD distribution on flash media. Oh, I need a flash reader? ... Our Nikon Coolpix 2100 shows up as a regular flash media when plugged in to USB:


umass0 at uhub0 port 1 configuration 1 interface 0
umass0: NIKON NIKON DSC E2100, rev 1.10/1.00, addr 2
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets
sd0 at scsibus1 targ 1 lun 0: SCSI2 0/direct removable
sd0: 244MB, 244 cyl, 64 head, 32 sec, 512 bytes/sec, 500400 sec total


ok. that was easy.

I built a NET4801 kernel with the config from the flashdist archive and ran


flashdist.sh sd0 flashsmall.txt bsd-4801 /tmp/openbsd39/ bsd-4801 /tmp/openbsd39/


disklabel comes back with:

Total size of media: 500400 sectors (256204800 bytes)
Bytes/Sector: 512
Sectors/Track: 48
Sectors/Cylinder: 720
Tracks/Cylinder (heads): 15
Cylinders: 695


Once everything is on the flash, I reboot the Soekris box and it just works. Nice.

Now on to configuring things they way I actually want them.

distflash.sh pulls the default configurations from a staging area on Sneezy. For now I'm configuring stuff directly on the Soekris box, now affectionately named "gw". Once I'm done I'm planning to run a find accross the whole file system looking for files that are newer than today 18:07, and save all my changes back to the staging area on sneezy.

Here's the service split between gw and chef:

gw:

  • three ethernet legs - working
  • PF - working
  • dhcpd - working
  • named - working
  • sshd - working
  • ntpd - done, not thoroughly tested yet
  • smb service to wireless network - working (see the long story)
  • httpd - redirect working
  • email proxy - redirect working
  • apcupsd - not done (stays on chef for now)
  • snmpd - not done (not critical)
  • sensorsd - not done (not critical)


chef:

  • email - postfix (working)
  • email - dovecot (working, to be replaced with courier)
  • email - spamassassin (working)
  • email - squirrelmail (won't fix)
  • media files - nfs (working)
  • media files - smb (working)
  • httpd - apache (working)
  • httpd - authenticated proxying to grumpy/mythweb (not done, not critical)
  • HD stats - smartd (working)
  • network monitoring - mrtg (working, needs gw added)
  • monitoring - nagios (not done, not critical)


I my current setup the music files on chef are exported via smb both to the wireless and the wired LAN, so I actually don't have to worry about anything. In the new setup chef is only connected to the wired LAN. smb broadcasts from the Audiotron won't be sufficient to find chef. This link at O'Reilly seems to indicate that I need to run Samba as a wins server. However, funny enough, right now when the Audiotron probes the network for music files, it will show babybaer which is only connected to the wired network. Why is that? I suspect chef is browse master and responds with the host lists for both the wired and wireless segments, so I either need a WINS server on chef, and point the Audiotron at that, or, if the Audiotron doesn't support WINS, run a smbd on gw and force it to try to acquire browse master.

Sunday, August 13, 2006

OpenBSD, bind, NAT & aliased IPs

Yay for routing and NAT. Not.

I'm using RollerNet for my secondary DNS. Works quite nicely most of the time, but hey it's free. The DNS logs at rollernet showed

zone goodcoffee.net/IN: refused notify from non-master: 216.27.180.188#14688


Hmmm, yeah, ns.goodcoffee.net is on 216.27.180.215, which is an alias on my outside interface. I'm not serving requests on .188. ok, so bind just hands the notify to the OS, which does its thing and sends out the notify via the default route. Only, that happens to not be the master in the bind config at RollerNet.

I like my setup, so let's just reverse the assignment of IP and alias. Long story short, PF doesn't allow NAT on an aliased IP. I couldn't get it to rewrite outbound traffic for the RollerNet name servers to come from .215. Nor could I convince bind to use .215.

After some fussing with configs and options, I eventually changed the bind config to listen on .188, and changed RollerNet to take .188 as the master. Since that looks ugly in the config, I'm migrating the DNS entry for ns.goodcoffee.net from .215 to .188. Along the way I fixed bind and PF configs to use the new ns2.rollernet.us IP.

Hah, ns1.rollernet.us apparently didn't notice the change in the configuration yet. It's still refusing notifies from .188, while ns2.rollernet.us already happily serves the updated zone. I'll wait some time before I stop serving DNS on .215.

Update:
ns1.rollernet.us came around to update as well 15 minutes later. All is good now.

Saturday, July 29, 2006

Friday, July 28, 2006

grumpy and wireless

Having much more success with the WG111T now on grumpy. I attached it to the supplied cable and left it on the TV cabinet, instead of connecting straight to the PC. Transferred several hundred MB of movie files with no issues whatsoever. I get about 830kByte/s (7MBit/s) actual throughput on wlan0 when copying files via scp. Not great, but perfectly sufficient for the occasional file transfer and daily program guide updates.


Some fun with ARP and routing

grumpy has eth0 on my internal network, and wlan0 on the WG111T. My wireless LAN is a separate leg off the firewall. Originally, it was an open WLAN with its own IP space, DHCP, etc. I set this up this way so that others can use my connection if they are within reach. However, with all the multimedia equipment now on the WLAN (and the Linux drivers supporting encryption), I turned on WEP. Not perfect security, I know, not even close, but better than nothing. But I disgress...

So, when grumpy has wlan0 enabled, I can ping grumpy.wlan from the wired network iff I ifdown eth0.
Looks like either the kernel on grumpy sees the directly attached network and tries to reply to ICMP requests originating on the wired LAN via eth0, even though they were sent to wlan0 via the firewall. This happens even when the cable is disconnected, resulting in an (incomplete) ARP entry. So, in order to access grumpy from the wired LAN, eth0 needs to be ifdown when the cable is disconnected.
However, I want it up if the cable is connected. Now, how do I do that?
...
ifplugd to the rescue. It's very straight-forward, easy to configure. It detects when the network cable is plugged in and configures and unconfigures eth0 accordingly.
The catch?
MythTV is configured to use the IP address of eth0 for the backend server. If I unconfigure the interface, mythfrontend is getting *very* unhappy. *sigh*
Let's use 127.0.0.1 for now...

Update:
After leaving grumpy running overnight in this config, wlan0 was dead _again_ this morning. rmmod ehci_hcd . Let's see if it's really the ehci module causing issues. Of course, that drops the transfer rate to a measly 230kByte/s.

Update:
grumpy has been running for two weeks with no wireless drops. So it really is the ehci_hcd kernel module giving me grief. I wonder if going to kernel 2.6.17 would help, but ah, the pain of rebuilding all the drivers for the TV cards. otoh, going to ivtv 0.6.x might fix closed captioning support. Hmmmm.

Thursday, July 27, 2006

grumpy gets a bigger hard drive

I started grumpy with a 120G drive I had laying around, figuring this will last for a while. As I quickly discovered, not so. Particularly, when I wanted to keep a few movies around. Also, the ShiftTV pieces started to eat up space quickly.

So, I finally got a whopping 300GB disk at Fry's. Special offer, 80 bucks. Not too bad. Here's how I transfered the system to the new disk:

  • partition the new disk like the old one, just bigger /opt (where I keep the movies)

  • initialize the file systems (mke2fs -j /dev/hdc1, mkfs.jfs /dev/hdc6, mkswap /dev/hdc5) and mount them under /mnt/

  • Use cpio to transfer the files from the root file system: find / -xdev -print0 | cpio -pa0V /mnt/hdc1

  • Use a plain cp to copy the video files (which cpio doesn't like due to huge file sizes): cp -av /opt/* /mnt/hdc6/

  • Install grub: grub-install --root-directory:/mnt/hdc1 /dev/hdc


ok, the latter didn't work ("/dev/hdc does not have any corresponding BIOS drive"). wtf? after searching quite a bit I ended up editing /mnt/hdc1/boot/grub/devices.map. adding

(hd1) /dev/hdc

finally, that worked. and I can boot from that drive when it is hda.

Monday, July 24, 2006

ACPI wakeup and grumpy

Going to sleep and waking up works great from MythTV. With a few gotchas:


  • if the frontend is running, the backend doesn't shut down the system.
  • echoing into /proc/acpi/alarm reliably starts the system... at midnight. The BIOS seems to completely ignore the time I set.


Once the frontend is not running, it's not trivial to bring it up again (particularly for my family). I'm running a window manager, in order to be able to use MythVideo properly. Otherwise, this would be simple (mythfrontend exits, gpm comes up again). I need a little app that just loops forever, accepts a key stroke to bring up the frontend, and when it exists, loops back.
Maybe even include some automated shut-down counter off the mythtv logs somehow. Hmmm, there's a little project to start playing with Ruby... or learn about window programming in Python.

The latter is more nasty. I guess, I have to check out nvram, or play with some wake-on-lan solution, but that would require that the wireless network connection worked properly.

But first, it's time to haul the trash from our recent kitchen remodel to the landfill.

Update (a few days later):
I suck. Had a typo in the script filename given to MythTV. sudo executed with no error, even though it couldn't find the script, so the shutdown proceeded without setting a new wakeup time. I'm still puzzled why grumpy wakes up at midnight.

video editing on Linux

I had quite some success with Cinelerra when editing my videos. So far, I always captured into MJPEG using the excellent MJPEGtools package using mencoder, video4linux and my old capture card. Now that I have this neat hardware MPEG2 encoder in my MythTV box, the whole process should become substantially less painful (at least there shouldn't be that many options to remember ... not that I remembered them, that's what scripting is for... but I disgress).

Cinelerra kinda forked into a community release. There is much more (better?) documentation linked off that site as well as the main page. Even unofficial Ubuntu packages exist now. Don't really feel like trying to compile this from svn myself. (Hmmm, maybe I should. Just for fun. No, wait... :-)

sigh
Babybaer (the most powerful computer in the house) is still on Ubuntu Hoary (and the Cinelerra packages are for Breezy and Dapper only. Time for a reinstall with Dapper. It's a good idea anyways.

Saturday, July 22, 2006

It's HOT!!!!

40C at a private weather station off Santa Teresa. We topped out at 37C on our patio. Now, at 9:00pm, it is still 33C outside. The air conditioning was running all day, getting the first floor down to "only" 29C. Franziska is a very unhappy baby today.
Upstairs it's as hot as outside, now point to open the windows and create some "Durchzug". I placed a fan over the AC duct in Pascal's room to get more cold air and some movement into that room.

Not even the pool is refreshing. Some idiot turned up the heat and the water feels almost as warm as a whirl pool. Aparently, some "old lady" complained...

Tuesday, July 18, 2006

huh? usb 4-4: USB disconnect?

Now, what is this nonsense?
The WG111T apparently disconnected from the USB bus and played dead. No reaction when trying to tickle it with unplug - re-plugin. Whoops, trying to rmmod ndiswrapper results in hung shell. Oh, and the logs have DHCPDISCOVER entries since 6am, so the software works, but there seems to be no reaction on the hardware interface.

The USB stick is near the exhaust of the fan cooling my PVR500 card. Maybe getting too hot? I put it on a cable and place it on top of the TV cabinet. No dice. The device still disconnects after a while. Strange. Maybe heat related? The device gets more than handwarm when turned on for a while.

Some people report this is an interaction with the ehci_usb USB2.0 driver and using uhci-usb works more reliably. yeah, well, and much, much slower. Grrrrrm.

"micro" earthquake

20:55: Bernhard retires to the "Stille Oertchen" with a newspaper.

20:56: Bernhard gets a good kick in the behind and the water tank behind him squeaks ominously.

20:58: No-one else in the house felt it (they sat on cushioned couches or the stairs). Bernhard looks at event nc51172604. Neat. Even links to Google Maps. Zoom in! The epicenter was about 4 miles from my house.

That's what a magnitude 2.9 feels like...

Saturday, July 15, 2006

ndiswrapper and WG111T

Follow instructions for Debian in wiki off ndiswrapper.sourceforge.net using module-assistant.


# module-assistant auto-install ndiswrapper
# unzip wg111t_1_2.zip

This is the 1.2 driver version off the NetGear Website, which supposedly works with ndiswrapper.

# ndiswrapper -i netwg11t.inf
# ndiswrapper -i athfmwdl.inf
# ndiswrapper -l
Installed drivers:
athfmwdl driver installed, hardware present
netwg11t driver installed
# dmesg | tail
ndiswrapper: driver netwg11t (NETGEAR,01/07/2005,1.0.1.1007) loaded
wlan0: vendor: ''
wlan0: ndiswrapper ethernet device 00:14:6c:5e:76:af using driver netwg11t, 1385:4250.F.conf
wlan0: encryption modes supported: WEP; TKIP with WPA; AES/CCMP with WPA
# ndiswrapper -m
Adding "alias wlan0 ndiswrapper" to /etc/modprobe.d/ndiswrapper

Hmmm, so far, so good. Let's see if this works. Continuing at http://ndiswrapper.sourceforge.net/mediawiki/index.php/DebianNoCompiles.

# apt-get install wireless-tools
# iwconfig
[...]
wlan0 IEEE 802.11g ESSID:"LostLostEntry"
Mode:Managed Frequency:2.437 GHz Access Point: 00:09:5B:F8:8B:26
Bit Rate:54 Mb/s
Encryption key:off
Link Quality:0/100 Signal level:-68 dBm Noise level:-256 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
# dhclient wlan0
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 7
DHCPOFFER from 192.168.201.1
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPACK from 192.168.201.1
bound to 192.168.201.112 -- renewal in 21600 seconds


Excellent. That was easy. Now on to configuring WEP. That will be good enough for my purposes
since the wireless network is on a separate leg off my firewall.


iwconfig wlan0 essid ...
iwconfig wlan0 enc ...


Change the AP WEP config and voila, everything working. Very nice.

I didn't expect this to be THAT easy. And I tried this only because Best Buy wouldn't take the WG111T back (over 30 days since purchase... grrr).

Thursday, July 06, 2006

XvMC

randomly browsing ...

http://www.mythtv.org/wiki/index.php/XvMC

Monday, July 03, 2006

pxe booting lisa

more from the "making ancient hardware work department". Lisa is an old Compaq Deskpro, which faithfully served as my firewall machine for a few years. I want to install Debian 3.1 on that machine. Since it doesn't have a CD drive (and hooking one up resulted in a freaked out isolinux error), I try pxe booting this thing.
This system has an Intel EtherExpress with UNDI PXE-1.0, which dutifully gives me the wonderful error "No filename received". LIAR!

tcpdump -s 560 -vv not host 192.168.200.1


20:32:59.021883 IP (tos 0x0, ttl 20, id 2, offset 0, flags [none], length: 576) 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from 00:d0:b7:19:b0:5e, length: 548, xid:0xba19b05e, secs:1792, flags: [Broadcast] (0x8000)
Client Ethernet Address: 00:d0:b7:19:b0:5e
Vendor-rfc1048:
DHCP:DISCOVER
PR:SM+DG+VC+VO+BF+T128+T129+T130+T131+T132+T133+T134+T135
MSZ:1260
GUID:0.165.28.236.157.227.180.211.17.162.226.146.14.228.177.124.15
ARCH:0
NDI:1.2.1
VC:"PXEClient:Arch:00000:UNDI:002001"
20:32:59.022502 IP (tos 0x10, ttl 16, id 0, offset 0, flags [none], length: 328) sneezy.lostentry.org.bootps > 255.255.255.255.bootpc: [udp sum ok] BOOTP/DHCP, Reply, length: 300, xid:0xba19b05e, secs:1792, flags: [Broadcast] (0x8000)
Your IP: 192.168.200.24
Server IP: sneezy.lostentry.org
Client Ethernet Address: 00:d0:b7:19:b0:5e
file "/tftpboot/pxelinux.0"
Vendor-rfc1048:
DHCP:OFFER
SID:sneezy.lostentry.org
LT:600
SM:255.255.255.0
DG:chef.lostentry.org


There you have it. It's right there.

After banging my head at this for a little while, I try an option suggested in the pxelinux docs:

option vendor-class-identifier "PXEClient";


Sure enough, suddenly this thing is much more cooperative in the tcpdump. It picks up the IP address, and tries to connect to sneezy:4011. I need a pxe server daemon.


cd /usr/ports/net/pxe
make
make install


(I love the FreeBSD ports collection...)

A while later I'm still sitting here scratching my head. The pxe daemon seems to be working and sending config data back to lisa, but nothing appears to be happening. looks like as if it doesn't understand what the daemon is talking about, or it doesn't receive the response.

...

ok. I give up. Where are the floppy images...

Saturday, June 10, 2006

Automatic shutdown and power-up for grumpy

No point having another computer running in the house 24x7 if we're not recording or watching all the time. The MythTV Wiki has an entry doing this using ACPI.

I installed powersaved (which doesn't support my AMD Duron 1600, stepping 00), and acpid.


grumpy:~# powersave -S
ACPI
grumpy:~# cat /proc/acpi/alarm
2006-00-00 **:**:**
grumpy:~# echo "2006-06-10 18:00:00" > /proc/acpi/alarm
grumpy:~# cat /proc/acpi/alarm
2006-06-10 18:00:00
grumpy:~# shutdown -h now


So far so good. Let's see if this works. [Waiting for 8 minutes] Of course, that didn't work. Go into the BIOS, enable the RTC Alarm resume function, and for good measure also enable Wake-Up on RTC Alarm Interupt. Let's try again... And it didn't work with my motherboard. Darn it.

While at it, I at least added CPU temperature monitoring from the information displayed in /proc/acpi/.

Sunday, June 04, 2006

WIFI & Linux

Yet another sad area in Linux hardware support is anything WIFI. This norwegian page gives a fairly gloomy, but at least current overview of what's out there. Atheros (madwifi) and Intel Centrino are the recommended hardware options. Consistent with what I hear from co-workers.

Here is an extensive list of cards that use an Atheros chipset. Sounds like the best option to me. The list at the Madwifi web site is long and appears to be reasonably up to date as well.

Update (a few weeks later):
And we learn that USB atheros devices are not supported well by the madwifi driver. Even though a Netgear WG111T has the right chipset, the USB device layer doesn't pass X through. *sigh*

Sunday, May 21, 2006

Addressing the heat problem with grumpy

Grumpy, my MythTV box, is running continously. The PVR-500 is running hot, the NVidia graphics card (fanless) is running hot, the CPU is running hot, the northbridge isn't exactly cool either, neither is the hard-drive.

When I first put this together, I used only the single fan that came with the case (Antec Overture). It's temperature controlled and with all the heat was quickly running at full speed after I closed the case, along with the associated noise. Even though it is a silent fan, it's not the most quiet around. I like the Coolermaster SAF-S84-E1. Virtually quiet.

I installed a fan next to the PVR-500 that blows air out of the case through the open expansion card slots. However, it didn't get enough air flow. So, I built another Coolermaster ultra-quiet fan in the 5 1/4" expansion slots:





Sunday, May 07, 2006

Piggy-backing off SpeakEasy's mail rejector

I'm running postfix with spamassassin and procmail on chef. The system works quite well. The amount of spam we see in our mailboxes has come down dramatically compared to a few months ago. I'm using SpeakEasy as default relay to work around a deficiency in SpeakEasy's domain sender verfication.

Patricia is forwarding her mail to a gmail account for easier and faster searching. SpeakEasy's sender domain checks are more stringent occasionally than what I use (and the spam checks on chef are performed on user delivery, not when I accept mail and forward it on to gmail.com). So I regularly end up with entries in my mail queue that are rejected by SpeakEasy (and I have softfail enabled).


-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
473825800 3908 Sat May 6 00:24:50 abcdf@0451.com
(host mail.speakeasy.net[69.17.117.59] said: 553 sorry, your mail was administratively denied. (#5.7.1) (in reply to MAIL FROM command))
_______@gmail.com

3EAED52BF 5611 Thu May 4 23:34:11 huneycu@alma.net
(host mail.speakeasy.net[69.17.117.59] said: 554 refused mailfrom because return MX does not exist (in reply to MAIL FROM command))
_______@gmail.com

60D3E53FF 3900 Sat May 6 00:22:11 dage3@0451.com
(host mail.speakeasy.net[69.17.117.59] said: 553 sorry, your mail was administratively denied. (#5.7.1) (in reply to MAIL FROM command))
_______@gmail.com

DC5E752C3 3303 Wed May 3 23:31:49 czj@0451.com
(host mail.speakeasy.net[69.17.117.59] said: 553 sorry, your mail was administratively denied. (#5.7.1) (in reply to MAIL FROM command))
_______@gmail.com

A579A537C 1538 Fri May 5 14:54:49 awawa@0451.com
(host mail.speakeasy.net[69.17.117.59] said: 553 sorry, your mail was administratively denied. (#5.7.1) (in reply to MAIL FROM command))
_______@gmail.com

-- 18 Kbytes in 5 Requests.


I added the following to /etc/postfix/main.cf:


smtpd_sender_restrictions =
reject_unknown_sender_domain
reject_unverified_sender


The first test will do a DNS lookup on the sender domain and make sure there is either a MX or an A record returned. The second test will actually try to initiate sending an email to the sender ("email callout"). Since I'm smart hosting through SpeakEasy, I'm actually not hitting the destination mail server (and won't participate in e.g. JoeJobbing aol.com). Instead, this just asks SpeakEasy's mail server whether it would allow an email from that domain to go through later when it'll be forwarded to gmail.com after it finally got accepted on chef.

Here's an example SMTP session with this feature enabled:


$ telnet mail.goodcoffee.net 25
Trying 216.27.180.215...
Connected to dsl027-180-215.sfo1.dsl.speakeasy.net (216.27.180.215).
Escape character is '^]'.
220 chef.goodcoffee.net ESMTP Postfix
MAIL FROM:
250 Ok
RCPT TO:
450 : Sender address rejected: undeliverable address:
host mail.speakeasy.net[69.17.117.59] said: 554 refused mailfrom because
return MX does not exist (in reply to MAIL FROM command)
quit
221 Bye
Connection closed by foreign host.


Note how chef responds with the error message from mail.speakeasy.net. The respective maillog entries nicely show how the verify(8) server is calling out to speakeasy.net while the incoming connection is still open.

Oh yes, the MX entry for alma.net is kinda amusing:


$ dig mx alma.net

; <<>> DiG 9.2.4 <<>> mx alma.net
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 6518
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1

;; QUESTION SECTION:
;alma.net. IN MX

;; ANSWER SECTION:
alma.net. 7200 IN MX 0 dev.null.

;; AUTHORITY SECTION:
alma.net. 7195 IN NS ns.buydomains.com.
alma.net. 7195 IN NS this-domain-for-sale.com.

;; ADDITIONAL SECTION:
ns.buydomains.com. 172795 IN A 208.254.3.177

;; Query time: 87 msec
;; SERVER: 192.168.200.1#53(192.168.200.1)
;; WHEN: Sun May 7 09:43:16 2006
;; MSG SIZE rcvd: 132



(Of course, I could just disable the softfail feature of postfix and the annoying entries in my mail queue would go away, but that wouldn't be so interesting...)

Update:
So, that ended up being a really stupid idea. Apparently, the mail check on SpeakEasy's server
failed 95% of the time and all legit mail was blocked (amusingly, spam still got through...). I took this out again. Doesn't seem to work the way I expected.

Saturday, May 06, 2006

Getting ShiftTV segments to grumpy

We have over 35GB of content downloaded from ShiftTV. In the one week MythTV is running here it already filled up 40+GB with MPEG2 material from the cable broadcasts.

So, we copy on demand:
- I added an icon Patricia's desktop to open up a sftp kio slave to grumpy with ssh authorized_keys login (URL: sftp://mythtv@grumpy/opt/movies/)
- copy over the move to that folder
- Media Library -> Watch Videos

Getting overscan to work properly

The nvidia package comes with a nice X tool called nvidia-settings. It controls all aspects of the graphics chip. I feel like being on Windows. When you exit the tool it saves all settings to ~/.nvidia-settings-rc. It even has a helpful --load-config-only option that will suck in and apply the values from the rc file. You can put that e.g. into the KDE autostart folder.

The only catch: The graphics chip doesn't care.

When I open the tool, overscan is not adjusted at all. Only once I move the overscan slider even only one notch the setting gets applied to the output properly. However, the setting does get adjusted properly when I use the --assign option of nvidia-settings.

Oh well, here is the script I use to configure TVout:


#!/bin/sh

nvidia-settings -a 0/TVOverScan[TV-0]=14
nvidia-settings -a 0/TVSaturation[TV-0]=130
nvidia-settings -a 0/TVHue[TV-0]=10
nvidia-settings -a 0/TVFlickerFilter[TV-0]=153
nvidia-settings -a 0/DigitalVibrance[TV-0]=7
nvidia-settings -a 0/ImageSharpening[TV-0]=0


The values are copied from nvidia-settings-rc after I was happy with the picture. It does need a little bit more fine-tuning for the greens, but looks pretty good already.

Thursday, May 04, 2006

success!!!

MythTV is now running for almost a week.

Stuff I have working:
- Debian 3.1 Testing base install
- wintv pvr-500 with dual tuners recording hardware encoded mpeg2 streams using the ivtv drivers
- computer in nice case (Antec Overture) and hooked up to TV
- mythvideo, so I can play back German TV segments downloaded from shiftTV using mplayer
- automatic login and start of mythfrontend
- manual commercial skipping (well, ok, that's a mythtv feature, but it's cool. Not as cool as the automatic skip of ReplayTV, though)

Basically, the whole system is usable. Decent video quality, too (especially considering that I'm feeding this via composite TVout to a 10 year old 26" TV). I'm excited!


Stuff I need to work on:

- no remote, still using keyboard
Patricia won't use this unless there is a remote. It is asking a bit much to remember all the relevant key strokes (although, she is getting curious ... slowly). I'm planning to build or buy a cheapo IR receiver for the serial port and re-use one of the dozen IR remotes I have laying around. The ReplayTV one is particularly interesting ("Commercial Skip" button is already properly labeled...)

- TVout borders/overscan
The Nvidia TVout signal leaves an ugly border around the picture. I didn't bother yet with experimenting how to get rid of this, aside from enabling the TV overscan setting in xorg.conf which had zero effect. Maybe need a special ModeLine? Or investigate http://sf.net/projects/nv-tv-out

- cooling issues
The Antec Overture is a *very* nice case, given the footprint. 3U, so regular expansion cards fit without the need for riser cards. The case is huge, but the case doesn't look bulky. 380W True Power power supply, temperature regulated 9cm fan in the back. The only catch is that the PVR-500, the FX5200 and the CPU generate quite a bit of heat and the airflow is not optimal so that the fan can get the hot air out of the case. It runs at full speed, but the inside of the case still gets very hot. Actually, the case around the PVR-500 feels warm from the outside...
I turned around the airflow of the case fan, so it blows air into the case straight on the hard drive, and installed another fan on the inside that blows air over the PVR-500 and the video card out through the PCI slot holes. Doesn't help much, though. For now, I opened the front expansion slots, so that warm air exits the case through the front.

- scheduled shutdown/boot to save power
Yet another computer sucking up power in the house. MythTV supports putting the computer to sleep after recordings are done and waking it up before the next recording. Need to see what my motherboard supports and how this is all configured.

Saturday, April 29, 2006

The state of TV out on ATI cards in Linux...

... is just sad. The GATOS stuff doesn't really look that maintained, TVout is only supported in the CVS version, the proprietary ATI drivers only support Radeon 8500 and up (tough luck if you happen to have a Radeon 7500 with RV200), xorg7.0 is supposed to support TVout using the GATOS code, but doesn't really exist yet.
*sigh*
I caved and picked up a Nvidia FX5200 card with TV out.

pvr500 with ivtv

Followed the generic distribution howto for my 2.6.15 kernel. Installed ivtv 0.4.4, copied firmware to /usr/lib/hotplug/firmware, kick out the old modules, /sbin/modprobe ivtv and get in dmesg:


ivtv: ==================== START INIT IVTV ====================
ivtv: version 0.4.4 (tagged release) loading
ivtv: Linux version: 2.6.15-1-k7 K7 gcc-4.0
ivtv: In case of problems please include the debug info between
ivtv: the START INIT IVTV and END INIT IVTV lines, along with
ivtv: any module options, when mailing the ivtv-users mailinglist.
ivtv0: Autodetected WinTV PVR 150 card (cx23416 based)
ACPI: PCI Interrupt 0000:02:08.0[A] -> Link [LNKB] -> GSI 5 (level, low) -> IRQ 5
ivtv0: Unreasonably low latency timer, setting to 64 (was 32)
tveeprom: Second (radio) tuner idx 101
tveeprom: ivtv version
tveeprom: Hauppauge: model = 23552, rev = D492, serial# = 9492586
tveeprom: tuner = Philips FQ1236A MK4 (idx = 92, type = 57)
tveeprom: tuner fmt = NTSC(M) (eeprom = 0x08, v4l2 = 0x00001000)
tveeprom: audio processor = CX25843 (type = 25)
tveeprom: decoder processor = CX25843 (type = 1e)
ivtv0: i2c attach to card #0 ok [client=tveeprom, addr=50]
ivtv0: This is the first unit of a PVR500
tuner (ivtv): chip found at addr 0xc0 i2c-bus ivtv i2c driver #0
TEA5767 detected.
ivtv0: i2c attach to card #0 ok [client=(tuner unset), addr=60]
tuner: type set to 62 (Philips TEA5767HN FM Radio) by autodetect
type set to 62 (Philips TEA5767HN FM Radio)
tuner (ivtv): chip found at addr 0xc2 i2c-bus ivtv i2c driver #0
ivtv0: i2c attach to card #0 ok [client=(tuner unset), addr=61]
cx25840 1-0044: cx25843-23 found @ 0x88 (ivtv i2c driver #0)
cx25840 1-0044: loaded v4l-cx25840.fw firmware (14264 bytes)
ivtv0: i2c attach to card #0 ok [client=cx25840, addr=44]
wm8775 1-001b: chip found @ 0x36 (ivtv i2c driver #0)
ivtv0: i2c attach to card #0 ok [client=wm8775, addr=1b]
tda9887 1-0043: (ivtv) chip found @ 0x86 (ivtv i2c driver #0)
ivtv0: i2c attach to card #0 ok [client=tda9887, addr=43]
ivtv0: Detected a TEA5767 radio tuner. Enabling radio support.
ivtv0: loaded v4l-cx2341x-enc.fw firmware (262144 bytes)
ivtv0: Encoder revision: 0x02050032
ivtv0: Allocate DMA encoder MPEG stream: 128 x 32768 buffers (4096KB total)
ivtv0: Allocate DMA encoder YUV stream: 194 x 10800 buffers (2048KB total)
ivtv0: Allocate DMA encoder VBI stream: 120 x 17472 buffers (2048KB total)
ivtv0: Allocate DMA encoder PCM audio stream: 455 x 4608 buffers (2048KB total)
ivtv0: Create encoder radio stream
tuner: type set to 57 (Philips FQ1236A MK4) by ivtv i2c driver #0
cx25840 1-0044: 0x0000 is not a valid video input!
ivtv0: Initialized WinTV PVR 500 (unit #1), card #0
ivtv: ====================== NEXT CARD ======================
ivtv1: Autodetected WinTV PVR 150 card (cx23416 based)
ACPI: PCI Interrupt 0000:02:09.0[A] -> Link [LNKC] -> GSI 10 (level, low) -> IRQ 10
ivtv1: Unreasonably low latency timer, setting to 64 (was 32)
tveeprom: Second (radio) tuner idx 101
tveeprom: ivtv version
tveeprom: Hauppauge: model = 23552, rev = D492, serial# = 9492586
tveeprom: tuner = Philips FQ1236A MK4 (idx = 92, type = 57)
tveeprom: tuner fmt = NTSC(M) (eeprom = 0x08, v4l2 = 0x00001000)
tveeprom: audio processor = CX25843 (type = 25)
tveeprom: decoder processor = CX25843 (type = 1e)
ivtv1: i2c attach to card #1 ok [client=tveeprom, addr=50]
tuner (ivtv): chip found at addr 0xc2 i2c-bus ivtv i2c driver #1
ivtv1: i2c attach to card #1 ok [client=(tuner unset), addr=61]
cx25840 2-0044: cx25843-23 found @ 0x88 (ivtv i2c driver #1)
cx25840 2-0044: loaded v4l-cx25840.fw firmware (14264 bytes)
ivtv1: i2c attach to card #1 ok [client=cx25840, addr=44]
wm8775 2-001b: chip found @ 0x36 (ivtv i2c driver #1)
ivtv1: i2c attach to card #1 ok [client=wm8775, addr=1b]
tda9887 2-0043: (ivtv) chip found @ 0x86 (ivtv i2c driver #1)
ivtv1: i2c attach to card #1 ok [client=tda9887, addr=43]
ivtv1: This is the second unit of a PVR500
ivtv1: Correcting tveeprom data: no radio present on second unit
ivtv1: loaded v4l-cx2341x-enc.fw firmware (262144 bytes)
ivtv1: Encoder revision: 0x02050032
ivtv1: Allocate DMA encoder MPEG stream: 128 x 32768 buffers (4096KB total)
ivtv1: Allocate DMA encoder YUV stream: 194 x 10800 buffers (2048KB total)
ivtv1: Allocate DMA encoder VBI stream: 120 x 17472 buffers (2048KB total)
ivtv1: Allocate DMA encoder PCM audio stream: 455 x 4608 buffers (2048KB total)
tuner: type set to 57 (Philips FQ1236A MK4) by ivtv i2c driver #1
cx25840 2-0044: 0x0000 is not a valid video input!
ivtv1: Initialized WinTV PVR 500 (unit #2), card #1
ivtv: ==================== END INIT IVTV ====================


Tune a channel and get an mpeg stream:

ivtvctl -c 2
cat /dev/video0 > test.mpg


Plays back in xine with no problem. Nice quality, too, but no de-interlace. We'll get to that, if needed.

MythTV recognizes the card no problem at all. Sweet! I programmed two shows in parallel, and they were recorded just fine. This is GREAT.

Friday, April 21, 2006

Joschka Fischer

I went to a talk by Joschka Fischer today. I was really curious about seeing the man that took the oath for German foreign minister in jeans and sneakers. As you can see these days he dresses a little bit more conservative. He had nice words for the audience, "you remind me more of university, than a successful tech company."

Either way, it was very interesting. He gave a quick introduction on his history in the German government, his positions on a variety of issues ranging from a nuclear Iran, the Iraq war, the rise of China and India, over global warming to renewable energies. He cautioned, "I'm not an expert on Internet technologies, but I am for foreign relations and issues affecting the environment." Then he opened it up for questions. A lot of issues were covered in detail, particularly the nuclear program in Iran, Fischer's fear of an arms race in the Middle East and the impact on the region, if Iran were to acquire the bomb. Scary stuff. He disagreed several times on various subjects with the policies set in Washington, DC, and had very harsh words about the Iraq war, "bad idea, poorly planned, bad execution". He outright dismissed claims by the Iranian government that their nuclear program is for civilian use, "Why do they need a closed fuel cycle? Why highly enriched Uranium? The Iranian program looks very similar to the existing Indian and Pakistani programs." Airstrikes on iranian nuclear facilities "with very high likelyhood are not going to be sufficient to destroy the program". And then there is Israel, and the rethoric of the Iranian government. Fischer managed to explain these issues concisely in terms and ways that were easy to follow and even though I'm following the news from the region, it was nice to have all the issues presented together and how they interact.

On renewable energies he considered a program started by the SPD/Greens government an economic success, "Germany is a leader in the field of solar technologies now, as well as wind energy". He talked about how all humans have the same right to fulfill their dreams as everyone in the industrialized nations.

"The developed world can't tell countries like China or India to cut back when their people are trying to go after their dreams", and then looped it back to renewable energies and cooperative world politic as the only solution for long-term prosperity. "In Europe war was the driver of change. My father went to war, my grand-father did, and his father did. War is terrible, but it's also change. You burry the dead, attend to the wounded, and then rebuild. You know where to spend the money and concentrate your efforts on the build-up. However, with the weapons available in the 21st century and the way the world-economy is interconnected, war is no longer an appropriate way to deal with the problems. "Diplomacy and cooperation between countries is the only way."

Immigration and the expansion of the European Union came up as well, particularly admitting Turkey into the EU. Fisher felt compelled to explain to his american audience (which by rough observation consisted of about 2/3 non-Americans, half of them Germans) what such a move would mean, "imagine Mexico, the Central American countries, as well as Columbia, in talks with the US to join the union. Think about the uproar this would create, what people would say".
Fischer compared immigration policy in the US to the Europe. A fairly open policy as it exists in the US would never work in countries like Germany. He explained that with the difference in attitude towards the poor. "The poor in the US are basically ignored and forgotten. If European countries had such a substantial amount of poor people as the US, they would quickly organize into a group with extremist tendencies (left or right) that could not be ignored by the government". This reminds me of the riots in France a couple months ago. It is already happening there. Probably just a matter of time until it happens in Germany.

Overall, I'm very happy I had the chance to listen to Joschka Fischer and meet him in person. This was not as impressive as seeing Michail Gorbatshev last year (or shaking his hand). However, Fischer was much more intellectually stimulating.

Shortly after the talk, the building began to rumble and shake. I went outside and saw 3 Blackhawk helicopters fly by accompanying this rather big military transport helicopter. Oh yes, President Bush is in town today, Airforce One was parked at Moffet Field, Bush probably was on his way to an invited guests only event somewhere on the Peninsula to dispense his usual nonsense. The contrast couldn't have been stronger.

Thursday, April 20, 2006

Hauppauge PVR-500

The new capture card is on its way. The PVR-500 has dual-tuner support (so we can record both Lost and Bones at the same time). It has hardware MPEG2 encoders, and is supposed to be fully supported by MythTV. This will be nice... I hope.

apcupsd

Rebuild the OpenBSD kernel, exclude uhiddev, ums, wsmouse, wskbd, ukbd, uhid, include ugen. install kernel and reboot.

Follow the instructions in the manual at www.apcupsd.org. Very straightforward:


./configure --enable-usb --with-upstype=usb --with-upscable=usb --prefix=/usr/local --with-cgi-bin=/var/www/cgi-bin/ --enable-cgi --with-css-dir=/var/www/htdocs/local/css --with-log-dir=/var/log/apcupsd
make
sudo make install


Don't turn on pthreads support. Bad idea on OpenBSD.

I went through the testing steps just up to the simulated shutdown. Nice:


Thu Apr 20 23:08:57 PDT 2006 apcupsd 3.12.2 (18 January 2006) openbsd startup succeeded
Thu Apr 20 23:14:16 PDT 2006 Communications with UPS lost.
Thu Apr 20 23:14:28 PDT 2006 Communications with UPS restored.
Thu Apr 20 23:16:29 PDT 2006 Power failure.
Thu Apr 20 23:16:35 PDT 2006 Running on UPS batteries.
Thu Apr 20 23:16:53 PDT 2006 Mains returned. No longer on UPS batteries.
Thu Apr 20 23:16:53 PDT 2006 Power is back. UPS running on mains.


Works like a charm so far.

Monday, April 17, 2006

One time too often...

... did Patricia blow the fuse on the circuit that powers the computers downstairs with the vacuum.

I got a APC BackUPS 900 RS at Central. It's supported by NUT using the hidups driver. And as I read more documentation I realize the hidups driver is for Linux only, OpenBSD ports only have NUT 2.0.0 and the generic newhidups is not built by default. Yay, let's build NUT 2.0.3 ourselves using the settings from the OpenBSD package.


./configure --sysconfdir=/etc/nut --datadir=/usr/local/share/ups --with-statepath=/var/db/nut --with-user=_ups --with-ssl --enable-strip --with-cgi --with-cgipath=/var/www/cgi-bin/nut '--with-gd-libs=-L/usr/local/lib -lgd -lpng -lz -ljpeg -lttf -lm' --with-gd-includes=-I/usr/local/include --prefix=/usr/local


Hmmm, that works, but doesn't build the newhidups driver. Appending --drivers=newhidups yields


gcc -I../include -O -Wall -Wsign-compare -s -c newhidups.c
In file included from newhidups.c:25:
libhid.h:35:17: usb.h: No such file or directory


Uh oh, trouble ahead. Revisions since 2.0.0 mostly deal with newhidups. Is this not working on OpenBSD? Great.

apcupsd to the rescue: This page explicitly mentions the BackUPS RS series. This requires a kernel rebuild and I will loose my USB keyboard. Sub-optimal, but I can live with that. Ok. It's late enough to go to bed now. I try this some other evening.

Wednesday, April 12, 2006

capture card

I have a KWorld/V-Stream TV883DVR-Pro which I picked up at Fry's last year. So far used it only for straight video in from the camera. For MythTV I need the tuner working.

Installed Debian, switched to testing, got kernel 2.6.15 and the v4l-dvb snapshot from 01162006.
Added a new card definition based on my experiments from last year and a little bit wiggle here and there:


[CX88_BOARD_VSTREAM_883_DVRPRO_TV] = {
.name = "V-Stream 883DVR Pro TV",
.tuner_type = 39,
.radio_type = UNSET,
.tda9887_conf = TDA9887_PRESENT,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.blackbird = 1,
.input = {{
.type = CX88_VMUX_TELEVISION,
.vmux = 0,
.gpio0 = 0x000004ff,
},{
.type = CX88_VMUX_COMPOSITE1,
.vmux = 1,
.gpio0 = 0x000007fa,
},{
.type = CX88_VMUX_SVIDEO,
.vmux = 2,
.gpio0 = 0x000007fa,
},{
.type = CX88_VMUX_CABLE,
.vmux = 3,
.gpio0 = 0x000007f8,
}},
},


I'm not sure if this is really a blackbird card, but it sure would be nice. The colors in tvtime are not 100% right yet, but it's much better than my experiments with the video4linux snapshot last year.

The card is working great with tvtime. No sound, though. However, in MythTV I can't get video buffers filled. whatever that means: "NVP: Timed out waiting for free video buffers." *sigh* It's getting late...

Update:
Looks like my card doesn't have a hardware MPEG2 encoder. Too bad.

Monday, April 10, 2006

MythTV?

Let's get this MythTV thing set up on grumpy and see how far I'm getting. I'm hoping I can get the MPEG2 encoder in my CX88 card up and running.

Some links:
Linux TV CX88 Wiki
mythtv.org

Add the following to /etc/apt/sources.list:


deb-src ftp://ftp.nerim.net/debian-marillat/ etch main
deb ftp://ftp.nerim.net/debian-marillat/ etch main


Following simple instructions...


apt-get install mythtv

Thursday, April 06, 2006

The Replay is dead!

Our ReplayTV 5080 is stuck at the "Please wait..." screen. Internet research indicates this means the OS image can't be read from the hard drive. Great. There are still 3 episodes of Prision Break on that hard drive that we need to watch...

l9ter's ReplayTV Upgrade Site was very helpful in finding a new software image. RTVPatch is a program to copy the image to a new hard drive. Just running RTVPatch on my Debian 3.1 system doesn't list any hard drives.

Update:
It's not the drive. I re-imaged to another drive after booting from the live CD from the rtvpatch site. Put that back into the ReplayTV, no dice. I noticed a LOT of dust in the cooling vents of the ReplayTV, so looks like we fried some part of the motherboard. Great.

On the upside, I was playing with MythTV over the weekend. My CX88 based capture card was at least partially recognized. I used it for capturing video via line-in from our camera for quite some time, but never bothered setting up the tuner. I'm going to put Debian 3.1 stable with the latest kernel in this box and see if the card gets recognized better. According to the cvs log there were lots of CX88 related V4L fixes in the last year. Also have to take a close look at my card, might be lucky and have a blackbird design in there. I seem to remember that this card is supposed to be able to do MPEG2 capture.

... and it would be kinda cool to play with MythTV more.

Update:
The drive is at least partially bad, when I tried to get the recorded episodes off the video partition, the whole system hung eventually.

Wednesday, April 05, 2006

Sunday, March 19, 2006

The "new" AT&T - but who do I call?

I loved SpeakEasy at our old place, great support, fast connection, no issues. When we moved into this place the only affordable "broadband" option available was IDSL (144/144) via Covad's Business unit. San Jose's cable network was still owned by AT&T broadband at the time and not comcastic. Not even PacBell/SBC offered DSL in this southern end of San Jose. So we ordered IDSL and got it installed, since going back to modem was just too painful. The installation basically put ISDN on the second phone line and combined the 3 IDSN channels into a single 144kBit pipe. Not great, but bearable.

A year later we got a call from SpeakEasy offering free upgrade to 1.5/768 ADSL using a "remote terminal" SBC had installed in our neighborhood. Not only was this faster, but even cheaper. I didn't have to do the PPPoE nonsense, could continue to use my two static IPs and run servers from home. That connection rides on the regular SBC phone line like most other ADSL lines, but uses SpeakEasy's backhaul from the central office. So far, so good.

Fast forward to a few weeks ago.

DSL is down. Phone is dead. Patricia calls me, I tell her to find the customer service number on the last phone bill, report the problem and have someone come out. She did, a technician showed up the next day, tested the line, and eventually found the culprit: One of the connectors had slipped off. Funny how that happened only a few hours after Patricia saw someone from SBC working on the phone closet in the neighborhood.

Fast forward again. SBC is now the "new" AT&T.

DSL is down. Phone is dead. I can't listen to my favorite Internet radio station. I pull out the last phone bill and look for customer service. Hmmm. Nothing on the front. Only, very prominently, www.att.com.
Lots of fine print on the back. Phone numbers of the PUC, the FCC, complaints addresses, but no phone number at AT&T to call in case of a problem. This is the phone company!

Finally, I go back to an older SBC bill, look on the back and indeed they have a customer service number in the fine print: 1-800-310-2355 (i.e. 1-800-PAC-BELL).
Call em up on my cell phone. "We're sorry, our offices are now closed". At least they let me connect to their 24 hour repair service. I get the ticket in. The whole process with their automated system takes "only" 15 minutes. "The next available time slot is Tuesday, March 21st" . Arrrgh. That's two days from now! They expect me to be without phone service for two days? I'm angry and annoyed.

Magically, everything starts working again just fine early in the afternoon. I'm guessing someone came out and slipped the connector back on...

Saturday, March 11, 2006

Wow! Dust and temperature...

chef was running in its new location behind the CD shelf since end of December. Yesterday evening I took it out to look at the fan configuration. Boy, that box was DUSTY!
Removed dust coating from hard drives, and cleaned the fins of the CPU heatsink. The impact is pretty impressive:

Chef disks temperature

Chef case temperature

Chef fan speeds


Note, how the CPU fan speeds up after the cleaning, as well as how the temperature of the hard drives drops as there is no more dust to insulate them from the cooling wind of the fan mounted in front of them.

Sunday, March 05, 2006

GMX and SPF

So, I finally ran into my first rejected mail due to SPF:


mail:
-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
B79A65361 1886 Sat Mar 4 16:20:14 bbeck@lostentry.org
(host mx0.gmx.net[213.165.64.100] said: 550-5.7.1 {mx020} The recipient does not
accept mails from 'lostentry.org' over foreign mailservers.
550-5.7.1 According to the domain's SPF record your host '216.27.180.188' is not
a designated sender. 550 5.7.1 ( http://www.gmx.net/serverrules ) (in reply to RCPT TO command))
Dino-@ist-einmalig.de


lostentry.org is still hosted on SpeakEasy's DNS servers (I didn't get around yet to change that to ns.goodcoffee.net and run secondary on ns1/2.rollernet.us).
SpeakEasy doesn't expose SPF records to their DNS customers. According to check-auth@verifier.port25.com the SPF record


v=spf1 ip4:216.254.0.0/24 ip4:69.17.110.0/24 ip4:69.17.116.0/24 ip4:69.17.117.0/24 mx ptr ~all


as published by SpeakEasy results in a "softfail" condition for SPF. In other words GMX refuses mail on softfail. Niiiice...

The remedy is easy:
Add relayhost=[mail.speakeasy.net] in /etc/postfix/main.cf, restart postfix, done.

Sunday, February 26, 2006

The new Winnie, the Pooh, ride in Disneyland - bah

[ok, maybe not so new anymore...]
... but what a shame. In place of a nice meadow where kids could greet and meet Winnie, the Pooh and his friends, Disney, in their infinite wisdom, installed a "Winnie the Pooh" ride.
Fine, I can live with adding more rides (in the end this *is* an amusement park), but why in the world did they have to make it this scary?
It starts out with a pretty scene in Pooh's house, then slips into a pitch-black dark tunnel with a rotating Pooh image running round the walls (apparently we are now transferred into his dream land), and ride through a ridiculous scene with funky patterns, lots of honey and ... oh, even more honey.

What bothers me is that this ride is most likely used by little children, and fans of Winnie, the Pooh (of all ages). Most of the ride is spent in this weird dream, that has barely anything to do with Pooh (aside from his image and lots of honey). It would have been so nice to build a ride that celebrates virtues that regularly come up in the books and movies, like friendship or adventure.

This one, though, is rather disappointingly flat.

The only positive thing was the very short wait time... (5 mins, compared to 65 minutes at Splash Mountain on the other side of the way).

Solaris 10, dhcp and hostname

Solaris 10 relies on dhcpd to pass it a valid hostname. If that doesn't happen the hostname is set to "unkown".

Fix: Set the host-name option in dhcpd.conf when using isc-dhcpd.

host dopey {
hardware ethernet 08:00:20:c1:95:e8;
fixed-address 192.168.200.14;
option host-name "dopey";
}


Alternatives are either hacking the init scripts (basically replace "unknown" with the hostname you want), or writing a custom init script.

Bacula and Backups

Trying to continue with Amanda and 20GB native tapes to back up 60+GB of data is an exercise in futility. I installed Bacula on Dopey months ago. To configure it I used

$ ./configure --sbindir=/usr/local/bacula/bin --sysconfdir=/etc/bacula
--with-pid-dir=/var/run/ --with-subsys-dir=/var/run/
--with-working-dir=/usr/local/bacula/bin/working
--with-dump-email=bbeck@lostentry.org --with-job-email=bbeck@lostentry.org
--with-smtp-host=mail.goodcoffee.net
--with-mysql=/usr/local/mysql/mysql-standard-5.0.15-solaris10-sparc/


To start it all up:

bash-3.00# cd /etc/bacula
bash-3.00# ./startmysql
bash-3.00# Starting mysqld daemon with databases from /usr/local/mysql/data

bash-3.00# ./bacula start
Starting the Bacula Storage daemon
Starting the Bacula File daemon
Starting the Bacula Director daemon
bash-3.00#


For OpenBSD, Bacula only supports the file daemon, so we use
./configure --sbindir-pid-dir=/var/run/ --with-subsys-dir=/var/run/
--with-working-dir=/usr/local/bacula/bin/working --with-dump-email=bbeck@lostentry.org
--with-job-email=bbeck@lostentry.org --with-smtp-host=mail.goodcoffee.net
--enable-client-only


To run jobs, use bconsole and 'run <jobname>'.