yashsingh1/xdaforums huggingface dataset:
[EVO 4G Android Development] qwasz123:
Ah, thank you. I did as you said and replaced the files and am running the latest nightly (21?) With the stock kernel and by fallowing the instructions on the op's post I still cannot get it to work...

I think it gives me a boot error but I am not sure, here is a link to the picturebas I do not know how to imbedded it into a reply (is it BB codes?)

http://www.imgur.com/1cVGC.jpg

Here's another image of just the script that goes wrong.

http://www.imgur.com/cCTeu.jpg
[EVO 4G Android Development] mwielgosz:
What kernel are you using? Go to settings > about phone and tell me the kernel version
[EVO 4G Android Development] detcup4evr:
I am having a problem getting it to boot. I am getting the following error when trying to run bootubuntu.

modprobe: chdir(/lib/modules): No such file or directory

mount: Invalid argument

I checked and /lib/modules dosen't exist on my phone. I have no /lib path. Can someone who has it working tell me what is in /lib/modules?

I am running stock Rom and tried the following Kernels:

The Stock HTC 2.6.32.17 Kernel

a Netarchy-toastmod-4.3.1 Kernel

a Netarchy-toastmod-4.2.2 Kernel

****Note to people getting the Device Busy message. See if you have moved apps to the sdcard. I stopped recieving those once I moved the apps off the SD Card.

Does anyone have any thoughts?

Thanks,
[EVO 4G Android Development] sac23:
guys can u post the kernel thats working with this thanks guys
[EVO 4G Android Development] mwielgosz:
I'm not sure about sense roms, but I would think a stock HTC kernel would have the ext2 module. On aosp roms, any cm kernel will have it compiled in. To revert back to stock kernel just wipe cache and dalvik and reflash your rom.

It seems that most custom kernels do not have the module...ext2 is kind of legacy now. Savaged-zen WILL include it with their next build.

/system/lib/modules will have whatever modules were compiled and packaged with the specific kernel that you have running on your system. Flashing a different kernel changes its contents. The function to load a module is 'modprobe ' where is the module you want to load. In this case, the script calls 'modprobe ext2' if your kernel wasn't compiled with it, it will fail.

I would suggest to anyone who is missing the module to go to their respective kernel thread and request that the module be built on next build.
[EVO 4G Android Development] KirkH420:
try installing backtrack4 linux instead of ubuntu..... that should be our next goal now.
[EVO 4G Android Development] Homefix:
im using 2.6.35.9-cynogenmodctso@core #20

Cyanogenmod-6-01132011-NIGHTLY-Supersonic

http://mirror.teamdouche.net/?type=nightly
[EVO 4G Android Development] prodigy2m:
HUGE file

Hey guys,

This Ubuntu zip file expands to 3Gb ... Is it possible to minify Ubuntu into smaller version? I remember there were 700 mb version one.
[EVO 4G Android Development] qwasz123:
2.6.35.10-cyanogenmodshade@toxygene #1

The one that comes standards on number 21 of the nightlys.
[EVO 4G Android Development] mwielgosz:
Yea, it is possible. If you look at the tutorial thread that Homefix posted, it will teach you how to make your own image. When you are on the project-rootstock part, change --imagesize 3G to --imagesize 700MB
[EVO 4G Android Development] mwielgosz:
I know that this kernel works...maybe you're having another issue. I will modify a script to include a logfile that ill have you post. I have to run to the store and when ill come back ill throe it together. Gotta love snowstorms!
[EVO 4G Android Development] KERKEDAGAIN:
dunno if the tutorial thread is being actively monitored, so I post here:

During "Creation" I get a 'failed to run in virtual machine' error..

trying for Xubuntu 10.10 running on the latest virtual box..
[EVO 4G Android Development] qwasz123:
Alright thanks again, I will eagerly await your return!
[EVO 4G Android Development] mwielgosz:
Hello again!

I made another script that will log all output of the scripts so I can see for myself exactly what errors you are getting, in full.

Extract these files to your /sdcard/ubuntu/ folder

Then open a terminal and type:

su

cd /sdcard/ubuntu

sh ./ubuntu_log

This will execute all the scripts and create two new files. 'ubuntu.log' and 'bootubuntu.log' Please attach both of those files to a reply. Please do not just copy and paste the results, attach them as files.

