Monday 28 May 2012

Debian on Pandaboard: Building Ubuntu kernel

Setting up basic build environment:

There is a nice package, called "build-essential", by installing which you should have all the tools needed to compile and packed applications/kernels from their respective sources:
sudo apt-get install build-essential libncurses5-dev
(You would want to have libncurses5-dev - without it, you would be unable to run "menuconfig".)
If that didn't work, use this:
sudo apt-get install gcc g++ make libncurses5-dev

Building your kernel: (with enabled WiFi, Bluetooth, etc)

In this tutorial, we are going to use Ubuntu kernel source. Why ? Because Ubuntu kernels are officially supported by TI devs - we will get all the fixes Ubuntu has and all nice features. But the most important point is: GPU driver binaries are built for specific versions of Ubuntu kernels. (If I am correct, the only binary blobs provided are for Ubuntu and Android. Source.) We want GPU drivers, right ?
There are very nice tutorials provided by armin76 about installing and configuring Gentoo Linux on Pandaboard. (http://dev.gentoo.org/~armin76/arm/pandaboard/) They had really helped me.
We will use the kernel source of Ubuntu Precise (we obviously want hard float).
(Run everything in this paragraph as a normal user - non-root. Don't use su.)

Step-by-step process: (Skip it, if you just want to build the kernel, without running menuconfig.)

1) Download the kernel source:
KERNELVERSION="3.2.0-1416.22"
cd
wget --no-check-certificate wget --no-check-certificate https://launchpad.net/ubuntu/precise/+source/linux-ti-omap4/$KERNELVERSION/+files/linux-ti-omap4_$KERNELVERSION.tar.gz
2) Extract:
tar zxvf linux-ti-omap4_$KERNELVERSION.tar.gz
3) Change to ubuntu-precise directory:
cd ubuntu-precise
4) Download a nice .config, provided again by armin76.
wget http://dev.gentoo.org/~armin76/arm/pandaboard/kconfig -O .config
5) Solve annoying CONFIG_SCSI_WAIT_SCAN=m "damn persistent module" problem (will set it as built-in - will explain why we want this):
sed -i 's/default m/default y/g' drivers/scsi/Kconfig
6) Force the kernel to built no modules (not even that scsi_wait_scan.ko module):
sed -i 's/=m/=y/g' .config
So, why do we need this ? Well, having no modules around makes the installation process hell like easy. More importantly, however, as reported by a number of users, is that you need to have modules built into your kernel or use initrd to have a normal booting procedure. (http://groups.google.com/group/pandaboard/browse_thread/thread/236f7df1572fc6d5 - post by Pavol Cupka)
(By the way, the kernel that armin76 provides didn't boot for me on Debian - waited 15 mins - no login, no read/write activity. In fact it happened on Angstrom also. The reason, I think, is that it fails to find a number of modules and stops booting. My usb keyboard + mouse were completely unresponsive. But then it works just fine on Gentoo ... I don't get it.)
7) Edit your kernel configuration (optional):
make menuconfig
(Make sure NOT to disable debug in display section. My picture was a mess after I disabled it.)
8) Build you kernel:
make -j2 ARCH=arm uImage
This will take a while. Find something to do for an hour or so. (Depends on your card speed.) After that you will get your uImage file (this is our new kernel).

Single-step process: (No menuconfig - will just build the kernel.)

Run this:
KERNELVERSION="3.2.0-1416.22"
wget --no-check-certificate https://launchpad.net/ubuntu/precise/+source/linux-ti-omap4/$KERNELVERSION/+files/linux-ti-omap4_$KERNELVERSION.tar.gz && tar zxvf linux-ti-omap4_$KERNELVERSION.tar.gz && cd ubuntu-precise && wget http://dev.gentoo.org/~armin76/arm/pandaboard/kconfig -O .config && sed -i 's/default m/default y/g' drivers/scsi/Kconfig && sed -i 's/=m/=y/g' .config && make -j2 ARCH=arm uImage
and you should get your uImage.

Installing your kernel:

