still too cool for wordpress.
choose only one: latest; past; wednesday lite; superscribe.

<< November 7, 2007 >>
chimp talkin

i was standing outside a building at the MIT airport, scanning my passport. i thought this was really convenient. some sort of awacs plane just landed, on a flight from cleveland. why hadn't i ever landed at this airport before?

after i had cleared customs, i needed to find a bathroom. i walked past one labeled "YOUTH" and found that convenient, too. next one was a men's room, so i walked it to find it almost completely full. some of them seemed to just be hanging out. i think the door may have said "bathroom/sanctuary." many of the men seemed to be middle eastern.

so i walked down the hall trying to find another one, and it was filled with people, too. they were mostly middle eastern, and the women were fully covered. i tried to hide the fact that i was drifting to the opposite side of the hallway, but i think it was pretty obvious. the hallway reminds me, now, of my elementary school by the kindergarten wing.

i wanted to show that i was comfortable being there with all these people staring at me, so when a monkey walked by, i tried to give him a high five. it seemed pretty reasonable that monkeys could talk, so i asked him if he liked movies. he said not really. i would have liked to ask him if it was because there are so few monkey directors, but i woke up.

* * *

<< November 7, 2007 >>
into the cload

'the cloud' is white and fluffy and peaceful; the reality is that the various clouds are fighting each other to the death...

luis makes it painfully obvious that he has never actually been inside a real cloud. in a single engine prop plane, they can be terrifying. and inconvenient.

* * *

<< November 7, 2007 >>
adventures in vms

i have a sata drive that has a bunch of linux installs on it, that i wanted to run from a VM. i have these great sata enclosures that i was hoping to use to do this.

unfortunately, neither parallels nor vmware fusion let me boot from an external drive! i can boot from "boot camp" or a virtual image. but i found a decent way around this, at least when using a linux guest.

the first step was to install linux into a virtual disk. you should make /boot on its own partition, just like back in the day. i think i made it 128M. since i was going to be booting opensuse 10.3 from the external drive, i just grabbed their gnome live install cd. you could use whatever distro you like. i disabled X and the graphical groups, so the install was only a couple hundred megs.

since both parallels and vmware allow you to access usb devices in the guest, i connected my drive over usb, and made that device available to the guest os. it showed up as /dev/sdb, and all of my partitions were there. i mounted my root partition on /mnt/tmp, and since i'm not smart enough to run a distribution that includes emacs by default, i did a mount --bind for /dev, /proc, /sys, and /boot into /mnt/tmp, and then chrooted in there.

i added a bunch of modules to INITRD_MODULES in /etc/sysconfig/kernel, since i only wanted to play this game once. some of these may not be needed, but mine ended up looking like this:

INITRD_MODULES="processor thermal ata_piix ahci fan jbd ext3 edd piix sd_mod usbcore scsi_mod usb_storage sg ehci_hcd sr_mod"

then i ran 'mkinitrd' and it did its business.

the one difficulty i had was that suse set up the mount points using /dev/disk/by-id/blah, and those ids are based on the physical route to the disk (ie, via scsi, ide, etc.) so when i now access via usb, it's different. you can run e2label <device> <label> to label your ext3 volumes, and mount via /dev/disk/by-label/blah. i named mine like b-root-103-32 for the root partition of a 32-bit 10.3 install, since as far as disk labels go, it's still 1981 and there is an 8 character limit.

you can label your swap partition with mkswap -L, and otherwise that's it. add a duplicate entry to your grub config pointing to your new root label. you should be able to boot grub from your virtual disk, and then the kernel will boot from the external drive.

* * *

<< November 7, 2007 >>
screen, terminals, titles

one of the first things you pick up on when you start working on lustre is screen. when i used to use it in linux, it would update the title bar of my terminal saying which window it was on, but i couldn't get it to work on the mac. today i took a little time while a vm image was building to figure it out.

the first thing i did, or would have done, in retrospect, was to write a little script to set the title for the terminal or screen window:

settitle() { case "$TERM" in xterm* ) echo -ne '\e]0;'"$@"'\a' ;; screen) echo -ne '\ek'"$@"'\e\\' ;; esac }

i source it in my .bashrc file.

i tried not using $PROMPT_COMMAND, but then there was some weird line wrapping stuff, so i went back to it. anyway, here is my PROMPT_COMMAND:

PROMPT_COMMAND="settitle ${USER}@$(hostname -s):"'${PWD##*/}'

the tricky part was enabling titles-in-terminals for screen, but i eventually found the right google terms, and have this in my ~/.screenrc:

termcapinfo xterm* 'hs:ts=\E]0;:fs=\007:ds=\E]0;\007' # defhstatus "screen ^E (^Et) | $USER@^EH" defhstatus "screen ^E ^Et" hardstatus off

since i already have the user and host in my $PROMPT_COMMAND, i don't add it again with screen, but i left it in in case others would rather do that. if i now reliably have the user and host in the title, i can probably just remove it from the prompt. oh yeah!

* * *