jueves, 29 de abril de 2010

Accessing Squeak's image from the outside

   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 Hard disk/ISO image in a folder, read/write the .image and .changes files and then unmount.

Mounting the virtual hard drive

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
You have read/write access here, so you can work with normal squeak, save the image and finally copy it overwriting SqueakNOS.* inside the mounted directory. 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.

Accessing the ISO image

Here we get into trouble: ISO images can only be mounted as read-only. This means that you'll 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.

No hay comentarios:

Publicar un comentario en la entrada