Hopefully I can see where it's going wrong
[EVO 4G Android Development] dean_fx:
Theres more to it than just backtrack. You have to make sure your Wireless chipset is capable of going into monitor mode, also you can not do this if your wireless adapter is using any type of workaround for drivers such as NDISWRAPPER. Most Atheros chipsets work flawlessly, but most machines come with these broadcom devices which....linux does not have a good relationship with.

But this would be a cool idea. The thought of it working on our mobile phones doesn't seem likely though. (Just saying).

:)
[EVO 4G Android Development] mwielgosz:
Are you creating your image on a linux distribution? Or are you running linux in a virtual machine on windows?
[EVO 4G Android Development] qwasz123:
Alright here you go!

Edit: They are considered invalid files for uploading.

Edit 2: Had to go onto computer to rezip them here you go now.
[EVO 4G Android Development] mwielgosz:
Alright, cool.

Before you do anything, delete the two .log files from your /sdcard/ubuntu. If we run it again, it will just append more data to them and make them very confusing.

First, is your 'ubuntu.img' file in /sdcard/ubuntu/ for sure? It MUST be in this folder as it is hardcoded into the script

Second, when was the last time you reset your phone? It seems that /dev/block/loop1 is busy and this could possibly be to you trying to mount (or having something mounted) previously. Reset your phone and try again.

Third, if rebooting doesn't work, open a terminal and type:

su

mknod /dev/block/loop1

Once you do these three things, if it still doesn't work, send me those two files once more and I'll see if anything had changed.
[EVO 4G Android Development] qwasz123:
1) Alright already had the Ubuntu.img inside the folder

2) Tried restarting it before (When in doubt restart) and tried it again and no go.

3) mknod, never heard of that command but I did it and yet again didn't get anywhere

Though I do have some nice files for you.
[EVO 4G Android Development] mwielgosz:
Well the logs are the same, still haven't pinpointed your issue.

Try typing this in terminal:

su

modprobe ext2

If it returns nothing, it went through fine. If it does return something, then that's you're culprit. You are running the proper kernel. A CM kernel does have the modules installed...so that should go through fine. It does on my phone and I'm running CM7 as well.

I also attached another bootubuntu script. I'm changing the mountpoint. What seems to be happening is that /dev/block/loop1 has something mounted to it already, which is odd. Someone before was saying that by having apps on the SD card, it would cause these errors. I don't know how apps2sd (or any similar program) works, but I would assume that it loop mounts a directory in the sd card to one of the /dev/block/loop files. In this script, I changed the mount point to /dev/block/loop2 hoping that by mounting it to a different loop point that shouldn't be busy, we can get past these errors. If that is the case, I'm going to suggest permanently including the change as many users could run into the issue.

Just replace the old script with this one. If it works, we've discovered your issues! If not, log me lol
[EVO 4G Android Development] KERKEDAGAIN:
virtual machine on windows xp
[EVO 4G Android Development] mwielgosz:
Your problem lies somewhere in your VM setup then. The OP said that he did get it working in that environment, but how, I do not know. No instructions on that. I would recommend that you set up an Ubuntu distribution if you want to make your own images.

Maybe the OP can comment on his experience with VM?
[EVO 4G Android Development] qwasz123:
My god sorry it took so long, the XDA App stinks and force closes on me all the time and I have not been able to use my Desktop in a while (EST).

First part, ran the scrip and it was OK! Then loaded the new Boot ubuntu (replaced the old one) and it still didn't do anything...

And here are those lovely files you wanted lol
[EVO 4G Android Development] KERKEDAGAIN:
Yeah, I saw that..it's all good, I have one set up, just wanted to multitask here @ the job
[EVO 4G Android Development] mwielgosz:
OK...error on my part. Changed the losetup command but forgot to edit mount. *facepalm*

Here I have attached two files. Try the 'bootubuntu' script first. That should work, but if it doesn't I included 'bootubuntu2' to try as well. If the first one fails, change 'bootubuntu2' to 'bootubuntu' and try again.
[EVO 4G Android Development] qwasz123:
It stops at the brought to you by homefix. Com (or whatever it was called part) with the first script. I am now going to try the second, I tried the login dad and ffffffff but it didn't work so well so I'm going to try the second boot Ubuntu script.
[EVO 4G Android Development] mwielgosz:
Once the scripts work, it will drop into the linux distribution. It will say something like

dad@linux:~$

I forget exactly what the prompt looks like.

The normal linux terminal will just read

$

or

#

depending on if your 'su' or not. Once it drops into dad@linux:/$ then you type in 'login dad' 'ffffffff'

