My Excellent $199 Chromebook Adventure ~pj

Sunday, July 07 2013 @ 10:57 PM EDT

Contributed by: PJ

I impulsively bought one of the $199 Acer C7 Chromebooks, specifically to find out if I could successfully put pure Linux on the Android Chrome OS laptop. I know Chromebooks run on Linux, the kernel, but I wanted KDE, which is what I normally run. I wanted both, and I thought it'd be fun. I also thought it might be an easier way to get around Microsoft's Secure Boot, which makes it hard to install a GNU/Linux environment on new laptops. Microsoft never runs out of ways to make it inconvenient to use Linux, of course.

So when I went to Best Buy, for something else, I asked if they had any Chromebooks. They were sort of hidden away, on the the far end of a display of all the Microsoft laptops. There were only two models, one a Samsung and the other an Acer C7. I chose the Acer over the Samsung Chromebook because the Acer had both wireless and Ethernet, and with the Samsung, it only had wireless, so if I wanted to use Ethernet ever, I'd have to get a USB Ethernet adapter. And I like to have both. Plus I worried some donkey would accuse me of pushing Samsung products, since we've been covering the Apple v. Samsung patents wars.

Then, once I got my new Chromebook home, I realized it only had 16 GB of storage, which I hadn't noticed in the store. Like I say, it was an impulse buy. I didn't think that'd be enough room for a dual boot. But just as I was giving up, a friend told me about crouton. Oh, my! A chroot so you don't have to dual boot but can just switch back and forth between Chrome OS and KDE or whatever you like.

The short version of my happy tale is I did it, and it works. And if I can do it, likely so can you. It was fun. I'll show you what I did, and I have some resources in case you can think of an even better way.

If what you want is the perfect laptop, you will probably have to spring for a Chromebook Pixel, I'd say, and put GNU/Linux on it too. The hardware is a big part of what makes a laptop superior, after all, and that Pixel screen can't be beat by a $199 laptop.

But for what it is, this is a great solution. And since for a couple of weeks I thought I couldn't dual boot, I explored the Chromebook and it's really surprisingly enjoyable. Faaaaast to boot up, and easy to use. Tons of apps instead of programs, kind of like on an iPad or your phone. And lots of details I like a lot. For example, I like the login as guest option. It doesn't track you. Once you log out, nothing is left behind. Of course wherever you went, they might be tracking you, but at least if you want to buy a gift for your husband or wife or kids, they won't find traces of what they are getting on a shared laptop. You can turn off Google Drive, if you don't need it. You can turn off cookies, all the usual things. I love the accessibility feature where you can get a black background and light text. So, yes, I enjoy my Chromebook a lot. Late at night, I would use it in bed while I watched TV too. It's lightweight, and just the right size. In short, tons of fun. But there were some things I wanted that I missed from KDE. Sometimes you just want to be local, not in the cloud at all.

So, let me show you what I did. I'll give you all the resources I had before me also, and I'll tell you what I picked out of that mountain of information. I will use a lot of words in the Resources section, because it helps me to know every detail, and maybe it will be like that for you too, but it's sooooo easy and quick to do this. I'll start with what I actually did, so you can see how easy it is, but here are links to both sections, and I do recommend reading it all before you begin, unless, unlike me, you are blessed with a lot of skill.


[ What I Did ] [ Resources ]    

How I Installed KDE on my Acer C7 Using Crouton

I'm not a developer, obviously, just a person. So a lot of the resources were above my head. But I read it all first, before I did a thing, and I recommend it, because if anything goes wrong, you won't panic. On my first try, things did go wrong, but it was actually fun and funny, because I knew what I was going to do to fix it, and it did fix it, as I'll show you. If I hadn't prepared in advance, it wouldn't have been fun at all.

It's a three step process to install crouton:

That is all there is to it.

1. Make a recovery image on a USB disk: I did a recovery image first, in case anything went wrong. It did go wrong on my first try, so I was glad I had it. This is while you are in your pristine, untouched Chromebook. Bring up your Chrome browser and type in the navigation bar:

