
chromebook-linux.com presents chrolin-usb! (Chromebook Linux USB) I wrote this set of shell scripts called chrolin-usb to easy install and boot GNU/Linux from your USB stick. Note that these scripts are just for Chromebooks*. * WARNING: this script will not work for CR-48 Chromebook, at least on this version Currently in version 1.3.1 you can install [...]
chromebook-linux.com presents chrolin-usb! (Chromebook Linux USB)
I wrote this set of shell scripts called chrolin-usb to easy install and boot GNU/Linux from your USB stick. Note that these scripts are just for Chromebooks*.
* WARNING: this script will not work for CR-48 Chromebook, at least on this version
Currently in version 1.3.1 you can install Debian 6.0.3, Ubuntu 11.04 and Gentoo simply executing a shell script to download the root filesystem and another script to copy to your USB drive. All the work as partitioning the USB, signing the kernel, copying the rootfs and Chrome OS kernel, copying the Chrome OS kernel modules… is done with this last script.
Basically, the process of these scripts is what I wrote on this post: http://www.chromebook-linux.com/2011/11/booting-gnulinux-distribution-from-usb.html
Here is the procedure how to install and run chrolin-usb.
Download chrolin-usb on your PC (requires GNU/Linux)
The scripts are hosted on this server, you need to run this scripts in your GNU/Linux system (and not inside your Chromebook).
You can download it here: http://files.chromebook-linux.com/chrolin-usb/chrolin-usb.tar.bz2
Or download with wget, open a console and type:
wget http://files.chromebook-linux.com/chrolin-usb/chrolin-usb.tar.bz2
Now, decompress the file:
tar -xjvf chrolin-usb.tar.bz2
This will generate a new folder called chrolin-usb, which contains some files and folders:
chrolin-usb.sh: the main script, to format partitions, kernel signing, installing on USB… makes all the stuff
get-debian-6.0.3.sh: script to download a prepared rootfs of Debian 6.0.3 for Chromebooks
get-ubuntu-11.04.sh: script to download a prepared rootfs of Ubuntu 11.04 for Chromebooks
get-gentoo.sh: script to download a prepared rootfs of Gentoo for Chromebooks
bugreport.sh: if you found a bug, please run this script and write down the bug you have found. This will send me your bug report
kernel_data_key.vbprivk: the private key to sign the Chrome OS kernel
config.txt: this file contains the set of parameters to pass to Chrome OS kernel
kernel-2.6.38.3.bin: this is the Chrome OS kernel 2.6.38.3+
2.6.38.3+: folder with Chrome OS kernel 2.6.38.3+ modules (to enable audio, wifi, etc.)
tools/cgpt: binary to create the Chrome OS partitions
tools/vbutil_kernel: binary to repack the kernel blob (with the parameters on config.txt)
builds: shell scripts as ‘get-debian-6.0.3.sh’ and ‘get-ubuntu-11.04.sh’ download the files on this folder
README: read this to quick install GNU/Linux on USB
CHANGELOG: modifications between versions
VERSION: text file with the your current version of chrolin-usb
Choose your GNU/Linux distribution to download
With the scripts get-debian-6.0.3.sh and get-ubuntu-11.04.sh you can download this prepared rootfs for Chromebook. It’s your choice, choose whatever you want and run the script.
To download Debian 6.0.3, open a console and run:
sh get-debian-6.0.3.sh
To download Gentoo, open a console and run:
sh get-gentoo.sh
If you want Ubuntu 11.04, then execute:
sh get-ubuntu-11.04.sh
And the script will download automatically the files, will take some time (5 GB in total, each one).
The files are splitted in some parts, but this script automatically unzip the parts, then merge and create a new file on the folder ‘builds’.
Run script ‘chrolin-usb.sh’
You have to known which device corresponds to your USB, this is pretty easy, just plug-in the USB and run this command in a console:
dmesg | tail
You will get something like: /dev/sdb or /dev/sdc, or /dev/sdg, that depends on your system. But you have to use the entire USB device which you have found and not a single partition on this device.
Again, if you’re unsure, please check that device is really your USB stick. Because if you wrong type your USB device, you will lose all data on this device! Remember that on GNU/Linux a command like: “dd if=/dev/zero of=/dev/sdX” is a beast and shows no mercy…
I’m going to assume that my USB device is /dev/sdg and I had succesfully downloaded Debian 6.0.3 using the downloader script, so now I’ve a rootfs binary on builds/debian_rootfs-6.0.3.bin
Then, installing Debian 6.0.3 to USB is easy as executing the script chrolin-usb.sh:
sudo sh chrolin-usb.sh -u /dev/sdg -i builds/debian_rootfs-6.0.3.bin
Confirm pressing ‘y’ key.
Then you will be prompted on how many space to reserve, so type how many GB want on your system, or just press enter to use the default value. The default value is calculated over the size of the rootfs you passed, if you want more space just type a bigger value but cannot exceed the size your total USB drive, of course.
Then wait until the process finishes.
And that’s all, now we’ve GNU/Linux Debian 6.0.3 installed on our USB. Put your Chromebook in developer mode, then plug-in the USB stick on your Chromebook and when the message: “Chrome OS verification is turned off” appears press the keys:
CTRL + U
This will boot from your USB and you should view your new GNU/Linux system running from USB!
Info about chrolin-usb parameters
If you run chrolin-usb.sh without parameters you should view this help menu:
– Chromebook Linux USB 1.3 – http://www.chromebook-linux.com Usage: sudo sh chrolin-usb.sh -u -i [-t ] [-b] [-k] [-f] -u Set USB drive to copy GNU/Linux. Ex: /dev/sdg -i Install the selected GNU/Linux root filesystem. Value: path with rootfs -t Set type filesystem for the rootfs image. Optional. Default: ext2 -b Set the block size to dd the files. Optional. Default: 4096 -k Sign again the kernel and copy to KERN-A without installing the rootfs. Optional. Useful when change the kernel parameters -f Dont’ format data on KERN-A and ROOT-A partitions. Optional Example: sudo sh chrolin-usb.sh -u /dev/sdg -i builds/debian_rootfs-6.0.3.bin
Required parameters:
-u : set the USB drive to copy GNU/Linux.
-i : set the binary of your rootfs. Note that you can prepare yourself your own rootfs with VirtualBox (or similar) and put the path here.
Optional parameters:
-t : set the filesystem type of your rootfs. (ext2, ext3, ext4, …).
-b : set the blocksize used with ‘dd’ (to make the copy). By default is 4096 for improving the speed when copying to your USB.
-k: repack the kernel blob, but don’t copy the rootfs. This parameter is useful when you have your rootfs installed, but you want to change some parameters in your Chrome OS kernel. To do it: edit the parameters on config.txt file, and execute the script ‘chrolin-usb.sh‘ using this argument.
-f: don’t format data on KERN-A and ROOT-A partitions
Important notes
1. Running this script will format your USB drive, so make a backup of the content before!
2. By default kernel root argument is /dev/sdb2. This is the USB device in your Chromebook. You could have to change this value on config.txt to the desired USB device to boot in your Chromebook, but probably not. Just keep in mind.
Login and passwords
If you download Debian or Ubuntu with the downloader scripts, use this values to login:
Debian 6.0.3
Login: user Password: chromebook Root password: chromebook-linux.com Note: for your convenience the user ‘user’ was added on /etc/sudoers, so open a terminal and change your root password using the command: sudo passwd root
Gentoo
Login: user Password: chromebook Root password: chromebook
Ubuntu 11.04 (is the version that made Jay Lee)
Login: user Password: user No root password
If you have any question, suggestion or problem please don’t hesitate to ask!








