Building and running Google Chrome OS on VirtualBox

This is (sort of) hot topic on the internets at the moment. Google released their Linux based Chrome OS to the public. It’s still in beta and under development, but you can try it now. There are lots of manuals such as this one, that instruct how to run already built image using Sun VirtualBox. But this is not fun, because:

  • Insecure. Who knows who’s built the image and if they aren’t sending your Google login data to themselves when you login
  • You’re stuck with that particular release. As I said, it’s in development, so new features and bug fixes get introduced on a daily basis

So I’ll show you how to (relatively) quickly build your very own Google Chrome OS. This instruction tells how to build Chromium OS with pre-built Chromium web browser. You will also need Sun VirtualBox.

In a nutshell:

  • Install Ubuntu as a VirtualBox VM
  • Download ChromeOS sources
  • Build ChromeOS
  • Create VMWare image
  • Boot it in VirtualBox
  • Enjoy

For the latest build release numbers check Chromium OS build page.

Preparation

Install Ubuntu

Do the standard installation, as you would normally do. I selected all defaults, and allocated 20GB single partition for the installation and assigned 512MB RAM.

Get OS source

Download/unpack http://build.chromium.org/buildbot/archives/chromiumos-0.4.22.8.tar.gz to /home/user/chromiumos/

NOTE! It seems that Google have removed OS tarballs and you now have to use these instructions to get the source code.

Install some additional packages required to build ChromiumOS

$ sudo apt-get install subversion pkg-config python perl g++ g++-multilib \
bison flex gperf libnss3-dev libgtk2.0-dev libnspr4-0d libasound2-dev \
libnspr4-dev msttcorefonts libgconf2-dev libcairo2-dev libdbus-1-dev
$ sudo apt-get install wdiff lighttpd php5-cgi sun-java6-fonts

OS build

Building local repository

cd ~/chromiumos/src/scripts
./make_local_repo.sh

Watch the output carefully and make sure it hasn’t failed with some errors!

Google says if the script fails, remove repo directory and call the script again. It hasn’t failed for me, so if you’ve done everything as per above you should be fine. I don’t really understand why calling the same script might make any difference…

This step is quite lengthy, so you might want to make yourself some coffee or tea. Or just take a short walk if the weather is good.

Create build environment

Another totally automated step. Just run

./make_chroot.sh

Which creates chroot’ed build environment for you. This uses all packages you downloaded in the previous step. There are adoption how to pull required packages from the remote repositories (Google and official Ubuntu), but I advise to take an easy way and download all packages first and build locally.

Get Chromium binary

make the following directory:

mkdir -p ~/chromiumos/src/build/x86/local_assets

And download chromium package from Google:

wget -O ~/chromiumos/src/build/x86/local_assets/chrome-chromeos.zip \
http://build.chromium.org/buildbot/archives/chromium-chromiumos-r32516.zip

Building OS

First you need to enter you chroot’ed build environment. Use the following command:

./enter_chroot.sh

I also recommend generating password for shared user, so that you can sudo from the terminal:

./set_shared_user_password.sh

And finally build all packages:

./build_all.sh

At this point, go and make some more tea or coffee. Which I wouldn’t recommend, though. Simply because you will have trouble getting asleep. Because sleeping is the most sane thing you might want to do at this moment. Building OS packages takes ages!…

But seriously, it’s not that bad, it took about an hour and a half on my Ubuntu VM to build it.

Make VM image and boot it in VirtualBox

Build bootable image

Once all packages have been built, you need to create OS image to boot from. Image build process creates two artefacts:
- Master boot record (mbr.image)
- Root FileSystem (rootfs.image)

./build_image.sh

Once the image files have been creates, the script will tell you where to find them. It is going to be in ~/chromiumos/src/build/images//

Here’s what you will have once the image build is done:

pulegium@ubuntu:~/chromiumos/src/build/images/999.999.33509.212332-a1$ ls -lh
total 729M
-rw-r--r--  1 pulegium 5000  512 2009-12-01 21:34 mbr.image
-rw-r--r--  1 root     root  40K 2009-12-01 21:31 package_list_installed.txt
-rw-r--r--  1 root     root  40K 2009-12-01 21:34 package_list_pruned.txt
drwxr-xr-x 22 root     root 4.0K 2009-12-01 21:29 rootfs
-rw-r--r--  1 pulegium 5000 950M 2009-12-01 21:23 rootfs.image
Exit Chroot environment and run image_to_vmware.sh script which will create you a VM image. The script will tell you where the image is stored. Copy it to your VirtualBox machine. Mine was called ide.vmdk.
Attach image as VirtualBox VM disk
Best to show where to click… So fire up VirtualBox and start creating new VM.
Creating New VM for Chrome OS
Creating New VM for Chrome OS
Then when prompted tell that you are going to use your own disk image.
Tell VirtualBox to use existing image

Tell VirtualBox to use existing image

Add new image…
Add new image

Add new image

And voila!
Image added

Image added

Enjoy Chrome OS
This is it, you’re ready to explore the new flashy OS… Enjoy!
Chrome OS login screen
Chrome OS login screen
Selection of preinstalled application. All web based and ready to go. Make sure you have connection to the internet. Chrome OS bit dull and TBH useless without internet...

Selection of preinstalled application. All web based and ready to go. Make sure you have connection to the internet. Chrome OS bit dull and TBH useless without internet...

In general I think Chrome OS looks OK'ish, but this menu smells of M$ Windows...

In general I think Chrome OS looks OK'ish, but this menu smells of M$ Windows...

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Live
  • Netvibes
  • NewsVine
  • Reddit
  • Slashdot
  • StumbleUpon
  • Technorati
  • Twitter
  • Yahoo! Bookmarks

Related posts:

  1. Sorting out YUM repositories on CentOS 5.4
  2. Building python 2.6.4 RPM for CentOS 5.4
  3. Using OpenID for authentication in Django
  4. Use SSH to upgrade WordPress plugins automatically
  5. The most unusual photocameras