chrome://imageburner
I used a Sandisk Cruzer 32GB USB stick, because I had it in the house already. Sandisk has goofy stuff for Windows people on it, so my first attempt didn't work. I got a warning and did it again, and then it worked. After I typed in the above chrome://imageburner, I got a prompt telling me to plug in a 4 GB or larger USB stick. Once I did that, it did the rest without me doing a thing. It tells you when to remove the USB stick. That's it.

2. Get into Developer Mode: Here's exactly what I did to enter Developer Mode:

a. Press and hold both the Esc and the Refresh (F3) keys and then tap the Power button.

b. When I saw an exclamation point and a warning that OS verification was turned off and suggesting I press SPACE to reenable it, I didn't press SPACE. Instead, I pressed Ctrl+D. It then asked if I wanted to enter Developer Mode. I pressed Enter then to do that.

c. I let it do its thing. It's wiping your laptop, so just wait while it reboots, and at one point you see the same exclamation point and the OS verification warning. Just ignore that. It will eventually reboot into Chrome OS. But you are still in Developer Mode.

Notes: I used a combination of the instructions from the crouton page itself for that and LifeHacker's page. In fact I downloaded from this link on LifeHacker. There is a screenshot there showing the exclamation point warning. But do check with the crouton page to make sure you are getting the latest version if you use the link years from now. I'm not a developer, so I needed more words, so that's why I switched to LifeHacker and combined the two. A Groklaw member had posted the url when I commented that I had gotten an Acer Chromebook and wanted to try to put Linux on it. Well, *more* Linux. Here are the Acer C7 instructions on how to enter Developer Mode from Chromium.org's page on Acer C7s.

3. Download and install crouton: I used the Lifehacker link, as I mentioned. It saves crouton to the Downloads folder automatically, but if not, make sure that is where it ends up. Both environments share the Downloads folder, so that's pleasant.

Next, I pressed Ctrl+Alt+T. This brings up your terminal on a Chromebook. Then I typed:

shell
Then, to actually download and install crouton:
sudo sh -e ~/Downloads/crouton -t kde
They suggest encryption, which you can read about here.

While it's installing, you'll see the text showing you what is going on and it takes a while. But it does it all by itself. You don't do a thing. When it's done, it will ask you for a username and password. I was told you could use the same ones from your Chromebook setup, but you can choose different ones, which is what I did the second time I did the install. Then when it's all done, run this command to start in the new desktop environment:

sudo startkde
The first time, I installed XFCE, because that's what most people install on Chromebooks, because of the simplicity factor, but for me, it wasn't working right afterward. I don't know why. The touchpad was hard to work with, so I had to plug in a mouse and I still had weird things happen. The instructions somewhere said to turn off the screensaver, as it was a known problem with the graphics. So I did that, but it was hard to get even the mouse to work normally. But after I erased everything and started over, I downloaded KDE and it was fine. It could just be my familiarity with KDE. I honestly have no idea why XFCE didn't work, but it's almost certain to be me and not it.1

That's it. You are done.

4. Going back and forth: Ctrl+Alt+Back and Ctrl+Alt+Forward to go back and forth. You hit Ctrl+Alt+Refresh after Ctrl+Alt+Forward on an Intel Chromebook, which is what an Acer C7 is. If you log out of Linux, and you want it back, just run

sudo startkde
or sudo startxfce4 or startunity or whatever you have installed. If you want to make boot up faster, just do the same Ctrl+D when you see the Developer Mode message.

How I got rid of first failed effort: I mentioned I put on XFCE first and it didn't work, so here's what I did to get rid of it and start over:

1. Reboot. When you see the exclamation point and the warning about your verification being off, do press SPACE. This time, it will get rid of crouton and restore you to the original state of Chrome OS. If, like me, you instead get a warning that Chrome OS is missing or damaged, it's time for you recovery image. I was so glad I was advised to do that first.

