Chromium OS on HP Mini

As it was before, the latest weekend was very hard for my netbook. I told in my previous article that I have installed three Linuxes: Fedora, Ubuntu, and Gentoo, while the latter was considered as a bad choice for a netbook. That’s why I was waiting for a new candidate for a netbook OS.

I looked over an article about Chrome OS and found out that it uses Portage for package build and management. As a proud Gentooer, I could not pass by :)

As Larry Wall said,

The three chief virtues of a programmer are: Laziness, Impatience and Hubris

However,  impatience was my enemy this time. I started from the famous Hexxeh’s site, downloaded an image for LiveUSB and tried to boot immediately. I saw the first Chromium OS dialog (choose your language and network) and the netbook rebooted. After reboot, I saw a message on black screen: “An unsupported wireless hardware detected”.

Well, I tried to boot with by home-grown Gentoo kernel that was known to support my WiFi, but the result was the same.
So, I followed an easy instruction for building Chromium OS.

Chromium OS sources are managed by the same repo utility used in Android. (Once I will write about ayer – a similar solution developed primarily by myself for managing closely tied git repositories and building RPMs.) Gentoo has repo utility in depot_tools package from flavour overlay:

layman -a flavour
emerge -av depot_tools

Now we can build Chromium OS:

repo init -u https://git.chromium.org/chromiumos/manifest.git
repo sync
export board=x86-generic
cros_sdk -- ./build_packages --board=${board}
cros_sdk -- ./build_image --board=${board}
cros_sdk -- ./image_to_usb.sh --board=${board}
Chromium greeting

Chromium OS in KVM

Hooray, my own build has booted without problems. I logged in with my Google account and started the browser. That was a pity that virtual terminal (Ctrl+Alt+F2) was always black and I saw it for just a moment before switching back to X Window System (Ctrl+Alt+F1). But I typed:

bash -c /usr/sbin/chromeos-install

Ok, seems it started installation. But… on what partition will it install Chromium? Well, another documentation said:

IMPORTANT NOTE: Installing Chromium OS onto your hard disk will WIPE YOUR HARD DISK CLEAN.

Oops, I’ve lost my notebook data :) That’s not a big deal: it’s easy to install Fedora and Ubuntu again.

I googled how to perform multi-boot install for Chromium OS, but wasn’t satisfied by found methods and I developed two solutions myself.

  • Put everything on a single partition and write Chromium OS state partition to a file:
    truncate --size 10G stateful.img
    mkfs.ext4 stateful.img
    mount -o loop stateful.img mnt/stateful_partition
    ...
  • Create two partitions: the first about 1 GiB (root), the second 10 GiB (state).

Then edit /sbin/chromeos_startup:

if [ "$ROOTDEV_RET_CODE" = "0" -a "$ROOTDEV_TYPE" != "/dev/ram" ]; then
  # Find our stateful partition.
  # variant 1
  mount -o rw,remount /
  STATE_DEV=/stateful.img
  # variant 2
  STATE_DEV=LABEL=state
...
  OEM_DEV=${ROOTDEV_TYPE}8
  # Do not mount OEM_DEV
  #mount -n -t ext4 -o nodev,noexec,nosuid,commit=600,ro \
  #  "$OEM_DEV" /usr/share/oem
fi

Finally, I added /boot/grub/grub.conf file in GRUB Legacy format on Chromium OS root partition:

title ChromiumOS
root (hd0,6)
kernel /boot/vmlinuz quiet console=tty2 init=/sbin/init boot=local rootwait ro noresume noswap loglevel=1 noinitrd root=/dev/sda6 i915.modeset=1 cros_legacy cros_debug

set OS name:

echo 'Chromium OS' > etc/gentoo-release

and regenerated GRUB2 config:

update-grub2

Now Chromium OS booted without problems from hard disk (it really takes about 10 seconds – great!), but Chromium was unable to show YouTube video and PDFs due to lack of support for h.264 and PDF format.

This instruction ended with broken Chromium. I made some investigations and even discovered that the browser cannot show crosh terminal emulator when libffmpegsumo.so is replaced. Also, the proposed 99java is invalid: it cannot contain if operator. I tried to replace the whole /opt/google/chromium with another Chromium (not Chrome!) archive, but this Chromium broke if Downloads directory was not empty: a black X screen with blinking white cursor appears immediately after login.

Finally, I added just libpdf.so and libpepflashplayer.so (with its manifest.json and pepper-flash.info).

Another problem is that both my notebooks were not able to boot from Chromium OS Live USB. Maybe it’s due to lack of some drivers, but I’m disappointed that all that I see is just black screen. Some day I will drop this quiet kernel option and test them again.

So, what would I say about Chromium OS at this moment? Fast, minimalistic, aesthetically pleasant and hardware-specific.

About these ads

One response to “Chromium OS on HP Mini

  1. i want to emulate what you have done on a hp slate (500?), but doubt i’d have as much luck. great read, though, even if it made me realize how inadequate i am at Linux.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s