[Samsung Galaxy S (4G Model)] sconsylman:
Linux on SGS4G Working! Done and Done!

Figured it out.

I can get Ubuntu 11.04, 11.10 & Debian 6 to mount repeatedly in all sorts of ui updatable configurations using this information:

http://www.nerd65536.com/2011/07/installing-ubuntu-in-android-version-2.html

It's a friggin Christmas Miracle! Can't tell you how much time I've wasted working this out, and it all boils down to the sh and run scripts.

So, without further ado, here goes.

!!Make sure you're rooted!!

!!The quotes just tell you what to type. Don't type them!!

1.

Download one of the three builds on the website listed above (or build your own, it should work fine). Extract it from tar.bz2, they should all extract to a linux file, this includes the necessary scripts. Put it on the sd-card on your phone.

2.

Download the new scripts that (Nerd) listed found here: http://ohm.nerd65536.com/android-linux/scripts-latest.tar.bz2

And extract them. You'll have another file that says linux. Open it, take the three files inside (install.sh, root-scripts & scripts) and paste them in the linux folder you moved to your sd-card. They will overwrite the ones currently there. These scripts work for sgs4g, the originals did not.

3.

Install the latest BusyBox in xbin if it's not already installed (must be rooted). Latest is 1.19.3

4.

Download a terminal client, like Better Terminal Emulator or Android Terminal Emulator. I use the first. The terminal needs to run the commands as root, especially the linux vnc command as it didn't want to work for me no matter if I started by typing su. Better Terminal Emulator has a check box to always start in root.

5.

Open up your terminal emulator and type su if you are not rooted there. Then change directory to the linux file on the sd-card. run the sh file there.

Like this:

"su"

"cd /sdcard/linux"

"sh install.sh"

If it works, the resulting dialog in terminal won't throw up any problems.

6.

Get back to / on sd by typing in terminal:

"cd /"

You should then have a: / # prompt, which means you are still rooted.

Enter:

"linux"

Which should result in a: root@localhost:/#

This means Linux is running. Congratulations. It should continue to run unless you shut down your phone.

7.

Download a VNC client, like Android VNC Viewer (free) or Remote VNC Pro, which I use. Add a new entry in it, with the following settings:

Host: localhost

Port: 5901

Password: cheesecake

Color: 24-bit

Name: Linux

When that's done save if you can or back out if you can't, and go back to your terminal emulator.

8.

It should still say: root@localhost:/#

If it doesn't, fine, if it does, just go back to root prompt by typing:

"exit"

Which should get you: / #. Then type:

"linux vnc"

Which should run itself and mount the chroot environment. It should tell you your new 'X' desktop is localhost:1, and have a: / # prompt again.

It might also ask you for a password, if so then put whatever password you'll remember in that's longer than 6 characters and verify it. This only happens once.

9.

Go back to your VNC client and if you entered a password in step 8. then edit your listing to your password instead of cheesecake, if not then don't.

Click on the Linux link and BAM! (shameless Emerilism), you're at your Linux desktop which should be running a iceWM desktop interface, which is fast. The LXDE desktop is nicer and if you want that then go into you're terminal and get into the linux shell by typing:

"linux"

And then switch to LXDE by typing:

"apt-get autoremove icewm- lxde+"

Which will run through the removal/ installation, and verify you want to download the <400mb files. Type:

"y"

And give it time to finish. When finished, just go back to your VNC client and hit Linux again, and you will have a nice looking functional desktop, with a cpu load graph on the bottom. I tried using Gnome desktop and Unity 2d, but both of these would install and not fully run with all options. They are heavier and slower, but cool non-the-less. Let me know if anyone has luck with these on Android.

Notes-

You only have to type "linux vnc" once in terminal to start linux every time you boot your phone. Otherwise, just open your VNC client and click on Linux to use it. Easy!

You will want to update and upgrade your linux after install, do so by typing in terminal:

"apt-get update"

"apt-get upgrade"

Also, you might run across a problem if you try to add-apt-repository, that's because that python command is not present. To use it, enable by typing:

"apt-get install python-software-properties"

Also of note, the downloadable linux builds are sized to about 2.15gig on your sd, which is big enough for most. There is a way to resize them which I tried but it gave me trouble in loading. I will try again and see if I can get it to work.

Here's the link from Dangermouse:

http://www.androidfanatic.com/community-forums.html?func=view&catid=9&id=1610

Thanks to Nerd65536 for the info, write-up and files. He fixed my problem.