[HD2 Ubuntu Development] mrmaffen:
Hey guys,

yesterday i finally found the time to try out the fix posted a couple pages before in this thread. And since there were many requests to write a guide on how to boot ubuntu 0.3 with magldr and nand android, i wanna share the following. please notice, that you wont be able to use the touchscreen or the hardware keys. at this time i dont know what causes this problem, but the only way to input ubuntu on my htc hd2 was through a hardware mouse.

Guide to get ubuntu 0.3 running with magldr and nand android:

1. first of all download all the required stuff ... ubuntu 0.3 (first thread) is needed, linit.zip (look at the attachments of this post) and if you not allready have a linux distribution, download a ubuntu or opensuse livecd on distrowatch.com or somewhere else

2. now unzip hd2-ubuntu_0.3.zip and linit.zip to whatever folder you like.

rename a zimage of your choice to "zImage", rename "initrd.cpio.gz" to "initrd.gz", put your zimage and initrd.gz to the root of your sdcard. all the other files inside hd2-ubuntu_0.3.zip belong into /linux

3. open up your terminal and execute the following command to gain root rights: "sudo -s" if your on ubuntu or simple as can be "su" on other distributions.

4. mount your ext2 image: to do so, execute the following commands:

a. "mkdir /mnt/ext2" (creates a folder ext2 in your mnt folder)

b. "mount /path/to/your/image/rootfs.ext2 /mnt/ext2 -o loop"

(mounts the image rootfs.ext2 to the previously created folder)

5. now the command "mount -l" should be listing your image ("/dev/loop0") as mounted, followed by the directory "/mnt/ext2" where it has been mounted in

6. now you can access the mounted image with the following command:

"cd /mnt/ext2" (changes directory to "/mnt/ext2")

"ls" (shows you the content of the mounted image)

7. after that you need to copy the "linit"-file to the bin directory of the mounted image with the following command:

"cp /path/to/linit/file/linit /mnt/ext2/bin" (copys your linit file)

"ls /mnt/ext2/bin" (should now show you the linit file inside the binfolder)

8. the last step to success is the following:

open up "/mnt/ext2/etc/rc.local" with your favorite text editor. you could use kwrite or vim, and edit the following:

before editing rc.local looks something like this:

__________________________

#!/bin/sh -e

#

# rc.local

# stuff

# stuff

# stuff

# stuff

# stuff

exit 0

__________________________

after editing rc.local should look like this:

__________________________

#!/bin/sh -e

#

# rc.local

# stuff

# stuff

# stuff

# stuff

# stuff

/bin/linit >> /var/log/linitlog

exit 0

__________________________

dont forget to save rc.local

9. now you can unmount the rootfs.ext2 image again by executing

"umount /dev/loop0"

10. congratz your rootfs.ext2 image has been successfully edited and the reboot loop problem should be fixed. you can check if "linit" is being executed correctly by reading the "/var/log/linitlog"- logfile. of course you need to mount your image again before being able to access the logfile.

please gimme some feedback on this guide since i dont know if i forgot something or made a mistake.

greetz :)