Send me the logs to either script.
[EVO 4G Android Development] qwasz123:
Here's what it looks like, I'll give you the files in a sec

http://www.imgur.com/yfo8Y.jpg
[EVO 4G Android Development] mwielgosz:
What's very strange about that screenshot, is that it reveals that the image failed to mount because 'the device or resource is busy'. But then later on down the line, it sucessfully writes to '/etc/resolv.conf' AND '/etc/hosts which IS mounted and has to be for it not to kick back an error. It's possible that everything is mounted from a previous try at running the script. Try resetting, this will clear all mounts back to default.

Strange error...
[EVO 4G Android Development] fatkitty420:
I'm actually getting another error when I run the "sh ./ubuntu.sh" command.

I see a looping script with what looks to be a "Directory not found cannot create directory" error." It literally just cycles down the terminal screen until my phone reboots.

Any thoughts?
[EVO 4G Android Development] mwielgosz:
What kernel are you running? Using apps2sd?
[EVO 4G Android Development] phwelo:
thanks to those working on this. i just wanted to report back my experience. i've followed all of the steps from the OP. mine is actually beginning to boot but after loading the background image & beginning to load the toolbar(s) me EVO reboots

i'm on CM7 nightly from 01/31 w/ cyanogen kernel 2.6.35.10
[EVO 4G Android Development] qwasz123:
so hit reset terms?
[EVO 4G Android Development] mwielgosz:
No, reset the phone
[EVO 4G Android Development] Homefix:
qwasz123: CM7, Not yet hard to fihd the time

Sorry all you knukle heads came down with the flu and still had to work,

Ill taake a day to read posts to reply if need. Ill post more images. Lucid and Maveric (bare and loaded) with and without gnome-panel.I will also use an open-source compression file.
[EVO 4G Android Development] qwasz123:
That didn't work but I figured out the problem, I was using the .zip file he (or someone else) posted a while ago and it just wouldn't work. So what I did was take the file and un zipx it with 7Zip and put it onto my phone, the script ran great etc, but apparently it only works through VNC....

I did the login etc but what I thought it was, was running Ubuntu on my phone and I could click on the Desktop/use Ubuntu with my finger...

Thanks again for all your help and hard work! I greatly appreciate it! And I love CM7 by the way! Keep up the good work!
[EVO 4G Android Development] fatkitty420:
No apps2sd.

Attached is my kernel and Rom.

Apparently this didn't upload well.

Kernel: King Havs #11

Warm 2.2

Still not working
[EVO 4G Android Development] mwielgosz:
You rock dude. Wondering if you gave up on this thread!

Hope you're feeling better.
[EVO 4G Android Development] mwielgosz:
Awesome! I'm so glad you finally got this working!

Yes, you can only access the desktop through VNC, and that can be a PITA, but it's still really awesome nonetheless. If you end up doing anything really neat with this, please let us know!
[EVO 4G Android Development] Homefix:
keep trying i know it works with your rom
[EVO 4G Android Development] fatkitty420:
I just installed Cyanogen with default kernel. It now works...

Oh well.

One note: I can't start any applications in Ubuntu. Tried to start teminal to su- but no go.
[EVO 4G Android Development] Homefix:
been away couple of days cant start any apps?

do you see the menu-panel? or are you still at the android terminal?
[EVO 4G Android Development] Homefix:
Lets take advantage of irc://irc.freenode.net:6667/#xda-devs

(im using konversation on my UbuntuEvo)
[EVO 4G Android Development] abit4u:
Couldn't get it to work, it goes in a loop. I'm using the latest nightly with CM7 nightly.
[EVO 4G Android Development] Homefix:
were did everyone go?

Who wouldnt want a computer on there phone?

You guys (or Girls) kill me!

Maybe what my wife says is true, Im nuts for doing this?
[EVO 4G Android Development] mwielgosz:
Hahaha, you're not nuts at all. I've been watching this thread everyday, but no one seems to be popping up with new issues. The users who are interested in this neat development haven't responded in a few days :P

BTW, what's the best way to enter text into Ubuntu through the VNC? You can't just click on something and have a keyboard pop up and the only way I found is to open the menu and click send text or something. Is there an alternate way?

Thanks
[EVO 4G Android Development] :
Ubuntu Evo + BT KB and mouse + [WIP] HDMI Development

You're not nuts. Many people have a problem of getting past "phone" to see "workstation".
[EVO 4G Android Development] Homefix:
You should just press and hold the menu key until keyboard (android keyboard)appears.

