?

Log in

Nexus' Journal
 
[Most Recent Entries] [Calendar View] [Friends]

Below are the 20 most recent journal entries recorded in Nexus' LiveJournal:

[ << Previous 20 ]
Friday, April 1st, 2011
6:24 am
Hardware fun
I'm a cheap bastard. The two computers that I own are both salvaged from an electronics dumping area at work. Both are old. PCI, AGP4 only.

But I love to load them up with lots of disk space. The machine I'm writing about now has one 500G PATA drive and one each of 1T, 1.5T and 2T SATA disks in it.

A couple of days ago, my brand new Western Digital Green started acting up on me. Considering the nature of my hardware, I actually suspected a bad port. After all, of the four SATA ports on the motherboard, I think two are bad. And of the two 2-port SATA cards laying around, I think some of those are bad, too. But the machine had been stable for a while and I got too distracted by other things to sit down and really work out what was bad and mark them as such.

Now, years ago I'd sworn off of WD drives. Never again, I said. I'm beginning to think I should have stuck with that mantra. But, I wasn't a fan of Seagate either and had lots of success with Maxtor over the years. Probably the opposite of everyone else in the universe. And now that Seagate has owned Maxtor for a while, I decided to get WD a try. And it worked, for about two months before it started dying. Currently it stays online as long as I don't write anymore content to it. So much for IDEs automatic remapping of bad sectors (smartctl seems to think it has plenty to remap to).

So, to try to isolate the fault. First thing I tried to do was boot from WD's tools CD. And I promptly ran into a problem. Not long ago my PATA DVD drive died. So I replaced it with a SATA DVD-RW. And, until now, I've never bothered trying to boot from it. Guess what doesn't work?

The CD burn was good, I booted the laptop using it (quickly complained that there were no WD drives attached). Trying Seagate tools, which I know I've booted this machine with before, no luck. Maybe it was never designed boot from a SATA CD/DVD. I gave up. Another annoying part about this was, I just took something like a dozen old CD drives into work and dropped them off in that dumping area. As I'm writing this, I think I may have one that is hiding out in the garage (don't know why, just remember thinking I should put that with the rest).

Instead, I went to Fry's and bought a new controller. Hoping that maybe a new controller would give me better luck. Hah! Do you know how are it is to find a 4-port SATA card that is for PCI and NOT PCIe? It took me a while to find them, and every single one of them had one of those infamous Fry's REDUCED PRICE stickers. Someone else has already tried them and returned them. Oh, boy. Well, at least it says Linux is supported on the package, and only $30. Let's give it a try.

No luck. Hangs on every boot identifying drives. I did a little research and found out that the ``new'' Sabrent SBT-SRD4 card I bought is known to ship will an ancient BIOS, and will hang any time a disk 1TB+ is attached to it. And I didn't have anything smaller! Turns out the shipping BIOS is dated from 2004 and the most recent SiL 3114 BIOS (chipset on the card) dates from 2008. Cool. Except I need to burn an ISO to boot to FreeDOS as I don't have any USB drives handy. Oh wait, I can't boot the machine from CD. Crap.

Oh, it turns out that Linux has a utility called flashrom, and it just so happens to support the SiL 3114 flash mechanism. Now to figure out how to use it. Turns out to be fairly easy.

Backup the old ROM:
# flashrom -p satasii -r backup.bin
# strings backup.bin | head -n 4
wSILICON IMAGE
SIMG
5.0.35
02-25-2004
# file backup.bin
backup.bin: BIOS (ia32) ROM Ext. (100*512)

After downloading the newer BIOS from www.siliconimage.com:
# strings b5500.bin | head -n 4
SILICON IMAGE
SIMG
5.5.00
04-22-2008
# file b5500.bin
b5500.bin: BIOS (ia32) ROM Ext. (120*512)

Looks promising.

# flashrom -p satasii -w b5500.bin

Went smoothly.

Rebooted. Good. Shutdown, reattached all of the big drives, booted and SUCCESS! All drives noticed and my LVM is back on line.

Now, for the final test, can I write to the WD drive?

No. Shit. Tomorrow night I'll dig out a USB drive, save off the contents, then hopefully make it bootable with the WD tools. Or swap out a drive from another machine. But for now, time for bed.
Friday, September 24th, 2010
2:01 pm
Migrate grub2 to new boot disk
I had a hard time finding simple instructions for this chore. Most of the hits referenced older versions of grub which no longer applied. These may not be the best instructions, but they worked for me.


On one of my Linux machines, my boot disk was failing, to the point where sometimes it wouldn't be seen by the BIOS on boot, but fortunately, still worked well enough that I was able to copy everything off of it before it totally died.

That disk has one big partition for the OS; all user data is on other disks.
I used UUID for everything in /etc/fstab and the grub configs. After all, each time I boot, all of my entries in /dev are different each time.

I actually moved to a smaller disk, but since this is only the OS, that's fine. It takes up less than 5G.



I attached the replacement drive and booted. In this case, it showed up as /dev/sdb.

fdisk /dev/sdb
# delete existing partitions
create primary partition 1 for 20G
create primary partition 2 for rest of disk
make partition 2 swap
make partition 1 bootable
write updates, exit fdisk

mke2fs /dev/sdb1
mkswap /dev/sdb2
mount /dev/sdb1 /mnt
cd /
find -xdev -depth | cpio -pdmv /mnt     # have lunch
umount /mnt
tune2fs -j /dev/sdb1    # copying into ext2 is faster than ext3
tune2fs -o journal_data_writeback /dev/sdb1    # saner option
mount /dev/sdb1 /mnt
mount -o bind /dev /mnt/dev
mount -o bind /proc /mnt/proc
chroot /mnt


At this point, my memory is a little fuzzy (fighting a cold while I was doing this and forgot to write down what I actually did that was successful)

grub-install --recheck /dev/sdb
grub-update


Maybe both commands were needed?


Get UUID for the filesystem:
file -s /dev/sdb1


Check /boot/grub/grub.cfg and make sure it's using the correct UUID and not the old one (this gave me some grief for a while).

Then update /etc/fstab to have / and swap use new UUIDs:
file -s /dev/sdb1 >> /etc/fstab
file -s /dev/sdb2 >> /etc/fstab
vi /etc/fstab   # edit in the obvious manner

exit   # to get out of the chroot
shutdown -h now 


Disconnect the old dying drive, turn machine back on

All worked.



Now, in theory it should have been possible to do this without the bind mounts for proc + dev (not even sure proc was necessary). It looks like this should have been all that was necessary:
grub-install --recheck --root-directory=/mnt sdb


But that didn't work for me. Not sure why.
Friday, February 12th, 2010
2:25 pm
Testing connecting with Buzz
If I understand things correctly, posting this will cause the post to show up on Buzz.
Wednesday, December 30th, 2009
4:27 am
Installing Galleon on Debian Linux
Galleon is a piece of software that interacts with TiVo's to transfer shows back and forth and provides applications that can be ran on the TiVo. It can be found at http://galleon.sf.net/. I primarily use it to archive shows off the TiVo before they expire.

I recently started having with my 2 year old installation of release 2.5.1 and figured it was time to update to 2.5.5. I did this as a new installation so that I could document anything that didn't work out of the box with their installation instructions, which are pretty straight forward.

I'm using Debian Testing, only a day or two out of date.

I think the only additional package that I needed is Java:

apt-get install sun-java6-jdk

download galleon (as a .zip) from galleon.sf.net
mkdir galleon
cd galleon
unzip ../galleon-2.5.5-linux.zip

as root from the same galleon directory:

make install

Initial server start:
/etc/init.d/galleon start

Monitor /var/log/galleon/wrapper.log, and should eventually see a line that says:
Galleon is ready.

Make a minor fix to the gui script. Add -Djava.net.preferIPv4Stack=true
right after java so the line reads:

java -Djava.net.preferIPv4Stack=true -cp $CLASSPATH ....

Execute the GUI:
/usr/share/galleon/bin/gui.sh

By default it tries to log to /var/log/galleon, so it typically throws a bunch of errors to the console that can be unsettling. I've not bothered to figure out how to redirect that, so I typically just run it as root.

The GUI actually talks to the server over RMI, so permissions aren't a problem. Probably not the most secure of protocols, so only run on trustworthy networks, I suppose.

Configure, per docs at SF.

The init script is provided by the wrapper.sf.net package, which is useful for wrapping any Java app that needs to act as a Unix server or NT Service. Galleon only ships with a Linux binary, but Wrapper supports others, so should be easy enough to roll your own if not already available on your platform.
Monday, August 4th, 2008
3:54 am
gen-ripit-configs
When using ripit, one of the things I find myself doing over and over is generating config files for it. So I wrote a little tool to help out with that. Since it's really built around lsdvd, I decided to write this one in Python rather than Bash. It was easier to deal with the emitted Python dictionary than trying to write an XSLT for the XML output that it can do. And never mind trying to parse the output in Bash.

So this tool takes three arguments, -t, -s and -l. -t for the title, -s for the season (if it's a collection of TV shows), and -l for the lower limit of tracks you're interested in (currently defaults to 30 seconds, I like to rip the 45 second trailers for TV shows). Some DVDs have a bunch of outtakes or stuff that less than 30 seconds, so I finally made that a configurable value.

Just run gen-ripit-configs and a little bit later you end up with a new directory (the same name as the title embedded on the DVD) populated with a bunch of files named N.config for each track on the DVD. You can then go in and edit each one to taste. The format will be different depending on whether or not -s was present. I like the format to be Title-Season_NN-Episode_Name

It's only 73 lines, but probably not the best document Python in the world.

#!/usr/bin/python

import getopt
import os
import re
import sys

midentify = 'mplayer -vo null -ao null -frames 0 -identify dvd://%d'
sid_regex = re.compile('^subtitle \( sid \): (\d+) language: (\w+)')
shortopts = 'l:s:t:'
longopts = ['limit=', 'season=', 'title=']
opts, pargs = getopt.getopt(sys.argv[1:], shortopts, longopts)

title_format = 'title="%(title)s-EXTRA"'
title_params = {
  'limit': 30,
  'title': 'OOPS'
}

for arg, value in opts:
  if arg in ['-l', '--limit']:
    title_params['limit'] = int(value)
  elif arg in ['-s', '--season']:
    title_params['season'] = int(value)
  elif arg in ['-t', '--title']:
    title_params['title'] = value
  else:
    raise RuntimeError, 'Unknown argument: %s' % arg

if 'season' in title_params:
  title_format = 'title="%(title)s-Season_%(season)02d-NN-TITLE"'

input = os.popen('lsdvd -a -s -Oy')
a = input.read()

exec a

directory = lsdvd['title']
print 'using directory %s with limit %d' % (directory, title_params['limit'])
os.mkdir(directory)

for track in lsdvd['track']:
  if (track['length'] < title_params['limit']): continue

  ix = track['ix']
  vobsubs = []

  # Some DVDs have subtitles in more than one aspect ratio.  Currently
  # lsdvd and mplayer have differing opinions on how they should be
  # referenced.  Fortunately, it appears that mplayer and mencoder are
  # in sync.  So, rather than using lsdvd's notion of what subtitles to
  # use, we'll use mplayer's.
  if (len(track['subp']) > 0):
    (sin, sout, serr) = os.popen3(midentify % ix)
    for line in sout:
      result = sid_regex.match(line)
      if result:
        vobsubs.append('[%s]=%s' % (result.group(1), result.group(2)))
    sin.close()
    sout.close()
    serr.close()

  f = open('%s/%d.config' % (directory, ix), 'w')
  print >>f, 'track=%d' % ix
  audio = [(int(a['streamid'], 16), a['langcode']) for a in track['audio']]
  print >>f, 'audio=(',
  for a in audio:
    print >>f, '[%d]=%s ' % a,
  print >>f, ')'
  print >>f, 'vobsub=(%s)' % ' '.join(vobsubs)
  print >>f, title_format % title_params
  print >>f, '# length=%d' % track['length']
  f.close()
3:41 am
update for ripit
After seeing how I actually use ripit, I've made some mods to facilitate my actual use cases.

First, I almost always do something like:
for v in *.config; do ripit -r -c $v ; done

Later followed by:
for v in *.config; do ripit -e -c $v ; done

That way I can be encoding one set of rips while processing the next DVD.

So, now there is no more -c option. You have to pass at least -r or -e (if you leave off both, it doesn't do anything). Instead, you pass one or more config files on the command line and it loops over them.

Second, I use the script on two different systems now. The second system doesn't have a new of an mplayer installation, so I built my own, and gave it a slightly different name (well, mencoder actually). So I broke out the hardcoded mencoder string and made it a variable at the top of the script to point to whatever the name of mencoder it is (I point it to nexus-mencoder on the other machine). It's not a machine I can easily change the apt repository for, so I figured this was the easiest thing to do.

It's now up to 149 lines.

#!/bin/bash -eu

MENCODER=mencoder

usage() {
cat << \EOF
 $0 [--help] | [--rip] [--encode] config1 config2 ... configN
 $0 -h | -r -e config1 config2 ... configN

Where config file looks like:
track=2
audio=([128]=en es fr en)
vobsub=([0]=en en es fr fr en)
title="Hulk"
EOF
exit 0
}

error() {
  echo "ERROR:" "$@" 1>&2
  exit 1
}

init() {
  . $config
  chapters=$track.chapters.txt
  mkvcmd="mkvmerge --chapters $chapters -o $title.mkv --noaudio $track.avi"
}


rip_chapters() {
  dvdxchap -t $track /dev/dvd > $chapters.tmp
  mv -f $chapters.tmp $chapters
}

rip_video() {
  $MENCODER \
    -msglevel muxer=0:decvideo=3:cplayer=1 \
    -quiet \
    -of mpeg \
    -oac copy \
    -ovc copy \
    -noautosub \
    -o $track.mpg dvd://$track
}

rip_audio() {
  for index in ${!audio[*]}; do
    $MENCODER \
      -msglevel muxer=0:decvideo=3:cplayer=1 \
      -quiet \
      -of rawaudio \
      -ovc copy \
      -oac copy \
      -aid $index \
      -o $track.$index.avi dvd://$track
  done
}

rip_vobsubs() {
  count=0
  for index in ${!vobsub[*]}; do
    $MENCODER \
      -msglevel muxer=0:decvideo=3:cplayer=1 \
      -quiet \
      -vobsubout $track.vob \
      -vobsuboutindex $count \
      -sid $index \
      -oac copy \
      -ovc copy \
      -o /dev/null dvd://$track
    ((count++))
    : # noop because the above can trigger -e handling
  done
}

rip_cc() {
  ccextractor -srt -o $track.srt $track.mpg
}


rip() {
  rip_chapters
  rip_video
  rip_audio
  rip_vobsubs
  rip_cc
}

encode() {
  [ -s $track.srt ] && mkvcmd="$mkvcmd --language 0:en $track.srt"
  [ -s $track.vob.sub ] && mkvcmd="$mkvcmd $track.vob.idx"


  deint="-vf pullup,softskip"
  deint="-vf yadif"



  $MENCODER \
    -msglevel muxer=0:decvideo=3:cplayer=1 \
    -quiet \
    $deint \
    -oac copy \
    -ovc lavc \
    -lavcopts vcodec=mpeg4:vqscale=4:mbd=2:trell:mv0:v4mv \
    -noautosub \
    -o $track.avi $track.mpg

  for index in ${!audio[*]}; do
    [ -s $track.$index.avi ] || continue
    mkvcmd="$mkvcmd --language 0:${audio[$index]} $track.$index.avi"
  done

  # mkvmerge will return an error code on warning type items
  $mkvcmd || true
}

main() {
  init
  if [ "${rip:=no}" == "yes" ] ; then
    rip
  fi
  if [ "${encode:=no}" == "yes" ] ; then
    encode
  fi
}


name=$(basename $0)
OPTS=$(getopt -o -hre --long help,rip,encode -n $name -- "$@")
eval set -- ${OPTS}

configs=""

while : ; do
  case "$1" in
    -h|--help) usage ;;
    -r|--rip) rip=yes ; shift ;;
    -e|--encode) encode=yes ; shift ;;
    -c|--config) config=$2 ; shift 2 ;;
    --) shift ; break ;;
    *) configs="$configs $1"; shift ;;
  esac