1) Make a backup of your boot files to "backup" folder on "boot" volume and clean "boot" volume:
sudo mv -f /boot/uboot/MLO /boot/uboot/u-boot.img /boot/uboot/zImage /boot/uboot/initrd.img /boot/uboot/uEnv.txt /boot/uboot/SOC.sh /boot/uboot/backup
2) Restore MLO and u-boot.img:
sudo cp -f /boot/uboot/backup/MLO /boot/uboot/backup/u-boot.img /boot/uboot
3) Install your new kernel (make sure you are in ubuntu-precise directory):
sudo cp -f arch/arm/boot/uImage /boot/uboot
4) Just reboot the system:
sudo reboot
NOTE: It could take 2 - 4 minutes before you get to the login screen with the new kernel. During this time, you may or may not have video signal. If you have a signal, you will most likely see only 2 penguins on a black background, with no other output.

My comments about my new kernel:

- Version: 3.2.0-1416.22
- Boot time with this kernel (from cold to login screen): 2 - 4 minutes
- HDMI out: yes, 1080p - default, but can change if you disconnect and then reconnect the cable or change the source from your TV (tested with fbdev video driver). Ony one resolution is available.
- DVI out: not tested
- Bluetooth: not tested
- Wifi: Works
- Ethernet: Not tested, should work
- SGX drivers:  Work, but with issues, more to come ...
- Audio: Not tested
- CPU frequency scaling: Not tested

Thanks to: armin76 for awesome tutorials.

Saturday 26 May 2012

How to install Debian on Pandaboard + do basic configuration.


Installing Debian - very easy and fast:

EDIT: Updated for the latest version of rootfs. Some minor changes.
(Thanks to Dr. Ace Jeangle for providing those instructions: http://www.chalk-elec.com/?p=1478 )
(And thanks to Robert Nelson, for creating and providing ARM hard float Debian rootfs. You can visit his site by following this link: http://www.rcn-ee.com .)

Insert your SD card into a card reader of your host PC and run the commands below on your host system, preferably Ubuntu or Debian. (We are using apt-get here.)

WARNING !!! PLEASE ENSURE THAT THE "sdb" DEVICE IS THE ONE OF YOUR SD CARD ! "sda" IS MOST CERTAINLY WRONG ONE TO USE ! IF YOU ARE NOT CAREFUL, YOU CAN WIPE OUT YOUR HARD DRIVE ! PLEASE READ BELOW ABOUT EASY WAYS TO CHECK WHICH ONE IS YOUR CARD

To check the latest rootfs available, visit:
http://rcn-ee.net/deb/rootfs/wheezy/
and update the VERSION variable to that of the newest rootfs
VERSION="2012-11-29"
sudo apt-get install uboot-mkimage wget pv dosfstools btrfs-tools parted
wget http://rcn-ee.net/deb/rootfs/wheezy/debian-wheezy-minimal-armhf-$VERSION.tar.xz
tar xJf debian-wheezy-minimal-armhf-$VERSION.tar.xz
cd debian-wheezy-minimal-armhf-$VERSION/
sudo ./setup_sdcard.sh --mmc /dev/sdb --uboot panda

Use "panda" for PandaBoard Ax (non-ES). Use "panda_es" for PandaBoard ES.
(http://elinux.org/BeagleBoardDebian#Demo_Image)
In my case, the name of my card is "sdc", because I have external USB HDD, which is "sdb". But usually, the card would be "sdb". I use:
sudo ./setup_sdcard.sh --mmc /dev/sdc --uboot panda
You can use the following command to see what is mounted:
df -h
Or you can use:
dmesg
just after you have plugged-in your SD card.
Take a notice of "sdb" or "sdc". Estimate which is your card.

Another OS is installed on the card:

If your card has already got some OS installed on it, we can remove it using "fdisk":
sudo fdisk /dev/sdc
(Change "sdc" to what you have !!!) NOTE: Use "d" option to delete a partition. Each partition has a number (1, 2, etc). Use option "w" to save your changes. (Otherwise your changes will not be saved.)

Video output:

a) If you want to use DVI video output:
Open file uEnv.txt on "boot" partition of the card:
(for e.g.)
nano /media/boot/uEnv.txt
uncomment the line "defaultdisplay=dvi", uncomment "vram=16MB" (if it is commented), uncomment "dvimode=1280x720MR-16@60" and (if you want) change it to suit your display. Some examples (as I don't use DVI) can be found here, by Dr. Ace Jeangle:
http://www.chalk-elec.com/?p=1478

b) If you want to use HDMI video output:
Same as above, except that you leave "dvimode=1280x720MR-16@60" commented in and change "defaultdisplay=dvi" to "defaultdisplay=hdmi".
More to come, when I do a little bit of testing with custom kernel, as with stock kernel, I have stubborn 640x480 60Hz output on my 1080i TV, via HDMI.

Booting process:

Insert your Debian populated SD card into Pandaboard and boot-up the board.
Ok, if your new Debian system is working, on boot you should see the video output being displayed on your monitor or TV. The booting process progresses much faster than on Ubuntu. After a minute or so you should see the login prompt (in Command Line Interface - no GUI).
(From here onwards, all the commands will be executed on our board.)

Login:

So, how do I login ? Well, the default user is "debian" and "temppwd" is its password. The root password is "root". (http://elinux.org/BeagleBoardDebian#Debian_Wheezy_snapshot)

Important security measures:

1 - Change root password ! (IMPORTANT !!!)
Login as root and run:
passwd
then enter and verify your new root password.
2 - Create new user.
Login as root (temporary) OR login as debian and use:
su
(sudo might not work), then run:
adduser YOUR NEW USER NAME
and answer all questions (password, full name, etc).
3 - Add the user to sudoers file. 
(Optional. Will grant the user the ability to use "sudo" command.)
Run:
su
visudo
This will open the /etc/sudoers file. (Visudo is made for this ! Don't think about using nano, vim, etc.)
Look for the following line:
root ALL=(ALL) ALL
and add this line just underneath:
user ALL=(ALL) ALL
changing "user" to your username. Save and exit: Ctrl + o, ENTER, Ctrl + x. Now you can use the "sudo" command. (Btw, "sudo" uses user password, not root password.
4 - Change debian password.
Login as debian or (your username) and run:
 sudo passwd debian
and type in + verify your new debian password. (This is strongly advised, as the default debian password is known and public.)

Set-up Internet connection:

Now, to download packages and etc we need to have an Internet connection. For Panda we have 2 options: Ethernet or WiFi - both work in our Debian Linux !
a) Ethernet: Just connect the cable between your router and the board. It should work straight away - no configurations are needed. Reboot is not necessary.
b) WiFi: Here a little bit of work is needed. But it will work: (This site has really helped me: http://www.howtoforge.com/how-to-connect-to-a-wpa-wifi-using-command-lines-on-debian)
1 - Run "ifconfig -a" if you want to. We do have our WiFi adapter working though. Its name is: wlan0 (We also have wpasupplicant installed - no need to search or install it.)
2 - Create and edit the following file:
su
nano /etc/wpa_supplicant.conf 
Type in the following:
network={
                 ssid="TYPE IN THE NAME OF THE ROUTER HERE"
                 psk="TYPE IN ITS KEY/PASSWORD HERE"
}
Complete the entries. Save and exit: Ctrl + o, ENTER and Ctrl + x .
3 - Run the following command:
wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf -Dwext
Then, when you see its output, hit ENTER.
4 - Run this last command:
dhclient wlan0
and now you should be connected.
5 - Following the next boot, you will be disconnected. To reconnect, you just repeat step 3 and 4.

Before installing anything:

Update your system. This is required, as you will run into problems if you don't do this:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
Depending on how old is your rootfs, this might take few minutes.

Installing Graphical User Interface:

The easiest way is by using the minimal_lxde_desktop.sh script, provided by Robert Nelson.
(This will give you a working LXDE environment, which I think is the best choice for us.)
cd /boot/uboot/tools/ubuntu
sudo sh minimal_lxde_desktop.sh
Or you can install LXDE with one command line:
sudo apt-get install lxde
If your choice is XFCE, then do:
sudo apt-get install xfce4
LXDE is the easiest option and is the guaranteed one. XFCE didn't work for me last time. GNOME / KDE would take a lot of time to install and are quite heavy (for fbdev in particular).
Installing any of these desktop environments will also cause installation of Xorg (1.12 currently), as well as xserver-xorg-video-fbdev driver, which we will use initially.

Achieving auto-connection (with Wifi):

We have a number of options here. The following are those, which I have tried:
(Choose option "c" if you want boot-up speed-up, but don't want Ethernet.)

a) Install Wicd client:
sudo apt-get install wicd
and answer one configuration question (which users will run wicd). Run the client, find your router, provide your password (in Advanced Settings), click "Automatically connect to this network" box and that's all ! (I don't know for sure, but in my case I had to reboot to get connection. Works perfectly.)

OR

b) Debian has a rc.local start-up script, which we can edit. Open the /etc/rc.local file:
sudo nano /etc/rc.local
and just add the following commands:
wpa_supplicant -B -iwlan0 -c/etc/wpa_supplicant.conf -Dwext
dhclient wlan0
to the end of the script (after all comments), BUT before "exit 0" command. Save and exit. You will be connected each time you boot.

OR

c) This one is the best so far. Edit /etc/network/interfaces file:
sudo nano /etc/network/interfaces
,look for the following:
# WiFi Example
#auto wlan0
#iface wlan0 inet dhcp
#    wpa-ssid "essid"
#    wpa-psk  "password"
,comment out  the last 4 lines quoted here and substitute "essid" with (your router ssid), "password" with (your router password). Now look for:
# The primary network interface
auto eth0
iface eth0 inet dhcp
and comment in the last 2 lines quoted. In the end, the file should look like this:
auto lo
iface lo inet loopback

# The primary network interface
#auto eth0
#iface eth0 inet dhcp
# Example to keep MAC address between reboots
#hwaddress ether DE:AD:BE:EF:CA:FE

# WiFi Example
auto wlan0
iface wlan0 inet dhcp
    wpa-ssid "**********"
    wpa-psk  "**********"
Save and exit. Done.
This actually has a double value for us. 1st - you have a working Wifi, which will be connected at each boot. 2nd - your boot-up time is reduced significantly, as Ethernet is disabled at boot and there is no DHCPDISCOVER loop (which takes about a minute of time). Being in this section means that you don't need Ethernet anyway.

Clock skew and its solution (Important !):

The most annoying problem ... EDIT: Seems to me there are still problems with this, ugh ...
The initial time we have in Debian is .... ugh ... quite far from being accurate - 1st of January, 1970 ! This indicates that the clock was completely reset ... No wonder - Panda, by itself, doesn't have a battery to supply hardware clock.
First, we need to make sure that the timezone is correct. To edit the timezone, we use:
tzselect
and follow the steps. In the end, you will get:
Therefore TZ='TIMEZONE YOU HAVE' will be used.
with you timezone. This is what we need. For example, I got:
Therefore TZ='Europe/Dublin' will be used.
Now, like stated, we will make this change permanent:
cd
nano .profile
Scroll to the bottom of the file, leave an empty space after the last line and add the timezone line:
TZ='TIMEZONE YOU HAVE'; export TZ
Save the file (Ctrl + o, ENTER, Ctrl + x), log out and log in again. Your timezone is set.
Next, we will set the correct time and date. For this task, we will use "date" command:
(Example)
sudo date -s "Jun 1 20:27:00 2012"
The usage is obvious enough. The "-s" flag is used to set the date. Use first 3 characters of each month.
To see the date, use:
sudo date
Now, we wouldn't be able to maintain the correct time via hardware clock. (Unless you have modded your board.) So, we are going to rely on the Internet to sync the clock. Lets use NTP service.1) Install the package:
sudo apt-get install ntp
2) Edit the configuration file (if you want better accuracy):
sudo nano /etc/ntp.conf
Look for the following section:
server 0.debian.pool.ntp.org iburst
server 1.debian.pool.ntp.org iburst
server 2.debian.pool.ntp.org iburst
server 3.debian.pool.ntp.org iburst
Replace this section by a relevant section of the NTP server you want to use. For e.g. I live in Ireland - so I want a local NTP pool. I have added:
server 0.ie.pool.ntp.org
server 1.europe.pool.ntp.org
server 0.europe.pool.ntp.org
and saved the file.
Look here about which pools to use and how to add them:
http://www.pool.ntp.org/use.html
3) Restart the NTP service:
sudo service ntp restart
Or, if the above command gives you a warning, you can use the combination:
sudo service ntp stop
sudo service ntp start
4) Your NTP service should be set up now and should sync the clock from time to time. Now, if you want to test whether it actually works, run:
sudo ntpq -pn
and you should see something like that:

Note the asterisk (*) (you will probably notice it only after reboot). If you have it, it means that this IP address is being currently used to provide the time for syncing the clock. Initially after reboot, you might notice that the time is set wrong again, but it is only temporally. After few minutes, the clock will be synced. That's all in relation to time.
If your desktop clock (clock applet) shows wrong time, run "sudo date" command to update it.
Note: I know, this paragraph might not sound important, but please, don't skip it. The reason being is that a clock skew will be a source of many annoying problems; such as those warnings you get during "tar" extraction, warnings during kernel configuration, potential errors during compiling, loads of other problems... We don't want them, right ?

Some tweaks:

Turn off SWAP:
SWAP is a form of virtual memory, which is:
- Completely useless for Pandaboard, as SD I/O is hellishly slow !!!
So, check if you have it disabled:
free -m
which should give you this line:
Swap:            0          0          0
meaning swap is disabled. This is how it should be.
If it is not disabled, run this to switch it off:
sudo swapoff -a
which should do the job. That's all.

Disable Ethernet at boot (if it is not needed):
(Skip this section, if you have used option "c" in "Achiving auto-connection (with Wifi)" section)
With Ethernet enabled, what you get is a couple of "DHCPDISCOVER...." lines and about 0.5 - 1 minute of wasted time during boot. If you don't use Ethernet, why wasting time because of it ?
To disable it, edit /etc/network/interfaces file:
sudo nano /etc/network/interfaces
and comment in the following:
auto eth0
iface eth0 inet dhcp
so it will look like:
#auto eth0
#iface eth0 inet dhcp
save and exit. Done !

