The Ubuntu netboot/network installers

The Ubuntu netboot (network) installers are fantastic, and for how good they are, they are hardly ever publicized.

The idea of just downloading your OS whenever and wherever you need to install it is kind of astounding. It makes the Windows/Mac experience of having to dig up some DVD and type in a 25-digit number seem positively archaic. It's the difference between walking across the street to buy bottled water, and turning on the tap and just having water appear. It completely changes the economics of the game when you no longer have to think of your operating system as a scarce resource.

As I understand it, there are three ways to do a netboot install. I've previously written about installing Ubuntu by booting from files downloaded to your hard disk. It's also easy to do a netboot install from either a CD or a USB key, and the procedures are very similar.

All three methods are nice because they have small initial downloads, about 10 MB; they then download the rest of your OS (and only the latest version of each package) at install time. It's a waste of time to download a ~700MB CD image if you're going to upgrade half of your packages right after installation. (Software is usually out of date by the time you install it! Especially during the development period for each release.) The installer is small enough that you can even burn it to one of those business card CDs.

The netboot installers are also versatile. They will install, at your request, any (or all!) of the following: Ubuntu desktop, Ubuntu server, Kubuntu desktop, Xubuntu desktop, Edubuntu desktop, and many more. They also support installing to encrypted LVM for full-disk encryption. (The netboot installers are based on the ncurses Debian installer.)

The hard disk method has the advantage that, of course, you don't need to use any external media. However, in my experience, the CD and USB key installers are a little less flaky. Unlike a hard disk installation, they also work even if you don't have Grub already installed.

For either the CD or USB key methods, you can find the appropriate files here:

(This is for Jaunty/i386. If you want a different release or have a different architecture, like amd64, adjust the URL accordingly.)

For CD installation: download mini.iso and burn it to your CD.

For USB media installation: download boot.img.gz and follow the instructions here. It will boil down to doing something like this:

# zcat boot.img.gz > /dev/sdX1
# aptitude install mbr
# install-mbr /dev/sdX

Then boot from your new media into the installer.

"Being Productive With Emacs" Redux

This past IAP I taught a short class on Emacs ("Being Productive With Emacs") at MIT. It was similar in content to the class that I taught in 2007, although I pared down the material a bit.

I've posted the slides online. You may use the slides under the terms of the GFDLv1.3+ or the GPLv3+.

(I made the slides using S5, which is pretty sweet. It lets you make moderately professional looking DHTML slides in a text editor without much pain.)

A command-line substitute for gitk

gitk is indispensable for viewing repo histories and understanding the relationships between different branches. However, using a GUI is a bit heavyweight if you are working remotely or only need to see the last few commits. Under these circumstances, git log --graph, introduced in git 1.5.6, is a pretty good fake.

My preferred invocation is

git log --graph --abbrev-commit --pretty=oneline --decorate

which I've aliased to gl in my shell.

The subsequent options, respectively: only show short commit names, for compactness; only display one line per commit, for compactness; and show where your branches are. Here's some sample output:

* f95f34e... (refs/remotes/origin/master, refs/heads/master) Acknowledge Alexey.
* c691bc7... Allow unmarking the marked commit.
* 7640638... Fixed visualization of marked commits
* c3830ed... Make it work better on Windows.  Thanks to Jeff Dik.
*   3433556... Merge commit 'fdr/sign-off'
| * 68344a2... Add signoff customization option
* |   3e29059... Merge commit 'cymacs/master'
|\ \  
| * | 45fb865... Fix incorrect diff hightlighting of lines beginning with "+" or "-".
| * | b7fe745... Disable undo in all magit-mode buffers.
| |/  
* | 10fe99a... Ambiguity in call to git log fixed
* | 3d34a7c... Make buffer saving behavior customizable.
* | 64b8265... Removed unused threshold machinery.
* | b430add... Make sure that point never ends up in an invisible region.
*   b30faeb... Merge commit 'voins/voins'
| * 7386af1... Use "medium" git log format when visiting commit
* | 5fb7327... Mention
* | f055b18... Typo.

One small step for freedom

Today, Apple announced that it is phasing out DRM in its music store. By the end of the quarter, Apple says that all songs in the iTunes music store will be DRM-free.

This is good news.

However, I hope that a victory for users in this battle does not lead people to believe that the war is over, or that DRM is just about music. Let's not pretend that this is the end of DRM at Apple. Let's not even pretend that this is the end of DRM in iTunes, as has been widely and erroneously reported.

I'm not holding my breath, but if I have a shred of optimism about this whole situation, it's because Steve Jobs has publicly disparaged DRM in music. DRM elsewhere is no less pernicious.

Disabling Firefox's yellow plugin bar

I hate Flash. But that is a rant for a different post.

I don't have Flash installed, and I don't want to have Flash installed. That means I get Firefox's yellow "Additional plugins are required to display all the media on this page" informational bar on many pages with Flash content. Here are instructions for disabling it in Firefox on Ubuntu 8.10.

[Update: much easier way to do this, apparently available on Firefox 3.0+: in Firefox, simply go to about:config and set plugins.hide_infobar_for_missing_plugin to true. Thanks, Rakhun!

The more complicated way I originally suggested doing this follows.]

In Firefox, go to about:config and set plugin.default_plugin_disabled to false. By itself, this suppresses the yellow plugin bar and replaces it with a dialog, which is even worse! In order to disable this dialog, you'll also need to delete the file /usr/lib/xulrunner-addons/plugins/

(The "null plugin" or "default plugin" is responsible for rendering a blank box and prompting you whenever Firefox encounters content it doesn't have another plugin for.)

If you ever regret this decision, you could keep somewhere safe and just move it back to that directory—or, just reinstall xulrunner-1.9 with aptitude reinstall xulrunner-1.9.

On other systems, you can identify the location of the default plugin by setting plugin.expose_full_path to true. Then go to about:plugins and look for the "Default plugin". Firefox should show you the path to the plugin file. Delete that file.