done

for config in $configs; do
  main
done
Wednesday, July 9th, 2008
2:41 pm
I'm an idiot
I used a -z where I meant to use a -s

As a result, for the last three weeks or so, I've not been putting closed captions into the streams I've been pulling off of my Tivo.

Current Mood: aggravated
Tuesday, June 24th, 2008
2:07 am
ripit: Ripping DVD to MKV
For a long time now, I've been wanting to start ripping DVDs to MKVs. I really liked the MKV container format for the native support of multiple audio tracks and subtitles.

For a long time, though, I didn't do this because the then current tools didn't support the vobsub type of image-based subtitles that DVDs have, and I didn't want to deal with the process of running vobsubs through OCR software. Plus I wanted to keep whatever languages were actually on the DVD. However, all of that has pretty much matured now so that just about everything I want is supported. The only thing that I originally wanted to do that I currently can't do is support the DVD menu into an MKV, and after much thought, decided I didn't want to bother anyway.

Most of the existing tools that I could find, like dvd:rip, acidrip and so on, were too complicated for my needs. But, I did go through them and pull out the interesting bits and pieces that I've found useful, and put together my own script.

It's rough, but it works, for me. This isn't a pop-in-a-disc-and-press-a-button tool. It requires a bit of manual set up before hand, but after that, it works well.

