Difference between revisions of "Installing/New To Linux"

From GalliumOS Wiki
Jump to: navigation, search
(Get into Developer Mode)
(Tag: visualeditor)
(Get into Developer Mode)
(Tag: visualeditor)
Line 82: Line 82:
  
 
=== Get into Developer Mode ===
 
=== Get into Developer Mode ===
The process to put the device in developer mode is very well described in the [[GalliumOS Installing/Preparing tutorial]]. Just in case you are looking for the Refresh key, it is the 4th one from the top left; it shows a clockwise arrow.  
+
The process to put the device in developer mode is very well described in the [https://wiki.galliumos.org/Installing/Preparing GalliumOS Installing/Preparing] Tutorial. Just in case you are looking for the Refresh key, it is the 4th one from the top left; it shows a clockwise arrow.  
  
 
It takes about 15 minutes to put your Chromebook into Developer Mode. After enabling Developer Mode, you’ll be able to access a Linux terminal from within Chrome OS and do whatever you like. Once you are in Developer Mode, your Chromebook is “rooted”; it means that you have access to the “root” of the computer system. It also means you have to tread carefully… Note that some older Chromebooks have a physical switch that you'll have to flip in order to turn on Developer Mode. If you aren't sure, look up instructions for your specific device on enabling Developer Mode.
 
It takes about 15 minutes to put your Chromebook into Developer Mode. After enabling Developer Mode, you’ll be able to access a Linux terminal from within Chrome OS and do whatever you like. Once you are in Developer Mode, your Chromebook is “rooted”; it means that you have access to the “root” of the computer system. It also means you have to tread carefully… Note that some older Chromebooks have a physical switch that you'll have to flip in order to turn on Developer Mode. If you aren't sure, look up instructions for your specific device on enabling Developer Mode.

Revision as of 23:53, 15 February 2016

Tutorial: How to install GalliumOS on a Chromebook

Objective of this Tutorial

This Tutorial is aimed at people with limited or zero computer programming experience who wish to install Linux GalliumOS on their Chromebook. It is a step-by-step recipe that requires no knowledge in computer programming. Its scope is limited in that it doesn't intend to show you how to install any Linux distribution but only GalliumOS. Furthermore, the user should not attempt to install GalliumOS on a Chromebook that IS NOT on the GalliumOS Hardware Compatibility List. (See below in "Things to check first"). 

GalliumOS is one of the numerous Linux "distributions". A Linux distribution is a set of software packages with an installation program that allows the user not only to access his or her computer with Linux Operating System (OS) but also to complete most of the tasks that an average user is expected to do with computers (word, presentation and spreadsheet processing, audio and video playing and editing, Internet browsing, e-mailing, etc.). In that respect, it differs from "commercial" operating systems that don't provide much besides access to the computer system. Linux is the most advanced operating system in the world: as of November 2015, 494 or 98.8% of the 500 world's fastest supercomputers use the Linux kernel. (See https://en.wikipedia.org/wiki/TOP500)

GalliumOS is different from other Linux distributions in that it is designed for Chromebooks. But then, why would you want Linux on your Chromebook?

Why Install Linux on a Chromebook

Chromebooks are lean and mean computing machines that are designed to work in conjunction with the Internet. A Chromebook "keeps" hardly any software on its internal drive; what the user needs to complete a task is downloaded from Internet - often for a price - and is not kept inside the computer when the task is done. This is why most Chromebooks are equipped with a very small solid-state drive (SSD), typically 16 or 32 gigabits (Gb). Often, this SSD is not upgradable and most of the time, the random-acess memory (RAM) is not upgradable either: Chromebooks' SSD and RAM are frequently hard-wired to the motherboard. With Linux installed on a Chromebook, applications stay inside the computer and can be accessed any time, with or without Internet. 

The often talked about constraint about installing Linux on a Chromebook is the SSD size. This SHOULD NOT be a deterrent when installing Linux. 16GB is plenty to install GalliumOS; all your music, photos, videos and other paraphernalia that don’t fit on the static drive can go to an external drive. On all Chromebooks, you have the luxury of at least three ports: two USB and one SD. Without spending much, you could have at any given time 768 Gb of memory on your Chromebook with three 256 Gb external drives! Even a Thunderbird mail profile, for instance, can sit on an external drive without any significant speed penalty. All your Linux OS and programs can sit nicely on the 16 Gb internal drive with room to spare. 

Furthermore, quite a few Chromebooks now can be upgraded with a larger capacity static drive. For a little investment, you could end up with a powerful laptop for a fraction of the price that you would normally pay for something other than a Chromebook.

Things to check first

You probably don’t want to venture into uncharted territory, so you need to do a few checks before you start converting your Chromebook computer to a GalliumOS Linux machine. There are many benefits with using Linux, notably the ability to run thousands of excellent applications without ever accessing the Net, but you have to be reasonably certain that your Chromebook will allow you to do that. The first place to find out whether your Chromebook is supported for a GalliumOS install is: https://wiki.galliumos.org/Hardware_Compatibility

Here are a few explanations about this table:

Model: The basic idea is that it is not advisable to attempt a GalliumOS install unless your Chromebook Model is listed in this table.

Hardware ID: The Hardware ID is something that you will read in your Chromebook when you create a Recovery Media for your specific model (see below). This is valuable information; write it down!

Processor Name: The Processor name (Sandy/Ivy Bridge, Bay Trail, Haswell, Broadwell, etc.) is something else you will need when you select the GalliumOS version you have to download. See: https://galliumos.org/download.html

Firmware: That is one of the crucial changes that may, or may not, be required to make your Chromebook a GalliumOS Linux machine. The firmware modification requirement is indicated in the column titled “…with custom firmware?”. Fortunately, this firmware change is a fairly straightforward operation thanks to the work of John Lewis. Basically, it boils down to opening a terminal page in Chrome on your Chromebook (we will get to that) and writing, or copying and pasting, a short script.

(NOTE: Although there is still the possibility to dual-boot (GalliumOS and ChromeOS), this is not discussed here as it is assumed that the user has a limited, small static drive on which space doesn’t really allow two Operating Systems. In this tutorial, we will dedicate the entire drive space to Linux.)

I strongly suggest that you note all the data regarding the Model name, Hardware ID, Processor Name and Firmware modification requirement specific to your Chromebook. You will need it later.

Now that you have determined that you can give yourself the go-ahead for a GalliumOS installation on your Chromebook, let’s do first a little bit of house-cleaning and preparation.

Backup

You may have a few files on your Chromebook drive that you wish to keep. You should transfer all those files onto an USB flash drive or an SD drive. Remember that everything on your drive is going to be wiped out when you install GalliumOS Linux.

Chromebook Recovery Media

You need to create a Chromebook Recovery Media in case, further down the road, you wish to return your Chromebook to its original state. To do that, you need to download the Chromebook Recovery Utility from the Google Web Store (it is in your ChromeOS Menu). This software allows you to create a recovery media for your Chromebook. You need a 4GB USB flash drive or SD card that does not contain data that you want to keep because this drive too is going to be totally erased to receive the recovery data. 

Once the Recovery icon is in your Chromebook Launcher, click on it to start the Recovery Media creation process. Go past the first page by clicking on "Get started" to access the next page titled “Identify your Chromebook”. This page contains important information regarding your specific Chromebook model number. 

There is a line that states: “For this Chromebook, enter XYZ XXX-XXX-XXX-XXX”.

Write down the MODEL NUMBER for YOUR Chromebook. It could be something like:

GNAWTY C2C-E3N-A2M

YUNA D21-A3B-L4A-A35

YUNA D25-B3B-B4A-A4M, etc.

Everything is important in this number, so keep it in a safe place; add it to the other info you already wrote down (Model, Hardware ID, Processor, firmware required, etc.). The first word could be something like: BANJO, CANDY, FALCO, GNAWTY, MONROE, PARROT, YUNA, etc. You notice that this first word is the Hardware ID that you have seen on the “GalliumOS Support by Model” table, that we have already talked about and is displayed at:

https://wiki.galliumos.org/Hardware_Compatibility

You need the whole number, not just the first word, to create a recovery utility; you also need the name if you ever need a “shellball” to bring your Chromebook back to its original state. We’ll get back to that, but for now, make sure you have this whole number kept somewhere.

In the "Identify your Chromebook" page of the Recovery Utility, the number we just talked about extensively is already written in blue in the Recovery window; just click on it and it will print automagically in the window below. But if you were to create a recovery utility for ANOTHER Chromebook, this is the window where you would enter the specific model number as outlined above. Since Google is nice to you, you could also select the Chromebook from a list that you call up by clicking on “Select a model from a list”. It is safer however to use the model number.

Click on Continue to proceed with the actual Media creation. Just follow the instructions.

Create your GalliumOS USB or SD installation drive

The Operating System you want to install, GalliumOS, must be available to you on a “bootable” USB or SD drive that you need to create. You therefore proceed to https://galliumos.org/download where you download the GalliumOS version appropriate to your Chromebook architecture (Haswell, Broadwell, Bay Trail, etc.). These are the Processor names that are displayed in the Hardware Compatibility List; you should have the name specific to your Chromebook available, if you wrote it down as was suggested earlier.

This GalliumOS installation file you download is an .iso file. The beauty of a file of this type is that you have on a single file all the bits and pieces required to install a Linux operating system with everything you need on a computer. Once this file has been downloaded, however, it needs to be decompressed and put on an USB flash or SD drive. To do that, it is recommended you use an application called Unetbootin that is available for Linux, Windows and Mac.  It can be downloaded at:

http://unetbootin.github.io/

Once Unetbootin is installed on your computer, you plug in an USB or SD drive and follow the indications in Unetbootin. It is recommended you use a 4GB USB drive. It has been found that Chromebooks may not boot with large capacity USB drives. Also, an USB 3 drive may also not be willing to boot. Do it cheap and simple!

Now, you should have two drives (USB or SB) to keep: one with your Chromebook Recovery Media; one with GalliumOS. Make sure you label them properly and don’t misplace or erase them.

Prepare the Chromebook

Select the procedure according to your Chromebook architecture

For this step, please see https://wiki.galliumos.org/Installing/Preparing This Wiki page explains how a Chromebook has to be prepared for installation according to the architecture of its processor (CPU). You notice that the architecture names (Sandy Bridge, Haswell, Broadwell, etc.) for which a specific installation is described are the same as the Processor names we already saw at https://wiki.galliumos.org/Hardware_Compatibility

If you followed our indications so far, your Chromebook architecture should have be noted somewhere.

For every architecture, the GalliumOS Installing/Preparing tutorial refers to SeaBIOS firmware. BIOS stands for Basic Input/Output System. It is a tiny – but very important – program (firmware) that tells your computer, among other things, where to look to find an operating system that will make it go. A special type of BIOS called SeaBIOS is required to install Linux on a Chromebook. Chromebooks with Haswell CPU architecture come with SeaBIOS already installed and you normally shouldn't have to worry about it. However, some bugs are reported in the SeaBIOS preinstalled on Haswell Chromebooks. (See https://wiki.galliumos.org/Firmware) It may therefore be advisable to install another version of the SeaBIOS on these machines. If you need to “flash” (replace) the BIOS firmware on your machine, you follow the procedure indicated in the Installing/Preparing tutorial. This is a delicate operation that you don't want to botch up as you may "brick" your Chromebook. ("Bricking" means that you make your computer worth no more than a brick of the same weight!) Luckily, John Lewis’ scripts to flash Chromebook BIOS makes it very easy. Before we get there, however, you need to put your Chromebook in developer mode.

Get into Developer Mode

The process to put the device in developer mode is very well described in the GalliumOS Installing/Preparing Tutorial. Just in case you are looking for the Refresh key, it is the 4th one from the top left; it shows a clockwise arrow.

It takes about 15 minutes to put your Chromebook into Developer Mode. After enabling Developer Mode, you’ll be able to access a Linux terminal from within Chrome OS and do whatever you like. Once you are in Developer Mode, your Chromebook is “rooted”; it means that you have access to the “root” of the computer system. It also means you have to tread carefully… Note that some older Chromebooks have a physical switch that you'll have to flip in order to turn on Developer Mode. If you aren't sure, look up instructions for your specific device on enabling Developer Mode.

Once you are in Developer Mode, your Chromebook still works normally. The only difference is a white window that displays for 30 seconds when you start and that you can bypass by entering CTRL+D. (“D” for Developer). After you are in Developer mode, it is suggested you configure your Internet access normally and enter your Gmail name and password, just to reassure you that your Chromebook is still alive and well. Also, for the continuation of the operation, you will need Internet access.

Remove the Write Protection, if required

The BIOS is write-protected through physical and software means. If you have a Sandy Bridge / Ivy Bridge or a Bay Trail Chromebook, you will have to remove the physical write protection. To do that, you have to open the computer and, generally, remove a screw. You will find the information on how to do that through a quick search in Google. 

Access the “shell” and flash the firmware

Let’s assume now that you have restarted your Chromebook in Developer mode, entered your password and accessed the Chrome browser in your Chromebook. The next step is to open a Terminal window. This will take you to the heart of your computer. The Terminal is the screen that allows you to talk to the innards of your machine through commands and scripts. (Just like you see in the movies when the hacker is about to steal government secrets!) You can do all that in a Chromebook. (Not steal government secrets, but access a terminal window!) You just have to press CTRL+ALT+T. (Kind of an anticlimax, isn’t it?)

In this black terminal screen, at the prompt, you type: “shell” (without quotation marks) and hit Enter, just as indicated in the GalliumOS Installing/Preparing tutorial. From now on, follow this tutorial for your appropriate CPU architecture from where it is stated:

“and hit enter. Now you should be in bash. You’ll have a prompt that looks something like this.”

(NOTE: If your Chromebook has a Haswell architecture but you prefer to flash the BIOS, follow the procedure outlined for the Broadwell architecture.)

Follow John Lewis’ script carefully. I recommend that you cut and paste it into the terminal. Remember that the Terminal is just another tab in the Chrome browser; you can access any other Internet site in other tabs and flip through tabs to Cut and Paste whatever you want from one page to another page.

After John Lewis’ script has been run, you continue with the GalliumOS Installing/Preparing Tutorial with a little caveat. Where it states: “Reboot your computer, plug in your GalliumOS USB and start installing!”, it should be the other way round. You must first plug in your GalliumOS USB drive, then reboot your computer.

Install GalliumOS

When the Chromebook starts, a blue Unetbootin page comes up. It shows three options and states that you edit options with the Tab key. Actually, you don’t want to edit options at this stage; you only want to select one of them. You change selections with the Arrow keys and press Enter to select. I suggest you select the second one, “Gallium Live Image and Installer”.

In a few seconds, you get a beautiful display of a glass skyscraper shot from below. You also have a fully functional Operating System at your disposal but your SSD is untouched because this is a “Live USB” (or "Live SD"): you totally bypass your SDD drive to talk to your computer. You can configure your WiFi and browse the Net. You can open AbiWord text processor and write your biography. But this is not what you want right now: you want to install GalliumOS. Fortunately, at the top right of the screen, there is an icon that states – Would you believe? – Install GalliumOS. Just double-click on it and follow the instructions.

When it comes to the page titled “Preparing to install GalliumOS, a Warning pop-up windows may come up to inform you of an error. You can safely ignore. You then come up to the Installation type window. The choice here is easy: select the first option, “Erase disk and install GalliumOS”. The installation may take 15-20 minutes. Relax and let GalliumOS do its thing. 

GalliumOS is installed!

Now you have removed your GalliumOS installation USB drive and restarted your computer. The first thing you see is “Press ESC for boot menu.” You press ESC and the screen shows “Select boot device:” and a choice of devices. If there is no USB flash or SD drive plugged into your computer, you have only choice # 1, that is the computer SSD. If more than one device is displayed, select the one you know is your SSD. The type and the size should help you determine which the right one is. And if you make a mistake, no big deal: you just won’t start GalliumOS.

Once GalliumOS is opened, you will want to test the applications that come with it. You can also add other applications: you have tens of thousands applications to choose from! If you want to add applications, open Synaptic Package Manager that you will find in the Menu under System.

Keyboard [TO BE EDITED AFTER MORE TESTING]

GalliumOS is a fantastic Linux distribution tailored to Chromebooks. So, of course, the first thing to check is the keyboard because, as you know, the Chromebook keyboard is not standard. If you click on the icon in the bottom left corner, you get to your GalliumOS menu. Now go to Settings [TO BE EDITED]

Regarding the keyboard, you may be from the "old school" like me and prefer to use the Chromebook Search key as a "Normal" Capital Lock key.

To get your Capital Lock back, you have to create a file and modify another one. Besides being useful, this procedure will show you how easy it is to change things in Linux.

  • Open Thunar File Manager. Under View, select "Show Hidden Files". Files that you were not aware of now show up in your Home folder.
  • One of the file is ".bashrc". Notice the dot (.) before the file name. This dot is what causes this file to be hidden. Simple, isn't it?
  • Right click on .bashrc and select "Open with Mousepad".
  • When .bashrc is open in Mousepad, cut and paste the following lines at the bottom of the file and Save.
if [-s ~/.Xmodmap]; then
xmodmap ~/.Xmodmap 
fi
  • Still in Mousepad, go to File and click on New.
  • In this new document, just enter:
keycode 133 = Caps_Lock
  • Save this file in your Home folder as .Xmodmap (Don't forget the "dot" before the file name!).
  • Close Mousepad and Log out of your session and back in. Your Capital Lock key should now work "normally".

Once you have confirmed that your Capital Lock is working, go to Setting, Keyboard, Setup and, in Keyboard Model, select: "Chromebook | No overlay | F keys mapped to media keys". You now have a standard Chromebook keyboard with the exception of the Search key that is now a normal Caps Lock. You can use the special function keys normally (Full Screen, Brightness, Volume, etc.).

You can also use the Keyboard Model window to select an external keyboard you wish to use if you plug one in. If you don't find the exact keyboard model in the list, you may use one close enough (same manufacturer, similar performance, etc.). You can try and see until you find a model that fits your needs. You can always use your mouse to change your selection if your external keyboard has a strange behavior.

Mouse and Touchpad

You may also prefer to use a mouse because the touchpad may feel awkward to use for you and interferes with your typing. Many people prefer having the touchpad deactivated when they type. There is a simple solution called: Touchpad Indicator. To install this application, go to:

http://tipsonubuntu.com/2014/05/26/install-touchpad-indicator-ubuntu-14-04/

Once Touchpad Indicator is installed, you may need to reboot the computer for the Touchpad-indicator to work. In the Menu, the application is under Accessories; click on it to start. It will put an icon in the right of the taskbar, in an area generally called the "tray"; however, it may not be visible, depending on the Desktop theme you have selected. If you see what looks like an empty spot in the tray, it may well be the Touchpad indicator icon. Click on it and select Preferences. First go to Theme and select the icon on the right; the Touchpad-indicator icon should now be visible in the tray. In Actions, select the option to deactivate the touchpad when a mouse is plugged in and make sure Activate the touchpad when leaving is selected. In General options, select Automatic start. With this configuration, the touchpad will be ON when you start the computer without a mouse and OFF when a mouse is plugged in.

Printers

Your printers may have been detected by Linux and configured. In the GalliumOS Menu, under System, you will find Printers. Select Add Printer and follow the indication. It may take 15-20 seconds, but the printers, whether they are USB or Network, should be detected. In some cases, the drivers are not readily available in the particular version of your Linux shell but are available on the manufacturer’s site. Just find them and follow the instructions.

If you have downloaded a printer driver, or any other software for that matter, as a .deb file, you install it using GDebi. In your Thunar file manager, go to the application .deb file that should normally be in the Download folder, right click on it and select Open with GDebi package manager. Follow the instructions.

File Transfer on Private Network

If you want to transfer files between computers on your own private network, through your own router, the easiest way is to install Nautilus file manager. In Nautilus, you just right click on the folder you want to share and select Share on local network.

Back to ChromeOS

You may wish to return your Chromebook to its original state; in other words, you want to run it under ChromeOS instead of GalliumOS. This is also a fairly simple operation as long as you follow the procedure.

If you flashed the original Chromebook BIOS to install GalliumOS, you have to flash again the BIOS to bring it back to original. Remember that even if you have a Haswell CPU, you may have chosen to install initially John Lewis' SeaBIOS.

Download the appropriate shellball

The first thing to do is to download a "shellball", that is a folder that contains a bunch of files specific to your particular Chromebook to bring it back to original. You find the shellballs at:

https://johnlewis.ie/Chromebook-ROMs/shellballs

When you get to that page, you see an Index listing names one of which should be familiar to you: it is your Hardware ID that was displayed in the Hardware Compatibility List that we referred to at the beginning of this tutorial. You may wish to go back to that list, just to be sure.

Open Thunar and go to your Home page. In there, create a folder named "shellball". Download into that folder all the files under the appropriate shellball name that you found in the shellballs list.

Get John Lewis' flashrom utility

Next, go to https://johnlewis.ie/Chromebook-ROMs/utils/

In the list, right click on "flashrom" and click on "Save Target As ...". Save this file in your Home folder.

In Thunar, go to your Home folder, right click on this downloaded "flashrom" file and Rename it "flashrom.sh"

Open a Terminal window. (XFCE Terminal is in your Panel and your Menu.) The Terminal normally opens in your Home folder. (The prompt should show [YOUR_COMPUTER_NAME]:~$)

You are now going to make "flashrom.sh" executable. To do so, at the prompt, type:

chmod +x flashrom.sh

While you are in the terminal, change to the shellball folder. To do so, at the prompt, type:

cd shellball

Enter the required commands

Still in the terminal, you now have to type the commands below.    

NOTE:     

  • When you type the commands, ensure that you have two dashes before « set » and « hwid » and not an M-dash (a single long dash). Text editors have a mind of their own and sometimes replace two consecutive dashes by a single M-dash.    
  • Replace the Hardware ID (hwid) number by the one specific to your Chromebook and that you should have kept (remember?).    
  • If a command does not work, i.e. you get a message like “Command cannot be found” it is quite likely that you missed a dot (.) or a slash (/) at the beginning of the command line.    

The commands are:

./gbb_utility --set --hwid="GNAWTY C2C-E3N-A2M" bios.bin

./gbb_utility --set --hwid=" GNAWTY C2C-E3N-A2M" bios.bin.new

./gbb_utility --set --flags=0x489 bios.bin

./gbb_utility --set --flags=0x489 bios.bin.new

Everytime, the system should confirm that the command was successful.

Still in the terminal, return to the home folder by typing "cd" and two dots at the prompt, like so:

cd ..

Then, run this command:

sudo ./flashrom.sh -w shellball/bios.bin

Restart your computer

Your Chromebook first displays a message with a red exclamation mark stating: OS verification is OFF. (PHOTO)

After some beeps, another message appears: "Chrome OS is missing or damaged. Please insert a recovery USB stick or SD card.(PHOTO)

Insert your USB or SD Chromebook Recovery Media into the appropriate port. Follow the instructions.

(Basically, just wait until the recovery is complete.)

When it's done, remove the Recovery Media and the Chromebook restarts.

After the restart, you get a beep, then the usual Chromebook opening page. (PHOTO)

Enter all the required data to log into your Chromebook.

Reset the "flags" and OS Verification

You don't really have to know what these flags are. Just keep in mind that they dictate the sequence of the boot process. You need to reset them for your Chromebook to boot like new.

Open a terminal with CTRL+ALT+T

At the command prompt, type “shell” and press Enter.

Type each of the following command, pressing Enter after each one:

sudo flashrom --wp-disable

sudo /usr/share/vboot/bin/set_gbb_flags.sh 0x000

sudo flashrom --wp-enable

Restart the computer.

You get the message stating "OS verification is OFF. Press SPACE to re-enable." Press the spacebar.

Your Chromebook is now - almost - back to where it was when new.

To make it complete, reinstall the physical write protect device if a change on the motherboard was required to disable the BIOS write-protection.