In the beginning was the command line..


HOWTO Install Linux on HTC-Apache

, posted: 4-Aug-2006 02:29

This is a very rough guide at the moment, corrections welcome.
This method doesn't remove Windows in any way, similar to booting from CD-ROM on a PC

1. Download tools

http://linuxsecurity.co.nz/barf/htc-linux-3rd-stage-distribution.tar
This archive contains bootloader.tar and apache_root_fs.tar.bz2

2. Install Linux onto SD Storage Card

We must create a Linux partition, install the root filesystem and install a bootloader executable for CE onto an SD storage card. To do this I put the miniSD card into an SD adaptor into a digital camera and connected it to my Linux PC

2.1 Backup your SD card!

Probably best to do this with your own method but I do this:
# mount /dev/sda1 /mnt/hd
# cd /mnt/hd
# tar cvjf /tmp/sd_card_backup.tar.bz2 *
# cd ..
# umount /mnt/hd

2.2 Re-partition your SD card

We need a FAT partition for our bootloader; it is like loadlin. And a Linux ext3 partition for Linux. If you know how to do this already then go for it.

Here are the cheat codes for fdisk: BE CAREFUL BTW
# fdisk /dev/sda

To delete the old partitions:
d

Create a new FAT partiton:
n
p
1
64M
t
1
6

Display partitions:
p

Create Linux partition:
n
p
2
<enter>

Display partitions again and CHECK EVERYTHING:
p

Write partition table to disk:
w
Quit:
q

2.3 Make filesystems

Make a FAT and ext3 filesystem on the SD card.

# mkfs.vfat /dev/sda1
# mkfs.ext3 /dev/sda2

2.4 Copy the filesystem to the SD card

Mount the ext3 filesystem
# mount /dev/sda2 /mnt/hd
# cd /mnt/hd
# tar jxvf /path/to/apache_root_fs.tar.bz2

2.5 Unmount Linux filesystem

# cd ..
# sync && umount /mnt/hd

2.6 Copy bootloader and kernel onto FAT filesystem

# mount /dev/sda1 /mnt/hd
# cd /mnt/hd
# tar jxvf /path/to/bootloader.tar.bz2

2.7 Unmount the FAT filesystem

# cd ..
# sync && umount /mnt/hd

Not much left to do!

3. Boot Linux
3.1 In WM5 goto the storage card in file explorer and run gnuharet
3.2 make sure default.txt is the script, press run
3.3 wait about 2 minutes for boot to finish

4. Connect
4.1 Setup usb networking on your PC
# ifconfig usb0 192.168.0.1

4.2 ssh to 192.168.0.206 root/rootme

5. Turning Off
To safely turn off Linux run the root shell and run the poweroff command. Push the soft-reset button and CE will boot.




Other related posts:
Linus interviewed, with shark-mounted LASERS
OpenMOKO - free PDA/smart-phone OS






Comment by juha, on 4-Aug-2006 08:30

Nice. Must see if you can run a real OS as well on the Apache, like NetBSD. :p


Comment by freitasm, on 4-Aug-2006 08:38

Wow, really cool!


Comment by freitasm, on 4-Aug-2006 08:39

By the way, any screenshots?


Author's note by barf, on 5-Aug-2006 14:51

screenshots: http://linuxsecurity.co.nz/barf/screenshots/


Comment by therian, on 28-Aug-2006 15:34

I have one question. Will linux see wifi, or buetooth card on this device ? If yes then my dream become true :). If it cant than what reason to install linux on it ? I dont see good reason have linux without networ.

barf: the wifi works but the driver has no WPA support yet.


Comment by therian, on 28-Aug-2006 15:35

I have one question. Will linux see wifi, or buetooth card on this device ? If yes then my dream become true :). If it cant than what reason to install linux on it ? I dont see good reason have linux without networ.

barf: yes, wifi works but the driver has no WPA support and bluetooth should work but I have had no success with bluetooth yet. the CDMA/EVDO should be supported soon but Qualcomm aren't a very friendly company to developers :-\


Comment by therian, on 29-Sep-2006 17:54

Guys is it possable to run kismet on PPC-6700 or is there any passive scanner for? If you find way to do such thing you are the best

barf: yes there is an ARM ipkg for kismet and it should run on the HTC Apache but I have not tried it. try this link http://www.netstumbler.org/archive/index.php/t-3267.html


Comment by therian, on 29-Sep-2006 17:57

Guys is it possable to run kismet on PPC-6700 or is there any passive scanner for? If you find way to do such thing you are the best


Comment by snipes, on 30-Dec-2006 16:57

The links are dead. Any chance of getting a new link?


Comment by Kurt Fitzner, on 15-Jan-2007 06:42

Where are the binaries for this now? Everything seems to have dissappeared.


Author's note by barf, on 15-Jan-2007 15:05

I no longer have an Apache so my progress has been stalled. But checkout the XDA developer wiki for downloads and more information.


Add a comment

Please note: comments that are inappropriate or promotional in nature will be deleted. E-mail addresses are not displayed, but you must enter a valid e-mail address to confirm your comments.

Are you a registered Geekzone user? Login to have the fields below automatically filled in for you and to enable links in comments. If you have (or qualify to have) a Geekzone Blog then your comment will be automatically confirmed and placed in the moderation queue for the blog owner's approval.

Your name:

Your e-mail:

Your webpage:

barf's profile

Stuart MacIntosh
Clarkville
New Zealand


Hello world.