"That which is overdesigned, too highly specific, anticipates outcome; the anticipation of outcome guarantees, if not failure, the absence of grace."
-- William Gibson, All Tomorrow's Parties
February 26, 2005

As an ADC member, I get access to the latest Mac OS 10.4 builds. I can't talk about them due to that whole NDA thing, but they cause me to reinstall my machines on a fairly regular basis.

8a393 came out today and I installed it on my laptop when I got home. I went to install it on my PowerMac (a dual G4 gigE, "Mystic"), and the DVD-RAM in it pretty much said "No. Piss off." This is pretty common with the junk-ass drive, so I thought about it for a few minutes.

First I figured I would just dd the Tiger image onto my spare 2g 10G iPod. This didn't work so well.

Then I realized... you can boot off firewire drives. So it stands to reason you can fucking install onto them. I have a firewire enclosure.

A few minutes of screwing around in the Mystic's insides later, I had the root drive out, attached to the enclosure, and plugged into my laptop. A reboot later, and I installed off the DVD. The install rebooted and asked me if I had another Mac I wanted to sync off of for this new install... as a matter of fact, I did: The laptop's boot volume. Ten minutes later (sigh, slow drives), I had a nice mirror of my laptop.

And now? Booted off the firewire drive with my keychain, my Mail, iChat, Safari, Terminal, etc, etc, settings all happy.

Sure it's just a matter of ditto/cpMac'ing files around... but damn. When it's so easy I don't have to think about it, just say "Yes, do that thing" and it works?

Well, that's why all my workstations are Macs these days.

Word up.

March 21, 2005

So Pete brought home a copy of WoW for me to waste my life on. Super, I think, but me being me and unable to just leave well enough alone, I don't want to wait for my MacMini to arrive. So I go to install it on my laptop, as my PowerMac a) has no CD-ROM and b) is a dual G4 500, not something WoW will be happy on.

Unfortunately WoW says "wtf is this Tiger bullshit? You ADC membership-having sucker, I won't play nice with this", so I figure, fine, 8a414 came out last week, I need to update anyway. I'll just dump my data onto my workstation and install Panther before going to bed, then burn the new Tiger build tomorrow and install it on another partition.


I boot my laptop into target disk mode, as that will be much faster than copying 25G over ethernet. No big. Then I hear the enclosure my workstation's root drive is in go "Pop!" and suddenly get real quiet. Anything not currently in memory on my workstation stop working. "Awesome!" I think, and reboot.

It boots my laptop OS. "Not awesome! But whatever!"

So figuring I'll just go ahead and continue on with dumping my data onto the PowerMac's data drives, I roll my chair back to grab the power cord for the laptop... and crack. I roll over it. "Fucking damnit!" says I, and look at it. It looks sad, but plugs in and charges the machine happily. "Whoo," I think.

So now I am copying all my crap off my laptop into my workstation which has no OS drive on it. Likely I just blew the enclosure and not the drive itself (which seems to spin up okay from what I can hear), so I'll just shove it back onto IDE later.

Well, now that the machine has free IDE. I spend the majority of yesterday moving data around... the new mirrorshades.net box (ligur Mk II) now has two 200G Maxtors in it, concatenated into around 355G. Yay.

I like that all of this happens at midnight. I really should know better by now...

July 20, 2005

I just had mod_bonjour cause httpd to crash. This is after using it all day... I wonder if someone is spamming bad bonjour/rendevous packets. iChat doesn't seem affected, but, eh.

Commenting out the module fixed it. Here's the trace.

Killing my connection and trying to start Apache didn't help any. mod_bonjour doesn't appear to have been corrupted (md5 same as on my home machine).

That sucked.

December 13, 2005

I've been around. I've done lots of stupid shit with computers. Upgrading the RAM in my Mac mini might just have been the most annoying one.

