NOTE: This HOWTO is obsolete. We have made it easier to install linux on universal now. You dont need a linux filesystem anymore, just get the cab file and install it. Our new host site is http://linuxtogo.org/~htcpxa
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
Make filesystem for wince
Type : mkdosfs /dev/mmc/blk0/part1
Make filesystem for Linux
Type : mke2fs /dev/mmc/blk0/part2
Wait until the command prompt returns
Reboot Universal by issuing the 'reboot' command
Type : reboot
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 ( If the size dossent match, look here )
Copy all files from C:\Linux\SD-MMC to the SD-card
Put the SD back in Universal
Boot Linux again (From /Universal/Documents/Linux/gnuharet.exe)
Prepare second mount point:
Type : mkdir /mnt1
Mount the partitions
1st partition mount
Type : mount -t vfat /dev/mmc/blk0/part1 /mnt
2nd partition mount
Type : mount -t ext2 /dev/mmc/blk0/part2 /mnt1
YOU MIGHT GET AN ERROR ?EXT2-fs warning...blablabla nevermind this
Decompress the files onto the ext2 partition
Type : tar jxvpf /mnt/"Opie, GPE or bootstrap image" -C /mnt1/ (Check and verify the file name on SD, changes in file name may occure)
Issue the 'reboot' command again. This is important, to be sure that all the files are written properly to the SDCard.
Type : reboot
In WinCe, navigate to haret{DATE}.exe on your SD card and execute it
Type : mkdir /mnt1
Type : mount -t vfat /dev/mmc/blk0/part1 /mnt
Type : mount -t ext2 /dev/mmc/blk0/part2 /mnt1
Type : tar jxvpf /mnt/"Opie, GPE or bootstrap image" -C /mnt1/ (Check and verify the file name on SD, changes in file name may occure)
Type : reboot
In WinCe, navigate to gnuharet.exe on your SD card and execute it
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 : tar jxvpf /mnt/"Opie, GPE or bootstrap image" -C /mnt1/
You can try the bleeding edge kernel with a modified opie image from blueangel build if you follow all these steps:
Accept that it may damage your device, and we don't take any responsibility.
Make Backup!
Download haret (gnuharet.exe) , kernel (zImage), haret config (default.txt) and the opie image (opie-universal-R0.tar.bz2) from http://www.linuxtogo.org/~htcpxa/
Get SD card with size <= 1GB and partition it to have a ext2(ext3) filesystem.
Format and mount it and extract the opie image into it.
Copy the downloaded kernel, haret and it's config to the device internal storage.(for example, My Documents)
Edit startup.root according to your configuration
a) Edit the Kernel Name "zi" to match the name you gave to your downloaded kernel.
b) Use the proper partition number at the 'root=' parameter. (/dev/mmc/blk0/part2 points to the second partition of your SD card. You will need to change this to /dev/mmc/blk0/part1 if you created a single partition.)
c) Save the file as default.txt and place it on the device aside the haret executable.
IMPORTANT! Enable GSM radio.
Close all running programs and do a soft reset.
Start haret and press the "Run" button.
Logon as root with password rootme.
Partitioning & formatting the SDCard directly on the Universal (not PC)
Download the RAR or ZIP from either of these links, decompress the files and copy them to some location on your Universal (usually \My Documents\Linux)
When this is done, browse to this folder on your device and run HaRET.
In case it doesnt load up and it freezes at mmc_rescan (sometimes throws Kernel panic saying its unable to mount it) you might want to reformat your SD card to FAT16 (If using WinXP, choose FAT as its file system).
This will install, decompress and mount a ramdisk image as your root.
When the device finishes booting, login to the Universal with username root, password rootme.
The instructions for partitioning your SDCard & getting Linux onto it are as follows:
a) fdisk /dev/mmc/blk0/disc
a1) Clear your old partition table by typing o at the prompt.
b) We'll create 2 partitions here ('n' command), say, 1st - 31Mb, FAT16, 2nd - remaining space, ext2.
b1) First partition: Type n at the prompt, for a New partition, and hit Enter
b2) Choose p for Primary partition, and 1 for the partition number
b3) Choose 1 for the Start Block
b4) Choose 4 for the End Block (this is 31Mb)
c) Change the type of 1st partition to FAT16 ('t' command, type=6)
d) Create the second partition
d1) Type n at the prompt, hit Enter
d2) Choose p for Primary partition, and 2 for the partition number
d3) Choose the default Start Block
d4) Choose the default End Block - this will use all available space
e) Save the partition table ('w' command) You will be returned to the shell
f) Make filesystem for wince: mkdosfs /dev/mmc/blk0/part1
g) Make filesystem for Linux: mke2fs /dev/mmc/blk0/part2
h) Reboot Universal by issuing the 'reboot' command
At this point you will want to copy the OPIE "image" (.tar.bz2 file) to the Storage Card via Windows (or Windows Mobile)
i) In wince, copy files you need to 1st partition (Storage Card)
j) Boot Linux again
k) Prepare second mount point: mkdir /mnt1
l) Mount the partitions
l1) 1st partition: mount -t vfat /dev/mmc/blk0/part1 /mnt
l2) 2nd partition: mount -t ext2 /dev/mmc/blk0/part2 /mnt1
m) Decompress the files onto the ext2 partition:
m1) tar jxvpf /mnt/universal_rootfs_060312.tar.bz2 -C /mnt1/
n) Issue the 'reboot' command again. This is important, to be sure that all the files are written properly to the SDCard.
o) Grab the kernel from here, unZip the zImage file and copy it into your Linux folder on your device
p) Edit up your startup script (default.txt):
set KERNEL zImage
set CMDLINE "root=/dev/mmc/blk0/part2 console=tty0 mem=63M fbcon=rotate:1"
boot2
q) Enjoy!
Note: You can now copy haret, the kernel and your default.txt to the 31Mb Storage Card/FAT partition and launch it from that location. You may also wish to copy rd, should you need complete access to the ext2 partition (to decompress a new Opie .tar.bz2 for example!)
31Mb will comfortably contain the latest Opie image, should you wish to upgrade.