So many thoughts. So little time.

Category Archives: Chromebooks

How to get ChrUbuntu and Crouton working together at the same time on a Chromebook

So, lately I’ve been doing checks on both ChrUbuntu AND crouton installations, and had to figure out how to have them both work together. So, here is the step-by-step, though I send you to some other locations to get the full installation instructions for those two.

1) Save anything you need to have backed up and set your Chromebook to the Developer mode. See here for how for your device: http://www.chromium.org/chromium-os/developer-information-for-chrome-os-devices — this is going to wipe your drive clean as a whistle, so back everything up that is in your Downloads folder that you may need to keep!!!

2) I recommend you switch to the Chrome Beta Channel for a saucy Unity installation and also currently for everything else. This is to obtain the more recent kernels for better video driver support, among other things. Go into Settings, click Help on the left sidebar, then click “More info” and then the “Change Channel” button. This performs a powerwash, which won’t matter on a unit freshly placed into developer mode. Note: Powerwashes clear out old Crouton chroots entirely.

3) Install ChrUbuntu first! Go to http://chromeos-cr48.blogspot.com/2013/05/chrubuntu-one-script-to-rule-them-all_31.html and follow all the instructions there, all the way to the end. (Lots of folks get it installed and forget to read the part at the end showing how to switch between the two systems from ChrUbuntu to Chromeos and back again.)

I used the following for a c710 which also works with any ARM units:
(See this page http://chromeos-cr48.blogspot.com/2013/10/chrubuntu-for-new-chromebooks-now-with.html for the script for the Chromebook Pixel and the newer Haswell-based Chromebooks like the Acer C720 and HP Chromebook 14. )

Go with the speedy XFCE environment in raring (stable in Chrome Beta channel):

curl -L -O http://goo.gl/s9ryd;sudo bash s9ryd xubuntu-desktop 13.04

or go with the beautiful Unity environment in saucy, assuming you used the Chrome Beta channel again:

curl -L -O http://goo.gl/s9ryd;sudo bash s9ryd default latest

I will tell you that if the physical security of your data is very important to you, that ChrUbuntu is the better way to go as your permanent installation. Even with a Powerwash or especially if someone hits your spacebar and exits developer mode, a ChrUbuntu installation with its data intact is still there on its partition waiting for you to return to Developer mode again. Crouton installs are totally and completely wiped. If you save everything to the cloud diligently, this will not matter to you perhaps. But I lost a 2 hour interview recording done in Audacity in a crouton installation due to someone hitting that spacebar! 

4) Install Crouton Next! If you changed to the Chrome Dev channel earlier (but don’t till they fix the bugs – use the Beta channel!), change to the Chrome Beta Channel for Crouton installations. Don’t worry – the ChrUbuntu installation already took the cue from your channel setting earlier and installed its own copy of the kernel you selected. That doesn’t get changed by this move.

Follow the instructions here: https://github.com/dnschneid/crouton/blob/master/README.md

or see this article at my website: http://terrybritton.com/copy-and-paste-crouton-linux-on-chromebook-commands-959/

I highly recommend XFCE – Crouton FLIES with this. Otherwise, KDE or Unity both work with the Chrome Beta Channel kernel in raring and saucy.

sudo sh -e ~/Downloads/crouton -t chrome,xfce -r saucy -n saucy

That puts your chroot into a folder named saucy, so it doesn’t get the default name of precise, which would be confusing! Start with:

sudo startxfce4

or

sudo startxfce4 -n saucy

5) So, now you have two installations, but the crouton installation turns off the developer mode needed to get back to your ChrUbuntu installation. So, use CTRL-ALT-F2 to get back into the Chronos shell, and type in WITHOUT logging in as chronos:

chromeos-firmwareupdate --mode=todev

(that’s two dashes before mode)

That’s it!

Here are the switch codes to go between ChrUbuntu and ChromeOS again:
To ChrUbuntu:

sudo cgpt add -i 6 -P 5 -S 1 /dev/sda;sudo reboot

To ChromeOS:

sudo cgpt add -i 6 -P 5 -S 0 /dev/sda;sudo reboot

See the associated post,

