Tuesday, July 6, 2010

SqueakOS the cheaters way

Cold boot to Squeak under 6 seconds? Possible. I haven't actually automated it yet, but it is possible as described below.

Tiny Core Linux is a mini Linux distribution that is, before boot, only two files. One is the Linux kernel. The other is the entire filesystem which is loaded into RAM. These two files are packaged up into a bootable .iso image for burning to a CD, although you can put them on any bootable medium and boot them using grub. You can put these files on an existing Linux partition on your hard disk, for example. The "tiny" version is 10MB and has a graphical interface and package manager! The "micro" version is 6MB and is only a command line. They boot really fast.

Now, the micro version can be used to run Squeak:
  1. Boot it up using one of the "vga=" command line parameters to get a working framebuffer. You could use grub to persist this setting.
  2. Get Squeak into the filesystem somehow. I used wget to fetch an image and the Linux VM from ftp://ftp.squeak.org/. A more permanent option would be mounting an existing filesystem.
  3. Become root (sudo su) to run Squeak, or fix the permissions on /dev/input/mice.
  4. Run squeak: "bin/squeak -vm-display-fbdev".
This is not quite as cool as SqueakNOS, but it is a practical, easy and stable way of running Squeak as if it were the OS with good hardware support and a filesystem.