The Ice(y’s) Age
(http://blog.hellokitty.com/icyrascal)
What’s Up, what’s on and what’s not… things that go bump in the night (and day)

Running Linux on O2 XDA Exec

I am planning to get an O2 XDA Exec to replace my phone… This phone seems to be my all-purpose phone… except it runs in Windows…

I thought it was the end but… I came around this site that well…uhm… changes the Windows Thingey to Hardcore Linux… and i like to share this with you…

 

note: There is no custom bootloader for the HTC Universal, so linux has to be booted via HaRET.

Download Ramdisk-image to your HTC Universal. Install it to your device (not to SD). The program will appear in Start->Programs->Bootlinux named Ramdisk.

Then do as follows

Start the program Ramdisk from Start->Programs->Bootlinux.

The screen will get some funny colors and seem freezed, don’t freak out -) its normal

Login

   Login with : root
   Password : rootme
Please Note

You write / by holding down FN while pressing the O button

You write + by holding down SHIFT while pressing the = button

This show’s how to create vfat and linux partiton on your SD/MMC card

Write and then hit enter as shown below in the white textboxes

fdisk /dev/mmc/blk0/disc

Clear your old partition table

Type : o

Create two partitions [one vfat (32MB) and one ext3 (rest) ] like this:

Type : n

Set the primary partition

Type : p

set the Partition number (1-4)

Type : 1

Set the First cylinder (1-xxxx, default 1):

Hit enter (This will set the default value to : 1 )

Set the Last cylinder or +size or +sizeM or +sizeK (1-xxxx, default xxxx):

Type : +32M    (NOTE TO MAKE ALTERNATIVE DESCRIPTION HERE ((Blocks/SD-Size)*32=Value to be set))

Create the next partition (linux partition)

Type : n

Set the primary partition

Type : p

Set the Partition number (1-4)

Type : 2

Set the First cylinder (xx-xxxx, default xx):

Hit enter to select the default value

Set the Last cylinder or +size or +sizeM or +sizeK (xx-xxxx, default xxxx):

Hit enter to select the default value

Define the Fat partion for WinCe to use

Command (m for help)
Type : t

Partition number (1-4)

Type : 1

Hex code (type L to list codes)

Type : 6 (For Fat 16)

Command (m for help)

Type : w

Hit enter and you will be returned to the shell

Now you have to create the filesystem on the two partitions you have made

Make filesystem for wince

Type : mkdosfs /dev/mmc/blk0/part1

Make filesystem for Linux

Type : mkfs.ext3 /dev/mmc/blk0/part2

Wait until the command promt returns Reboot Universal by issuing the ‘reboot’ command

Type : reboot
Now you prepare your SD/MMC card to run linux on it

When WinCe starts loading, remove the SD, and put it in your desktop, check that your desired size in MB correspond with what you set it to in fdisk

Choose and download a GUI image (*.tar.bz2 file) and the corresponding linux boot installer (the *.cab file) you want to run, Download Linux.

NOTE: Someone told me that internet explorer might change the extension on the *tar.bz2 file to *.tar.tar. If it does simply just rename it back to it’s name with extension tar.bz2. DOenst mather if you do that in windows or with the RAMDISK image. With the RAMDISK image you can change the name like this:

Type : mv *.tar.tar *.tar.bz2

Copy both files you downloaded to the root of your VFAT partition on your SD-card (it’s the viewable partition in WinXP).

Put the SD back in Universal

Boot Ramdisk again from (From Start->Programs->BootLinux )

Login

   Login with : root
   Password : rootme

Prepare the first mount point:

Type : mkdir /mnt/vfat

Prepare second mount point:

Type : mkdir /mnt/ext3
Mount the partitions

1st partition mount

Type : mount -t vfat /dev/mmc/blk0/part1 /mnt/vfat

2nd partition mount

Type : mount -t ext3 /dev/mmc/blk0/part2 /mnt/ext3

YOU MIGHT GET AN ERROR [EXT2-fs warning…blablabla] nevermind this

Copy Opie, GPE, x11, OpenMoko or Console-image to the linux partition ext3 (without quotes) (no need for the linux-boot cab file yet)

Type : cp /mnt/vfat/"The *.tar.bz2 file" /mnt/ext3/

Go in to the linux partition (ext3)

Type : cd /mnt/ext3

Decompress the image (without quotes)

Type : bunzip2 "The *.tar.bz2 file"

You will now have a file with allmost the same name , but it misses the bz2 ending. The file ends now on just “tar”. Now it’s time to add it to the filesystem, do:

Type : tar xvpf "The *.tar file"

You will now see a lot of files beeing unpacked to your sd card (if it doesnt spam messages on your screen something went wrong, try again). After it is done wait a minute to get sure everything is written. Now do:

Type : sync

Now you can also delete “The *.tar.bz2 file” from both /mnt/ext3 and /mnt/vfat to free up some space (without quotes).

Type : rm /mnt/vfat/"The *.tar.bz2 file"

And (without quotes)

Type : rm /mnt/ext3/"The *.tar.bz2 file"

To be sure everything got written/delete to/on the SD/MMC card do *(Do it three times just to be sure it is finished):

Type : sync

Wait until it get’s done and then issue the ‘reboot’ command again.

Type : reboot
Now it’s time to install the linux bootloader (it wouldnt harm your WinCe bootloader)

Install the cab file (”image”-Linux.cab) to your device (not SD). When it’s installed you are ready to run Linux. Choose Start->Programs->BootLinux and hit the linux bootloader you installed. To free up some some space you can just uninstall Ramdisk. You wouldnt need it anymore.

Enjoy!

Note : There are no password on the image you just installed. Login as ‘root’ and hit [Enter] when it asks for a password (only Ramdisk is suplied with password).

How to install a new updated image on an already formatted SD-Card

Boot Linux with RamDisk (if you uninstalled it you have to install it again).

Type : mkdir /mnt/vfat
Type : mkdir /mnt/ext3
Type : mount -t vfat /dev/mmc/blk0/part1 /mnt/vfat
Type : mount -t ext3 /dev/mmc/blk0/part2 /mnt/ext3
Type : cd /mnt/ext3
Type : rm -rf *

NOTE: Errors may occur, never mind them :

rm: unable to stat `var/lock/browse.dat' : input/output error
rm: unable to remove : `var/lock' : directory not empty
rm: unable to stat `var/run/nmbd.pid' : input/output error
rm: unable to remove : `var/run' : directory not empty
rm: unable to remove : `var' : directory not empty
Type : sync
Type : cp /mnt/vfat/"The *.tar.bz2 file" /mnt/ext3
Type : bunzip2 "The *.tar.bz2 file"
Type : tar xvpf "The *.tar file"
Type : sync
Type : reboot
 
notes: Only applicable to T-Mobile MDA Pro, O2 XDA Exec, 
QTEK 9000, i-Mate JASJAR, Orange SPV M5000, Vodafone VPA IV, 
Dopod 900)

One Response to “Running Linux on O2 XDA Exec”

  1. amethyst_lover:kuririnmail.com Says:

    Wow, thanks for sharing! :)

Leave a Reply