Archive for February, 2006

Kickstart for Ubuntu Live CD?

Sunday, February 26th, 2006

Wouldn’t it be great to have a kickstart option for the Ubuntu Live CD?
First, kickstart is very convenient. I’ve been using kickstart to install Red Hat and Fedora machines. A kickstart script is a kind of ‘answer file’ containing the answers to the questions otherwise asked during a manual installation. The kickstart procedure is easily extended in the %post section. Everything after this magical keyword is considered a script and executed in the last stage of the installation process. In this script, you can take care of installing cronjobs, printers, update all sorts of config files. You can tell the installer to grab a kickstart file from a web server by adding ks=http://url/to/ks.cfg to the kernel boot parameters.

I was happy to see the kickstart feature introduced in Hoary (Ubuntu 5.04). Some of Red Hats’ kickstart features are still missing, but they might show up in Dapper, which is scheduled for April.
motor kickstart
Secondly, two very cool features of the Live CD are the ability to make changes to the file system and the fact that it comes with a fully functional package management system: APT. After booting, you can simply open a terminal and apt-get install something. Even tried an apt-get update; apt-get upgrade, but be sure to do this just before a coffee break, even better… before lunch!

Ok, so why kickstarting a live cd? All installed packages and modified settings will be lost after rebooting anyway.
Quite some open source projects, like Typo3, Lamppix and schoolTool, are offering demo cd’s. These cd’s boot your pc into a fully configured web-server. If the Ubuntu Live CD would have a kickstart option, these projects could just as well offer a kickstart script for it. Instead of downloading a modified live cd distribution, just download the script that adds some functionality to the live cd you already have lying around.

I’ve once used a similar solution to turn a room of windows computers into a linux course lab. By then, the first ubuntu live cd was based on Morphix. Just two extra lines of code added some kind of kickstart option to the Morphix cd:

#!/bin/sh

# determine the mac address of the first network adapter
mac=`/sbin/ifconfig  | awk  '/HWaddr/ { print $5 }' | head -1`

# download and execute livecd init script
wget -q -O - http://intranet/livecd/init.sh.php?mac=$mac | /bin/sh

The init.sh.php script on the intranet server returned the code to execute at startup. By including the hosts’ mac address, the script is able to return host specific shell scripts. The lab pc’s where booting a script that took care of installing missing packages, mounting nfs home directories, mounting the nfs application directory, setting the root password, start ssh, etc. Think of it as a fat client alternative for LTSP.

If you have any ideas on how to get this into Ubuntu, go ahead!

Plain text formatting

Thursday, February 23rd, 2006

I recently did some fun shell scripting to format plain text. I found out that Links, a text based browser, is your friend when you want to display a nice table on a terminal screen. Links has some command line options for using it as a filter. More precise, an HTML to plain text filter.
Since it is straight forward convert a CSV file into an HTML table, we’re just one step away from plain text.
(more…)

De terminal en niets dan de terminal

Monday, February 20th, 2006

Helaas biedt Terminal.app niet een full screen optie. Je kunt wel gemakkelijk met Appeltje + en Appeltje – de fontgrootte snel veranderen. Handig als er iemand over je schouder mee kijkt.
Een terminal die full screen kan is GLTerminal. Pluspunt is de terminal emulatie, en dat bedoel ik heel letterlijk. Het emuleert namelijk de vervorming en beeldflikkering van een geeky, monochrome, seriele terminal! Met Appeltje + Enter ga je naar full screen mode en je waant je echt 20 jaar terug. In de huidige vorm is het niet veel meer dan een speeltje. De talloze bugs en beperkingen zullen er voor zorgen dat je snel weer bij Terminal.app terug keert.
Een serieuzer alternatief is iTerm. De belangrijkste features zijn tabs en de mogelijkheid om naar meerdere tabs te sturen. Maar helaas, niet full screen.

De terminal en niets dan de terminal krijg je als je na het opstarten inlogt met ‘>console’ als gebruikersnaam. Je voorkomt hiermee dat de complete grafische omgeving opgestart wordt en komt in de tekst-modus terecht zoals je die wellicht van een linux machine kent. Lekker iTunes draaien in de achtergrond is er dan niet bij.

De oplossing zit’m in X11, je kun hier een xterm bijna het hele scherm laten vullen, zeker in combinatie met de instelling ‘Enable the Enter Full Screen menu’. Met Appeltje + Optie + a toggle je tussen een volledig X scherm en de gewone OS X omgeving…. niet echt heel aantrekkelijk.

Het enige dat nog in de weg staat is het de window manager. Als we die nu eens niet op starten! Lees verder voor de technische details…
(more…)