So many thoughts. So little time.

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.

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

  1. MattKimura says:

    Does this work on any distro, or is it only for Chrubuntu?

    How fast is the switch between the two? Is it a Crouton replacement? (Just not as fast as crouton, but the same usefulness)

    • Terry Britton says:

      It is for switching to Chrubuntu. The reboot from one into the other takes mere seconds no matter which direction you are going. I have another article here showing how you can have both Chrubuntu and Crouton on your machine at the same time, if you’d like to do a speed comparison. Chrubuntu runs Linux independent from the ChromeOS in its own partition, while Crouton is more like a desktop running on top of the ChromeOS, which is still running while you are in Crouton, and shares the same partition with ChromeOS.

  2. curiousepic says:

    So, noob here. I got to step 8, but the trouble is that it’s just rebooting into ChrUbuntu. At first I thought it was because I had previously set ChrUbuntu to default with
    sudo cgpt add -i 6 -P 5 -S 1 /dev/sda
    But after having a more linux savvy friend take a look, it seems that my cgpt package is just not actually doing anything, and we can’t figure out why. Any ideas?

    • Terry Britton says:

      sudo cgpt add -i 6 -P 5 -S 0 /dev/sda isn’t getting you back to ChromeOS?
      Perhaps you need to install cgpt – sudo apt-get install cgpt is the command, I believe.
      Let me know how it goes and if you find out anything!

  3. curiousepic says:

    Hmm, nope:
    E: unable to locate package cgpt

    most cgpt commands result in
    ERROR: cannot open ‘user/bin/cgpt’ (No such file or directory)
    even though
    file /usr/bin/cgpt
    gives some info as if it’s there.

    A friend helped out by doing an apt-get update, but that didn’t change anything either.

    • Terry Britton says:

      Just to make sure, are you in the chronos shell or the crosh shell? The chronos shell is what you want (CTRL-ALT-F2) not the crosh shell (CTRL-Alt-T).

      Terry

  4. curiousepic says:

    I have actually not seen any reference to crosh or chronos after booting into Chrubuntu. It may help to note that I followed the install instructions here: http://chromeos-cr48.blogspot.com/2012/04/chrubuntu-1204-now-with-double-bits.html

    The ctrl-alt-f2 terminal seems identical to the ctrl-alt-T terminal and seems to give me the same results.

    • Terry Britton says:

      I thought you were trying to get back to Chrubuntu from ChromeOS. In Chrome, the two terminals have different capabilities and command sets. I’m pretty sure cgpt is only in the chronos shell. But as you see from my article, it certainly is where you access the files you want to change to add a shortcut.

      So, if cgpt isn’t working, how are you getting to Chrubuntu at all? (I think we are having a communication problem…)

      If you are trying to get back to ChromeOS, then from Chrubuntu’s terminal use:
      sudo apt-get install cgpt

      That should get it in there. Then make sure -S is a zero for ChromeOS.

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

      That should have you working. If still not, add synaptic and check to see if cgpt is installed from there.

      sudo apt-get install synaptic

      Terry

  5. curiousepic says:

    We figured out my issue – I was still on Ubuntu 12.04, and cgpt is no longer available in the Precise repositories. After updating to 13.04 (13.10 apparently has display issues on the CR-48), I was able to install cgpt and carry on with the instructions. Thanks for the assistance!

    • Terry Britton says:

      That’s both good news and bad news! I wonder why they would remove cgpt from the 12.04 repositories??? Well, 12.04 has not worked well for a while now. I am having the best luck with 13.04 myself with all desktop installs I’ve tried.
      Thanks for the update!

Add Comment Register



Share Your Point of View

* Copy This Password *

* Type Or Paste Password Here *