Disable screensaver in LXDE:
Screensaver is useless in our case. It is an extra load for CPU, as we do not have OpenGL drivers (and will probably never have). We would be able to install GLES / GLES2 drivers, but they are most likely not used by screensaver. So, lets disable it.
For LXDE:
Open /etc/xdg/lxsession/LXDE/autostart file:
sudo nano /etc/xdg/lxsession/LXDE/autostart
and remove "screensaver" line. Save and exit.

My comments about what I have so far: 

- The system is fast. Certainly much faster than Ubuntu. It boots quicker (edit: at least with original kernel) and is much more responsive.
- EDIT: But SD I/O is still slow :(
- The rootfs partition is Ext4 !
- Both USB keyboard and USB mouse work normally.
- Ethernet is working fine.
- WiFi is working. Firmware is installed.
- HDMI out works. With GUI, I get 640 x 480 picture at 60 Hz on my 720p HDMI TV (with default kernel). Fbdev driver is being used by default. Primitive, I know. But this is only temporary. Later, I will try to install GPU drivers. But first, I need to choose the right version of kernel and install it. (GPU drivers are heavily dependent on the version of the kernel you use.) Of course, you should be able to somehow change you resolution, by modifying your uEnv.txt file. Also, you can install the omapfb driver, which is for OMAP DSS (also uses NEON extension) - it doesn't use SGX though. The omapfb driver will be faster than fbdev driver.
- Sound doesn't work - no soundcard is found. We should be able to solve this ...
- I don't know whether Bluetooth works or not. However, according to some comments on http://www.chalk-elec.com/?p=1478 , it should work.
- Obviously no 2d/3d hardware acceleration yet. I will try to install the drivers ...EDIT: 2d/3d in progress ...
- No hardware video decoding yet. This will probably take a lot of time to set up ...
- Edit: Clock skew problem solved. Took a lot of time !
- A lot more to come. I will try to get as much working staff as I can on this awesome board !

Why did I choose Debian in the first place:

1 - Heard it was much faster than Ubuntu.
2 - Debian uses .deb packages, like Ubuntu, and also shares a lot in common with it. Installing packaged drivers should work ... Of course some changes will be needed.
Actually, after I have done a little bit of reading, I understood that: INSTALLING UBUNTU PACKAGES ON DEBIAN IS NOT A GOOD IDEA AND CAN CAUSE A LOT OF PROBLEMS LATER ON. So, I am going to build everything from source.
3 - I just wanted to see what is Debian like ! (I have already tried Ubuntu, Angstrom, YDL and Fedora.)

What's next ?

Lets build Ubuntu kernel ! This way, we would be able to install SGX drivers and hardware decoders/encoders.
http://alastordmcblog.blogspot.com/2012/05/debian-on-pandaboard-building-ubuntu.html





Tuesday 22 May 2012

Installing Ubuntu on Toshiba Satellite L755G

Intro:
- This is just my method - modify it as you like !

Purpose:
- To quickly install Ubuntu/Lubuntu/Kubuntu/etc on Toshiba Satellite L755G laptop

What do you need (or may need):
- Toshiba Satellite L755G laptop (I know - obvious)
- Ubuntu ISOs (Download links below.)
- Already installed OS + burning software. (My laptop had Windows 7 64-bit pre-installed and had, I think, 3 burning applications.)
- Blank CDs (A USB storage device may be used instead of optical disk, but I have never used such method - not going to explain. )
- Wired or wireless Internet connection is NOT necessary during installation, but is HIGHLY recommended.
- Maybe an hour or 2 of free time ?

Downloading Ubuntu ISOs:
- Ubuntu (the one with Unity desktop environment):
http://www.ubuntu.com/download/desktop
- Lubuntu (LXDE desktop):
http://lubuntu.net/
- Kubuntu (KDE)
http://www.kubuntu.org/getkubuntu/download
- Xubuntu (XFCE) (Didn't try this. Desktop - LiveCD.)
http://xubuntu.org/getxubuntu/
- Other flavors can be found here: http://www.ubuntu.com/project/about-ubuntu/derivatives
* I have used LiveCD ISOs. They are very good to show that your PC will actually run Ubuntu. Excellent way to test your Wifi also. The Wireless chip set is supported, by the way.
* Choose 64-bit, as we are using 64-bit AMD processor in our machine and we want to take advantage of 64-bit processing and more than 4 GB of RAM. (Of course, PAE - Physical Address Extension allows you to use up to 64 GB on 32-bit system. It is not the same as running on 64-bit though - https://help.ubuntu.com/community/EnablingPAE .)
* Choose 32-bit only if you have a reason for it. What is the point of missing 64-bit features otherwise ? One reason would be if 64-bit doesn't work for some reason. (Than again you can just switch ISOs.) A good reason is if you want to run some 32-bit applications which are linked to 32-bit libraries. (There are other ways to have 32-bit applications - https://help.ubuntu.com/community/32bit_and_64bit , but, honestly, this one is the easiest.) I wanted to have at least one 32-bit system to be able to run ePSXe without any problems. (ePSXe depends on some old 32-bit libraries.)
* Download with torrent client when possible

Making LiveCDs:
- Look here: https://help.ubuntu.com/community/BurningIsoHowto
- We just need to burn the ISO onto a blank CD in a specific way. Easy. One thing to remember though: You are burning the ISO using a special burning software. So, you DO NOT extract the ISO file and you DO NOT burn the ISO directly, like you burn movies.
- Windows 7 should have some burning applications pre-installed. You just need to: insert a blank CD, right-click the ISO and choose the burning application. The application should burn the ISO and verify the disk.
- On Win 7 you can use this guide: http://windows.microsoft.com/en-us/windows7/burn-a-cd-or-dvd-from-an-iso-file

So, how do we start our Ubuntu CD ?
- It is straightforward enough.
1) Boot into your default system (most likely Win 7), if you are not there already.
2) Insert the CD, if it is not inserted already. No need to run anything.
3) Restart - now, pay attention to what you see on the screen.
4) When you see TOSHIBA splash screen - press F12 button quickly. This will open the Boot Menu.
5) Most likely, the first option will be "HDD/SSD". We need the "ODD" (Optical Disk Drive) option. Using up/down keys choose this option and press ENTER:
(This is my Boot Menu. As you can see, I have put "ODD" as the 1st choice - makes more sense. If you use USB storage devices to install OSs - use USB. Later I will show how you can change the boot priority/sequence, i.e. what is booted first. But this is BIOS staff, not Linux.)
6) Then you will see black screen with some white characters, or something like that. After a while a Ubuntu splash image should appear (at least for LiveCD), showing that Ubuntu is loading ...

