Android 5.1 Possibly Coming February 2015

Google released Android 5.0 just over a month ago, and since then Lollipop has been trying to … more

Double Tap to Wake on the Nexus 6 Without Root

A few weeks ago, we featured an app which allowed the Nexus 6 to regain the double tap to wake … more

Make Your Own Heat Sink for the LG Optimus 4X HD

Its not a rare occurrence that performing a resource heavy task on your Android device (e.g. … more

Learn How to Create an Old School Dialer

XDA is not only a great source for custom ROMs, kernels, and various modifications for numerous … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[ Tutorial ] How to Install Debian Linux on Your Samsung Galaxy Fit

OP riddz17

3rd September 2012, 06:29 PM   |  #1  
OP Junior Member
Flag kolkata
Thanks Meter: 43
 
23 posts
Join Date:Joined: Jun 2011
More
This is a Tutorial to install Ubuntu/Debian in any Android mobile.

* Installing Ubuntu or Debian Linux does not format your Android OS or change anything to your phone.
The Operating Systems run over the underlying Android OS which continues to function as normal



Choosing your Linux OS:

Quote:

There are few things you must be aware of before installing Ubuntu/Debian on youe Android Phone

Ubuntu does not support earlier ARM CPUs like the ones used in the Motorola Cliq. Samsung Galaxy Fit (ARMv6), Samsung Galaxy Y, etc.


( Reason behind this is , Your Android OS Kernel must support loop devices. Most newer Android smartphones/tablets come with this support so we can mount our Ubuntu image as a loop device. If not, you will either have to build your own kernel with support for loop devices or you can try an aftermarket ROM for your phone as most aftermarket ROMs come with support for it. )

You need at least an ARMv7 CPU like the kind found in the Motorola Droid, Samsung Galaxy S,HTC EVO 3D, Sony Experia Play, etc. most newer phones (Hummingbird, Snapdragon, Tegra2, etc.).So you can Install Ubuntu if you have ARMv7 or newer Processor.

If you have ARMV6 or any other moderate Processor don't be sad, because Debian supports the CPU on practically all Android devices, so if you prefer Debian, or you can't run Ubuntu, choose the Debian download link.

* If you're not sure what CPU your device has, look up your device on http://pdadb.net/, click the link under CPU, and read the line for "Supported Instruction Set(s)".

e.g. : My Phone which is a " Samsung Galaxy Fit" uses ARMV6 Instruction Sets.






Pre-Requirements:

Hardware Required:

an Android Phone

SD Card with more than 2GB of free Space

Android root environment:

Most important! Your Android device should be “rooted” because you need root access to run Ubuntu/Debian off your Android. If your device is not rooted you have to root your device.


Quote:

Linux Operating System:

Download suitable OS from the following Link:



Ubuntu 11.04 (Natty Narwhal)

linux.ubuntu-natty.tar.bz2 Ubuntu 11.04 (Natty)



Ubuntu 11.10 Oneiric Ocelot

linux.ubuntu-oneiric.tar.bz2 Ubuntu 11.10 (Oneiric)





Debian 6.0 Squeeze

linux.debian-squeeze.tar.bz2 Debian 6.0 (Squeeze)

Quote:

Applications Required:

BusyBox Installer



A terminal emulator like Better Terminal Emulator ( Recommended ) or Terminal Emulator.



Optional Apllications:

androidVNC

Or

ConnectBot


Procedure ----------------------------------------------->

Quote:

Step 1:

(Mount the SD card on your computer.)

Extract the .tar.bz2 file you downloaded to your SD card. You should now have a folder named "linux" on the root of your card.

(Unmount the SD card.)

Open Busybox Installer, and install Busybox.

Open Better Terminal Emulator, and install Better Terminal Emulator.




Quote:

Step 2:

Open your terminal emulator. (If using ConnectBot, connect to 'local', not 'ssh'.)

Run the following commands:

Code:
su




( If Prompt for Superuser Request then allow )

Code:
cd /sdcard/linux

sh install.sh




If you don't see any errors, Linux is now installed.




Quote:

Step 3:

Open your terminal emulator.

To start a chroot session


Code:
su

linux




To start the SSH server

Code:
su

linux ssh



You can then use ConnectBot (SSH: user@localhost) on your device, or any SSH client to connect to your device. See Login Information, below.





Quote:

To start a VNC session

( Firest you need androidVNC to be installed , then type the following in terminal )

Quote:


Code:
su

linux vnc




The first time you run VNC, it will prompt you to create a VNC password.



You can then use androidVNC (host: localhost port: 5901), or any VNC client to connect to your device.

Configure The VNC App as follows:






Note: The default desktop environment is icewm. If you wish to replace it, for example, with LXDE:

Run the following as root in Linux:


Code:
apt-get autoremove icewm- lxde+


Secure your Log in Password:

Please remember to change these passwords if you are planning on using the SSH server. Malicious people can do Very Bad things to your device if you don't.

There are two accounts included in the images:

root

Password:cheesecake

user

Password:dessert

After a successful connection to host you will be able to use Ubuntu / Debian in graphical interface just like in your PC ! It will keep your Android OS as it is and just run in the upper layer over it

Quote:

These are some of the screen shots taken from my Samsung Galaxy Fit!






Linux vs Linux Terminal Emulator :

Terminal Emulator only Emulates Linux terminal, but after Linux Installation you can get full features; more than just the limited commands which runs on Android shell rather than Linux Shell.

Please Leave your Feedback and Queries below. Thank You




Last edited by riddz17; 6th September 2012 at 09:00 AM.
The Following 5 Users Say Thank You to riddz17 For This Useful Post: [ View ]
5th September 2012, 05:38 PM   |  #2  
Junior Member
Flag Brasília
Thanks Meter: 0
 
1 posts
Join Date:Joined: Aug 2012
Thumbs up Verry Good
I'll test it now. Thanks for the tutorial
9th September 2012, 10:42 AM   |  #3  
vs4vijay's Avatar
Member
Flag Jaipur/Ajmer
Thanks Meter: 5
 
58 posts
Join Date:Joined: May 2011
Donate to Me
More
Info 2
Did a long time ago...
even i managed to install Backtrack 5..
anyway nice post...
there is app call BotBrew...try it...
10th September 2012, 08:56 AM   |  #4  
OP Junior Member
Flag kolkata
Thanks Meter: 43
 
23 posts
Join Date:Joined: Jun 2011
More
Quote:
Originally Posted by vs4vijay

Did a long time ago...
even i managed to install Backtrack 5..
anyway nice post...
there is app call BotBrew...try it...

Nice app Bro
Its very hard to get low end devices to perform flawlessly.

but who cares as long as u can work around it
10th September 2012, 01:13 PM   |  #5  
pavel73's Avatar
Senior Member
Bucharest
Thanks Meter: 102
 
433 posts
Join Date:Joined: Aug 2011
More
Thumbs up
great thanks
10th September 2012, 01:13 PM   |  #6  
Junior Member
Flag Pekanbaru
Thanks Meter: 0
 
5 posts
Join Date:Joined: Aug 2012
Thumbs up
screenshots please.
14th November 2012, 04:00 PM   |  #7  
LinuxHippy's Avatar
Member
Flag Philadelphia, PA
Thanks Meter: 2
 
30 posts
Join Date:Joined: Nov 2012
More
Linux won't install
I love this forum. Over the last couple months I've been reading the forums and learning how to root my phone and install custom ROMs. For the last 10 years I've been using Linux on my computers and netbooks. I like Android because it's a mobile version of Linux, but I would like to get a full version of Linux running on my phone. I followed this thread many times with and cannot get Linux to install. I'll try to give the details:

I am running a rooted Samsung Galaxy S 4G T959V running the Valhalla-Black edition ROM (Gingerbread). I installed Busybox V1.20.0 and Busybox Installer V1.20 without uninstalling either. I have Android Terminal Emulator installed with su privileges. I keep getting the same mount error with all the 3 linux images shown on this thread. Here is what I got (the first error has to do with mount):

************************************************** ************************************************** ************************************************

# sh install.sh
Remounting /system rw ...
mount: No such file or directory
Usage: mount [-r] [-w] [-o options] [-t type] device directory
Installing scripts in /system/bin ...
cp: can't create '/system/bin/fsrw': File exists
Unable to chmod /system/bin/fsrw: Read-only file system
cp: can't create '/system/bin/linux': File exists
Unable to chmod /system/bin/linux: Read-only file system
Mounting the Linux image ...
Mounting: Prepwork ...
Usage: mount [-r] [-w] [-o options] [-t type] device directory
Mounting: Loopback mount ...
mknod: /dev/block/loop254: File exists
mount: Invalid argument
Mounting: Setting up chroot environment ...
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
mkdir failed for /data/local/mnt/media/sdcard, No such file or directory
mount: No such file or directory
[ Done ]
Customizing the image ...
install.sh: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent
install.sh: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent
Installing root-scripts ...
mkdir failed for /data/local/mnt/root/scripts, No such file or directory
Unable to chmod /data/local/mnt/root/scripts: No such file or directory
cp: can't create '/data/local/mnt/root/scripts/ssh.sh': No such file or directory
cp: can't create '/data/local/mnt/root/scripts/vnc.sh': No such file or directory
Unable to chmod /data/local/mnt/root/scripts/*: No such file or directory
Install finished

************************************************** ************************************************** *****************************

What am I missing here?

Marty
Last edited by LinuxHippy; 14th November 2012 at 05:01 PM.
14th November 2012, 05:59 PM   |  #8  
Senior Member
Flag Hanoi
Thanks Meter: 470
 
264 posts
Join Date:Joined: Nov 2011
Donate to Me
More
Quote:
Originally Posted by LinuxHippy

I love this forum. Over the last couple months I've been reading the forums and learning how to root my phone and install custom ROMs. For the last 10 years I've been using Linux on my computers and netbooks. I like Android because it's a mobile version of Linux, but I would like to get a full version of Linux running on my phone. I followed this thread many times with and cannot get Linux to install. I'll try to give the details:

I am running a rooted Samsung Galaxy S 4G T959V running the Valhalla-Black edition ROM (Gingerbread). I installed Busybox V1.20.0 and Busybox Installer V1.20 without uninstalling either. I have Android Terminal Emulator installed with su privileges. I keep getting the same mount error with all the 3 linux images shown on this thread. Here is what I got (the first error has to do with mount):

************************************************** ************************************************** ************************************************

# sh install.sh
Remounting /system rw ...
mount: No such file or directory
Usage: mount [-r] [-w] [-o options] [-t type] device directory
Installing scripts in /system/bin ...
cp: can't create '/system/bin/fsrw': File exists
Unable to chmod /system/bin/fsrw: Read-only file system

************************************************** ************************************************** *****************************

What am I missing here?

Marty

I guess mount command in install.sh didnt work
Maybe you can edit it. to correct one, may be this or may be not
Code:
echo "Remounting /system rw ..."
#busybox mount -o remount,rw /system
sh $kit/scripts/fsrw
14th November 2012, 09:28 PM   |  #9  
LinuxHippy's Avatar
Member
Flag Philadelphia, PA
Thanks Meter: 2
 
30 posts
Join Date:Joined: Nov 2012
More
Quote:
Originally Posted by zcop

I guess mount command in install.sh didnt work
Maybe you can edit it. to correct one, may be this or may be not

Code:
echo "Remounting /system rw ..."
#busybox mount -o remount,rw /system
sh $kit/scripts/fsrw

I placed these lines in install.sh and deleted the 3 original lines that looked similar to it. I still got messages about mount, but these are a bit different:

# sh install.sh
Remounting /system rw ...
mount: No such file or directory
Usage: mount [-r] [-w] [-o options] [-t type] device directory
Installing scripts in /system/bin ...
Mounting the Linux image ...
Mounting: Prepwork ...
Usage: mount [-r] [-w] [-o options] [-t type] device directory
Mounting: Loopback mount ...
mknod: /dev/block/loop254: File exists
mount: Invalid argument
Mounting: Setting up chroot environment ...
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
mkdir failed for /data/local/mnt/media/sdcard, No such file or directory
mount: No such file or directory
[ Done ]
Customizing the image ...
install.sh: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent
install.sh: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent
Installing root-scripts ...
mkdir failed for /data/local/mnt/root/scripts, No such file or directory
Unable to chmod /data/local/mnt/root/scripts: No such file or directory
cp: can't create '/data/local/mnt/root/scripts/ssh.sh': No such file or directory
cp: can't create '/data/local/mnt/root/scripts/vnc.sh': No such file or directory
Unable to chmod /data/local/mnt/root/scripts/*: No such file or directory
Install finished
15th November 2012, 06:43 AM   |  #10  
Senior Member
Flag Hanoi
Thanks Meter: 470
 
264 posts
Join Date:Joined: Nov 2011
Donate to Me
More
Full install.sh
Code:
sdcard=$(readlink -f /sdcard)

kit=$sdcard/linux
img=$kit/linux.img
mnt=/data/local/mnt

export bin=/system/bin
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=screen
export HOME=/root

echo "Remounting /system rw ..."

#Mount command
busybox mount -o remount,rw /system

#This script just mount system. We mount it above so we dont need it again.You can see fsrw with notepad....
#sh $kit/scripts/fsrw

echo "Installing scripts in $bin ..."
cd $kit/scripts
for file in *; do
  cp $file $bin
  chmod 755 $bin/$file
done
cd - > /dev/null

echo "Mounting the Linux image ..."
#mount the image
$bin/linux mount

echo "Customizing the image ..."
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 "  Installing root-scripts ..."
#install custom root-scripts in $mnt/root/scripts
if [ ! -d $mnt/root/scripts ]; then
  mkdir $mnt/root/scripts
fi
chmod 755 $mnt/root/scripts
cp $kit/root-scripts/* $mnt/root/scripts
chmod 755 $mnt/root/scripts/*

echo "Install finished"
Try it again and let see what happen

Post Reply Subscribe to Thread

Tags
debian, install ubuntu/debian, linux, samsung galaxy fit, ubuntu
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes