HTC Universal how to install linux without a Linux computer
| Home | Status | News | Kernel | Hardware | Installing Linux | Screenshots | Bugs |
Now a easier way to install Linux on your HTC Universal
In Qtopia and Openmoko folder there are just one cab file. All you have to do now is to install the cab file with just hitting it. You dont need to create a linux filesystem anymore, it will install to the wince partition on your SD card. It will create a 100MB file on the root of your SD card. When you dont want to have Linux on your device anymore you just uninstall it like you do with a wince application. Remember to install to the device. Not on SD card (even thuogh linux will install to SD card). The *-Linux application will appear where all the other wince programs appear (
example). Just hit the icon and linux will install. Note the first boot will take some time because i Linux is beeing installed, but next time you boot it will boot alot faster. You are also able now to have multiple linux images on your device, since they will appear as Qtopia-Linux, Openmoko-Linux and so. For now i have only created easy installers for Qtopia and Openmoko but the rest will come.
Get the images from here:
Linux-images
The HOWTO below is to install linux the old way, with a linux filesystem on the second partition on your SD card.
Prepare your device for running linux from ramdisk and from SD-CARD
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/discClear your old partition table
Type : oCreate two partitions [one vfat (32MB) and one ext3 (rest) ] like this:
Type : nSet the primary partition
Type : pset the Partition number (1-4)
Type : 1Set 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 : nSet the primary partition
Type : pSet the Partition number (1-4)
Type : 2Set the First cylinder (xx-xxxx, default xx):
Hit enter to select the default valueSet the Last cylinder or +size or +sizeM or +sizeK (xx-xxxx, default xxxx):
Hit enter to select the default valueDefine the Fat partion for WinCe to use
Command (m for help) Type : tPartition number (1-4)
Type : 1Hex 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/part1Make filesystem for Linux
Type : mkfs.ext3 /dev/mmc/blk0/part2Wait 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/vfatPrepare second mount point:
Type : mkdir /mnt/ext3
Mount the partitions
1st partition mountType : mount -t vfat /dev/mmc/blk0/part1 /mnt/vfat2nd 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, O.P.I.E-II, GPEphone, 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/ext3Decompress 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 : syncNow 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 : syncWait 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