LiveCD has loaded - what is next ?

Ubuntu (with Unity)
1) You will be greeted with this screen in Ubuntu:

2) Choose "Try Ubuntu". (Why not "Install Ubuntu" you might ask ? Well, this way we can first connect to a wireless router for example and have connection. This will than allow us to download staff during installation.)
3) Wait while the system loads. This will take some time. After that you will see the Unity desktop. There should be a "Install Ubuntu XX.XX" icon.
4) You should first make sure that you are connected to the net. If not - connect now. Then, when you are ready, double-click the installation icon.
5) A window pops-up and you can choose your system language ... Well, the rest is more or less straightforward.Visit this page for instructions:
http://www.ubuntu.com/download/help/install-ubuntu-desktop

NOTE: For Ubuntu 12.04 LTS I didn't have to do anything extra to get it working. GUI (Graphical User Interface) started perfectly, which means either:
- The GPU (Radeon HD) was detected correctly and a certain open-source graphics driver started successfully, or
- the VESA (very simple driver - no 2d, 3d staff) loaded automatically.
6) After the system has been installed, it will ask you to restart. Press restart, remove the disk when it is ejected, close the tray and press ENTER to continue.
7) The system should boot up without any surprises.
8) Now, lets install the property ATI Catalyst driver to get 3d and 2d acceleration. Go to: System -> Administration -> Additional Drivers
9) Install the "ATI/AMD proprietary FGLRX graphics driver". (NOT the one with "post-release updates" !) The updated one will most likely fail to install/work. (Failed for me.)
10) Restart again. Now you should have 3d acceleration. To test that it is actually working, lets run "glxgears" command from the terminal. (Install it by running: "sudo apt-get install mesa-utils"). This is what I get:
11) Enjoy !


