Archive:Chromebox: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
Line 92: Line 92:
#: <nowiki>sudo crossystem dev_boot_legacy=1</nowiki>
#: <nowiki>sudo crossystem dev_boot_legacy=1</nowiki>
<br />
<br />
<br />
 
'''Note:''' Jump to [[ASUS_Chromebox#Set_Firmware_Boot_Flags|Section 3.1 Set Firmware Boot Flags]] if you wish to have auto-boot into legacy BIOS (OpenELEC/Ubuntu).  If it is not carried out at this stage I found I had to re-install Chrome OS to do this, and then start modifications from scratch.  There is a warning about configuration of Boot Flags later in the wiki, I just wanted to add one slightly earlier to help users like me.


=== Create a Backup Copy of ChromeOS (on USB/SD)===  
=== Create a Backup Copy of ChromeOS (on USB/SD)===  

Revision as of 21:00, 28 April 2014

Asus Chromebox
Asus chromebox.jpg
Manufacturer Asus
Released 2014-03-14 (US)
OS Chrome OS
CPU Intel® Celeron 2955U Processor
Storage 16GB internal SSD
RAM 2 GB, Dual Channel, DDR3 at 1600MHz
Graphics Intel® HD Graphics 4000
Connectivity HDMI, Displayport, Bluetooth 4.0, USB 3.0, Wifi 802.11 a/b/g/n, 10/100/1000 Ethernet, 2 -in-1 Card Reader, Audio jack
Dimensions 4.88 x 4.88 x 1.65 inch (WxDxH)
Asus Chromebox Rear Ports
Asus Chromebox Side/Front Ports
Home icon grey.png   ▶ Devices ▶ x86 hardware ▶ Chromebox

The ASUS Chromebox is a small lightweight intel PC that runs Chrome OS and can be made to boot into other linux versions. It features HDMI, Displayport, USB 3 ports, gig ethernet, SD card slot, and internal wireless-n networking. This page is a collection of links, information, tips, and guides related to running XBMC on the ASUS Chromebox line of computers.

Device Preparation

Put in Developer Mode

Putting the ChromeBox in developer mode will allow you to access the underlying Linux operating system features necessary for installing XBMC.

WARNING: This will erase all user data on the device.

With the device powered off:

  1. Insert a paperclip into the hole left of the SD card slot and press the recovery button
  2. Power on the device, then remove the paper clip
  3. When greeted with the recovery screen, press CTRL-D to enter developer mode
  4. Press the recovery button (with paperclip) to confirm.

The device will reboot and wipe any existing user data.

Recoverybutton.png


Disable Firmware Write Protect

Disabling the firmware write protect will allow us to (later) set the firmware boot flags to shorten the developer boot screen timeout (from 30s to ~1s), and optionally boot directly to the legacy BIOS (and into Ubuntu or OpenELEC). This is not absolutely necessary, but highly convenient and carries little to no risk.

With the device powered off and unplugged:

  1. Remove (4) rubber feet from bottom of unit
  2. Remove (4) screws under rubber feet
  3. Separate two halves of unit
  4. Remove write-protect screw circled below:
    Inside-chrome1.jpg
  5. Reassemble in reverse order



Update the Legacy BIOS

It is necessary to update the legacy BIOS to enable booting from USB/SD media, or if replacing ChromeOS with Ubuntu/OpenELEC, as the stock legacy BIOS is completely broken. If you dual booting and using either the ChrUbuntu or ChrOpenELEC scripts to install, then this step is included as part of those scripts and does not need to be done manually.

To update the legacy BIOS:

  1. Power on and boot to ChromeOS
  2. Hit CTRL-ALT-F2 to open a shell
  3. Login with user chronos (no password required)
  4. Download the updated legacy BIOS with the command:
    curl -L -O http://johnlewis.ie/asus-chromebox-SeaBIOS-new.bin
  5. Flash the new bios with the command:
    sudo flashrom -w -i RW_LEGACY:asus-chromebox-SeaBIOS-new.bin


This updated legacy BIOS has a ~5s wait on the 'Press ECS to show boot menu' screen. If you would prefer a shorter wait (~1.5s), use the following file/commands instead of those listed in steps 4/5 above:

curl -L http://gdurl.com/EVKN/download -o seabios.bin
sudo flashrom -w -i RW_LEGACY:seabios.bin

The md5sum on seabios.bin is F1290EC96AC77026044E29E62B40F6CC

Set Developer Boot Flags

Setting the following boot flags will allow you to boot either to a backup copy of ChromeOS on USB/SD (using CTRL-U) or to the legacy BIOS (using CTRL-L) and into Ubuntu or OpenELEC.

Important: These boot flags must be set before installing either Ubuntu or OpenELEC.

To set the boot flags, perform the following steps:

  1. Power off your ChromeBox, then power on but do not login.
  2. Press CTRL-ALT-F2 to open a shell.
  3. Login as user chronos, no password is needed.
  4. Run the commands:
    sudo crossystem dev_boot_usb=1
    sudo crossystem dev_boot_legacy=1


Note: Jump to Section 3.1 Set Firmware Boot Flags if you wish to have auto-boot into legacy BIOS (OpenELEC/Ubuntu). If it is not carried out at this stage I found I had to re-install Chrome OS to do this, and then start modifications from scratch. There is a warning about configuration of Boot Flags later in the wiki, I just wanted to add one slightly earlier to help users like me.

Create a Backup Copy of ChromeOS (on USB/SD)

If you plan on wiping ChromeOS to install OpenELEC (vs dual booting), it's a good idea to have a backup copy of ChromeOS on USB that you can boot to if necessary. These instructions assume you have already put the ChromeBox into developer mode and set the developer boot flags as per above.


To create a bootable USB copy, perform the following steps:

  1. Power off your ChromeBox, then power on but do not login.
    Press CTRL-ALT-F2 to open a shell.
    Login as user chronos, no password is needed.
  2. Insert a USB stick or SD card (8GB minimum) and run the command:
    sudo fdisk -l | grep 'Disk /dev/sd'
    This will list all the drives your ChromeBox sees. The main internal HDD is /dev/sda, any connected USB/SD devices will be /dev/sdb, /dev/sdc, etc. Identify the device corresponding to the USB/SD card you inserted (compare sizes).
  3. Run the following command to copy/install ChromeOS to your USB/SD card:
    sudo chromeos-install --skip_src_removable --skip_dst_removable --skip_vblock --dst /dev/sdb (or whatever your device is from above step)
  4. When the process completes, your Chromebook will reboot. Now with the USB/SD card still inserted, Press CTRL-U to boot the USB/SD copy of ChromeOS. On first boot, it will want to repair itself and then reboot to the standard login screen.
  5. Lets confirm we're booted off of the external device.
    Press CTRL-ALT-F2 to open a shell.
    Login as user chronos, no password is needed.
    Run the command:
    rootdev -s -d

We should see the same device as identified in step 2 above, instead of /dev/sda for the internal HDD. Now we have a backup ChromeOS install that we can boot into at will with CTRL-U

Perform a Factory Reset

A factory reset is not needed on a "fresh" device, only needed if one has previously installed either Ubuntu or OpenELEC and wishes to either switch to the other or start over.

  1. Create recovery media using step 2 of Google's instructions here: https://support.google.com/chromebook/answer/1080595?hl=en
  2. With the device powered off, use a paperclip to press the Recovery button and power on the device
  3. Insert the recovery media (USB or SD) when prompted



Installing XBMC

There are two basic approaches to running XBMC on a ChromeBox:

  • Dual boot ChromeOS with a full Linux distro (eg, Ubuntu) or dedicated platform (OpenELEC)
  • Replace ChromeOS with a full Linux distro (Ubuntu) or dedicated platform (OpenELEC)


The optimal XBMC experience on the ChromeBox will be replacing ChromeOS with OpenELEC, but individual needs and preferences will vary.

Dual Booting

Ubuntu (or any other distro)

Dual booting Ubuntu (or any other distro) is accomplished by using the ChrUbuntu shell script. It was/is developed by Jay Lee to automate the re-partitioning of the internal HDD and installation of various versions/flavors Ubuntu. It can also be used to install any other distro as well (eg Debian, Mint, Fedora, etc).

Generic instructions for using the ChrUbuntu script on any ChromeOS device are available at: http://goo.gl/Zekkcl

After Ubuntu (eg) is installed, follow the standard wiki instructions for installing XBMC under Linux.

OpenELEC

Dual booting with OpenELEC is accomplished by using the ChrOpenELEC shell script, which is a modification of the ChrUbuntu script to setup and install OpenELEC instead of Ubuntu.

As with ChrUbuntu, before using ChrOpenELEC, your ChromeBox must be in Developer Mode and be Factory Reset.

  1. Power on and boot to ChromeOS
  2. Hit CTRL-ALT-F2 to get to command prompt
  3. Login with user chronos (no password required)
  4. Download and run the ChrOpenELEC script with the command:
    sudo curl -L -O http://goo.gl/WIytxU; sudo bash WIytxU
    (with an uppercase 'i' not a lowercase 'l' in WIytxU)
  5. Enter the size of the partition to be used as a whole number, from 1 to the max recommended size (9GB for a stock 16GB SSD)
    NOTE: the numeric keypad is off by default, using it will enter garbage characters that will screw up the installation script and result in a failed install.
  6. Press Enter to reboot when prompted. ChromeOS will "repair" itself and reboot.
  7. Hit CTRL-ALT-F2 to get to command prompt
  8. Login with user chronos (no password required)
  9. Download and run the ChrOpenELEC script with the command:
    sudo curl -L -O http://goo.gl/WIytxU; sudo bash WIytxU
  10. Press Enter to install when prompted. The script will download and install OpenELEC, as well as update the bootloader and legacy BIOS (SeaBIOS) if needed.
  11. Press Enter to reboot when installation complete
  12. At the developer boot screen, press CTRL-L to boot the legacy BIOS and into OpenELEC



Replacing ChromeOS


Before continuing, ensure the steps listed above in Device Preparation have been completed. It is highly recommended that you create a backup/USB copy of ChromeOS . This is useful in case (eg) you want to change the boot flags later, which can only be done from within ChromeOS.

OpenELEC


In order to install OpenELEC, you'll need to download a custom build tailored to the ChromeBox. This build differs from the regular OpenELEC Generic x86_64 build in that it uses a slightly older version of the syslinux bootloader (5.10, vs 6.02), as the version included with OpenELEC does not work properly on the ChromeBox at this time. This custom build also includes a fix for some MCE IR remotes, which fail to work when connected to USB 3.0 ports (fix has been submitted as a patch and hopefully will be included in future Linux and OpenELEC releases).

Installation steps:

  1. Download the custom build of OpenELEC from http://gdurl.com/qnDc/download
    Once downloaded, unzip/extract the files.
  2. Insert a USB stick and run the create_installstick installer.
    See the OpenELEC wiki instructions for more details on creating the USB installation media.
  3. Power off your ChomeBox. Insert the USB/SD installation media.
    Power on and press CTRL-L to boot to legacy BIOS
    Press ESC to bring up the boot menu and select the number corresponding to your USB installation media
    The OpenELEC installer will load
  4. Choose the 'Quick Install' menu option
    Select the target disk for install (the internal HDD should be the only option presented)
    Hit Yes/Ok to the prompts confirming that the target disk will be erased/overwritten
  5. When the installer has finished, remove the installation media and select Reboot.
  6. (Optional) Set the firmware boot flags to shorten the boot time and set the default boot.


If you have set the firmware boot flags as above, OpenELEC should boot right up in about 15 seconds. Otherwise, you will need to hit CTRL-L to boot the legacy BIOS

That's it! If you don't need the MCE remote fix, you can update to the latest official OpenELEC build. Afterwards, updates should be automatic.

Post-Installation

Set Firmware Boot Flags

With the firmware write-protect disabled, we can shorten the default developer-mode boot wait time (from 30s to ~1s) and set the ChromeBox to default to booting the legacy BIOS (and into Ubuntu or OpenELEC) instead of requiring CTRL-D or CTRL-L to be pressed each time.

  • Power on and boot to ChromeOS
  • Hit CTRL-ALT-F2 to get to command prompt
  • Login with user chronos (no password required)


To shorten the boot wait time only, run the command:

sudo set_gbb_flags.sh 0x1
(This is the same as immediately pressing CTRL-D)


To shorten the boot wait time and set the default boot to the legacy BIOS:

sudo set_gbb_flags.sh 0x489
(This is the same as immediately pressing CTRL-L)


To reset these options to default, use:

sudo set_gbb_flags.sh 0x0

Known issues

  • Some MCE remote IR receivers do not currently work with USB 3.0 ports under Linux due to a bug in the mceusb kernel driver. A custom build of OpenELEC with a fixed mceusb driver is available in section 2.2.1 above. For Ubuntu installs, a custom kernel will need to be compiled with the fixed driver.

Random notes

Feel free to place various notes, tips, and links here. As this section of the wiki gets more organized, those notes will be properly sorted. Consider this like a dumping ground for when you're not sure where to put something.

Links