glad im not the only nut in the world!
[EVO 4G Android Development] arvinghost:
Hey guys so what works and does not work right now with this linux on the Epic?
[EVO 4G Android Development] mwielgosz:
I'm not sure if this exact mod would work out of the box on the epic...its possible. There is a thread for Ubuntu on the epic though...search and check it out. The project can't be much different.

How are people's experiences with using this?
[EVO 4G Android Development] mwielgosz:
Homefix,

Thanks for the lucid image. I'm downloading now and will try tomorrow. Just for info, if you want to know what processes are running on Linux, open a terminal and type 'top' That will show you what is running and if you press 'h' while its open, you can get help displayed which tells you how to sort the list based on CPU, memory, etc usage.
[EVO 4G Android Development] easy1600:
Can you do us a favor and write a script that will undo everything the install script did?

I've tried this twice now. It starts up just fine the very first time. Works great. After a reboot it just loops like some others I have seen here. I didn't want an operating system that works one time only. CM6.1.2|Evo

Thanks.

p.s. If there is a solution I am all ears. I have searched this forum and see nothing to solve our infinite loop problems.
[EVO 4G Android Development] mwielgosz:
I'm about to go to bed, but since tomorrow is Saturday, I will write a script that removes the ubuntu installation. I've been working on a series of updated scripts for this thread, just need to add some final touches. Your request will be simple though, check back tomorrow.
[EVO 4G Android Development] :
Did you make these images yourself? I will try now but would like to know how to make images is there a tutorial for that? Images work fine but then they get old an no one bothers updating until someone else gets interested and updates them.

Edit: Probably should have read the first post better I see the thread now.

Command to find resource hogging processes is "top". "ps - u ubuntu" works too use | grep app name to narrow the list on ps command. You can use part of the app name if you don't know the whole name it just shows all the matches. Also what did you use to zip the files I can't unzip them in ubuntu it just gives me errors in archive manager.
[EVO 4G Android Development] Homefix:
there is no install script persay.

The script creates a "chroot" on your sdcard using the image that is supplied.

Google "chroot"

Loops: all i can add is if you experiance loops download basic image and set it up yourself I will add instructions. I have a maverick image i will be uploading today.EDIT NO I WONT .......

It is a basic image that should work with most roms.

I will list the roms it works with as i find them.
[EVO 4G Android Development] easy1600:
I use chroot for server hardening.

