Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,812,164 Members 39,739 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
riddz17
Old
(Last edited by riddz17; 6th September 2012 at 08:00 AM.)
#1  
Junior Member - OP
Thanks Meter 41
Posts: 23
Join Date: Jun 2011
Location: kolkata
Angry [ Tutorial ] How to Install Debian Linux on Your Samsung Galaxy Fit

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




The Following 5 Users Say Thank You to riddz17 For This Useful Post: [ Click to Expand ]
 
rodri22
Old
#2  
Junior Member
Thanks Meter 0
Posts: 1
Join Date: Aug 2012
Location: Brasília
Thumbs up Verry Good

I'll test it now. Thanks for the tutorial
 
vs4vijay
Old
#3  
vs4vijay's Avatar
Member
Thanks Meter 5
Posts: 57
Join Date: May 2011
Location: Jaipur/Ajmer

 
DONATE TO ME
Did a long time ago...
even i managed to install Backtrack 5..
anyway nice post...
there is app call BotBrew...try it...
 
riddz17
Old
#4  
Junior Member - OP
Thanks Meter 41
Posts: 23
Join Date: Jun 2011
Location: kolkata
Quote:
Originally Posted by vs4vijay View Post
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
Knowledge is knowing a tomato is a fruit; Wisdom is not putting it in a fruit salad.
 
pavel73
Old
#5  
pavel73's Avatar
Senior Member
Thanks Meter 98
Posts: 399
Join Date: Aug 2011
Location: Bucharest
great thanks
 
Dwi Aulia Rahman Putra
Old
#6  
Junior Member
Thanks Meter 0
Posts: 5
Join Date: Aug 2012
Location: Pekanbaru
screenshots please.
 
LinuxHippy
Old
(Last edited by LinuxHippy; 14th November 2012 at 04:01 PM.)
#7  
LinuxHippy's Avatar
Junior Member
Thanks Meter 0
Posts: 17
Join Date: Nov 2012
Location: Philadelphia, PA
Default 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
 
zcop
Old
#8  
Senior Member
Thanks Meter 464
Posts: 257
Join Date: Nov 2011
Location: Hanoi

 
DONATE TO ME
Quote:
Originally Posted by LinuxHippy View Post
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
 
LinuxHippy
Old
#9  
LinuxHippy's Avatar
Junior Member
Thanks Meter 0
Posts: 17
Join Date: Nov 2012
Location: Philadelphia, PA
Quote:
Originally Posted by zcop View Post
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
 
zcop
Old
#10  
Senior Member
Thanks Meter 464
Posts: 257
Join Date: Nov 2011
Location: Hanoi

 
DONATE TO ME
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

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

Advanced Search
Display Modes