Create Shortcut Aliases to Easily Switch Between Chrome OS and ChrUbuntu Linux

to make life easier for yourself!

Create Shortcut Aliases to Easily Switch Between Chrome OS and ChrUbuntu Linux on a Chromebook

After completing these steps you will be able to switch to ChrUbuntu from Chrome OS by simply entering the command ubuntu in the terminal. You will be able to switch to Chrome OS from ChrUbuntu by entering the command chromeos in the terminal.

1. Install ChrUbuntu using the instructions here or at the one script to rule them all page

2. Boot into Ubuntu and navigate to the Home folder

3. Press ctrl + h

4. Double-click the file .bashrc

5. Scroll to the bottom of the file and add this command:

alias chromeos='sudo cgpt add -i 6 -P 0 -S 0 /dev/sda;sudo reboot'

6. Save the file and close it

7. Open a terminal by selecting Applications > Accessories > Terminal and type chromeos

8. After entering your password (the default password is ‘user’), the computer should reboot into Chrome OS

9. Log in to Chrome OS and press ctrl + alt + → (→ is the forward arrow where the F2 key would normally be)

10. Type chronos and press enter

11. Type

sudo vim .profile

and press enter

in chromeos, after adding the alias the ‘ubuntu’ alias command in terminal didn’t work in chromeos until a hard reboot, then afterwards it did.

OR edit

sudo vim .bashrc

and put the alias there near the bottom with the other aliases – works right away for me.

12. Press the letter a to begin ‘insert mode’

13. Type

alias ubuntu='sudo cgpt add -i 6 -P 5 -S 1 /dev/sda;sudo reboot'

14. Press esc to return to ‘command mode’

15. Press shift + z then shift + z again to save the file and return to the terminal

16. Type exit and press enter

17. Type chronos to log in again and press enter

18. Type ubuntu and press enter

19. The computer should reboot into Ubuntu

Sources: http://www.chromeoslounge.com/cr-48-chrome-notebook/548-easy-way-install-ubuntu-cr-48-a-8.html#post9580 and http://www.chromeoslounge.com/cr-48-chrome-notebook/548-easy-way-install-ubuntu-cr-48-a-9.html#post9711

Note about the Chrome alias, it only works in the developer “chronos” console (/.profile) unless you add instead to ~/.bashrc, and you can name it whatever you want. On the Ubuntu side, another option is to add a desktop icon that runs the cgpt command.

Copy and Paste “Crouton Linux on Chromebook” Commands

We have several targets available already with crouton: Unity, KDE, XFCE, e17, gnome, cinnamon, LXDE, X11, CLI-extra, core and XBMC so far, with directions to put in Awesome from X11 and even KXStudio from KDE as explained in the Wiki (Intel-only for KXStudio).

https://github.com/dnschneid/crouton/wiki

https://github.com/dnschneid/crouton/tree/master/targets

Also, each can have the Chrome browser automatically install if it is listed first in the -t parameter, such as

-t chrome, xfce

Here I’m going to list a number of commands you can copy and paste that will produce new chroots with Chrome into named directories — if people find this helpful I can perhaps copy this into the Wiki.

On Intel machines, replace “chrome” with “chrome-beta”
(no quotes) if you want to try the latest version out, or with “chrome-dev” (no quotes) for the bleeding edge. (Will not install onto ARM processors since builds for those do not yet exist for ARM.)

The -r parameter specifies which distro version of Linux you want.
Type:

sh -e ~/Downloads/crouton -r list

to list the recognized releases. For instance, Ubuntu has precise, quantal, raring and saucy, and Debian has squeeze, wheezy and woody along with earlier versions at the time of this post.

The examples below use “precise” (except for cinnamon, which requires raring at least), but feel free to replace that with any others you wish to experiment with!

XFCE:

sudo sh -e ~/Downloads/crouton -t chrome,xfce -n xfce -r precise

Start with either sudo enter-chroot xfce or sudo startxfce4

Unity:

sudo sh -e ~/Downloads/crouton -t chrome,unity -n unity -r precise

Start with either sudo start-chroot unity or sudo startunity

KDE:

sudo sh -e ~/Downloads/crouton -t chrome,kde -n kde -r precise