I'm too busy to go through all this myself. When I read "easier than coffee" I assumed it was true (wrong). I'm just waiting for a script that undoes the chroot (which apparently wasn't done right in the original script anyways) so I can use a debian image someone else made because like I said, I don't have time to mess around with all this. I'm fixing to finish up my bachelors real soon.
[EVO 4G Android Development] Homefix:
I have simpler scripts give this a try I have included a 3.5 gig Lucid image If you used the tested rom at that time (CM6) it is simple. As far as the scripts, i did not create them i only used them,

I have noted in the first post that i am not fluent with linux/perl. Im trying to catch on.

I have found simpler scripts which are included in the new image.
[EVO 4G Android Development] KERKEDAGAIN:
.. downloading to test now, will report back in a few. Thanks for your dedication to the project!
[EVO 4G Android Development] easy1600:
I just flashed another ROM so ignore my request. Now all I need is to find a kernel with a loop device compiled to flash over evoNonSense.

By the way there is an improved setup script over here: http://xdaforums.com/showthread.php?t=950083

Thanks to the dev's for doing the grunt work. :)
[EVO 4G Android Development] dasmoover:
Taken from: http://xdaforums.com/showthread.php?p=11320128#post11320128

The problem with all the other boot scripts for Ubuntu is that they assume a loopback device is free. This script is modified to fix that problem by figuring out which loopback device is free. Any app on the SD card may interfere with this script because for some reason apps mount themselves to the newly created loopback device thus causing the "Device or resource busy" error.

function init {
#required for mount -o to function
ifconfig eth0 promisc #must be initialized or will crash when doing it on ubuntu
modprobe ext2
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system

export kit=/sdcard/ubuntu
export bin=/system/bin
if [ ! -d /data/local/ubuntu ]
then
mkdir /data/local/ubuntu
fi
export mnt=/data/local/ubuntu
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export USER=root
export HOME=/root
}

function loop {
loop=`losetup -f`
mknod $loop b 7 0
echo "Please type the number you see after /dev/loop and hit enter"
echo $loop
read loopno
losetup /dev/block/loop$loopno /sdcard/ubuntu/ubuntu.img
mount -t ext2 /dev/block/loop$loopno $mnt
}

function sysmount {
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
mount -o bind /dev $mnt/dev
mount -t devpts devpts $mnt/dev/pts
}

function networking {
sysctl -w net.ipv4.ip_forward=1
#echo "Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4"
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "Setting localhost on /etc/hosts "
echo "127.0.0.1 localhost" > $mnt/etc/hosts
}

echo "Initializing filesystem"
init
loop
echo "Mounting proc, sysfs, dev, devpts"
sysmount
echo "Setting up Google Open DNS and networking"
networking
echo "Ubuntu deployed succesfully, opening chroot."

chroot $mnt /bin/bash
echo "Welcome to Ubuntu"
#After exit command is executed clear it all up
echo " "
echo "Shutting down ubuntu"
umount $mnt/dev/pts
umount $mnt/dev
umount $mnt/proc
umount $mnt/sys
umount $mnt
echo "Filesystem unmounted"
losetup -d $loop

#rm /dev/loop* - hides which app is using the loopback device

# remount of /system READONLY
mount -o remount,ro -t yaffs2 /dev/block/mtdblock3 /system

I have not tested this but in theory it should work. To exit the Ubuntu system without restarting your phone simply open up root shell and enter 'exit'.
[EVO 4G Android Development] mwielgosz:
READ ALL BEFORE CONTINUING:

Sorry it took so long, I've been busy with family stuff. I wrote a script that simply removes EVERYTHING to do with this Ubuntu set up including the /sdcard/ubuntu folder on your SD card. This script will make it so nothing to do with Ubuntu is left on your phone. Useful if you are trying to either straight up delete Ubuntu, or need to redo the installation for whatever reason. The script that "installs" this actually just places a few small executable scripts into your /system folder. Whether you keep or delete the files, it shouldn't really matter as they are such small files. Nonetheless, you asked for this script, and you got it.

USE WITH CAUTION: I'm not responsible for anything that happens to you're phone due to this script.

Remember, it deletes the files installed into your /system folder AS WELL AS the ubuntu image and the entire ubuntu folder on the sdcard, so only run this if you absolutely want or need to.

To run:

* Download the 'uninstall_ubuntu.sh.zip'

* Unzip the 'uninstall_ubuntu.sh' and place on the ROOT of your sdcard! (Do NOT place in the ubuntu folder)

* Start a terminal

* type the following: (without quotes)

* 'su'

* 'cd /sdcard/'

* 'sh uninstall_ubuntu.sh'

* Reboot your phone for good measure

When the script is done, nothing will remain of this Ubuntu installation. Now you can either forget about Ubuntu on Android, or give another image a shot knowing that you have an absolutely clean system.

When the script is finished, everything is removed. USE WITH CAUTION
[EVO 4G Android Development] Homefix:
someone help me with this:

Im trying to get .config option in the kernel with CONFIG_DEVTMPFS at least 2.6.32

I have no clu what to do. but if i can do this it will let me have a workaround for upstart system in ubuntu and get a lot more things working

How do i add this to the kernel or if it is even possible.
[EVO 4G Android Development] mwielgosz:
Sounds like you're going to have to compile your own kernel if you want to switch an option. More than likely, its in the .config file usually found in /use/src/linux/.config

It's been awhile since I actually compiled a Linux kernel, so googleing 'kernel .config' and 'compile Ubuntu kernel' should provide sufficient information.
[EVO 4G Android Development] Homefix:
Got it Compiling NOW!!!!!!!!!!

what a pain in the ass setting up things though.

Sorry about all the script mess im only 1 tester and when it takes an hour to transfer the image to sdcard doesnt leave much time for debugging,

not to mention im not a linux programmer (yet)

mwielgosz: thanks for the help
[EVO 4G Android Development] mwielgosz:
How did it turn out? I will second the fact that the long transfer of the image makes debugging a PITA but unless you get android running in a vm on Linux (which is definitely possible), it's all one can do.
[EVO 4G Android Development] m11kkaa:
This is a great work!

It would be better(and faster I think) if it would work native without a remote-viewer and maybe without running android.
[EVO 4G Android Development] weinerwad3000:
I have the newest version of cyanogenmod 7 and I keep getting the error message "modprobe: module 'ext2' not found

mkdir: can't create directory '/data/local/mnt': files exists