I was about to order a putty knife (which everyone suggests using, but damages the case, when ejp reminded me that a while back I had posted a link to some guys who used a strand of CAT5 to get the case open. That single side tab on the front was the worst one.

Twenty minutes later, I had the case open, the RAM swapped, and booted the machine. All was happy.

But Buddha on a pogo-stick, man. What a pain.

As an added bonus, I pulled the 512 stick out of the mini and dumped it into my x86 workstation that never gets used. All of my machines now have a gig or more of RAM in them now.

selene (PowerBook) 1.25G
eos (Mac mini) 1G
hyperion (Dell SC1400, fw/fserv) 1G
helios (x86 bitchbox) 1G

Kinda neat. Weird, though.

April 12, 2006

So since I turned my MacMini into a server box (previous system was dying), I've been using my laptop as a workstation at home. When plugged into a 24" LCD it has a fun tendency to kick the fan on high when I do, oh, just about anything at all. The sound was driving me nuts so I figured I'd pick up another MacMini. Well, after seeing Half-Life 2 running on an iMac I changed my mind and ordered a new Intel iMac, decked out for gaming, now that Macs have an easy way to dual-boot Windows.

It got delivered this afternoon, and I've got it set up pretty nicely. The only issue I'm having is freaking Keychain Access not letting me add existing keychains. I've had this problem before, but I can't remember what the deal was. Driving me nuts as KA is one of the apps I live in.

I did just notice something kind of odd, and yuckf00 pointed out the likely cause:

On the iMac:

[bda@moneta]:[~]$ uname -m
[bda@moneta]:[~]$ dmesg
Unable to obtain kernel buffer: Operation not permitted
usage: sudo dmesg
[bda@moneta]:[~]$ ls -l /sbin/dmesg
-r-xr-xr-x 1 root wheel 34908 Feb 21 16:24 /sbin/dmesg*

On a PowerBook:

[bda@selene]:[~]$ uname -m
Power Macintosh
[bda@selene]:[~]$ dmesg | head -n 2
standard timeslicing quantum is 10000 us
vm_page_bootstrap: 316093 free pages
[bda@selene]:[~]$ ls -l /sbin/dmesg
-r-xr-sr-x 1 root kmem 14752 Mar 20 2005 /sbin/dmesg*

Kinda weird.

Anyway, woot:

May 11, 2006

Stopping Spotlight Indexing

While I don't really have a problem with metadata indexing in theory, I really dislike having mds kick up to 50% CPU on my laptop, which engages the Fan Whose Pitch Is Just Right to Set My Teeth On Edge (Of Doom County). While I'm not sure if I'll actually disable indexing, the Spotlight overview there was pretty informative.

Unlike, say, this, which is just full of retardedness.

February 8, 2007

Continuing on my "pkgsrc is pretty awesome" schtick, here's how easy it is to get it running on OS X. The most annoying part is downloading XCode (if you haven't got it already).

Once you have the DevTools/XCode installed, you'll need to create a case-sensitive volume for pkgsrc. Until somewhat recently you couldn't resize volumes, and this would have been far more annoying. However, these days it's pretty trivial.

Another option would be to create a disk image and run pkgsrc out of that. The documentation suggests this course. It has the added bonus of being portable (pkgsrc on your iPod?); I'm just doing this on my laptop and don't want to have to deal with managing a dmg, so I'm going the resize route.

[root@selene]:[~]# diskutil list
#: type name size identifier
0: GUID_partition_scheme *74.5 GB disk0
1: EFI 200.0 MB disk0s1
2: Apple_HFS selene 74.2 GB disk0s2
[root@selene]:[~]# diskutil resizeVolume disk0s2 70G "Case-sensitive Journaled HFS+" pkgsrc 4.2G

Once it's done resizing the volume, you'll need to reboot.

The reboot is required because we're monkeying around with the boot volume. If you're doing this on an external disk, you can just refresh diskarbitrationd with disktool -r.

[root@selene]:[~]# diskutil list

#: type name size identifier
0: GUID_partition_scheme *74.5 GB disk0
1: EFI 200.0 MB disk0s1
2: Apple_HFS selene 70.0 GB disk0s2
3: Apple_HFS 4.1 GB disk0s3

Well, leetsauce, our volume exists. But it's not mounted, because resizeVolume doesn't actually format it.

[root@selene]:[~]# diskutil eraseVolume "Case-sensitive Journaled HFS+" pkgsrc disk0s3
Started erase on disk disk0s3


Mounting Disk

Finished erase on disk disk0s3 pkgsrc

And now it shows up happily:

[root@selene]:[~]# mount
/dev/disk0s2 on / (local, journaled)
devfs on /dev (local)
fdesc on /dev (union)
on /.vol
automount -nsl [182] on /Network (automounted)
automount -fstab [189] on /automount/Servers (automounted)
automount -static [189] on /automount/static (automounted)
/dev/disk0s3 on /Volumes/pkgsrc (local, journaled)

And is it indeed case-sensitive:

[root@selene]:[/Volumes/pkgsrc]# touch foo Foo
[root@selene]:[/Volumes/pkgsrc]# ls -l ?oo
-rw-r--r-- 1 root wheel 0 Feb 8 02:09 Foo
-rw-r--r-- 1 root wheel 0 Feb 8 02:09 foo

If you care to, you can change the mountpoint using Netinfo Manager, but I'm lazy and just symlinked /Volumes/pkgsrc -> /usr/pkg. You could also change --prefix=/Volumes/pkgsrc, but as I'm using it on other OSes, I like having it all in the same place. Personal preference.

