Thursday, October 11, 2012

How to run Chrome OS (not Chromium OS) on a Virtual Machine

As part of my job, I often want to be able to demo Chrome OS to clients so that they can see how simple it is or to show them a concept such as enterprise enrollment. However, since Chromebooks aren't compatible with common screen-sharing applications like GoToMeeting.com or WebEx, it's not possible. Google+ Hangouts do work on Chrome OS but you have to have a user logged into the Chromebook, no demoing the login screen or enrollment process.

So I set out to find a way to run Chrome OS (the official code) on a virtual machine. Even before Chromebook hardware was available, Chromium OS, the open source base for Chrome OS has been able to run on virtual machines (see Hexxeh's nice nightly builds) but I didn't want to deal with the rabbit trail of Chromium OS vs. Chrome OS when presenting to clients, I wanted them to see exactly what they'd see on a Chromebook. So with a little scripting, I've managed to get Chrome OS running on VMWare workstation (should work on VMWare Player and Fusion also though I haven't tested). Here are the instructions:

Disclaimer: None of this is official or supported. I'm not responsible if Chrome or Chromium OS breaks your physical or virtual machine, destroys your data or re-elects Obama. The risk is entirely your own.

  1. Download this VMWare image. It's an unofficial, 200mb Chromium OS image. We'll use it as the base image, overwriting the Chromium OS filesystem and kernel with Chrome OS. The image is .tar.bz2 compressed. Windows users may need to download 7-Zip to decompress.
  2. Once decompressed, open the .vmx file in VMWare and boot the machine. You'll see Chromium OS boot up. Your VM should have Ethernet setup so the image automatically has Internet connectivity, no need to run through setup since we'll be blowing things away shortly.
  3. Press CTRL+ALT+spacebar. Release the spacebar but hold CTRL+ALT down and press F2. This switches us to the virtual console on Chromium OS (the spacebar is needed to make sure the VMWare guest and not the host OS pick up the CTRL+ALT key combo).
  4. Login as user chronos password chronos. We'll want Chrome OS to start with a fresh stateful partition as soon as we first boot it so run:

    sudo touch /mnt/stateful_partition/.developer_mode                   (password is chronos again)


    this tells Chrome OS that the system has been in developer mode and should be wiped when it next boots up. Since we're running on a VM, there's really no such thing as a developer switch like there is on a real Chrome OS device but Chrome OS assumes it's not in developer mode so it does the wipe for us.
  5. Now we're ready to download Chrome OS and overwrite Chromium OS. This step is pretty easy. Just run:

    wget http://goo.gl/4suhf; sudo bash 4suhf

    this will download a script and run it. The script takes care of downloading Chrome OS and overwriting your VM with it. You'll be able to choose which specific Chrome OS image you wish to use. All of the models I've tested have worked but if you're low on VM resources (RAM, CPU) then I suggest using Mario. If you want a 64-bit VM, use the Samsung 550 or Series 3 image.

    When the script finishes, you'll be back at the command prompt but attempting to run any commands will crash. This is because you're still booted into Chromium OS but you've overwritten your VM disk with Chrome OS. Just manually reboot the VM with the reset button. Your stateful will quickly be wiped and you'll see Chrome OS boot with that official logo!
Gotchas
  • Auto-updates don't work. You'll need to rerun the script in Step 5 to update. Sometimes the recovery image version lags behind the current stable version of Chrome OS.
  • Enterprise enrollment won't work out of box but it can be made to work. Hit CTRL+space then F2 (let go of space, hit F2 while holding CTRL the entire time). Run:

    sudo su -
    echo 'serial_number="1234567890"' > /tmp/machine-info
    restart ui

    replace 1234567890 with whatever serial you prefer. Then follow the normal CTRL+ALT+E method to enroll. If you have devices already listed in your CPanel you can choose one that's not been enrolled yet, use it's serial and be able to demo auto-enrollment.
  • For some reason I can't figure out, Chrome OS always want's to display at 1280x800 but VMWare only shows 1280x720 cutting off the bottom 80 pixels. It's something to do with the VESA BIOS on VMWare I believe (and the fact that Chrome OS expects an Intel graphics card that's not there on the VM). It's annoying that the bottom part of the screen where the clock, menu, etc are is missing. You can however use CTRL+Windows Key to pull up the menu of apps. If anyone finds a workaround to fix this, I'd love to know it. Update: turning the VM off and setting the monitor to 1024x768 forced in VM settings lets you see the menu bar. I couldn't bump the resolution higher than 1024x768 without cutting off the bottom.
Good luck and post in the comments how Chrome OS works in a VM for you!

Friday, September 7, 2012

How the Chromebox and Series 5 550 Got Their Codenames

Bill Richardson is a Google engineer working on Chrome OS and the guy who originally put Ubuntu on Chromebooks (I just automated his work with a script and hosted image). He recently shared some really cool insight into how Chrome OS devices got their nicknames. For reference, the Samsung Series 3 Chromebox is know to engineers as Stumpy and the Series 5 550, Lumpy:

That name has a little history. Our cubicles have name plates on them. As a joke, someone added nameplates to the hardware lab door with the names of the seven dwarves from Snow White.  A couple of us were trying to remember all the names without looking, when the chief hardware guy stopped by to talk about the new desktop form-factor chromebook. He wanted to pick a clever project name, and since it was short and squat and we had similar-sounding names on our minds, I suggested Stumpy. He liked it, so it stuck. Then we wanted the laptop version to sound similar, and to keep them straight we started it with 'L' for "Laptop", which gave us Lumpy.

Some folks had a similar reaction to yours, but the thing to remember is that many engineers still have a childlike "playing with toys" enthusiasm. In our techno-geek culture, giving a silly or fun project name to something is an indication that we like it.

After the fallout from Apple's BHA project [link added by me] in the mid-90's, a lot of big companies stopped letting the engineers pick the names, which I think takes a lot of fun out of it.

I'm not sure why but the idea of a bunch of Google engineers sitting around trying to name off the seven dwarfs makes me laugh. 

Monday, August 27, 2012

Update: ChrUbuntu 12.04 now works on Cr-48 and Samsung Series 5!

I'm happy to announce that I finally found the time to get ChrUbuntu 12.04 working on the original Cr-48 and Samsung Series 5. I achieved this by custom compiling 64-bit Chromium OS kernels for both devices. The instructions in the ChrUbuntu 12.04 blog post have been updated to point to the new script. A few things about this new version of the script:

  • The script now works on the 1st generation Cr-48 and Samsung Series 5 Chromebooks. A custom 64-bit kernel is used for Ubuntu. Newer Chromebooks will use the official 64-bit Chrome OS kernel found on the device at script execution time.
  • I don't have an Acer Chromebook to test with and there's no public overlay to compile for the Acer (ZFB) device. For now, these boards will use the Cr-48 kernel. If an Acer user tries this script, please report your results back here! I'm particular interested to know if the trackpad and audio work properly.
  • The script now detects the size of your hard drive and dynamically adjusts the maximum size you can select for the Ubuntu partition. Hardware modders rejoice!
If you're an original Cr-48 or Samsung Series 5 owner and are looking for a way to say thanks, consider upgrading or getting a family member a Samsung Series 5 550 Chromebook or a Samsung Series 3 Chromebox using these links. The price is the same but a portion of the cost goes to support this blog!