NetBSD LiveKey

NetBSD everywhere...

Introduction

The NetBSD LiveKey project is a non-destructive NetBSD/i386 on USB stick. It is composed of a tarball or zipfile to be uncompressed on an USB key without changing the original Filesystem (usually VFAT).
You will probably need about 256MB RAM to run the key smoothly.

Content

The compressed archive is composed of :

  • A 8MB compressed NetBSD 3.0 kernel bundled with a RAMDISK for initial boot
  • A 50MB compressed vnd ffs disk image containing :
    • full base
    • full xbase
    • misc and helvetica fonts
  • A tgz archive containing tuned /var, /dev and /etc
  • A pkg directory, containing packages to be installed at boot time, in the actual image these are :
    • bash 3.1 (due to many complains, it is not the default shell anymore ;)
    • ion3 window manager
    • links-gui and dependencies (jpeg, png, tiff, zlib)
  • A root directory, directly customizable before booting the key

Bootloader

To make the key bootable, you will use grub, probably like this :

mount_msdos /dev/sd0e /mnt
grub-install --root-directory=/mnt /dev/sd0
And create a /mnt/boot/grub/menu.lst like this one :
title NetBSD LiveKey
root (hd0,0)
kernel --type=netbsd /livekey/netbsd
boot

Installation

$ cd /key/mount/point
$ tar zxvf /path/to/livekey.tar.gz
or
$ unzip /path/to/livekey.zip
Simple, huh ?

Login using "root" with no password, start X11 with ion3 window manager running xinit at prompt.
XF86Config is configured to use the VESA driver, at 1024768 16bpp

.xinitrc, .profile, .Xdefaults and everything you'd want to tune can be found on the root/ directory placed in the key.

You may want to try it without rebooting using QEMU. The command line will be something like :
$ qemu -m 256 /dev/sda

Status

  • 10 / 05 / 2006 - The disk boots, the whole OS is loaded
  • 11 / 05 / 2006 - Runs X11 !
  • 11 / 05 / 2006 - FS image is now a compressed vnd(4) image, writable directories are mount'ed on mfs(8)
  • 12 / 05 / 2006 - Configuration and rw directories are now located in RAMDISK, in /live/initfiles.tgz
  • 13 / 05 / 2006 - Automatic packages installation, initfiles.tgz out of RAMDISK and root directory directly in the key
  • 14 / 05 / 2006 - The project gets its own homepage ;)

Screenshots

Grub

grub

Loading the kernel

grub

Stage 2, enter the device key name (usually sd0e on a real key, wd0e in QEMU)

grub

Login screen

grub

ion3 window manager

grub

See my mp3 walkman booting NetBSD !

Downloads

Images

Documentation on how to build your own key Build scripts and ramdisk files

Contact

You can reach me by mail at imil@gcu.info or in IRC, iMil in the #netbsd channel on Freenode or IRCnet networks.

Enjoy !