(When Netinfo Manager stops SPODing at startup I'll probably change the mountpoint.)


[root@selene]:[~]# cd /usr/pkg
[root@selene]:[/usr/pkg]# curl -O ftp://ftp.NetBSD.org/pub/pkgsrc/pkgsrc-2006Q3/pkgsrc-2006Q3.tar.gz
[root@selene]:[/usr/pkg]# tar -xzf pkgsrc-2006Q3.tar.gz
[root@selene]:[/usr/pkg]# cd pkgsrc/bootstrap
[root@selene]:[/usr/pkg/pkgsrc/bootstrap]# ./bootstrap

And off it goes.

===> bootstrap started: Thu Feb 8 02:37:50 EST 2007
===> bootstrap ended: Thu Feb 8 02:40:15 EST 2007
[root@selene]:[/usr/pkg/pkgsrc/bootstrap]# mkdir ../../etc/
[root@selene]:[/usr/pkg/pkgsrc/bootstrap]# cp /usr/pkg/pkgsrc/bootstrap/work/mk.conf.example ../../etc/mk.conf

Prepend /usr/pkg/bin:/usr/pkg/sbin to your $PATH.

The main reason I did this was to upgrade vim to 7.x, because I want tab support (I never really got the hang of managing buffers, but to the dismay of all my Elite Vim hax0r Friends).


[root@selene]:[/usr/pkg]# cd pkgsrc/editors/vim
[root@selene]:[/usr/pkg]# bmake package

And after downloading a few billion patches and compilation...

[root@selene]:[/usr/pkg/pkgsrc/editors/vim]# which vim
[root@selene]:[/usr/pkg/pkgsrc/editors/vim]# vim --version
VIM - Vi IMproved 7.0 (2006 May 7, compiled Feb 8 2007 02:59:09)


April 12, 2007

So a dude uses Cocktail to screw around with his system, and discovers /usr is now visible in Finder (it is not by default). So he deletes it and then blames Apple for not protecting him against his own malicious stupidity.

After a couple dozen people point and laugh, he cries out:

"Regardless, I expected folks within the Apple realm to be of help, rather than be righteous and condescending."

And of course anyone who has actually ever met a Mac user laughs insanely.

Amid all the justified "you are an idiot" and "lol rm -rf /" noise, there is this gem:

"You can't have your userland cake and eat your hacker cake too."

One wonders what flavor and toppings the respective cakes consist of.

November 1, 2007

So I have to say that out of all the features hyped in Leopard, Time Machine seems to be worthy of it. It really does make backups trivial.

I had a bunch of tarballs in ~/Desktop which were basically transient. I didn't want them backed up, but backed up they got, eating a couple gigs of space pointlessly. My initial reaction was to just rm them from the backup dirs, but I was told (as root) I could not. I don't really like being told I can't do things when I'm root, but ok, maybe there's other magic required. Maybe it's not as flat-filesystem-y as one is led to believe.

A quick Googling later, and the answer was thankfully trivial. The Time Machine UI is ... totally weird enough ... that I've been avoiding it. But nice to see it's so easy to do something so obvious.

[bda@moneta]:[/usr/bin]$ uname -a
Darwin moneta.int.mirrorshades.net 9.0.0 Darwin Kernel Version 9.0.0: Tue Oct 9 21:35:55 PDT 2007; root:xnu-1228~1/RELEASE_I386 i386
[bda@moneta]:[/usr/bin]$ ./iopending
dtrace: failed to initialize dtrace: DTrace requires additional privileges
[bda@moneta]:[/usr/bin]$ sudo ./iopending 2
Tracing... Please wait.
2007 Nov 1 12:49:23, load: 0.34, disk_r: 0 KB, disk_w: 0 KB

value ------------- Distribution ------------- count
< 0 | 0
0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 5618
1 | 0

2007 Nov 1 12:49:25, load: 0.31, disk_r: 8 KB, disk_w: 4 KB

value ------------- Distribution ------------- count
< 0 | 0
0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2810
1 | 16
2 | 0

2007 Nov 1 12:49:27, load: 0.31, disk_r: 0 KB, disk_w: 400 KB

value ------------- Distribution ------------- count
< 0 | 0
0 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 2873
1 | 0


[bda@moneta]:[/usr/bin]$ sudo find . -type f -exec grep -H '^#!/usr/sbin/dtrace' {} \; | wc -l
[bda@moneta]:[/usr/bin]$ sudo find . -type f -exec grep -H '^#!/usr/sbin/dtrace' {} \; | awk -F: '{print $1}'


The scripts living in /usr/bin is kinda weird. /usr/sbin is really a better place for them if they're going to live in the default $PATH.

MacTech has an introduction to DTrace which is really decent (except for the page autoreloading, ugh), and worth reading.

His investigation of ln and why why it wouldn't let him create hardlink directories (yeah, OS X has .. hardlink directories support now; required for Time Machine, and a really elegant solution to the problem, but still kinda weird) is pretty entertaining.

If you're me, anyway.

January 20, 2008

...attempt no tracing there.

Adam Leventhal discovers Apple acting like Apple.

It is rather interesting, but it's hardly shocking behavior. It's even understandable given their legal obligations to the large, hammer-wielding media industry people. I'm just happy it's the sort of thing you're unlikely to see Team DTrace allow to happen, given Adam's reaction.

(The Apple DTrace guys have posted on dtrace-discuss@ before. I'm curious to see if someone will be bringing it up.)