I built this on a Debian/unstable system, though I don't see why it wouldn't work on just about any system where the tools are already ported. I don't give much in the way of configuration. It's designed to work for me on my system. But, because of that, I can keep it pretty simple.

The tools that the script actually uses:
dvdxchap
mencoder
mplayer
mkvmerge

I think that all of those are available on most systems with native ports. Additionally, I use a tool off of SourceForge called ccextractor. I use that to extract closed captions from some DVDs. I've found that some collections of TV shows on DVDs, instead of having English as an image based vobsub, they just keep the closed captions they used for the original airings. Makes sense, why redo the work? Stargate SG-1, Season 1 is like that, for instance. Anyway, I'm not sure how well packaged ccextractor is, but it's pretty simple code that should be fairly portable to any system. It comes with Win32 and Linux binaries, at least, perhaps more. Just drop it somewhere in your path. I also use this tool to extract captions from streams off my TiVo, which I need to post about sometime as well. But back to ripit.

The versions of mplayer/mencoder I use are from debian-multimedia. I use the YADIF deinterlacer that seems to not be in any version yet available from Debian natively. Choosing your own deinterlacer, and you may be able to make this work with a different version, though word on the net seems to be that YADIF is the best of the bunch. I tend to agree. This version I just hardcode it to always using YADIF, even when not necessary. I've not ripped any movies since I set that up, so I made need to make that a job specific option.