Lubuntu
1) In Lubuntu, you are will see the following:
2) Choose your language and press ENTER. You will see the following:

3) Don't press any of these yet ! Instead, press F6:
4) Now we can see some boot options. Press Esc. You will see the string of options. Remove the last 2 characters "--", change "splash" to "nosplash", change "quit" to "noquit" and, after that, add: "radeon.modeset=0 xforcevesa". So, the last 4 options will be:
noquit nosplash radeon.modeset=0 xforcevesa
5) "Try Lubuntu without installing" should be highlighted and the code should be shown as in the picture above. Press ENTER.
6) After a while a Lubuntu splash screen will be shown. Then, the LXDE desktop will appear. You will see the installation icon:
7) Double-click and the window will greet you. Choose language, etc ... Visit this page if you need help: https://help.ubuntu.com/community/Lubuntu/InstallingLubuntu
8) After the installation has finished, you will be prompted to restart the computer. The CD will be ejected, take it out, close the tray, press ENTER to continue the restart process.
9) As the system boots up, you will something you do not expect - black screen with white characters - no GUI (at least I got it with Lubuntu 12.04 LiveCD). Check whether you can type - if you can, follow next step. If you can not type, press the Ctrl + Alt + F1 combination. This will take you to Command Prompt.
10) At the command prompt, type your username, press ENTER, your password, ENTER. You must be connected to the Internet at the point. We need to download GPU drivers. Now we are ready to run some commands.
11) Type:
sudo apt-get install fglrx
press ENTER, type your password again, ENTER. The Apt program will then install the fglrx (Catalyst) driver for our ATI Radeon HD GPU. This will take few minutes or so:

12) After the fglrx driver has been installed, type and run the following code:
 sudo aticonfig --initial -f
This will provide the basic configuration for our video card.
13) Reboot:
sudo reboot
After the system has booted, you should be able to login normally (with GUI). Now you also have 3d acceleration !
14) To test that you have you 3d staff, just install "mesa-utils" package and run "glxgears" in the terminal window.
15) Enjoy !

Kubuntu
- Should work the same way as Lubuntu
- Didn't work fully for me, as it could not download fglrx drivers for some reason :(