2. Recovery: Recall how you hit ESC and Refresh while poking the Power button? That's how you enter Recovery mode. So do it again. Or just reboot and when it asks you to plug in your USB recovery disk, do it. Then just wait until it tells you to remove it. That's all there is to it.


Resources

1. Chromebook Central is a Google-sponsored community forum. Just click on "Discuss Chrome OS". You don't need to log in to read, just to post. This is where you find questions and answers from folks, meaning they might be right or they might not, but this is an example of the fun and intriguing things you can find there, this response to a question about whether you can run Crouton in a tab:

Dennis L: There's an experimental branch of crouton called 'crouton-vnc' that runs a vnc server in the crouton chroot, this allows you to get a chrome store 'vnc viewer' and access the crouton vnc server via a tab in chrome - very cool. ;-)
I agree. I'm actually putting this here, so I can find it later, when I'm ready to try it.

If you've just bought a Chromebook and are just getting started, they suggest starting here, for answers to usual question by first time users, like where do I find things in Chrome OS. No Java or Silverlight on a Chromebook, by the way. They are not supported: "Chrome devices have Flash support built-in, but they do not support Java or Silverlight. If you need Java, Silverlight, or other plug-in support, there are virtualization and remoting options you can use for Chrome devices. See the chapter on Remote Access and Virtualization in the Chrome Devices for Education Technical Planning Guide (PDF)." There are videos for all of the main things you would want to know here.

2. The Chrome website. The Chromium Project page is for developers, mainly. That's where all the development is done for both Chrome and Chrome OS. So they're talking about things that are not what I am doing or wanting to do, but still, it's interesting and helpful to get an overview. You'll find documentation, bug tracking, source code and build instructions, and a few helpful hints as well. So I read and read until I couldn't stand to read any more, and by then I had collected what I thought I needed. The "Chromium" names refer to the purely open-source version of Chrome and Chrome OS and the Chromium OS section is where you'll find the information related to Chromebooks. Here's a helpful page, Poking Around Your Chrome OS Device. It tells you ways to get the command prompt in Chrome OS, for example, how to make changes to the filesystem, how to get into Developer Mode, that sort of thing.

In particular, there are model-specific instructions on switching into Developer Mode, which gives you a root shell and a few pointers on what to do next. Here's the page of instructions for the Acer C7 Chromebook. If you really know your way around, that will be enough for you. But for me, it wasn't.

3. Jay's Lee's website, where you can find how to set up a dual boot arrangement. He has a single script that "can install Ubuntu, Kubuntu, Lubuntu, Xubuntu, Edubuntu or many other desktop variants." It works, according to the page, on Samsungs too. That's what I had decided not to do, but if you have room on your Chromebook, and there are Acer C7s that have a larger hard drive than mine, this may be your page.

4. Crouton, which is a script by David Schneider that, once you are in Developer Mode on Chrome OS, you just create a virtual Linux installation in a persistent directory and switch to it without rebooting at all. That way you can run both Chrome OS and a Linux desktop at the same time.

Here is Schneider's explanation of crouton. First, what's a chroot?:

What's a chroot?

Like virtualization, chroots provide the guest OS with their own, segregated file system to run in, allowing applications to run in a different binary environment from the host OS. Unlike virtualization, you are not booting a second OS; instead, the guest OS is running using the Chromium OS system. The benefit to this is that there is zero speed penalty since everything is run natively, and you aren't wasting RAM to boot two OSes at the same time. The downside is that you must be running the correct chroot for your hardware, the software must be compatible with Chromium OS's kernel, and machine resources are inextricably tied between the host Chromium OS and the guest OS. What this means is that while the chroot cannot directly access files outside of its view, it can access all of your hardware devices, including the entire contents of memory. A root exploit in your guest OS will essentially have unfettered access to the rest of Chromium OS.

...but hey, you can run TuxRacer!

That's why you want a good passphrase:
Prerequisites

You need a device running Chromium OS that has been switched to developer mode. Note that developer mode, in its default configuration, is completely insecure, so don't expect a password in your chroot to keep anyone from your data. crouton does support encrypting chroots, but the encryption is only as strong as the quality of your passphrase. Consider this your warning....