Another tool that I often use is lsdvd. I switch back and forth to using lsdvd and mplayer -identify to figure out what all is on the track, so that I can rip it. At some point, I suppose I should make it so that the tool could automatically use lsdvd to extract the info, but so far, I've not felt enough pain to do that.

So, how does it work?

Well, it assumes that dvds can be played using using [mplayer dvd://1] with no options. Generally, that means that /dev/dvd is a symlink to the appropriate subsystem. Actually dvdxchap uses that as the access point. If you can't do that, that's the first place you need to start to make this work locally for you.

Each rip/job requires a config file. I typically name the file 1.config, 2.config, etc, to match the track number. Running [ripit -h] will give an example one, but here's another example of something I'm doing right now:


track=1
audio=([128]=en)
vobsub=([0]=en)
title='Stargate_SG1-Season_03-18-Shades_of_Grey'


Nothing magic about the title, that's just the format that I use, borrowed from a common way of ripping CDs.

The audio and vobsub settings are basically KSH/BASH style sparse arrays. The audio starts at 128 and vobsub at 0. Again, [mplayer -identify] and [lsdvd -x] can be used to find those values. I typically set it up to pull in every language for both.

You can then run [ripit -c 1.config] and some time later, you end up with Stargate_SG1-Season_03-18-Shades_of_Grey.mkv.

Since I have two machines, and only one DVD drive, I actually usually do it in two parts: ripping then encoding.

So, I'll do something like:


for v in *.config; do ripit -r -c $v; done


And just rip all of the raw data into the current directory (just a few gigs). Then, on the various machines, I'll do:


ripit -e -c 1.config
ripit -e -c 2.config
ripit -e -c 5.config


Basically, I manually load balance across all of my CPUs/cores.

I don't bother rencoding the audio. The video takes up such a large portion that, in my opinion, it's not worth the hassle. No sense going from one lossy encoding to another on the audio.

On the video, I don't bother trying to target a specific bitrate or file size. I just want is somewhat smaller, so I basically go to an mpeg4 encoding at quality 4. It's a tad blocky, and if I was watching this stuff on a big screen TV, I'd probably go up the quality 3. But, for me, this is a good trade off. It's about 1/3 smaller. A typical 45 minute TV show is 500M.

Anyway, here's the script, all 130 lines of it:

#!/bin/bash -eu

usage() {
cat << \EOF
 $0 [--help] | [--rip] [--encode] [--config CONFIGFILE]
 $0 -h | -r -e -c CONFIGFILE

Where config file looks like:
track=2
audio=([128]=en es fr en)
vobsub=([0]=en en es fr fr en)
title="Hulk"
EOF
exit 0
}

error() {
  echo "ERROR:" "$@" 1>&2
  exit 1
}

init() {
  . $config
  chapters=$track.chapters.txt
  mkvcmd="mkvmerge --chapters $chapters -o $title.mkv --noaudio $track.avi"
  for index in ${!audio[*]}; do
    mkvcmd="$mkvcmd --language 0:${audio[$index]} $track.$index.avi"
  done
}


rip_chapters() {
  dvdxchap -t $track /dev/dvd > $chapters
}

rip_video() {
  mencoder \
    -quiet \
    -of mpeg \
    -oac copy \
    -ovc copy \
    -noautosub \
    -o $track.mpg dvd://$track
}

rip_audio() {
  for index in ${!audio[*]}; do
    mencoder -quiet -of rawaudio -ovc copy -oac copy -aid $index -o $track.$index.avi dvd://$track
  done
}

rip_vobsubs() {
  count=0
  for index in ${!vobsub[*]}; do
    mencoder \
      -quiet \
      -vobsubout $track.vob \
      -vobsuboutindex $count \
      -sid $index \
      -oac copy \
      -ovc copy \
      -o /dev/null dvd://$track
    ((count++))
  done
}

rip_cc() {
  ccextractor -srt -o $track.srt $track.mpg
}


rip() {
  rip_chapters
  rip_video
  rip_audio
  rip_vobsubs
  rip_cc
}

encode() {
  [ -s $track.srt ] && mkvcmd="$mkvcmd --language 0:en $track.srt"
  [ -s $track.vob.idx ] && mkvcmd="$mkvcmd $track.vob.idx"


  deint="-vf pullup,softskip"
  deint="-vf yadif"



  mencoder \
    -quiet \
    $deint \
    -oac copy \
    -ovc lavc \
    -lavcopts vcodec=mpeg4:vqscale=4:mbd=2:trell:mv0:v4mv \
    -noautosub \
    -o $track.avi $track.mpg

  $mkvcmd
}

main() {
  init
  [ "${rip:=no}" == "yes" ] && rip
  [ "${encode:=no}" == "yes" ] && encode
}


config=config
name=$(basename $0)
OPTS=$(getopt -o -hrec: --long help,rip,encode,config: -n $name -- "$@")
eval set -- ${OPTS}

if [ "$1" == "--" ]; then
  rip=yes
  encode=yes
fi

while : ; do
  case "$1" in
    -h|--help) usage ;;
    -r|--rip) rip=yes ; shift ;;
    -e|--encode) encode=yes ; shift ;;
    -c|--config) config=$2 ; shift 2 ;;
    --) shift ; break ;;
    *) error "internal error processing options" ;;
  esac
