Monday 18 February 2013

Chrubuntu Install and Fixes

Welcome to my guide for installing Chrubuntu (Ubuntu 10.4) into the new Samsung Series 3 Chromebook (Arm Processor).
This guide has been compiled using many different sources and I take no credit for the amazing work that Jay Lee @ chromeos-cr48.blogspot.co.uk has done in porting Ubuntu over to the Chromebook and making it a genuinely usable system.
If you wish to donate to the project, please do so on his site and not to me as I am only providing an install guide.
At this time the project is at "Alpha" stage (this is actually the first release "Alpha 1"), therefore you can't expect the experience to be perfect but with the fixes I am going to help you through, it won't be far off.
Also I just want to make it clear that this guide is intended to help you install Chrubuntu onto your Chromebook and install some of the fixes (such as audio).  I have tested this method several times with no problems and it took a lot of trial and error to get it right, but I do not take any responsibly for any damage or loss of data that you may experience as a result of using this method.
Now that we have the legal bit and the thank you's out of the way let's have fun....

Please make sure you are connected to a power supply before you begin.
Also make sure you have backed up any important data on your Chrome OS partition as this will be erased...

First thing you need to do is create restore media for your Chromebook in case anything should go wrong or if you wish to restore your Chromebook at a later time.
I recommend using a USB flash drive, however you can also use an SD card if you wish.