27 Responses
[...] pretty cool! UPDATE: you can use a shell script to make this process easy, see this post: http://www.chromebook-linux.com/2011/11/shell-script-to-easy-install-gnulinux.html Here is the procedure to make your own bootable USB on Chromebook: Requeriments 1. An [...]
Thanks for the post and code.
The zeroing of ROOT-A was quite slow here (about 1/5 the speed of other portions) — looking at the script it appears there is nothing set for dd’s bs parameter. Would that make any difference?
Anyway, off to try the usb stick that took about 3 hours to create
Thanks for the post and code.
Specifying bs=$BS for the “Cleaning data on ROOT-A” dd-ing step in the chrolin-usb.sh appears to result in much faster operation (about 5 times faster than the default here).
As a follow-up to the bs=$BS point, an appropriate count= argument needs to be specified. Calculated and used the following value:
COUNT=$(($NEW_HUMAN_SIZE * 1024 * 1024 * 1024 / $BS))
With this type of modification, the process took around an hour compared with over 3 hours for an umodified run.
Wow, this looks like a really nice scriot. What does it take to create my own rootfs of another distro? I’d like to try Linux Mint XFCE and since you got Ubuntu working, it can’t be much harder to do Mint.
Also, where is the swap partition if the drive is only split into KERN-A and ROOT-A?
Kevin, there is no swap partition. You will need Virtualbox to create your own linux images
I can’t get it working because I don’t have access to a 64bit machine. Very sad restriction.
I did find a patch to build the tools with the smallest amount of deps for i386, but it’s far too detached from any instruction to be useful.
I’m running into a little problem when I try to do the final step of the actaul installation. It says,
“/home/user/Downloads/chrolin-usb-3.4.0/tools/vbutil_kernel: error while loading shared libraries: libcrypto.so.0.9.8: cannot open shared object file: No such file or directory”
Anyone know how to fix this? Please and thank you!
Thank you, Debian install is working great on a 32GB SD card for the atom-based Samsung Chromebook. I press Ctrl+U to boot Debian and Ctrl+D for ChromeOS. Cheers,
Is anyone running into an error when running the following command?
sudo sh chrolin-usb.sh -u -i builds/ubuntu_rootfs-11.04.bin
The error is:
/chrolin-usb-3.4.0/tools/cgpt: 1: Syntax error: “(” unexpected
Any information to resolve this would be appreciated!
Thanks!
I have the same “(” unexpected error
Fix the libcrypto.so error on fedora:
sudo ln -s /usr/lib64/libcrypto.so.10 /usr/lib64/libcrypto.so.0.9.8
I am getting several successive syntax errors when I run the chrolin-usb shell script. I did not see the requirement for a 64bit machine that someone mentions above in the responses—- is that really true? Perhaps my download of the chrolin zip file was corrupt…………..
Any update on the “(” unexpected error?
IIRC requires 64bit machine because the binaries extracted from ChromeOS chroot (cgpt and similar) were compiled on 64bits host.
When i try to do the last step to write everything onto my sd card, I get this error:
chrolin-usb.sh: 135:chrolin-usb.sh: /media/OS/chrolin-usb-3.4.0/tools/cgpt: Permission denied
I got this error both when using a puppy linux live cd (32-bit) — and a ubuntu live cd (64-bit).
I tried as root as well and got the same error.
I just tried running it again from a ubuntu 12.04 (installed to a hard drive) and got the same Permission denied error.
I have used your scripts successfully in the past but somehow I have been parted with my USB stick. So, I went to build a new one with an 8gig corsair voyager USB stick and the ubuntu image. No matter what I do, I have been unable to get it working again. The error message I keep getting has to do with a modules directory not existing.
- Copying 3.4.0 kernel modules to /dev/sdf2 /lib/modules…
cp: accessing `/mnt/chrolin/lib/modules/.’: Not a directory
Upon looking, the lib directory is not a directory but a fifo pipe instead. In fact the whole rootfs looks sort of corrupted. Though, I must admit to be a noob to chrolinux, I do however have almost 30 yrs experience as a linux sysadmin so it isn’t like I didn’t try _every_ trick I could think of either.
Ken: are you installing a custom linux image or a prebuilt image from here? If it’s a prebuild which distro?
It looks like your rootfs don’t have /lib/modules/. Could be a corrupted download/image?
@jordi Yeah, thats my guess too. Because I immediately went and used the same scripts to download / install the gentoo image and it worked like a charm. My guess is someone should look at the ubuntu image (this site) for corruption.
While gentoo and debian images are hosted here the ubuntu image isn’t hosted on this server as it’s a work from another person.
It should work but can exists the possibility the other server was temporarily unavailable leaving a corrupted image. I will take a look If I’ve some time.
This is a great tutorial, thank you. I have a Samsung ARM Chromebook that I would like to use Debian with http://www.chromium.org/chromium-os/developer-information-for-chrome-os-devices/samsung-arm-chromebook
Will your Debian 6 script work on this Chromebook?
Thank you!
Anybody install Debian on the Acer C-7?
Please Archilinux support!!!! Manajaro Linux is a beatiful distribution.
Thanks by your contributions to free and open source software.
When I go to run
“sudo sh chrolin-usb.sh -u /dev/sdb -i builds/debian_rootfs-6.0.3.bin”
It returns
“chrolin-usb.sh: 280: file: not found”
so I go to line 280 in the script and it looks like a problem checking that the usb drive (in my case an sd card) exists. I’m sure that it exists on /dev/sdb why is this “file -s $USBDRIVE” returning an error? Can I remove this check from the script?
Any help appreciated,
Jorge
Sure, you can remove this check, but probably if isn’t detected at this step could cause some troubles later. Maybe because your sdcard is mounted on another location
thanks DM for the help on fedora!! You saved me on that one.
Great writeup, easy to follow. Waiting for my write to usb to finish.
john