done

main
Thursday, May 15th, 2008
4:33 am
Less taxes!
I just got a letter from the County Assessor.

They've lowered the assessed value of my house. Cool!

Oh, wait... that means that the value of my house has dropped 8% in the 10 months I've owned it.

Crap... that means I now owe 99.9% of the value. So much for equity.
Friday, April 4th, 2008
4:26 pm
When good xterms go bad.
When using xterms, I often single/double/triple-click to initiate a selection, then extend the selection with a right mouse click.

This morning, when I came out to the office, I noticed it wasn't working any more. As soon as I released the left-mouse button, the selection would be un-highlighted, and impossible to extend. I could still paste what I had managed to select, just couldn't extend.

This was the second time that this had happened.

It turns out that is may be related to me running x2x to connect my two workstations. Sometime over the evening, x2x had died, and I'd simply restarted it.

When tracking down the selection problem, I noticed it was happening on both machines, no matter which mouse I used. So I killed x2x, and then selection started working properly on both machines. Restarted x2x, and no issues (yet).

I suppose that something got into a strange state, which is what caused x2x to die. I'm not sure if restarting x2x, or doing proper selections with x2x absent fixed things. But, for the moment, it seems to be working.
Wednesday, January 2nd, 2008
10:35 pm
So, I now have laying around:
2 power supplies, 300W + 400W
couple of random mother boards
3 network cards
a scsi card
couple of sound cards
7 video cards, including at least one dual monitor capable
11 hard drives of various sizes
a video capture card
2 empty computer cases
1 complete computer
a bean bag chair
and about 1,000 comics

And that's just the disorganized stuff in the middle of the floor
I really need to straighten up this office