Tip: Never use cheap memory for important backups, I would always use a trusted brand such as Sandisk etc. Also be aware there are a number of "fakes" out there especially on auction sites so always stick to trusted dealers if you want the genuine product.  (It's not always worth the savings you can make buying the products cheaper).  Same goes for the media you are going to use to install Chrubuntu later on.  I would recommend using a branded product and ideally Class 10 to give you Optimal read/write speeds:
Class 4 = 4mbs Class 10=10mbs and so on.
Ok so I am only at the first stage and I am already waffling, but this is important info in the long run.  Anyway back to our Chromebook....

So insert your media into either the USB or SD slot and open a new Chrome window.

Type "chrome://imageburner" into the omnibox (browser's address bar).
Follow the on-screen instructions, it will download the necessary files and create your recovery/restore media.
Once you have your restore USB flash or SD card you can remove it and put it somewhere safe in the hope that you will never need to use it.

Moving onto our next task which is getting the Chromebook into "Developer Mode" this uses the "Developer Bios" and is intended for those creating new software etc for the device, however it gives us the opportunity to change various settings (including setting an alternate boot device yay)!

Make sure your Chromebook is switched off.
Press and hold "Esc" and "Refresh keys" (Refresh is where F3 would be on traditional keyboard).
Whilst holding the "Esc" and "Refresh" keys, power on the Chromebook.
You will now come to a screen stating "Chrome OS is missing or damaged.  Please insert a recovery USB stick or SD card."

 Tip: If you ever want to recover your Chromebook this would be the point that you would insert the recovery disk we created earlier.

Press "CTRL" and "D" keys together

You will now get a screen with the message "To turn OS verification OFF, press ENTER".

Press "Enter"

When Chromebook reboots press "Ctrl+D" to enter Developer Mode.
You will get a screen with gives you the following "Preparing the system for Developer Mode"
This process takes a few minutes so please bear with it and DO NOT power off your machine.

At this point the Chromebook is reverting to factory "Out Of The Box" settings.
On my machine this process took approx 16 mins (you do get a progress bar at the top of  the screen).
When the Chromebook reboots, press "CTRL+D" your machine will boot into ChromeOS.

Now select your language & keyboard settings
You need to enter your wireless network key and connect to your network (internet).
DO NOT click "Continue" instead on your keyboard press "Ctrl+Alt+=>" (=> is the right arrow next to the refresh key on the left of the keyboard where F2 would traditionally be).
This will take you to a "Terminal" screen and will ask you for localhost login:
Enter "chronos" (without the speech marks) and press "Enter"

Insert the storage device on which you want to install Chrubuntu (if using USB be sure to sure the 2.0 port (Black) not the 3.0 (Blue) as this does not support booting).

You must type one of the following commands (followed by pressing "Enter"):

SD Card

wget http://goo.gl/34v87; sudo bash 34v87 /dev/mmcblk1


USB Flash Drive

wget http://goo.gl/34v87; sudo bash 34v87 /dev/sda


You will be asked to press "Enter" twice, once to confirm that you are running the ARM Chromebook and secondly to confirm that you understand all data on your USB device will be erased.

Now your Chromebook will start downloading the Chrubuntu Operating System!
The download is split into 52 files and each file contains 100mb of data (actual size of file varies from 1mb to 99mb depending on compression) so as you can appreciate this takes a while.
Good time to go make coffee I think....

Process took 51 minutes on my Chromebook to give you an idea.

When machine reboots, you will be back at the "OS verification is off" screen.
You need to press "CTRL+U" and this will boot the Chromebook into Chrubuntu.
OK so that is the Chrubuntu (Ubuntu 12.04LTS) Operating System installed on your Chromebook.
Your password is "user" (without quotation marks) but can be changed.

I recommend rebooting the Chromebook and then getting all of the Ubuntu updates before continuing (just as a matter of good practice).

From now on anytime that your Chromebook reboots you will be presented with the
"OS verification is off" screen:

"CTRL+U" Takes you to Chrubunutu
"CTRL+D" Takes you to Chrome OS

If for any reason you decided to exit out of Developer mode you will need to enter the following command to boot back into Chrubuntu:

sudo crossystem dev_usb_boot=1

Now for the fixes....

So this is when we are reminded that this is an Alpha release and therefore not perfect.
The following work right away:

WIFI
Bluetooth
Battery Monitor
USB Ports
SD Card Reader
Touchpad (not perfect see fix later in this guide)

However the sound does not work and this is the first fix I am going to guide you through.

YOU MUST FOLLOW THIS EXACTLY OTHERWISE YOU COULD
DAMAGE YOUR SPEAKERS.

Open a new terminal window "CTRL+ALT+T" and type "alsamixer" (without quotation marks) and then hit "Enter".
You will get the AlsaMixer v1.0.25 mixer screen.
At the bottom of the window you will see Headphone and Speaker options, notice that Headphone is in red with indicates that it is the item selected.
Navigate through this program using your arrow keys (Do not use scroll on your mouse as this will alter the levels which you do not want to do).

Start by pressing the right arrow until "Left Speaker Mixer Left DAC1" is selected in red.
List is alphabetical so you will know when it is coming up, but if you do miss it just hit the left arrow to go back.
You will notice that the box above contains the letters MM this means that the channel is muted.
This is what we need to change.  Press the "M" key and the MM should change to 00
You have successfully enabled the channel.  Do the same thing with the following channels:
"Left Speaker Mixer Right DAC1"
"Right Speaker Mixer Left DAC1"
"Right Speaker Mixer Right DAC1"
Now we will enabled the headphone output, same process enable the following:
"Left Headphone Mixer Left DAC1"
"Left Headphone Mixer Right DAC1"
"Right Headphone Mixer Left DAC1"
"Right Headphone Mixer Right DAC1"

Now press "Esc" and you should be back at the terminal screen.
At this point we have all of the settings in place but we have to save otherwise Ubuntu will forget next time we reboot and we will have to enter all of this again. Type the following command:

sudo alsactl store

You will be prompted for your password so just enter that and your settings will be stored.
Exit terminal.
Now go to the speaker icon on the top right of your screen (next to the clock) left click and go to "Sound Settings".  Underneath where it says "Play sound through" select "Speakers" and test the sound using the volume slider.
If it's not working go back through and make sure you enabled all of the correct channels.
If you did everything right you should have sound! Yay!
Close the Sound Settings window and you're done.

Now to sort the touchpad and get it working much better.
As I'm sure you have noticed by now, the touchpad works but is far from perfect (very laggy etc).
Here is a straight forward guide to making it work correctly:

It is very important that once you start this process, you do not reboot until it has completed otherwise you could damage your Chrubuntu installation.

Open a terminal window "CTRL+ALT+T" and enter the following commands
(Pressing "Enter" after each line):

mkdir ~/backup sudo mv /usr/share/X11/xorg.conf.d/* ~/backup/
cd /usr/share/X11/xorg.conf.d/
sudo wget http://craigerrington.com/chrome/x_alarm_chrubuntu.zip
sudo unzip x_alarm_chrubuntu.zip
sudo rm x_alarm_chrubuntu.zip


When asked "replace 10-evdev.conf" type "y" for yes.
By default this is set to UK keyboard, if you wish to change this type the following command:

sudo vi /usr/share/X11/xorg.conf.d/10-keyboard.conf

Press "Enter" and you will see a config screen. Simply change "gb" for your country ie. "us" and close terminal.

Reboot the machine and you should have a perfectly working touchpad. Woohoo!


If you have tried to load any flash sites or videos (youtube is a good example) you will have been meet with a message telling you that the flash plugin is missing and you need to install, however when you try and install missing plugin you find that it is not available for the ARM architecture,
you can't download it from the Ubuntu Software Center either.
Luckily you have a version that will work right at your fingertips (the one that came with Chrome OS). This took me a while to work out but here is the guide:

I have done the hardest part for you (extracting the flash player from Chome OS) so you can download it directly
here

Now extract the "flashplayerarm.tar.gz" file you just downloaded and you should have two files, "default" and "libpepflashplayer.so" I am going to assume you extracted them to the Desktop but if you extracted them elsewhere then just alter this guide accordingly.

Open a terminal window "CTRL+ALT+T" and type the following commands:


cd Desktop
sudo cp libpepflashplayer.so /usr/lib/chromium-browser/plugins

sudo cp default /etc/chromium-browser
exit

Enter your password when prompted and that's it Flash Player should be installed.

For now this only works with Chromium/Chrome as Firefox are not supporting this project but hopefully a fix will come soon for all you Mozilla users.


Next we are going to change the password on your Chrubuntu installation, this is optional but highly recommended.
One of the glitches I have found is that I am unable to access the "User Accounts" option is system settings so in order to change your password you will need to use terminal.

Open Terminal "CTRL+ALT+T" and type:

passwd user

"user" represents the username you wish to change which is user by default.
It will prompt you for your current password and then ask you to enter new password and confirm.
That's it!

So now you should have a nicely working Chrubuntu install.
I will post updates as they become available.

There is currently no hardware video acceleration or on-board webcam support but hopefully they will be with us soon.

I case you were wondering...

I prefer USB/SD installation because it does not affect the 16gb storage allocated to Chrome OS and therefore allows that to be used to it's full potential. It also allows me to simply switch between the Operating Systems by using either the "CTRL+D" command for Chrome OS or "CTRL+U" for Chrubuntu.
I may write a guide in the future for installing to the internal storage.

I hope you found this guide helpful and thanks to all the people that made this possible.

Keep Rockin'

Thursday 14 February 2013

Mac OSX 10.8 Mountain Lion on VMWare (Linux)

First we need to install VMWare Player for Linux.


Download file "VMware-Player-5.0.1-894247.x86_64.bundle" here
Now access terminal (ctrl+alt+t) and type:


sudo apt-get install build-essential linux-headers-`uname -r`

This command installs the required dependencies for VMWare.
(Enter your password when prompted)
Navigate to the folder where you have stored the "
VMware-Player-5.0.1-894247.x86_64.bundle" file. ie. Desktop\VMWare\Install


Now enter the following commands into terminal:


chmod +x VMware-Player-5.0.1-894247.x86_64.bundle
sudo ./VMware-Player-5.0.1-894247.x86_64.bundle


Note: The chmod +x command grants root (admin access to the file).
Sudo is equivalent to run as administrator.

Now you should get a standard install window and you just need to follow the prompts.
Next download the file "vmwarepatch901.tar.gz" here

You must use the patch otherwise you will get: 
Virtual Network Device error: "Unable to start services. See log file /tmp/vmware-root/mdconfig-23331.log for details".
Do not try and load VMWare Player yet.

Extract the file "vmwarepatch901.tar.gz" to your "home" folder.  
Once completed your home folder should contain the 2 files "patch-modules_3.2.0.sh" and "vmware3.2.0.patch.
In terminal type the following commands:

cd
sudo ~/patch-modules_3.2.0.sh

The patch should now install (ignore any fails).
Exit terminal.


You can now delete the 2 files from your home directory as you are finished with those.


Test VMWare player and make sure it works.

Job Done!!


Now we have VMWare Player installed and modified, we can concentrate on getting MAC OSX 10.8 running on our Linux system.


Download the file: "tools901.tar.gz" here
Extract the file ie. Desktop\tools\ and then you should have the following:
"darwin.iso" "darwin.iso.sig" "install.sh" "uninstall.sh" "Unlocker.Linux32" and "Unlocker.Linux64"
Open teminal (Ctrl+Alt+T)
Navigate the folder where you extracted "tools901.tar.gz"
Use "chmod +x" command on all of the files (UnLocker.Linux32 not required for 64-Bit installation).
Now use the command:


sudo sh install.sh


This should unlock the Mac OSX features in VMWare and also copy the files "darwin.iso" and "darwin.iso.sig" to the directory /usr/lib/vmware/isoimages/ where they are needed later.
Exit terminal.


Now for the exciting part....


Load VMWare Player.
Select "Open a Virtual Machine"
Navigate to the location of your MAC OSX Mountain Lion VMWare Image and click "Open"
Go to "Edit virtual machine settings"
Setting amount of RAM (I recommend at least 2gb) (I use 4096mb) and hit "Save"
Go back to "Edit virtual machine settings"
Under "Processors" select the amount of cores you wish to assign to Virtual Machine (2+ is best)
I tend to leave Virtualization settings to "Automatic" (You must have Hardware Virtualization enabled in your bios to do this).


If you do not have Hardware Virtualization available then there is a software patch for this which I will go into at some other point but that does affect hardware performance.
Most modern processors i3/i5/17 etc support this.


Once you have selected settings hit "Save" again and it's time to test. Woohooo!


When prompted "This virtual machine might have been moved or copied" select "I copied it"


Now we need to install the drivers for your "Mac".


Shut down the Mac Virtual Machine and once VMWare has closed, restart it and select "Edit virtual machine settings" on your OS X 10.8 Mountain Lion image.
Go to CD/DVD (IDE) and select "Use ISO Image"
Browse to the "tools" folder you created earlier, find darwin.iso and select "Open"
Hit "Save" and then "Play virtual machine"


Once Mac has booted open "Finder" and under "Devices" select "VMWare Tools" and Double-Click "Install VMWare Tools".
Follow the On-Screen prompts.
You will get a message saying "The Installation Failed" ignore this (it worked) just click "Close" and  restart the "Mac".
You should now have the drivers installed and be able to increase the display resolution etc.


Next time you reboot go back into "Edit virtual machine settings" and change "Use ISO image" to "Use a physical drive" so that you are able to run discs as normal. "Save" and "Play virtual machine" again.


Note: When you boot your virtual machine you may get a message stating that vmware needs to create folder ~/.vmware to save preferences, here is the fix:


Open terminal (Ctrl+Alt+T) and type:


sudo chown -R user:root ~/.vmware


Please substitute "user" for your own username.
This will change the permissions and allow VMWare to access the folder.

Please comment if you found this guide helpful, I will be making a video once I get my YouTube channel all up and running.
I will tidy the guide up over the next few days as I am sure the grammar is all over the place, but just wanted to get it out of my head and onto the web!


Keep Rockin'
RetroFatty.


Other things worth mentioning:
To uninstall VMWare open Terminal (Ctrl+Alt+T) and type:

sudo vmware-installer -l

This gives you a list of the VMWare products currently installed.
Next type:

sudo vmware-installer -u vmware-player

I am running Ubuntu 12.04 Linux.
Linux and Mac OSX 10.8 on Windows 7 guides to follow...
This works on both Intel (Core2Duo+) and AMD processors.

32 Bit version available however Snow Leopard+ requires 64-Bit
You must have Hardware Virtualization.  Otherwise you will require software mod (instructions coming soon).