Friday, May 7, 2010

digging hard links

A couple of tips about hardlinks: to find all hard links in a specific namespace use something like this:

$ find -type f -links +1

this because hard links have, by definition, more than one link pointing to them, as you can see with ls or stat on one of them.

Another useful tip: to know about any hard link which is related to a specified file use something like:
$ find /home -xdev -samefile foo
this will print out all files which are hardlinked to foo. Remember that hard links have the same inode number which can be seen with
$ ls -li foo

once you know the inode number, you can also search for hard links with something like

$ find /home -xdev -inum 7465209
Have fun!

Thursday, January 14, 2010

How to run ChromeOS under VMware

Starting from this announcement

http://www.unixmen.com/news-today/706-chromium-os-zero-released-

I wanted the try out ChromeOS but under VMware and have a look at it. The first thing is to convert the downloaded raw image to VMWare disk image format:

$ qemu-img convert -f raw ChromeOS-Zero.img -O vmdk ChromeOS-Zero.vmdk

Then start VMware player and create a new virtual machine, but select "Custom". At some point during the process, it will ask you to select a disk. Choose to use an existing virtual disk, and point the installer tothe file created above.

This is the only trick you need to complete the virtual machine creation. Now to see what is all this ChromeOS fuss about ...