Current Mood: amused
Monday, December 31st, 2007
5:27 pm
Almost returned the car....
I managed to put over 100 miles on the car in two days. I did this for a couple of reasons. First, it was a light traffic holiday weekend, so it was a good time to practice driving the stick. But, more importantly, it was a good time to exercise the car.

The purchase came with a 3-day, 250-mile return policy. So, if I don't like it for any reason, back it goes.

While driving around yesterday, I had to fill up the tank (a bit over $40... ouch). Shortly there after, the engine light came on.

Well, typically when that happens, it means we forgot to put the gas cap back on. We've done this several times with my old Mirage and the Prius. Quite embarrassing. So, first thing I did this morning was check that. No go.

So, after checking the manual (I can only find one online for a '96), it turns out the light means a possible emissions problem. Drat!

So, back we go. I say, there is nothing that gets you bumped to the front of the maintenance line like saying, ``Fix it or take it back.'' :->

So we drove over the a bay, and someone stopped what he was doing and put the computer on it. Turns out a minor code, so we cleared it and test drove it for a while. It didn't come back. Yay!

We're pretty confident it was just some moisture from when they did the high-pressure cleaning of the engine as part of the final detail cleaning they do with the sale. Apparently this happens a lot.

The computer gadget was pretty cool. Hand-held, small screen. Can use it to ask the engine what the problem is, and clear the code (some don't go away by themselves, even if the problem has been fixed). I need one. Could save a few $50 trips just to have the mechanic put the gas cap on.

Anyway, in a few hours, it's a done deal. No taking it back. It's growing on me. I'm getting better at driving the stick. Only killing it once or twice per outing now.
Friday, December 28th, 2007
11:51 pm
Another car
A while back, my '98 Mitsubishi Mirage met an untimely death. With the purchase of the house, it was difficult to replace it.

Recently, though, having only one car has become just too annoying. I don't need to go far, but I'm too lazy to deal with a bike, particularly during the rainy season.

I'd been thinking about getting one for a few weeks now, and today I did.

I wanted limit myself to about $1500, and came pretty darn close to that. I went to Toyota Sunnyvale and told them to give me the cheapest car on the lot. After checking it out, and going back to the office to finish off the day's work, that's what I drove away with a few hours later: 1994 Infiniti G20. It's rough. It's the highest mileage car I've ever owned. But, it should do what I need to have done.

Only one problem: it's a standard. I've never driven a stick before (fortunately the salesman was nice enough to teach me the basics). This shall be an adventure.

Enjoy the picsCollapse )
Sunday, November 18th, 2007
8:06 pm
Vacuuming the lawn
When we bought the house, we ended up with a much smaller lawn. We thought we could be a bit more environmentally friendly by using an old style reel mower. I got a Sears Craftsman 18" Hand Lawn Mower (291.376500). They apparently don't sell this model any more, but it's a lot like this current model. We also got rid of our two gas power mowers, just giving them to the

It works well in the back yard, but in the front, it was pretty worthless.

The front yard has a lot of thatch. Probably 3 inches thick. According to this post I just found, anything over a 1/2 inch is excessive. Whoops. This excessive thatch made such that the reel mower would sink into the grass, and then the blades would essentially be trying to cut through the thatch rather than the top of the grass blade. Simply wouldn't work.

While I do need to de-thatch the front lawn, it's not going to happen any time soon. So, today I bought an electric mower. I was going to look for a rechargeable one, but OSH didn't have one. So I went with a Craftsman 19 in. Deck Rear Bag Electric Mower. Since it's a corded mower, I feel like I'm running a vacuum cleaning over the lawn.

It works quite well. I was able to finish a lot quicker than when I was using the reel mower. At least out front. About the same in the back.

Still, a good investment I think.
Tuesday, June 26th, 2007
7:01 pm
mixing optional and sufficient with PAM
I had recently set up LDAP on my Debian box at home, and had migrated my personal accounts from /etc/passwd to LDAP.

I just noticed the other day that I couldn't play music any more because I no longer had access to the audio devices.

After much debugging, I think I've found out the problem.

Some time ago, I had followed the simple advice of:

echo "auth optional pam_group.so" >> /etc/pam.d/common-auth

(and of course, update /etc/security/group.conf)

Well, that's all fine and dandy, assuming you only have one real authentication method, like say, pam_unix.

But, when I migrated to ldap, the instructions said to add this:
auth sufficient pam_ldap.so

BEFORE the pam_unix line.

So, what happens? When I log via ldap, the ``sufficient'' setting would cause PAM to stop processing the rest of the stack in that file. The early exit model would tell it to skip the pam_group request.

So, I just moved the optional pam_group line to before the pam_ldap line, and now all appears to work fine.

I'm still not sure on how proper this is though. What happens if ldap is down and maybe pam_unix has some sort of strange failure? Well, in re-reading the docs, it says ``...in the absence of any other definite success or failures....'' So I guess the failure mode would be the same no matter where the pam_group line appeared in the file.

So, now my common-auth looks like this:
auth required pam_warn.so
auth optional pam_group.so
auth sufficient pam_ldap.so
auth required pam_unix.so nullok_secure use_first_pass

Current Mood: geeky
Thursday, August 31st, 2006
9:42 am
And you....
George Calvin Castle
March 03, 1927 - August 31, 2006
Monday, May 15th, 2006
11:26 pm
random updates
I've not even had time to read LJ since before Pantheacon (February). I'm way behind. Going to be scary to try to catch up.

Free comic book day was last week. I spent around $500 and came home with over 1,000 comics. Ok ... they had sales, too. Apparently I'm back into comics, in a big way. I've forgotten how much I actually enjoy bagging, sealing, sorting and boxing. Last night I spent two hours just taping up bags. Get a rhythm going and sort of zone out. Very meditative.

We're seriously considering San Diego this year. We need to make plans soon though so I can get the time off work.

Speaking of work, I'm spending significantly less time there now. I think I stayed away from the office two weekends in a row now. And I'm not often spending 12-14 hours/day there. I did one day last week, but that was because of last minute changes necessary for a fairly major launch. That's reasonable. I'm still spending about 10/day at work, but that includes taking a shower and having breakfast and lunch there. I arrive about 7:15am, and leave at 5:00pm. Best thing, I'm not driving 4 days/week. They've started a shuttle that stops a couple of miles from my house. I drive to the mall, and park there. My gas consumption has gone done a LOT, and it gets me about 40/minutes of reading time the days I ride.

Lately I was trying to get Firefox working lately. I still maintain my own personal Linux distribution at home, and FF was simply not working. I just finishing recompiling everything (EVERYTHING) and it still wasn't working. Highly annoyed. Finally did what I should have done in the first place: starting mucking around in .mozilla/firefox. I'm not sure what it was, but after I moved extensions out of the way, it started. I moved it back, and it still started. I'm guessing a corrupt cache. Possibly related to the fact that I have a harddrive that's giving me bad sector reads.

Speaking of harddrive, it's still passing SMART tests and passes everything when booting into the diagnostic disc as well. Fortunately just the boot drive. I can live if it really goes bad. I may swap out soon anyway and put in another drive just so I don't have to deal with all the damned messages showing up on the console.

I've been trying to get Debian installed on my other machine so I can use that as an environment. But it doesn't have everything my homebrew system has. I really need leafnode-2 and mail2news, and neither has a premade deb, and I don't feel like bootstrapping it. This is a good opportunity for me to write my own leafnode like news server with a PostgreSQL backing store that I've started designing years ago and never got around to. Of course, the recent influx of comics has put that on hold. Not to mention that I'm actually trying to make attempts to enter in receipt information so I can track our expense (I'm only 20 months or so behind on THAT).

Feels like work: Too many irons in the fire.

Still, I do feel like I'm spending more time with Munchkin (she has declared Saturday's to be our day :-). And that makes up for all of it.
Tuesday, December 20th, 2005
8:36 am
Dog sitting
One of the perks of working at Google is our liberal dog policy. There are dogs all over campus.

This morning one of my coworkers brought in his full sized poodle, Beau.

I sit in the back office of a two office suite, and currently only six of the seven desks are occupied. So if the outer door is closed, it's a good two rooms to stretch out in.

So while Beau's owner and a couple of other coworkers wander off to forage for breakfast, I get to dog sit.

Though I had to hurry up and eat my sausage before Beau went after it.
Sunday, December 11th, 2005
7:22 am
flannel heaven
Flannel pajamas. Brand new flannel sheets. And two beautiful, flannel clad women on either side of me.

Flannel heaven.

Current Mood: content
Thursday, October 13th, 2005
5:31 pm
It's here!
The Prius is in!
[ << Previous 20 ]
Mike's vanity page   About LiveJournal.com