With encryption!

Add the -e parameter when you run crouton to create an encrypted chroot.

You can get some extra protection on your chroot by storing the decryption key separately from the place the chroot is stored. Use the -k parameter to specify a file or directory to store the keys in (such as a USB drive or SD card) when you create the chroot. Beware that if you lose this file, your chroot will not be decryptable. That's kind of the point, of course.

But when I got to this section, and I was lost:
Usage

crouton is a powerful tool, and there are a lot of features, but basic usage is as simple as possible by design.

There are three ways to acquire and run crouton. Two of which have cyclical dependencies.

If you're just here to use crouton, you can grab the latest release from goo.gl/fd3zc. Download it, pop open a shell (Ctrl+Alt+T, type shell and hit enter), and run sh -e ~/Downloads/crouton to see the help text. See the "examples" section for some usage examples.

The other two involve cloning this repo and either running installer/main.sh directly, or using make to build your very own crouton. Of course, you won't have git on your Chromium OS device with which to do this, hence the cyclical dependency. Downloading a git snapshot from GitHub would bypass that issue.

crouton uses the concept of "targets" to decide what to install. While you will have apt-get in your chroot, some targets may need minor hacks to avoid issues when running in the chrooted environment. As such, if you expect to want something that is fulfilled by a target, install that target when you make the chroot and you'll have an easier time.

Once you've set up your chroot, you can easily enter it using the newly-installed enter-chroot command. Ta-da! That was easy.

That was when I switched to the LifeHacker page. Most people use XFCE with crouton, but it doesn't have to be XFCE. There are other targets, as he calls them. Here are your choices. I chose KDE and it worked fine. Simple is good on a cheap Chromebook, so XFCE might work better, but I know KDE and I wanted as much familiarity as possible, and it's a chroot, so you can remove it and put another one or have two. But before you do anything, you need to download crouton to your Chromebook's Downloads folder.

Once you have installed it and are booting, remember not to press SPACE when the warning about verification being off shows up. If you re-enable verification, it will wipe your KDE or whatever you installed and you will be back to Go. Just wait, and then you'll see a Chrome welcome page. Don't worry. Your KDE or XFCE is in there. Just pick your wireless network from the dropdown list, enter your user name and password (from your Google Gmail info) and then hit Continue. Sign in. Note that you can sign in with Ethernet also, but if you are on a static address, one where you manually have to plug in the address, you can't really do it. But there is a workaround. Without closing what you are doing, go into guest mode when you reach the point in the sign-in process where they ask for the network you want, fill in the manual information in your Settings, and then close out that guest page, and you'll be back in the sign-in section. It will then see your Ethernet properly and you can soldier on.

LifeHacker has instructions too. And here are the instructions for crouton at Google Groups.

5. How to get into Developer Mode. Note that it's device specific. An Acer 710, which is what I have, is a C7, not an Acer 700, which is another model that has a hardware switch. Everything is virtualized now. So look down the list for whatever brand and device you have. If you follow the instructions, you'll know when you have made it into Developer Mode when you see an exclamation point and "OS verification is OFF. Press SPACE to enable". But don't press SPACE. Just wait or press Ctl+D at the same time, you will hear beeps and see a screen saying it's entering Developer Mode. It takes a while. Don't turn it off. OS verification is how Chrome OS makes sure you are only running software that shipped with your Chromebook, meaning it's a read-only BIOS. As my instruction page explained: "The read-only BIOS verifies one of two read-write BIOSes (there are two so we can provide updates if we have to with less risk of failure) and continues execution there. The read-write BIOS then verifies one of two (same reason) kernels and executes that, and the kernel verifies its root filesystem as each block is read off the SSD."

This is why you need a recovery image handy, because if you mess around, and then you find you can't boot, it's likely to be that it's refusing to boot without the verification. That's great for everything normally, but when you want to install something else, like a GNU/Linux system or crouton, verification has to be off and you have to stay in Developer Mode to be able to boot your new GNU/Linux environment.