Start with either sudo enter-chroot kde or sudo startkde

Gnome:

sudo sh -e ~/Downloads/crouton -t chrome,gnome -n gnome -r precise

Start with either sudo enter-chroot gnome or sudo startgnome

Cinnamon:

sudo sh -e ~/Downloads/crouton -t chrome,cinnamon -n cinnamon -r raring

Start with either sudo enter-chroot cinnamon or sudo startcinnamon
(Not available for some machines and distos – I believe I heard raring is the one that works.)

XBMC (doesn’t require browser):

sudo sh -e ~/Downloads/crouton -t xbmc -n xbmc -r precise

Start with either sudo enter-chroot xbmc or sudo startxbmc

e17:

sudo sh -e ~/Downloads/crouton -t chrome,e17 -n e17 -r precise

Start with either sudo enter-chroot e17 or sudo starte17

LXDE:

sudo sh -e ~/Downloads/crouton -t chrome,lxde -n lxde -r precise

Start with either sudo enter-chroot lxde or sudo startlxde

Base installs: (for Awesome, for instance — see Wiki https://github.com/dnschneid/crouton/wiki)

sudo sh -e ~/Downloads/crouton -t X11 -n xinit -r precise

Start with sudo start-chroot xinit

Command-line only:

sudo sh -e ~/Downloads/crouton -t cli-extra -n cli -r precise

or

sudo sh -e ~/Downloads/crouton -t core -n core -r precise

Start with sudo start-chroot

You can start as many cli instances as you like.

Append the above commands with -u at the end to update to the latest crouton which you have downloaded to your ~/Downloads folder (delete the old one before downloading it!)  http://goo.gl/fd3zc

(Originally posted at Crouton Community at Google Plus.)


Addendum to readme: Downloading bootstrap files over and over again is a waste of time

Saving and Using Bootstrap Files

The instructions on saving the bootstrap files appear to be incomplete, as they seem to only grab the “precise” release version of the files.

It seems this command allows you to get bootstrap files of any release you desire stored in your ~/Downloads folder — IF you include the releasename…

sudo sh -e ~/Downloads/crouton -d -f ~/Downloads/myreleasenamebootstrap.tar.bz2 -r releasename

substituting “releasename” above with raring, precise, quantal, etc.

Then use it like this:

sudo sh -e ~/Downloads/crouton -f ~/Downloads/myreleasenamebootstrap.tar.bz2 -t desktopname -n foldername

with “desktopname” being kde, unity, gnome, etc.

For updating, just leave out the -f ~/Downloads/myreleasenamebootstrap.tar.bz2 and simply update the folder name.

sudo sh -e ~/Downloads/crouton -n foldername -u

According to dnschneid, “Actually, when you update a chroot it skips the bootstrap stage entirely, as it’s not necessary. The -f parameter is simply ignored, and new versions of crouton can all use the same bootstrap file, no matter how old.”

Dennis Lockhart also shared this tidbit of an approach:

“I have also installed several targets in a single release, it saves some disk space plus you can still start and run as many as you like. For instance for a raring chroot enter:

sudo sh -e ~/Downloads/crouton -r raring -t chrome-beta,cli-extra,gtk-extra,cinnamon,gnome,kde,unity,xbmc,xfce

and it will install all the targets in a chroot named ‘raring’ by default.
Then you can start them with the start* scripts, (I.E.):

sudo startgnome -n raring

Also, with the new target naming conventions in crouton, you can update all of them at once without specifying any targets on the command line, just download the latest version of crouton and then, in my example,  issue:

sudo sh -e ~/Downloads/crouton -n raring -u

It’s easy to add targets to an existing chroot too just by using the ‘-u’ option. For example in your KDE chroot you could add gnome & xbmc by entering:

sudo sh -e ~/Downloads/crouton -t gnome,xbmc -n kde -u

And with the ‘edit-chroot’ command ‘s ‘-m’ option you can rename them too.

Pretty slick….”

I’ll say! I have gotten it to work myself … and it rocks! It is such a cool technique!

I originally posted this over at Google+ in the Crouton Community, but I’m sharing it here on my blog as well for you non-G+ers (yet!)