Getting started with SqueakNOS

The idea of this article is to explain what are the different bundles that are available to deliver SqueakNOS.

You probably already know that SqueakNOS is(n't) an operating system. Then, the way to use it is by booting it's code from some media, like a CD or a hard drive. The good news is that it's not necessary to alter your hard drive in any way, nor reset your PC each time you want to test SqueakNOS, and that's possible thanks to virtualization. The idea of virtualization is to simulate the existence of an entire machine (processor, memory, hard disk and other devices), where you can install an entire operating system. The software used to do this is called a virtualizer, and there are many of them available, including VMWare Player, Sun's VirtualBox, QEmu, etc.

SqueakNOS bundles

SqueakNOS comes bundled ready to be used in two ways:

  • as a bootable CD, actually an ISO image, which you can burn and boot in your machine or load into the virtualizer to simulate a CD (as you'll see in the net section).
  • as a VMWare appliance, which is an already configured virtual machine, created for VMWare Player but which can be also used in also VirtualBox. This appliance doesn't ship with a bootable CD, but instead uses a small bootable virtual hard drive.

It isn't necesary to download them both, you should choose the one you feel more comfortable and use it. Actually, I prefer the ISO, because while both alternatives allow you to change the image, the ISO also allows you to change the VM (if you want, here is shown how to do it).

To download any of the bundles go to SqueakNOS files section in SourceForge.

As of 19-feb-2010, the VMWare appliance file is a some days more recent than the ISO image, but that should change quickly, we are preparing an update right now.

SqueakNOS in a virtualized environment

The easier way to test and work with SqueakNOS is through virtualization. That means that with the help of a virtualizer you'll create a virtual machine where you can install and boot the SqueakNOS easily. I use VMWare Player because it's a bit faster than VirtualBox and also because it comes with vmware-mount tool which is useful to access disk images outside the VM.

SqueakNOS in a real system

to be written (28-dic-2009)

Accessing and changing the image

After some time playing with SqueakNOS, you'll notice you can't save the image from the inside of the VM. Also, you may want to introduce some code from the outside,  and if you are like me, you just like working in normal squeak and then migrate the changes to the VM. So there has to be a way of modifying the image.

To do so, you have to mount the VM/ISO image in a folder, read/write the .image and .changes files and then unmount. But there's a problem: the ISO image can only be mounted as read-only. This means that you would be able to read the files inside it, but wouldn't be able to write to it a new image in case you make a change from the outside. To solve this problem, you can regenerate the ISO with a new image. Unpack the .iso in some place, overwrite the .squeakNOS.image/changes files and then issue:

~/isocontent/ $ cd platforms/SqueakNOS
~/isocontent/platforms/SqueakNOS$ make iso

that will generate in release folder a new bootable .iso with the image you just placed.

In case you are using the VM appliance, you'll mount the VM disk's file system inside your real file system. You can do that with this command (which gets installed with VMWare Player)

$ vmware-mount SqueakNOS.vmdk /vmdisk

The same goes here as for the CD image, but with the big difference that you also have write access here. So if you like, you can work with normal squeak, save the image and when you are done you do

$ vmware-mount -k ../SqueakNOS.vmdk

to unmount. When you restart the VM you'll see all the changes you did from the outside.

Updating to the latest Squeak/Pharo and SqueakNOS

Before updating, it should be noticed that SqueakNOS is made of two parts: the Image and the Object Engine (the VM). Updating the image side is easy, because it's made of smalltalk code and you don't have to compile anything to use it. Updating the OE is a little more complicated so it'll be explained in another article.

To get most of the system, you should get the latest SqueakNOS. Also, you probably want to use the latest Squeak/Pharo image. My preferred way of doing that is this:

1. Get the latest image from Squeak / Pharo from it's main site.

2. Get the latest version of SqueakNOS from squeaksource.com using monticello. To get it you'll need to download some dependencies before. First, load VMMaker and then SquekNOS as specified in code snippets.

3. After you finish step 2, save the image and then overwrite the SqueakNOS.image and SqueakNOS.changes inside the ISO/VMDK with the updated version you just saved.

 After that you are ready to boot.

That's all for now, let's see you in the next article.