6. Switching back and forth between Chrome OS and pure Linux: After you have installed crouton, you can then switch back and forth. To get to Chrome OS from Linux, it's Ctrl+Alt+Back (the Back key is the left-facing arrow key, F1 on the Acer C7). To get back to Linux, it's Ctrl+Alt+Forward (or F2). On an Arm device, you will need to add the Switch key, as in Ctrl+Alt+Shift+Back and Ctrl+Alt+Shift+Forward.

7. To leave Linux, just log out as you normally would. To get back in:

sudo start(target)
For me, that's startkde. If you put XFCE, it'd be sudo startxfce4

8. How to make a recovery image. This should be number one, before you do anything else, actually. It saved me when the first attempt was an unmitigated disaster. All you do is this: on your Chromebook, type this into the navigation bar: chrome://imageburner. Have a USB stick handy, at least 4GB in size. You will get a prompt to plug it in. Once you do that, it does the rest. Then, if everything goes wrong, you can get back to the original factory state.

If you ever need it, here are the instructions:

In developer mode, your Chrome OS Notebook gives you an option to use a recovery image every time the machine boots. To install your recovery image, do the following:
1. Turn your Chrome OS Notebook off.
2. Turn it back on.
3. During the boot warning (telling you your OS verification is turned off), press space to enter recovery mode.
4. Wait until prompted to put your USB disk in.
5. Put the USB disk in.
6. Wait while the image is copied to the SSD.
It is just that simple. But if, when making your recovery image, you get any warnings at all, do it again, to be sure. There can't be anything else on that USB stick you care about keeping, because it will wipe and reformat it.

9. List of keyboard shortcuts on a Chromebook: The first is Ctrl-Alt-/, aka Ctrl-Alt-?. That pops up an overlay to show all the keyboard shortcuts, which occasionally change slightly from release to release. At one point, in fact the point when I decided to erase and start over, my screen was sideways for no known reason. But had I looked at that list first, I'd have realized that you can move the screen sideways and back with shortcuts.

10. You can install using apt-get whatever you don't see that you want. I read that, but I haven't done it yet, personally.

11. Removing Linux: If you want to remove Linux ever, just press spacebar when it prompts you to reenable the OS verification, or unmount
/usr/local/chroots/precise

11. Miscellaneous things I read: If in XFCE, disable the screensaver, as it has issues in Chrome OS. To do that, open the icon 12GB Filesystem by right clicking it, then choose Applications, then Settings, then Screensaver and in the box that comes up, choose Mode and from its dropdown list, Disable Screen Saver. I had to use a plug in mouse to get that part down. The touchpad had me dancing all over the place in XFCE. You are still in Developer Mode, remember, so it will take an extra 30 seconds to boot up, but when you get to the Developer Mode message, you can speed it up by hitting Ctrl+D. From the developer guide: "Why Ubuntu? Is there another way? The answer is yes, you can for sure target something else, like kde, in crouton, but for dual booting, the developer guide says:

Ubuntu Linux (version 12.04 - Precise)
Most developers working on Chromium OS are using Precise (the LTS version of Ubuntu). It is possible that things will work if you're running a different Linux distribution, but you will probably find life easier if you're on this one. Please note that Ubuntu 9.10 (Karmic) is known not to work.
And finally, I called Google to inquire about using an Ethernet adapter. The one that works with Chromebooks, including the Pixel, is the Linksys by Cisco USB Ethernet Adapter, 300M.

OK. So that's a list of everything I found. Enjoy your own adventure. No doubt some of you will be more expert than I and have done this already. If you know better methods or you see needed corrections, just let me know, please.

_________
1 Notes: If you want XFCE, which is what most people find works well:

sudo sh -e ~/Downloads/crouton -t xfce
If you have a touchscreen, like you are fortunate enough to have a Chromebook Pixel, LifeHacker says type this instead, so you get touch screen support:
sudo sh -e ~/Downloads/crouton -t touch,xfce

162 comments



http://groklawstatic.ibiblio.org/article.php%3fstory=20130707160346164