How to boot Google ChromeOS on an eeepc or vmware and virtualbox

After watching the webcast of the google chromeos announcements today I felt I should probably see what all the fuss was about and get the source code and have a go at building it and as lots of people may be a little daunted by this I thought I'd add a guide, although it is pretty well documented by google.

Firstly all instructions on where to download and how to build can be found here - http://www.chromium.org/chromium-os/building-chromium-os what I write will provide a summary for people who just want to have a go with it, experienced developers will want to use code from the git repo and probably won't need a guide on how to do it.

Firstly you need to be running ubuntu, ideally karmic 9,10, it doesn't matter if it's 64 or 32 bit, a few GB of hard disk space would also be helpful.

Assuming you're using ubuntu then you need to download the source code from google which they're packaged up nicely as a .gz archive from the link under  "Method One:  Download the code directly (cannot commit changes)" here. Then extract this to ~/chromiumos.

In depth instructions to build the os can be found here, however they are slightly confusing so I shall summarise exactly what you need to do, if you need more details then you might want to refer back to the google documentation.

Setup

To start change to the scripts directory:

cd ~/chromiumos/src/scripts

Then make a local repository to hold all the packages from which we will build the system.

./makelocalrepo.sh

When building the OS apt is used much like in debian/ubuntu.

Next build a chroot environment in which to build the new system:

./make_chroot.sh

if this does not work some people find you need to make the directory ~/chromiumos/chroot/home/root/trunk however I don't recall doing this.

Next you need to get a version of the chrome browser to include, fortunately google have prebuilt this and can be found under "Download Chromium binary"  here I have not linked directly to the files as they are likely to change names.

**EDIT This link is down (checked 22/11/09) so I have provided mirror of the file here please remember that these files are evolving fast and if you want to get the very latest chrome you should get the source code and build it yourself as described in the original google article **

then rename the downloaded zip "chrome-chromeos.zip" and place it in "~/chromiumos/src/build/x86/local_assets" - you will need to create this folder.

Now enter the chroot environment:

./enter_chroot.sh

at this stage it is wise to create a local user so you can login without authentication from google, this can be achieved by:

( cd ../platform/pamgoogle && ./enablelocalaccount.sh USERNAME )

where USERNAME is the username you wish to use.

and to enable a root account for administration run:

./setshareduser_password.sh

Build

Now all that remains is to build the system:

./buildplatformpackages.sh

./build_kernel.sh

To create a image of the file system exit the chroot:

exit

(enter root password)

./build_image.sh

this will place a build under ~/chromiumos/src/build/images.

Install

From here there are two options, if you wish to boot from a usb stick then use:

./imagetousb.sh --to=/dev/the usb drive

you can find the usb drive name by looking in System>Administration>Disk Utility and you need the name of the device ie /dev/sde rather than a partition ie /dev/sde1

If you wish to use chromeos in a vm then use:

./imagetovmware.sh

this produces a vmware disk image of the system which will also work in virtualbox. This step requires qemu (which can be got by running sudo apt-get qemu, this can conflict with virtualbox so if you have any problems running virtualbox then remove qemu)

And that's it!

Good luck if you try this, I tried it and it worked on my eeepc and in virtualbox, any comments, questions or corrections appreciated.