Notes for building a chroot for chromeos: Section 1: Creating chroot ========================== The following is run on an existing armhf computer (in my case a trimlice), or a computer with qemu-arm working with binfmt. This will create a minimal ubuntu root file system. Everything needs to be run as root. # debootstrap --variant=minbase --arch=armhf quantal ubuntu-12.10-armhf http://ports.ubuntu.com Where ubuntu-12.10-armhf is the location of the chroot Edit etc/fstab and add: proc /proc proc nodev,noexec,nosuid 0 0 Set up the chronos user: # chroot ubuntu-12.10-armhf bash # mount proc # mkdir /usr/local/home # adduser chronos --home /usr/local/home/chronos # addgroup audio-chr --gid 18 # addgroup video-chr --gid 27 # adduser chronos audio-chr # adduser chronos video-chr The first user (uid 1000) will match chronos in chrome os - this is important. Remember to umount proc before exiting the chrooted bash. If 18 or 27 exists, add chronos to them instead. In ubuntu 27 exists as sudo. Disable starting services in the chroot: # echo -e '#!/bin/sh\nexit 101' > /usr/sbin/policy-rc.d # chmod +x /usr/sbin/policy-rc.d Setting up sudo support: # addgroup admin # adduser chronos admin # apt-get install sudo Getting a working ubuntu running: # apt-get install ubuntu-minimal You now have a functional ubuntu chroot. Copy my chromeos scripts into the root of the chroot, and tar.gz it. Section 2: Getting it to run on the chrome book =============================================== Copy the tar.gz to a usb drive or similar and insert it into the chromebook. It needs to be in developer mode for this. Switch to VT2 with Ctrl+Alt+[->] (wich is F2 - [<-] moves back to chrome os again). Log in with chronos. # sudo su # cd /usr/local # mkdir ubuntu # cd ubuntu # tar xzvpf /media/removable//ubuntu.tar.gz # ./run.sh /usr/local/ubuntu bash Now you are running ubuntu in chroot. Setting up locale: # apt-get install locale # locale-gen edit etc/default/locale and enter: LANG= LC_MESSAGES=POSIX Setting up timezone: # dpkg-reconfigure tzdata Getting your fav. window manager: # apt-get install # mcedit /defaultprogram Enter the name of the window manager to start and press F10 (Volume up) to save and quit. Exit the chroot with exit or Ctrl+D. Section 3: Starting the window manager: ======================================= In order to start the window manager do this as root from VT2: # xinit /usr/local/ubuntu/run.sh -- :1 This will start a second X server on VT-3 (Ctrl+Alt+F3). Use Ctrl+Alt+F1 to get to chromeos. Quirks: ======= IMPORTANT: If you are not logged in to chromeos then the chromebook will shut down instead of suspend when lid is closed etc. Screen dims even when there is activity in linux sometimes. Switch to chromeos with Ctrl+Alt+F1 to un-dim. Can't get to automounted drives such as sd cards and usb drives. But you can mount them manually. Some times you can't switch volume down, only up. If this happens you can only switch volume down from chromeos, and only if sound is actually playing from chromeos. Occationally either X server will not draw anything. Switching to VT4 (Ctrl+Alt+F4) and back to the X server seems to do the trick for me. Switching between the VT's too fast may crash the X servers, and the chromeos X server brings down everything else. Todo: ===== EGL support in linux - copy over EGL on run.sh. Don't dim screen in linux. Startup chroot when X starts. Create minimal ubuntu tar.gz with rchroot and run scripts.