[Guide] Ubuntu 12.04 desktop on N7 2013 with LinuxOnAndroid - Nexus 7 (2013) General

Hello,
I'm gonna describe here a method that can bypass the "loop device not found" bug with Android 4.3 and LinuxOnAndroid (also called Complete Linux Installer).
With that method, you will be able to run Ubuntu 12.04. It will not harm your device, since it's only an application and a "mount loop".
This is not from me, I found some loose informations on LoA's forum and just tried it out. Then I wrote this guide when I finally got it working. Credits are at the end of the post.
Informations :
- Any Kernel should work (I use ElementalX 1.4)
- Any ROM should work (I use ParanoidAndroid 3.99)
- Any 4.3 device should work (this has been seen working on Nexus 4 and Nexus 7 flo).
- This trick should work for any GNU/Linux armel distribution, but you'll have to change some things, like "startlxde" command and others. I can't help you for that.​
What do I need ?
- Root access(SuperSu is recommended)
- BusyBox
- a root file explorer (ES File Explorer is recommended)
- Android 4.3 or CustomROM based on 4.3
- A computer running GNU/Linux (Ubuntu is recommended, but this should work with any debian-based distro. LiveUSB should work)
- Internet access (Around 450Mb download is needed, so 3G or 4G is not recommended)
- ... some free time.​
What should I do ?
Step 1 : Install apk on your device
Download and install those 3 applications :
- Complete Linux Installer
- Terminal Emulator
- Android-VNC-viewer​
Step 2 : Prepare the .img ubuntu disk on your computer
- Start Ubuntu on your computer.
- Download the LinuxOnAndroid "ubuntu.img" from Sourceforge (you'll need the 'small' version : 396Mo)
- Create a new folder (anywhere you want, ext4 partition is recommended, so /home/user is good) and call it "loa" (for LinuxOnAndroid)
Code:
[I]Example : [/I]
mkdir /home/yourname/loa
- Extract the ubuntu1204-v4-small.zip in that folder
- Open a terminal and navigate to the directory where the ubuntu.img was extracted :
Code:
cd /home/yourname/loa
- Enter the following commands :
Code:
#Create the needed directories
mkdir ubuntunew ubuntuold
#Create a new empty .img
dd if=/dev/zero of=ubuntunew.img bs=1M count=0 seek=4096
#Format your new .img into ext4 (original is ext2 and bugs with Android 4.3)
mkfs.ext4 -F ubuntunew.img
#Mount the .img into the directories
sudo mount -o loop ubuntu.img ubuntuold
sudo mount -o loop ubuntunew.img ubuntunew
#Copy the content of downloaded ext2.img into created ext4.img (may process during some time)
sudo cp -r ubuntuold/* ubuntunew
#Unmount mounted .img
sudo umount ubuntuold
sudo umount ubuntunew
Step 3 : prepare your device for the new ubuntunew.img
- Copy the ubuntunew.img (4Go) from your computer to your device
- Place the ubuntunew.img in SDCARD/ubuntu/ubuntunew.img (you'll need to create the directory)​
Step 4 : prepare Complete-Linux-Installer for the new ubuntunew.img
- Open "ES File explorer", turn on the "root explorer" option
- Navigate to /data/data/com.zpwebsites.linuxonandroid/files
- Edit bootscript.sh with a text editor :
1) In "Set up loop device and mount image" :
The line :
$bbox mount -t ext2 /dev/block/loop255 $mnt
becomes
$bbox mount -t ext4 /dev/block/loop255 $mnt
2) In "Mount all required partitions" :
add the line :
$bbox mount -o bind /sys/fs/selinux $mnt/selinux
3) In "Unmount all user defined mounts if any" :
add the line :
$bbox umount $mnt/selinux
- Save changes in bootscript.sh​
Step 5 : Use Complete-Linux-Installer to boot ubuntunew.img
- Open "Complete-Linux-Installer
- Go to "Launch" > "Settings" > "Add"
Name : Droidbuntu
Image : /storage/emulated/0/ubuntu/ubuntunew.img
- Choose "Droidbuntu" from the list and "Start Linux"
- Proceed with the installation (terminal starts and ask you a few things) :
Code:
Example values I used on my N7 flo :
- resolution : 1920x1200 (I disabled navbar and statusbar, if you did not, you'll have to try acceptable values)
- run vnc : [B]yes[/B] (important! it will allow you to start the GUI)
- run ssh : no
- password : whatever you want
- You should now be in linux shell (you can tell by the [email protected]:/# in the terminal emulator)
- Enter the command :
Code:
#It will allow you to start the GUI by adding startlxde to the xstartup script
echo startlxde | tee /home/ubuntu/.vnc/xstartup
- Leave the terminal alone (don't close it) and open "androidVNC"
Values to use :
Code:
Nickname : Droidbuntu
Password : ubuntu
Adress : localhost
Port : 5900
Username : root
24-bit color (4 bpp)
Check the local mouse checkbox
- Clic on "Connect"​
You are now in Ubuntu 12.04 LXDE. :highfive:
You may want to change "entrymode" in settings, and use "Touchpad", it's better in my opinion.​
What's next ?
To start Ubuntu later, just open Complete-Linux-Installer and click "Start linux", then once you're in [email protected], open VNC and "connect". Yes, it's that simple.
The command lines need to be entered in terminal emulator, not in lxterm nor any terminal in Ubuntu.​
Credits :
LinuxOnAndroid Team
Canonical and partners
Following LinuxOnAndroid forum users : clb, Isei, RobbH
NOTE : My english surely isn't perfect. If I made any errors, or if you don't understand a step, please tell me.

I can upload an ext4 ubuntu.img (described in step 2), but only if it really is necessary. The image is 4.0 Gigabyte and it will take me a long time to upload this... (My upload internet speed is 40Ko/s so it will take 30 hours to upload, and I'll be glad not to^^)

Awesome guide thank you.
Sent from my HTC Desire HD

Could some one post the image prefered-large one because i do not have ubuntu and it seems complicated for a 'noob like me

bogii4 said:
Could some one post the image prefered-large one because i do not have ubuntu and it seems complicated for a 'noob like me
Click to expand...
Click to collapse
This will not work "as it" with the large image, because you are adding the command startlxde to Ubuntu, which will start LXDE, not Unity.
Do not forget that small image uses LXDE, when large image uses Unity. I don't know which command you should use to start Unity in the xstartup script for VNC.
But, if you want some programs that are inclueded in large-image, you can always use "apt-get install nameofthepackageyouwant" in the terminal-emulator while using Ubuntu. This command will download and install the program. But if you want Unity, I can't help you, maybe some else know...
And, by the way. You don't have Ubuntu on your PC but you want to use it on Android ? That's odd^^

can you verify this works on Flo? it's not clear that you have this on your Nexus
reading the working devices list on linuxonandroid.org, it says "It does not work when going to the mount step since there is a bug in 4.3. It should run perfectly after that is fixed."
have a link or two where someone has successfully installed this on their Nexus 7 (Flo)? or do you have screenshots of it on yours?

Midnight_Rider said:
can you verify this works on Flo? it's not clear that you have this on your Nexus
reading the working devices list on linuxonandroid.org, it says "It does not work when going to the mount step since there is a bug in 4.3. It should run perfectly after that is fixed."
have a link or two where someone has successfully installed this on their Nexus 7 (Flo)? or do you have screenshots of it on yours?
Click to expand...
Click to collapse
It works on flo, I posted here in "Neuxs 7 (2013) > Nexus 7 (2013) General" and the title of this thread is "on N7 2013".
I also explained in the introduction that this is a way to bypass the bug with 'mount loop'.
I also said in the "informations" box that it works with 'flo'
I also gave the credits to users from LinuxOnAndroid forum, who made this possible. There you'll find some testimony of people who were able to run it. You can also check RobbH's post on LinuxOnAndroid thread, here, on XDA.
Sorry, but I think that it's pretty clear haha

Sent from my Nexus 7 using xda app-developers app

sure, ok, seems odd though that you edited your OP after you tell me the info i was looking for was already in the OP
whatever, thanks anyway

Midnight_Rider said:
sure, ok, seems odd though that you edited your OP after you tell me the info i was looking for was already in the OP
whatever, thanks anyway
Click to expand...
Click to collapse
I added this to OP :
Code:
Example :
mkdir /home/yourname/loa
I'm trying to help you and others here, I'm not here to be insulted and called a liar. Thank you.

anyway (workaround) we can boot the 'large image as in Unity the full desktop experience? or do we have to wait for an actual fix ?

Just thought I would pop in and say hi.
Thanks to @Vaykadji and everyone else in LoA land that helped get everything running on 4.3 we are finally sorting the bugs.
A beta version of the app featuring the edits needed in the boot script has been pushed to our beta test group and new ext4 images are being cooked as we speak.
Should not be much longer now and LinuxonAndroid will fully support 4.3

bogii4 said:
anyway (workaround) we can boot the 'large image as in Unity the full desktop experience? or do we have to wait for an actual fix ?
Click to expand...
Click to collapse
as I said : the part in the guide where you add "startlxde" to the xstartup script is only for LXDE (so: small image of Ubuntu only). But if you find the same command for Unity, you will maybe be able to boot with Unity.
Note: Unity and LXDE are both "desktop environment", but different ones. Google it if you don't understand, I can't explain this with my poor English :/

I used this method,but in ubuntu 12.04,it's only X cursor and gray desktop.
in ubuntu 13.04,solved this problem. so we best use ubuntu 13.04.
now I have a problem:in ubuntu,I installed openjdk and run java application .if java application not close and run background.then I press power button to close screen,battery drain very quickly.I saw "android os " always awake.one hour maybe drain 5% battery.
if close the java application battery drain normal.and "android os " no longe awake.
this problem only found in nexus 7 (flo), I have run java application in other android device(like nexus 7 2012,htc evo 4g lte,htc incredible) all of them didn't appear this problem.
some people can test this problem?
and how can I resolved it?

sdwshlsdx said:
I used this method,but in ubuntu 12.04,it's only X cursor and gray desktop.
in ubuntu 13.04,solved this problem. so we best use ubuntu 13.04.
now I have a problem:in ubuntu,I installed openjdk and run java application .if java application not close and run background.then I press power button to close screen,battery drain very quickly.I saw "android os " always awake.one hour maybe drain 5% battery.
if close the java application battery drain normal.and "android os " no longe awake.
this problem only found in nexus 7 (flo), I have run java application in other android device(like nexus 7 2012,htc evo 4g lte,htc incredible) all of them didn't appear this problem.
some people can test this problem?
and how can I resolved it?
Click to expand...
Click to collapse
The X cursor and gray desktop appears when you don't add "startlxde" to you xstartup script. I'll try with 13.04 if I have the time, I couldn't tell right know.

Works well on Ubuntu 13.04 small image (but in 13.04, you don't have to do the "echo startlxde | tee /blablabla" command)

a little off topic but.. i was able to boot Windows XP using Bosch it took 10-15mins to fully boot but it is not usable i expected more mouse seems smooth but clicking - the start menu, open something takes forever :/ worth it?

Vaykadji said:
I added this to OP :
Code:
Example :
mkdir /home/yourname/loa
I'm trying to help you and others here, I'm not here to be insulted and called a liar. Thank you.
Click to expand...
Click to collapse
you're right, did not mean to insinuate anything or insult you, that was not my intent. please accept my apologies

Thank you ! We're good.
Now, since this guide will soon no longer be usefull (with LoA being updated), I'm willing to do some researchs on how to improve Linux ARM experience. Because I noticed that they were plenty of cool things that were not ported (or not officially though).
Some repo's are broken for example. Official repo's (I was planning to install LightSpark, a flash-player fork, but no can do). Maybe this will be more usefull for LinuxOnAndroid user's.
And Touch should be released soon for Nexus products (not including flo, but hopefully it'll come quick).

So, with this, it's not touch screen?
Sent from my Nexus 7 using Tapatalk 4

Related

Debian working niceley on Desire.

Debian for Desire.
If you are able to try this on another android device, please do as I will be very interested in the results.
Download
http://www.multiupload.com/79TSI1AAF9
You will need.
-Root access.
-Busybox (included in most custom roms)
-1.4gig free on SDCARD
-VNC Client (ie. AndroidVNC)
-Terminal Emulator (ie. ConnectBot)
-7zip
Instructions
-Extract the file deSIREbian.7z on your PC using 7zip.
-Copy the contents (debian.img and deboot) to root directory of SDCARD.
-On your phone in terminal emulator type
su
sh /sdcard/deboot
Click to expand...
Click to collapse
You should get a blank screen showing "localhost:/#" after a couple of seconds.
-On your phone in your VNC client log in using these details
Password - password
Port - 5901
Click to expand...
Click to collapse
Nickname and Address are not needed, call it what you want though.
Changing the colour to 24bit and enabling local mouse pointer and full screen bit map are not neccesary but reccomended.
-Thats it.
Notes.
-You can log in via ssh, (gives a much better terminal, ie works properly with aptitude). Use [email protected] and password "toor"
-The version of Debian is Armel Lenny, installed using debootstrap.
-It is just the base package with LXDE on top, you only get a desktop, a file browser, an internet browser, and a pic viewer.
-If you want more packages there's tonnes of room on the image. eg apt-get install openoffice.org or apt-get install abiword or apt-get install any flipping thing u want
-You can access the SDCARD from Debian at "root/sdcard" (read-write)
-You can access Debian filesystem from Android (When Debian is running) at "sdcard/debian" (read only)
-debian.img is mounted at "sdcard/debian" using "dev/block/loop5"
-So far the only rom i have come accross that this dont work with is one of the cyanogen nightlies from last week. apart from that, working on opendesire, cyanogen, defrost, leedroid, official 2.2 with busybox...
Issues.
Debian cannot be shut down. You need to reboot the phone to do this. (You can kill the VNC server with "vncserver -kill :1" there is an icon on the festoons to do this.)
Update log.
deSIREbain.
-First release.
deSIREbain2
Fixed
-Loading a second terminal no longer breaks vnc.
-You no longer need to create the folder debian on sdcard.
Added
-ssh server (login with root and toor)
Removed.
-The image has been downsized from 2 gig to 1.4
Hey,
thank you for your work, i will test it so far and will tell you the results
got this error:
Code:
# su
su
# sh /sdcard/deboot
sh /sdcard/deboot
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
mount: mounting /sdcard on /sdcard/debian/root/sdcard failed: No such file or di
rectory
net.ipv4.ip_forward = 1
chroot: can't change root directory to /sdcard/debian: No such file or directory
#
If you have the same problems try out
su
mkdir /sdcard/debian
losetup /dev/block/loop3 /sdcard/debian.img
mount -t ext2 /dev/block/loop3 /sdcard/debian
ls /sdcard/debian
thx to mercianary for help
greetings
I found this guide quite helpful at getting a bootstrapped Debian setup running.
http://www.saurik.com/id/10
I didn't need to insert the ext2 module as it's already loaded for me, I guess G1s didn't have that convenience back then.
blackstoneuser5 said:
I found this guide quite helpful at getting a bootstrapped Debian setup running.
www . saurik.com/id/10
I didn't need to insert the ext2 module as it's already loaded for me, I guess G1s didn't have that convenience back then.
Click to expand...
Click to collapse
I used parts of this for reference too. Its a great guide, explains things really well.
i've just updated this. link is in the first post.
Fixed
-Loading a second terminal no longer breaks vnc.
-You no longer need to create the folder debian on sdcard.
Added
-ssh server (login with root and toor)
Removed.
-The image has been downsized from 2 gig to 1.4
debian for desire--help please
hi
I spent much time for searching debian or ubuntu for desire, but nothin worked
know i found this and i have download everything and start to install over the terminal
but the " sh /sdcard/deboot" is not workin to
there's only this answer:
# su
su
# sh /sdcard/deboot
sh /sdcard/deboot
[: not found
losetup: not found
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
busybox: not found
sysctl: not found
chroot: not found
may somebody help me?
i really want to have it on the desire
thanks
It looks like you had not installed busybox
Which ROM do you use ?
oh i'm sorry
i'm a newbie and don't really know what a rom is
but i had problems with busybox and there was a somebody who said i can get the app titanium and let it install the busybox
could you please show me a tut how to install busybox
maybe a german tut
thanks
Getting error at: sh /sdcard/deboot
line 5: syntax error near unexpected token `else'
Rosi1337 said:
Getting error at: sh /sdcard/deboot
line 5: syntax error near unexpected token `else'
Click to expand...
Click to collapse
dont know why that happened.. works on mine. syntax looks ok to me.
try with this one (attatched), it's the same but without the bit that's not working for you.
what rom are you using, i shall try to replicate the error so I can try to fix properly.
thepuechen said:
could you please show me a tut how to install busybox
maybe a german tut
thanks
Click to expand...
Click to collapse
There should be a guide on installing busybox somewhere if you want to search for it, i know i remember seeing one a while ago.
Too be honest, your better off just flashing a rom that includes busybox, it would be MUCH easier.
have a look here and see what takes your fancy, I would recomend defrost, because it is stable and easy to overclock.
Thanks mercianary,
It works fine!,
I use customised DeFroST_0.9b_uvonly with USB-host patch.
By the way I would like to add more options to kernel line.
Where can I find like a menu.lst file ? or How to add it to kernel line.
There is no /dev/graphics/* in running Debian console.
I would like to use FrameBuffer on running Debian.
thanks,
Android VNC won't connect Trying to get a handshake, but then says that VNC connection failed
please paste at that time log
jacobtc said:
Android VNC won't connect Trying to get a handshake, but then says that VNC connection failed
Click to expand...
Click to collapse
Please paste at that time log.
Maybe vnc server does not running.
tknv said:
Thanks mercianary,
It works fine!,
I use customised DeFroST_0.9b_uvonly with USB-host patch.
By the way I would like to add more options to kernel line.
Where can I find like a menu.lst file ? or How to add it to kernel line.
There is no /dev/graphics/* in running Debian console.
I would like to use FrameBuffer on running Debian.
thanks,
Click to expand...
Click to collapse
You should understand that this is not a really booted native linux. Instead you are working in a chroot environment. So there is no kernel running that can get parameters. Only the the stock kernel of your DeFroST. Also there is no FrameBuffer as the graphic hardware ist not accessible. Instead this approach uses a vnc-server to which you can connect via a local viewer.
The advantage of this approach is clear:
- run almost any linux package available in the debian repository
- use your phone as before with the nice android
The disadvantage:
- no graphic output, so no 3D-games (which are rare under linux on the arm platform ;-)
- you can crash your android by eating up to much ram (not such a problem - it restarts on its own and if not you just have to reboot)
Thread is dead?
It seems this thread is dead. The problems many users seem to have come from a dirty setup. The image is broken in many terms:
- wrong file permissions on important binaries, like su
- wrong file permissions on many device files under /dev, so the ttys are only accessible by root
- wrong permissions on other places so there are always errors when installing additonal software (e.g. with the man pages)
- wrong setup that uses the root user for the desktop - instead an unprivileged user should be used
- missing packages for timezones and locales so the time is only right, if you are in a UTC region and console programs having trouble displaying anything else then plain english
I can not recommend using this setup image. It is better to use one of the instructions available online to get a clean setup.
Su doesn't work because your allready root.
Getting anything but root to work would be a real pain.
As you said its a chroot environment, its never going to be perfect.
The image was made using debootstrap just like all the other 'clean' ones.
Yep, it is broken as hell, but it works for what most people would need it for...make,gcc,python,a proper web browser,torrents, and some emergency word processing on the train to work.
The problem most people have is not being able to mount the image, this is due to fro-yo a2sd taking up all the loop devices.
Just thought I'd add my 2 cents.
I tried this on a MIUI rom and the scripy didnt do anything - ie i ran it using:
"# sh /sdcard/deboot"
.....and all it said was:
"#"
I entered all the lines in the shell script but the last one said it failed to launch VLC and no commands registered property (not even ls)
So i tried it on Defrost 5.1, and the script still didn't work.
But when i entered everything manually, it did work. Not too sure about the green theme though.
But thanks alot! Saves me spending a few hours trying to coax a working debootstrap out of my computer.
Thanks!
Josh.
mercianary said:
Su doesn't work because your allready root.
Click to expand...
Click to collapse
Nope. Actually su works only for root. It's missing the setuid root flag like all other binaries that should have it set.
mercianary said:
Getting anything but root to work would be a real pain.
Click to expand...
Click to collapse
Nope. I am always working as a normal, unprivileged user in my chroot. You just have to be in the proper groups. No need to work as root. Android works also with an unprivileged user.
mercianary said:
As you said its a chroot environment, its never going to be perfect.
The image was made using debootstrap just like all the other 'clean' ones.
Yep, it is broken as hell, but it works for what most people would need it for...make,gcc,python,a proper web browser,torrents, and some emergency word processing on the train to work.
Click to expand...
Click to collapse
This is what I do not understand. There is no need that it is broken, as mine works without any errors. So I think something went wrong in creating yours. For sure a chroot is no running OS but you can server almost any service with it and run anything you want (if your ram does not get exhausted ;-).
mercianary said:
The problem most people have is not being able to mount the image, this is due to fro-yo a2sd taking up all the loop devices.
Click to expand...
Click to collapse
Yes. Everyone with a good rom should have a2sd+ (aka the old a2sd) which saves more space than the froyo one and leaves your loop devices for you.
jo

Debian Lenny on Droid Eris [02/14/2010 - WORKING! mjgdroid completed!!]

EDIT [02/14/2010]: Please see mjgdroids FINISHED PORT HERE.Make sure to thank him and/or donate to mjgdroid.
EDIT: MAKE SURE YOUR ROM SUPPORTS PARTITIONS ON YOUR SD! YOU CAN USUALLY FIND THIS INFO IN YOUR ROMS FAQ.
I'm currently looking for a work-around. Mounting EXT3 still works in the rooted terminal, but that doesn't help Android see your FAT partition.
Here it is folks, working instructions to get Debian Lenny running on your Droid Eris! I say that it's 90% complete because I do not yet have fully functioning MeeGo, I hope to resolve the issue sometime this weekend. Otherwise, all is well. I'm releasing the instructions so that others in the community can contribute.
Thanks to ban_dover for a lot of initial work. For author credit, other contributions, and the original thread leading up to my fix, see http://forum.xda-developers.com/showthread.php?t=748094. If there is ANYONE else who needs to be credited here, PLEASE pm me and I'll edit this post.
Also, if you're wondering "Why Debian Lenny?" it was readily available and already set up for ARMv5 and up. There are also available MeeGo binaries for Lenny. WOOHOO! Everybody's life is easier.
EDIT: I've released what I consider to be an unstable/incomplete RAW image. I will not link to unstable images in this post, you can download it on page 2 of thread. This image can be used to skip both step 1 and converting the image from QCOW to RAW.
1. Create ARM image containing Debian Lenny
In Linux command line
- Download Debian ARM Installer
wget http://ftp.de.debian.org/debian/dis...el/current/images/versatile/netboot/initrd.gz
wget http://ftp.de.debian.org/debian/dis.../versatile/netboot/vmlinuz-2.6.26-2-versatile
- Create disk image
qemu-img create -f qcow deb-arm.img 4G
- Run QEMU VM to run Debian ARM Installer
qemu-system-arm -M versatilepb -kernel vmlinuz-2.6.26-2-versatile -hda deb-arm.img -initrd initrd.gz -append "root=/dev/ram" -m 256
- In Debian installer, follow prompts
I chose the following user access, root-pass:debian91, user:debian and pass:debian91
Install desired defaults. I initially went with desktop environment; core environment may be best for MeeGo
- Reboot VM ONCE to permit it to statisfy any changed dependencies
2. Create filesystem on phone and copy Lenny
In Linux SUPER-USER command line
- Backup SDCARD if necessary
- Enter superuser mode
"sudo sh" or "sudo bash"
- Partition SDCARD
Use partition editor of choice (I used GParted)
FAT must be first partition
Create second partition as ext3
- Mount EXT3 partition
mkdir sd
mount -t ext3 /dev/sdb2 sd
- Convert QCOW image to RAW image
qemu-img convert deb-arm.img -O raw deb-arm.raw
- Mount RAW image as loop
mkdir image
mount -t ext3 deb-arm.raw image -o loop,offset=32256
- Copy image contents to EXT3 partition on SDCARD
cp -r image/* sd
- Unmount both SDCARD and RAW image
- umount deb-arm.raw && umount /dev/sdb2
3. Bind necessary nodes and create chroot jail
In eiter ADB shell or in rooted phone command line (either method MUST BE SUPERUSER!!!)
- Enter superuser mode
"su" (make sure to accept and remember if asked on rooted phone; also not sure how to superuser in ADB shell)
(NOTE: The folowing commands should use "busybox" as a prefix if using ADB shell in terminal)
- Mount EXT3 partition (should be /dev/block/mmcblk0p2)
mkdir /data/local/debian
mount -t ext3 /dev/block/mmcblk0p2 /data/local/debian
- Bind the necessary nodes
mount --bind /dev/pts /data/local/debian/dev/pts
mount --bind /proc /data/local/debian/proc
mount --bind /sys /data/local/debian/sys
sysctl -w net.ipv4.ip_forward=1
- Enter into Debian system
chroot /data/local/debian /bin/bash
4. Installing MeeGo and opening an Xsession through VNC
- COMING SOON!! (like, over the weekend)
EDIT: MINOR SETBACK DUE TO FROYO NOT SUPPORTING PARTITIONED SDCARDS. WORKING WITH DEVS TO RESOLVE.
Connecting chroot to VNC
Running MeeGo environment
- Why Not Now
Finding the best way to get an xserver on Android... possibly without VNC
Seeing which is better, install MeeGo before copying to SDCARD, or after
- Possible future: adapting Lenny to favorite distro flavor
- This would take a lot more of my time, and those who want to convert it to ubuntu can google it more easily
Information Sources
This is a list of articles that I've gleaned my info from.
Debian Lenny ARM on Qemu
http://www.debian.org/releases/stable/installmanual
http://www.finalcog.com/howto-install-debian-lenny-arm-qemu-ubuntu-jaunty
http://kevin.deldycke.com/2007/04/how-to-grow-any-qemu-system-image/
Chrooting Troubleshooting
http://forum.xda-developers.com/showthread.php?t=748094
http://forums.dlink.com/index.php?topic=6073.0;wap2 (helpful in determining why nexus one and incredible images wouldn't chroot)
https://help.ubuntu.com/community/BasicChroot
http://forums.gentoo.org/viewtopic-t-470306-start-0.html
Inspiration
http://bayleshanks.com/wiki.pl?tips-computer-android-g1_debian_cyanogenMod
Most of the G1 development on XDA
http://androidforums.com/incredible-all-things-root/120622-how-run-ubuntu-droid-incredible.html
Very cool, good job.
very nice indeed!
Thanks guys.
I've always wanted to ask but thought it might offend someone. In any case, what will this enable us to do that we couldn't do already?
Sent from my FroyoEris using XDA App
xnatex21 said:
I've always wanted to ask but thought it might offend someone. In any case, what will this enable us to do that we couldn't do already?
Sent from my FroyoEris using XDA App
Click to expand...
Click to collapse
My thoughts exactly, I have no idea what's being said here.
Sweet! Nice work.
korben dallas said:
My thoughts exactly, I have no idea what's being said here.
Click to expand...
Click to collapse
Hmm... I sometimes fall on the answer that its obvious. Let me give a few reasons why I did it. Other than "it is fun for me."
1. Because we can, lol
2. It opens potentially the full gamut of available Linux software that wouldn't otherwise run (unless ported)
3. Broadened capability means wider choice
4. Unknown territory (at least for Eris users) provides new frontiers
I like these answers, three out of four also sum up why open source exists.
Very nice man. Got any screens?
Nikolai2.1 said:
Very nice man. Got any screens?
Click to expand...
Click to collapse
Right now, my camera is my eris. I'll get somebody to take either video or some pics this weekend so y'all can see it in action.
Could anybody create an image and upload it I just spent the last 4 hours waiting for debian to install inside qemu only for it to hang right before the end lol. Needless to say I just want to experiment with it but I don't really want to do that again or risk it hanging again.
Running X from Chroot
OK, so I was sitting around on break and it hit me that Debian Lenny has the Gnome Mobile desktop designed for touch interfaces in its repositories. The project is called Hildon and was the basis for Maemo before it became MeeGo. Voila, debian gui solved.
Then I remembered an article I'd read while in college on running X from within a chroot jail. I love google; I took a look around for it and found it: http://norman.walsh.name/2003/08/22/chroot. Bingo! We may not need VNC to get graphical output.
In short, my free time is going to consist of installing Hildon in Lenny and writing a script to bind the proper directories, descend into chroot and run X.
It's interesting to note a few things. I read on a few boards that android doesn't have it's own Xserver. Historically, chroot was used for testing purposes to ensure that a system could run on the existing kernel/hardware/etc. Well, in Debian Lenny we have an xserver and its dependencies compiled to run on ARMv5 and up. So technically if we can get X to run from chroot with the proper bindings, then we can get that SAME xserver to run directly on Android. Further, the ability to run Debian in chroot directly implies that the same software will run outside of chroot.
And one speculation: it would be an interesting experiment to see if these tools could be run side-by-side with the default Android rom. To any devs familiar with Android roms, does that sound overly ambitious?
AcidRoot said:
Could anybody create an image and upload it I just spent the last 4 hours waiting for debian to install inside qemu only for it to hang right before the end lol. Needless to say I just want to experiment with it but I don't really want to do that again or risk it hanging again.
Click to expand...
Click to collapse
Hey AcidRoot! I give no guarantees as I mentioned I'm still working out kinks, but I can upload my image. I'll compress it, upload it, and edit this post with a link to it.
My current image of Debian Lenny ARMv5 is available here. I'm not posting the link in the first post because this image does not constitute what I'd call stable and complete, just so you're forewarned.
composerdude said:
Hey AcidRoot! I give no guarantees as I mentioned I'm still working out kinks, but I can upload my image. I'll compress it, upload it, and edit this post with a link to it.
My current image of Debian Lenny ARMv5 is available here. I'm not posting the link in the first post because this image does not constitute what I'd call stable and complete, just so you're forewarned.
Click to expand...
Click to collapse
Thanks alot I know the risks I just want to experiment with it.
One of the kinks that would be immediately noticed is that paths to executable directories are not set. When chroot into /data/local/debian, make sure that one of the first things you do is change the path variable.
Code:
PATH=/usr:/bin/:usr/local/bin:.
oman def going to try this later on tonight... sounds GREAT
What is this exactly?
Awesome work man! I've been following this in ban_dovers thread. I just needed to comment here so it'll show up in my "participated" folder on my xda app.
I'll be lurking and waiting for something more stable and noob friendly. Keep up the great work.
Sent from my nonsensikal froyo using XDA App
@joshw0000: Thanks for the encouragement!
@EVERYBODY: I just discovered today after updating Tazz Froyo to the latest version that updates to CM6 have aparently broken support for partitioned SD cards. I am looking for a work-around before working out more kinks. My istructions still work, it's just that ANDROID sees a blank SD, even though partitions can still be mounted to run Debian. Anyone testing, check your FAQs to make sure partitions are supported. I'll keep you posted on my end.

Debian Squeeze on GT540

Hi,
I start this thread to speak about natively running Debian Squeeze on LG Optimus GT540.
I have put somme script to bootstrap complete installation on sdcard on :
poivron.org/~jimpulse/swift
Please read README first.
Kernel is 2.6.29 from lge source with minors modifications :
* lge source don't compile properly ( this is not what is distribute as binnary ?GPL violation? ).
* Framebuffer console on startup.
* Software refreshing enable.
* Race condition on mddi register function when using software refresher
* Inkernel command line.
* ext3fs
Kernel debian packages are in swift/kernel
the boot image is in swift/boot and is reconstruct at end of bootstrap.
Lxde environement with matchbox-window-manager and matchbox-keyboard is working fine for me.
Slim is used as display manager in autologin mode.
Freesmartphone is installed but not configured (TODO)
Wifi (4325) is working but module is not loaded on startup. The firmware is from lge source distribution but is the same as on binary distribution.
Bluetooth (?4325?) is not working. (blueman need dpkg --configure at first startup). (TODO)
Enjoy.
--
jim
i got: You don't have permission to access /~jimpulse/swift/README on this server.
You don't have permission to access /~jimpulse/swift/README on this server.
Says when i try to open README file
Sory, I"m noob !
Now, It's working.
I didnt understand how it's booting. What should i do. Just flash boot.img to recovery then boot from it? Is it enough or what should i do can you write it step by step?
Hi,
You must install debian on first partition of your sdcard.
The partition must be ext2 or ext3 formated (preferably ext3).
The script 'bootstrap.sh' is make for that, you have to be root to use it.
the card must be mounted with suid,dev,exec .
you must have installed somme packages on your host, read README file.
--
jim
hi there,
so its something like a dual boot ?
something like this http://forum.xda-developers.com/showthread.php?t=1408824.
Hi,
It is not dualboot by itself.
It is just a scritp to install Debian Squeeze armel on sdcard and build a boot image.
More explanation :
!!! Please, dont run the script if your dont understand what it do !!!
You have to edit the script to match your preference :
ROOT=<the target directory where to install to>
ROOTDEV=<Name of the device were your phone will look to find root filesystem>
This script is tested only on Ubuntu oneiric but should work on other debian-like distros.
You can format your sdcard like this : sudo mkfs.ext3 -L swift /dev/XXX
where XXX is the device file corresponding to the partition you want to format. You can figure out that by looking at kernel message after inserting the sdcard : dmesg
Eject and reinsert the card to mount the new filesystem.
Remount the filesystem with apropriate options : sudo mount -o remount,exec,suid,dev /media/swift (or wherether your filesystem is mounted).
So, change ROOT= variable as ROOT=/media/swift (or whatether ...)
and ROOTDEV=/dev/mmcblk0p1 (for the first partition of the sdcard)
Then run in the swift/ directory : sudo ./bootstrap.sh
If all is right, it take aprox 4 hours on my [email protected] to download and install everything.
After installation, you have choice to flash the boot rom (eg : sudo fastboot flash recovery /media/swift/boot/boot.img-2.6.29-swift) or to use it as chroot environnement from android.
jimpulse said:
Hi,
It is not dualboot by itself.
It is just a scritp to install Debian Squeeze armel on sdcard and build a boot image.
More explanation :
!!! Please, dont run the script if your dont understand what it do !!!
You have to edit the script to match your preference :
ROOT=<the target directory where to install to>
ROOTDEV=<Name of the device were your phone will look to find root filesystem>
This script is tested only on Ubuntu oneiric but should work on other debian-like distros.
You can format your sdcard like this : sudo mkfs.ext3 -L swift /dev/XXX
where XXX is the device file corresponding to the partition you want to format. You can figure out that by looking at kernel message after inserting the sdcard : dmesg
Eject and reinsert the card to mount the new filesystem.
Remount the filesystem with apropriate options : sudo mount -o remount,exec,suid,dev /media/swift (or wherether your filesystem is mounted).
So, change ROOT= variable as ROOT=/media/swift (or whatether ...)
and ROOTDEV=/dev/mmcblk0p1 (for the first partition of the sdcard)
Then run in the swift/ directory : sudo ./bootstrap.sh
If all is right, it take aprox 4 hours on my [email protected] to download and install everything.
After installation, you have choice to flash the boot rom (eg : sudo fastboot flash recovery /media/swift/boot/boot.img-2.6.29-swift) or to use it as chroot environnement from android.
Click to expand...
Click to collapse
I have done it for one time but it didn't boot So im gonna do it again tomorrow. I dont have time today
I'm always having problem with the script. Now im starting again. I hope it will done this time... And can you use a .35 kernel for this?
Hi,
I'm planning to include .35 kernel, but I dont know which one to use. I've start a thread to ask people there preferences. Kernel need minor modification to have frame buffer console working.
If you have probleme with the script, post last few line of output and I will try to help.
--
jim
I have the mismatch size problem with the one of xorg-bla-bla packages By the way Mikegapinski's kernel is good to work i think.
Edit:
And does this make a problem?
pre-installing dpkg
warning, in file '/var/lib/dpkg/status' near line 3 package 'dpkg':
missing description
warning, in file '/var/lib/dpkg/status' near line 3 package 'dpkg':
missing maintainer
Click to expand...
Click to collapse
These two warning are not a problem, these are only because dpkg/status is not complete before installing dpkg. It's a bootstrap edge effect (dpkg need dpkg to be installed).
If the script don't run until the end, you should have a phase number given at end of output. You can skip already ran phase by passing a phase number as parameter to the script.
The xserver-xorg-core problem is about dependencies against all video driver. So I mangle the control file to remove these dependencies. Perhaps this can fail if debian repo version has changed.
jimpulse said:
These two warning are not a problem, these are only because dpkg/status is not complete before installing dpkg. It's a bootstrap edge effect (dpkg need dpkg to be installed).
If the script don't run until the end, you should have a phase number given at end of output. You can skip already ran phase by passing a phase number as parameter to the script.
The xserver-xorg-core problem is about dependencies against all video driver. So I mangle the control file to remove these dependencies. Perhaps this can fail if debian repo version has changed.
Click to expand...
Click to collapse
Now i have bootedup but how can iload the wifi module now?
Hi,
The default password for root is root .
There is no sudo preinstalled so use su.
Firmware and nvram settings are in /etc/wl as for android names rte.bin and nvram.txt .
You have to pass parameters at load time :
modprobe wireless firmware_path=/etc/wl/rtecdc.bin nvram_path=/etc/wl/nvram.txt
or put this in /etc/modprobe.d/wireless.conf :
alias wlan0 wireless
options wireless firmware_path=/etc/wl/rtecdc.bin nvram_path=/etc/wl/nvram.txt
Wicd is not working correctly so you have to configure by hand
(iwconfig and ifconfig) or edit /etc/network/interfaces. (view debian administration guide for that).
I will update the script tomorrow to add a configuration file for modprobe and an alias to wlan0.
--
Jim
jimpulse said:
Hi,
The default password for root is root .
There is no sudo preinstalled so use su.
Firmware and nvram settings are in /etc/wl as for android names rte.bin and nvram.txt .
You have to pass parameters at load time :
modprobe wireless firmware_path=/etc/wl/rtecdc.bin nvram_path=/etc/wl/nvram.txt
or put this in /etc/modprobe.d/wireless.conf :
alias wlan0 wireless
options wireless firmware_path=/etc/wl/rtecdc.bin nvram_path=/etc/wl/nvram.txt
Wicd is not working correctly so you have to configure by hand
(iwconfig and ifconfig) or edit /etc/network/interfaces. (view debian administration guide for that).
I will update the script tomorrow to add a configuration file for modprobe and an alias to wlan0.
--
Jim
Click to expand...
Click to collapse
Thanks for these and how can i access the command line from my computer?
Hi,
Sorry, but I've forget to put openssh on package list. I'he also froget to add debian repo to sources.list .
Edit /etc/apt/sources.list with nano or vi and add a line with :
deb http://ftp.debian.org/debian/ squeeze main
then run apt-get update
You have to use the lxde terminal to configure wireless and install openssh-server (apt-get install openssh-server).
After that, you will be able to connect with ssh (ssh [email protected]<IP ADDRESS>) from your computer.
adbd is not working and need some tweak to work with debian.
--
Jim
Hi,
I've update bootstrap.sh :
* openssh-server and openssh-client are installed per default
* sources.list is now created durring bootstrap with same repo that the bootstrap process used.
* modprobe is configured to pass correct parameters to wireless module. There is also ans alias wlan0 ponting to wireless.
* network/interfaces is update to have the loopback interface configured at boottime. The configuration for wlan0 must be tweak for your network (essid, dhcp or static ...) .
Now, I'm working on 2.6.35 from wingrime and hope to publish it next week.
--
Jim
So, how is it going?
Sent from my GT540 using Tapatalk
jasper580 said:
So, how is it going?
Sent from my GT540 using Tapatalk
Click to expand...
Click to collapse
Yeah i wonder it too. I is so good to have debian on my phone. It'll be more usable with a touchscreen gui. It doesn't lag more. I think you should change the keyboard to a bigger. And we should can rotate screen. At least with running a sh file from terminal By the way you're great! I think this is gonna be awesome for our phones...

Guide for building your own custom Raring Ubuntu-Core IMG.

Guide to making a Raring Ubuntu-core image on a Linux PC/laptop (NOT a virtual machine (VM)) for the purpose of installing it on your TF101.
All credit goes to the time and consideration x3maniac took to assist me with doing this!
OP for Tubutnu by x3maniac
This guide allows you to create a CORE Ubuntu image on your Linux box and then install it using the Tubuntu application for Windows. ***Please note, a CORE image does not contain a GUI. The gnome-core guide in the next link will walk you through the steps of installing the gnome-core GUI after you have made your fresh Raring Ubuntu-Core image.***
http://forum.xda-developers.com/showthread.php?p=37803357
***Why do I want to do this when the OP by x3maniac already has a Raring image for download? This guide is helping you make your own UPDATED image. There are daily builds of Raring and the image in the OP by x3maniac is over 2 months old as of this last update to this post.***
Please note that I am using a stock Ubuntu 12.10 laptop. I believe any variant of Ubuntu on a laptop or PC should work with this guide just fine.
Download the files first and then open Terminal to input our commands.
Download: http://cdimage.ubuntu.com/ubuntu-core/daily/current/raring-core-armhf.tar.gz
(You may optionally choose any date time from the Ubuntu-core folders. Ensure you are using the armhf tar.gz file.
Download (Recommended): https://www.dropbox.com/s/dqn9aa94oeju9kf/modules.tar.gz
Alternate Download: http://goo.im/dev/x3maniac/mod_firm_ext.zip
Alternate Download: http://www.novaspirit.com/downloads/mod_firm_ext.zip
After the downloads are complete, open Terminal and let’s get the image built!
A side note, I did not know that using ~ represented the user folder so if you do great, if not it will help you understand that /home/thomas can be represented using ~. So any subfolders of /home/thomas are included using the ~. I will specify my full paths and you can substitute the directories you wish to use. (Linux is still new to me too, I know enough to be dangerous!)
1. mkdir /home/thomas/images/ubuntu-raring
2. cd /home/thomas/images/ubuntu-raring
3. sudo apt-get install qemu
4. sudo apt-get install qemu-user-static
5. Now type this command: qemu-img create raring.img 200M
a.The Ubuntu Raring core image is approximately 186MB. So you understand at 186MB you only have 14MB available of extra stuff you can put into the image. You can resize up later but never down. You may specify any MB size you wish to use for the image. Experiment later, for now just make it 200M.
6. fdisk raring.img (you will see an error about invalid flag, this is ok, step 7 below is w for write, do proceed to step 7)
7. Type w to quit
8. Determine the file system you want (I used ext4)
a. Now type: mkfs.ext4 raring.img (according to config file of Tubuntu app, the partition is set up as ext3, you can use that as well)
b. A warning that your image is not a block special device (when choosing ext4) hit Y to proceed.
c. From /Ubuntu-raring directory type: mkdir mount
9. Now type: sudo mount –o loop ./raring.img ./mount
10. Now type: cd mount
10a. Now type: ls (you are only listing the mount directory to verify you have the lost+found directory) Go up one directory to /home/thomas/images/ubuntu-raring
11. Now type: cp /home/thomas/Downloads/raring-core-armhf.tar.gz /home/thomas/images/ubuntu-raring
12. Now type: sudo tar xvvf raring-core-armhf.tar.gz –C ./mount (you should not be in the mount directory)
13. Now type: sudo tar xvvf modules.tar.gz -C ./mount (you should not be in the mount directory)
14. sudo cp /usr/bin/qemu-arm-static /home/thomas/images/ubuntu-raring/mount/usr/bin (enter)
15. Now type: sudo chroot mount (if successful you will see /#)
16. Now type: passwd and make a password and confirm it.
17. Now type: exit
18. Now type: sudo umount ./mount
19. You should now be in the /home/thomas/images/ubuntu-raring/ directory. From here use the ls command and see your raring.img file.
20. You will need to copy this file your Windows box and use the Tubuntu installation application OR wheelie and nvflash commands. (Wheelie and nvflash commands are for more advanced users).
21. Click on this link for the next guide: http://forum.xda-developers.com/showthread.php?p=37803357
Hi, I have no problems creating the image and mounting it. But when chrooted:
apt-get update
0% [Working]qemu: Unsupported syscall: 374
Err http://ports.ubuntu.com raring Release.gpg
Something wicked happened resolving 'ports.ubuntu.com:80' (-11 - System error)...
I am on Ubuntu 12.10 64-bit. What could it be? qemu & qemu-user-static installed, qemu-arm-static copied...
Thank you and sorry for my CZ-english
onmail said:
Hi, I have no problems creating the image and mounting it. But when chrooted:
apt-get update
0% [Working]qemu: Unsupported syscall: 374
Err http://ports.ubuntu.com raring Release.gpg
Something wicked happened resolving 'ports.ubuntu.com:80' (-11 - System error)...
I am on Ubuntu 12.10 64-bit. What could it be? qemu & qemu-user-static installed, qemu-arm-static copied...
Thank you and sorry for my CZ-english
Click to expand...
Click to collapse
I need to update my guide. After the image is created on your Linux box you then install it on your tablet using tubuntu application. From the tab is where you run apt get commands. Sorry about that.
Sent from my SGH-T999 using Tapatalk 2
TomTcom said:
I need to update my guide. After the image is created on your Linux box you then install it on your tablet using tubuntu application. From the tab is where you run apt get commands. Sorry about that.
Sent from my SGH-T999 using Tapatalk 2
Click to expand...
Click to collapse
Oh, I see, but I think I will not be able to install apt-utils wpasupplicant if the wlan0 adapter is not working (I mean when wpasupplicant is not installed in the image).
onmail said:
Oh, I see, but I think I will not be able to install apt-utils wpasupplicant if the wlan0 adapter is not working (I mean when wpasupplicant is not installed in the image).
Click to expand...
Click to collapse
Yes you will because the core image has everything you need except the supplicant. You can make your own supplicant or copy from your working dual booted prime image of android. Let me try and update the guide later tonight.
Sent from my SGH-T999 using Tapatalk 2
onmail said:
Oh, I see, but I think I will not be able to install apt-utils wpasupplicant if the wlan0 adapter is not working (I mean when wpasupplicant is not installed in the image).
Click to expand...
Click to collapse
Ok, made several changes to my guide. Here's a couple things to note in case you missed them.
1. This guide helps you make an image of Raring Ubuntu-Core. This means there is no GUI and an additional post I have linked to for installing Gnome-Core (your actual desktop environment) for Raring.
2. After the Raring.img is made, you need to start on the Raring Gnome-Core guide and follow those instructions. That installation takes about 2 hours to download and answer questions because it is such a core install.
3. About the wifi, you will be using x3maniac's Tubuntu Windows installation application and starting from fresh with Prime Android and your new Raring image and if you follow the second guide it will walk you through setting up your wifi (do make sure you boot into Prime Android and set up your wifi first before booting to Raring.
4. Please familiarize yourself with the OP I have linked to for the x3maniac Tubuntu application.
It's not as hard as it may seem. After you do it a few times it's rather quick. Installing gnome-core by yourself is kind of slow and a bit tedious but the purpose of doing this was to have complete control of your image.
Later on if you are brave you can also build your own kernel as well and make changes. See my guide in my xda signature.
Hope this helps, thanks for using my guide. Hit the thanks button a couple of times and I'll make sure you get up and running.
TomTcom said:
Ok, made several changes to my guide. Here's a couple things to note in case you missed them.
1. This guide helps you make an image of Raring Ubuntu-Core. This means there is no GUI and an additional post I have linked to for installing Gnome-Core (your actual desktop environment) for Raring.
2. After the Raring.img is made, you need to start on the Raring Gnome-Core guide and follow those instructions. That installation takes about 2 hours to download and answer questions because it is such a core install.
3. About the wifi, you will be using x3maniac's Tubuntu Windows installation application and starting from fresh with Prime Android and your new Raring image and if you follow the second guide it will walk you through setting up your wifi (do make sure you boot into Prime Android and set up your wifi first before booting to Raring.
4. Please familiarize yourself with the OP I have linked to for the x3maniac Tubuntu application.
It's not as hard as it may seem. After you do it a few times it's rather quick. Installing gnome-core by yourself is kind of slow and a bit tedious but the purpose of doing this was to have complete control of your image.
Later on if you are brave you can also build your own kernel as well and make changes. See my guide in my xda signature.
Hope this helps, thanks for using my guide. Hit the thanks button a couple of times and I'll make sure you get up and running.
Click to expand...
Click to collapse
OK, thanks a lot, I will try. I have been playing with Tubuntu for some weeks and now I just started playing with building the image (and thinking about kernel...). Just now I am on Lubuntu (with xfce4 which I prefer) with 2.6 kernel and I am trying on my son's TF101 Raring with Gnome and 3.1 kernel. I am just thinking about the possibility when one system is "fine tuned" if it would be possible to copy it from one TF to the other one (I mean just the Linux partition).
onmail said:
Hi, I have no problems creating the image and mounting it. But when chrooted:
apt-get update
0% [Working]qemu: Unsupported syscall: 374
Err http://ports.ubuntu.com raring Release.gpg
Something wicked happened resolving 'ports.ubuntu.com:80' (-11 - System error)...
I am on Ubuntu 12.10 64-bit. What could it be? qemu & qemu-user-static installed, qemu-arm-static copied...
Thank you and sorry for my CZ-english
Click to expand...
Click to collapse
Replying to my own post because I must say - sorry, I am ehm an idiot... Because the only problem was - I have not edited the /etc/resolv.conf in the mount/etc directory. So now I can easily apt-get anything in the chroot! So it seems I can easily "prepare" an image with everything inside
onmail said:
Replying to my own post because I must say - sorry, I am ehm an idiot... Because the only problem was - I have not edited the /etc/resolv.conf in the mount/etc directory. So now I can easily apt-get anything in the chroot! So it seems I can easily "prepare" an image with everything inside
Click to expand...
Click to collapse
Did it work? I couldn't not without finding a way to inject VI into the image for editing the file. You can mess with permissions but it ultimately doesn't work from the Linux box.
If you are able to do it without the tab, post the instructions and I'll add it to my OP and give you the credit.
Sent from my SGH-T999 using Tapatalk 2
TomTcom said:
Did it work? I couldn't not without finding a way to inject VI into the image for editing the file. You can mess with permissions but it ultimately doesn't work from the Linux box.
If you are able to do it without the tab, post the instructions and I'll add it to my OP and give you the credit.
Sent from my SGH-T999 using Tapatalk 2
Click to expand...
Click to collapse
It works I am just in the middle of installing xubuntu-desktop... I have made a quick & dirty bash script which will help to set hostname for the new TF101, root password, make a new user with password and add him to sudo group, automatically enable all the deb repos (universe etc.), set cpu freqs in rc.local and install some usefull utils (sudo cpufrequtils bash-completion wpasupplicant nano mc net-tools). And there is a second script you can run on the first run on TF101 which will resize the linux partition to its limit, copy the wpa_supplicant.conf from the android partition and starts wlan0 I will send this to you asap but will test this first. Hope my English is understandable
onmail said:
It works I am just in the middle of installing xubuntu-desktop... I have made a quick & dirty bash script which will help to set hostname for the new TF101, root password, make a new user with password and add him to sudo group, automatically enable all the deb repos (universe etc.), set cpu freqs in rc.local and install some usefull utils (sudo cpufrequtils bash-completion wpasupplicant nano mc net-tools). And there is a second script you can run on the first run on TF101 which will resize the linux partition to its limit, copy the wpa_supplicant.conf from the android partition and starts wlan0 I will send this to you asap but will test this first. Hope my English is understandable
Click to expand...
Click to collapse
Xubuntu on raring is working without any problems. Now I would like to get the nvidia accelerated drivers working. I have tried 2 or 3 3.1 kernels but still without success. Googling for some help on compiling 3.1 kernel.
onmail said:
Xubuntu on raring is working without any problems. Now I would like to get the nvidia accelerated drivers working. I have tried 2 or 3 3.1 kernels but still without success. Googling for some help on compiling 3.1 kernel.
Click to expand...
Click to collapse
Awesome! If you go to the op for x3maniac, you can view his github that has 3.1 kernel source. Take a look and see of it helps.
Sent from my SGH-T999 using Tapatalk 2
TomTcom said:
Awesome! If you go to the op for x3maniac, you can view his github that has 3.1 kernel source. Take a look and see of it helps.
Sent from my SGH-T999 using Tapatalk 2
Click to expand...
Click to collapse
By the way, I have instructions for compiling the 2.6.36 kernel in my xda signature if that helps you.
Sent from my SGH-T999 using Tapatalk 2
TomTcom said:
By the way, I have instructions for compiling the 2.6.36 kernel in my xda signature if that helps you.
Sent from my SGH-T999 using Tapatalk 2
Click to expand...
Click to collapse
Yes, I know, I have already checked that. The 2.6 kernel is ok but I would really like to see the nvidia drivers working...
Had an issue mounting raring.img in step 9, had to run sudo fsck.ext4 "path to file" afterwards it mounted smoothly, dont know why tho.
JoinTheRealms said:
Had an issue mounting raring.img in step 9, had to run sudo fsck.ext4 "path to file" afterwards it mounted smoothly, dont know why tho.
Click to expand...
Click to collapse
Hmmm...did step 8a work ok?
Sent from my SGH-T999 using Tapatalk 2
TomTcom said:
Hmmm...did step 8a work ok?
Sent from my SGH-T999 using Tapatalk 2
Click to expand...
Click to collapse
Afaik it did, gave me the mentioned prompt, and finished without error. Might have something to do with me running a x64 vm ? as i wasnt able to chroot either. Im trying to get this running on my tf300t, but its alot different to installing it on the trusty tf101
Cheers for the guide tho, help me understand the whole process :good:
JoinTheRealms said:
Afaik it did, gave me the mentioned prompt, and finished without error. Might have something to do with me running a x64 vm ? as i wasnt able to chroot either. Im trying to get this running on my tf300t, but its alot different to installing it on the trusty tf101
Cheers for the guide tho, help me understand the whole process :good:
Click to expand...
Click to collapse
I believe our dev x3 mentioned there were differences on a VM so it probably has to do with that.
Glad the guide is helpful. Welcome!
Sent from my SGH-T999 using Tapatalk 2
Nice guide ! I just crated a 13.04 raring img. ( Used VM Kubuntu 12.04 )
Need some updates but nice
And there is a problem with actual release, wpa supplicant is not pre installed and now I'm in the begining of your second guide and cant set up wifi.
I had to download package with chroot, then install with my tab same for nano
Anyway, it's just FYI I dont really need help
Kingzak34 said:
Nice guide ! I just crated a 13.04 raring img. ( Used VM Kubuntu 12.04 )
Need some updates but nice
And there is a problem with actual release, wpa supplicant is not pre installed and now I'm in the begining of your second guide and cant set up wifi.
I had to download package with chroot, then install with my tab, and now it doesnt find iwlan0
Anyway, it's just FYI I dont really need help
Click to expand...
Click to collapse
This guide wasn't designed to use wifi, only to correctly package it for flashing 13.04 directly to the tab. The next guide adds the gui and requires your Android to be set up to copy over the wpa_supplicant file before executing those commands.
Onmail was able to script more changes to the image from "chroot" but I didn't go that far, he was able to get the supplicant and other abilities such as adding to the package better than I did.

[GUIDE][Dual Boot][TheEasyway] How to setup Linux RootBind Method [Updated May 16th]

Hello everyone ! I made this guide for all who want to try to dualboot Android and Ubuntu using the RootBind method.
But first, what is RootBind ?
Actually, the RootBind method consist to have a Linux file system, living in a folder of our Android partition.
The default location for this linux file system is /data/linuxroot.
The way to switch between Android and Linux is to flash an Android kernel or the linux kernel. That's all.
It means you'll be able to have a linux installation, without erasing Android ( Still available, not touched at all ) and it means that you can easily manage your Linux installation.
You dont want it anymore ? Just delete a folder. You want to try another version, but you dont want to lose your current data ? Just do a zip of the folder, and extract a new version instead.
Advantages :
No need to repartitionate your tab.
It works with all TF101.
It doesnt touch current Android Installation.
It has same free space as your /data Android partition.
You can easily access it from within Android.
It has good performances
Kernel has everything working
And you only need to flash an Android or Linux Kernel to boot desired OS.
Everything is possible thanks to @jrohwer and @DjDill and @TravellingGuy.
Dont forget to thanks them : jrohwer Kernel Thread - jrohwer 14.04 Kubuntu IMG / DjDill images thread / TravellingGuy Image thread​Of course, every manipulation is risky, Me, jrohwer, DjDill, Travelling Guy, my dog, or even my math professor, can NOT be responsible for any damage on your tab, use this guide at your own risk​First Post : Dualboot setup
Second Post : How to change the linux location / How to have multiple linux installations
Third Post : FAQ & Tips​
DualBoot setup. Linux installation
First of all, here is all what you'll need :
The last rootbind kernel : Download Here Take the zip version.
[*]WARING : Note that if you use the last kernel ( 15 one ) YOU MUST TAKE MODULES AND EXTRACT IT IN /lib/modules/ when installation is done
The last Linux IMG of your choice, DjDill made imgs for this method with everything pre working here : DjDill images thread / TravellingGuy Image thread / jrohwer 14.04 Kubuntu IMG
Kernel for booting back Android You can find the KatKiss kernel there for exemple : KatKernel
A terminal emulator in Android or ADB Shell
If you dont want to use one of DjDill img, you'll need the bcm4329 tar from there : http://forum.xda-developers.com/showpost.php?p=43203818&postcount=569
You need to have a rooted device with a custom recovery. Check by here or by there
This method works on any TF101
Note that all command can be done with ADB shell aswell.
If you choose to install one of DjDill img :
Boot to Android as usual
Copy all download files to your tab. You can rename the kernel zip to Linux_Loader.zip and Android_Loader.zip to be clearer.
Now, I assume you have files in internal storage ( change sdcard0 by sdcard1 if it's on microSD )
We will now ensure terminal has root permissions :
Open Terminal emulator
Type su then Enter
SuperUser will ask terminal emulator root permission, allow it.
If you have an error with this command, your device may not be properly rooted.
Now we will setup installation location and extract our linux tar.gz ( Be aware it may take a while ) :
Code:
busybox mount -o remount,rw /
mkdir /data/linuxroot
chmod 755 /data/linuxroot
cd /data/linuxroot
tar -pxvzf /storage/sdcard0/yourubuntufilename.tar.gz
busybox mount -o remount,ro /
If you don't choose to install one of pre configured img :
Boot to Android as usual
Copy all download files to your tab. You can rename the kernel zip to Linux_Loader.zip and Android_Loader.zip to be clearer.
Now, I assume you have files in internal storage ( change sdcard0 by sdcard1 if it's on microSD )
We will now ensure terminal has root permissions :
Open Terminal emulator
Type su then Enter
SuperUser will ask terminal emulator root permission, allow it.
If you have an error with this command, your device may not be properly rooted.
Now we will setup installation location and extract our linux tar.gz ( Be aware it may take a while ) :
Code:
busybox mount -o remount,rw /
mkdir /data/linuxroot
chmod 755 /data/linuxroot
cd /data/linuxroot
tar -pxvzf /storage/sdcard0/yourubuntufilename.tar.gz
cd /data/linuxroot/lib/firmware
tar -pxvzf /storage/sdcard0/bcm4329.tar.gz
cp nvram.txt nvram_3429.txt
busybox mount -o remount,ro /
The setup is now complete.
In order to boot your linux installation, flash the linux kernel.
To get back to Android, flash the Android kernel.
​
How to change the linux location / How to have multiple linux installations
Here we are, so in order to have multiple linux instllations or change defaut linux installation location, you will need a Linux computer. ( Or a Virtual Machine, that's what I use, with Virtual Box for exemple.
You will need 3 tools to get it done too.
You can get it there abootimg, blobpack and blobunpack files at the end of first post ( Thanks to @shaola ).
I post the zip in attachement for mirror.
MORE INFORMATIONS ABOUT THESE TOOLS : http://forum.xda-developers.com/showpost.php?p=13713619&postcount=3
Now you have to get in the Rootbind kernel, the blob file. Blob file in Asus ROM can contain any partition of the device ( System, kernel, recovery etc ). In this kernel blob, there is only the kernel partition. Soooo, here we go for some commands.
Open your linux computer
Place all four files in same place ( better to have a folder created for this ). I'll take exemple of ~/kerneltf/ It's a exemple, so adapt in consequencies of course.
Now you have your four files in same place, blobunpack, blobpack, and abootimg-i686 so let's start with commands :
Go to the desired place :
Code:
cd ~/kerneltf
Unpack the blob containing partition imgs
Code:
./blobunpack blob
This will create partitions img. The one that interest us is the .LNX partition. ( Here blob.LNX )
Now unpack the kernel parition img
Code:
./abootimg-i686 -x blob.LNX
This will create 3 files, bootimg.cfg, zImage and initrd.img
The file we want to edit is bootimg.cfg. so open it with a text editor.
You'll see the last line is a cmdline. At the end we have the location of linux system place.
For exemple here : root=/dev/mmcblk0p7 bind=/linuxroot that means, the folder takes place in mmcblk0p7 ( /data partition of device ) and is placed in /linuxroot folder. So with Android layout it means /data/linuxroot.
You can now change the location of your folder, so you have some choices :
1-Change the folder location or name. ( This can be used to have multiple linux systems )
So you have this part : root=/dev/mmcblk0p7 bind=/linuxroot
If you want to change folder place/name change this part : bind=/linuxroot into whatever you want
For exemple root=/dev/mmcblk0p7 bind=/linuxroot2 or root=/dev/mmcblk0p7 bind=/linuxroot3 ( To have more linux systems )
Or root=/dev/mmcblk0p7 bind=/Linuxroot/Linux1
ATTENTION as said in rootbind thread : Make sure, however, not to put the Linux rootfs to the "internal storage" (/data/media) or any subdirectories thereof. This plays havoc with the Android media scanner when re-booting into Android and your tablet may slow down to a crawl.
2-Change the folder location in order to have it on an other partition like SDCard
For this choice, a 2nd partition on your SDcard is greatly recommended and should be in ext4. ( Must be the second partition, it is better for general use of SDcard )
So root=/dev/mmcblk0p7 bind=/linuxroot will become root=/dev/mmcblk1p2 ( can be p3 p4 or more if you have more than 2 partitions in your sdcard to have several systems on your SDcard ) the bind argument must be deleted as it will not be used.
3-Change the folder location in order to have it on first partition on SDCard
The problem here if you want your linuxroot folder in you SDcard with your other files, is that sdcard MUST be formatted in ext4 and so will not be recognized directly by Windows ( Using MTP in the TF will work but not Storage Mount ) cause Windows doesnt support ext4 partition. It's definitively the worse choice IMHO. The precedent process is definitively better choice. More than that it could make MediaScanner in Android going crazy too ( a .nomedia can maybe do the trick but not sure ).
More again, it hasnt been tested at all so you're the only responsible, but if you want to do it :
For exemple, to put folder on SDcard, you should change root=/dev/mmcblk0p7 bind=/linuxroot to root=/dev/mmcblk1p1 bind=/linuxroot
This means your folder is in sdcard ( The one in the tab ) at root in /linuxroot folder. ( /storage/sdcard1/linuxroot in android )
THIS HAS NOT BEEN TESTED YET, I CANT TELL YOU IF IT WORKS OR NOT.
Sooo, now you seted up your new location ( BE SURE TO DONT TOUCH ANYTHING ELSE ON THE CMDLINE, ONLY THIS PART ):
We will now repack the kernel to get it flashable.
Once again, be sure that you didnt make mistake with the file, and you only edited root=/dev/mmcblk0p7 bind=/linuxroot this part without deleting something or got a typo error.
We will now update the new bootimg :
Code:
abootimg-i686 -u blob.LNX -f bootimg.cfg
Then we will rename old blob file to create a new one with our modified kernel:
Code:
mv blob blobold
Now, we will repack our blob in order to make a new flashable zip with our kernel:
Code:
./blobpack blob LNX blob.LNX
You're done, make a copy of the old zip, rename it as you wish ( avoid spaces in the zip title ) for exemple Linux_Loader_2.zip
Then open it, and replace the blob file with your new one.
Now you're good to flash. Be sure to install a linux system in desired location before flashing it of course. See post 1 for this !
And a last one !
Envoyé de mon Nexus 4 en utilisant Tapatalk
Nice does work with TF101 G model (3G+) ?
Envoyé depuis ma TF101G-B80 with Revolution HD 4.0 (3.6g release) by Mike _1986
stephane.papin said:
Nice does work with TF101 G model (3G+) ?
Envoyé depuis ma TF101G-B80 with Revolution HD 4.0 (3.6g release) by Mike _1986
Click to expand...
Click to collapse
Yes, it works with all TF101
Si t'as besoin d'aide, hésite pas à me MP
Is a bootloader within the realm of possibility?
Thanks for the write-up.. I'm at the drinking my coffee while the untar keeps chugging stage, and it occurs to me that a bootloader would be very cool to have. Kernels flash so quickly, the recovery method isn't far off in terms of usability.. but it did motivate the question: is it possible?
So I'm just curious - is there any reason why we couldn't have the android and linux kernels both on disk to be loaded by a bootloader based on user choice?
Hello,
I have tried the "DjDill img" method.
When it finishes booting, it tells me that there are networks, and yhat I have to configure wifi.
I can't find how.
ifconfig shows lo and wlan0, and wlan0 is up but of course has no address.
if I try a iwlist scan, it tells me that wlan0 is an interface that doesn't support scanning.
In "settings manager/network connections", if I try to add a connection, it doesn't see my ssid.
Do you have any idea or point me to some doc/tuto.
Thanks in advance
nbenm
nbenm said:
Hello,
I have tried the "DjDill img" method.
When it finishes booting, it tells me that there are networks, and yhat I have to configure wifi.
I can't find how.
ifconfig shows lo and wlan0, and wlan0 is up but of course has no address.
if I try a iwlist scan, it tells me that wlan0 is an interface that doesn't support scanning.
In "settings manager/network connections", if I try to add a connection, it doesn't see my ssid.
Do you have any idea or point me to some doc/tuto.
Thanks in advance
nbenm
Click to expand...
Click to collapse
What kernel and what image did you used?
Tapatalké depuis mon Nexus 4 MIUI !
Couple questions
First, BIG thx to you and all the devs for hacking the tf-101!!
I've tried several of the images and they all worked as posted (Go figure ). I will be trying to compile a kernel for some custom work.
1 - Are the kernels compiled on the TF-101 and the tarballed?
2 - Any idea if Kali Linux 1.0.6 ARMHF Image, build will work?
I'll be using an external wifi dongle and not the internal.
Again much excitement to the tf-101 world!
Kingzak34 said:
What kernel and what image did you used?
Tapatalké depuis mon Nexus 4 MIUI !
Click to expand...
Click to collapse
I'm using kernel:Ubuntu-3.1.10-12-rootbind-oc1.0GHz.zip from your rootbind kernel link
I use image:tf101-14.04-xubuntu-armhf.tar.gz which is a DjDill image.
Before you reply me, I wanted to try "TravellingGuy Image". On its page, it was told to create wlan0 entry in the interfaces file. I did this and it works now.
But I can't understant why:
- iwlist scan doesn't work
- network manager doesn't see any of the multiple essids tahere are here
When I try to iwconfig essid "my_ssid", it says "cannot read /proc/net/wireless". Does it need some module ?
Thanks
nbenm
nbenm said:
I'm using kernel:Ubuntu-3.1.10-12-rootbind-oc1.0GHz.zip from your rootbind kernel link
I use image:tf101-14.04-xubuntu-armhf.tar.gz which is a DjDill image.
Before you reply me, I wanted to try "TravellingGuy Image". On its page, it was told to create wlan0 entry in the interfaces file. I did this and it works now.
But I can't understant why:
- iwlist scan doesn't work
- network manager doesn't see any of the multiple essids tahere are here
When I try to iwconfig essid "my_ssid", it says "cannot read /proc/net/wireless". Does it need some module ?
Thanks
nbenm
Click to expand...
Click to collapse
Ubuntu-3.1.10-12-rootbind-oc1.0GHz.zip doesnt exist ?
It's Ubuntu-3.1.10-12-rootbind-oc1.2GHz.zip
Or Ubuntu-3.1.10-10-rootbind-1.0GHz.zip
If you choose the Ubuntu-3.1.10-12-rootbind-oc1.2GHz.zip, wifi will works by default with defaut network manager without needing any cmd config or anything on pre installed DjDill img, IDK for Travelling guy img I didnt tested it, but you can try the other method if you're on Debian img and wifi doest work.
If you choose DjDill img, choose one of the lastest, This one http://forum.xda-developers.com/showpost.php?p=50335555&postcount=1
Or the 1.1 14.04 one, end of this post : http://forum.xda-developers.com/showpost.php?p=50335574&postcount=2
Or the Lxde build from same post.
But I suggest to use the first for now, it's the newer and have a lot of fixes.
Updated !
With second post and added jrohwer 14.04 IMG !
image: Kubuntu 14.04 With Tegra drivers.
kernel: Ubuntu-3.1.10-12-rootbind-oc1.2GHz.zip also tried Ubuntu-3.1.10-10-rootbind-1.0GHz.zip
It boots into KDE fine now but initially had some warnings even after running depmod -a. I had to issue the comnmand depmod -a a few times and it black screened once on boot.
I cant seem to get the wifi networking working even though it finds local networks clicking on the networks in the GUI doesn't do anything. Any help here. This is my first linux boot on the transformer but I have used Ubuntu since gutsy. I have to admit I am a little confused after reading a couple of posts here about exactly comes with these premade images. For instance the nvidia drivers are they included as modules in these images. When i read jrohwer's thread for the image he includes his apt sources list and states that the it took a little to get the nvidia drivers working?
Like I said on the other thread to setup Wi-Fi you have to setup in cmd line. Search on the net to setup with nmcli command or you install another network manager
Tapatalké depuis mon Nexus 4 MIUI !
Kingzak34 said:
Like I said on the other thread to setup Wi-Fi you have to setup in cmd line. Search on the net to setup with nmcli command or you install another network manager
Tapatalké depuis mon Nexus 4 MIUI !
Click to expand...
Click to collapse
Yes sorry I was struggling with the command for nmcli. I should have elaborated ... Tried various commands .. and this was what worked.
Code:
nmcli dev wifi
to list off the possible availables ap's then to join what you want
Code:
sudo nmcli dev wifi connect "whatever ap u want to connect to"
much easier to hunt down answers with a working intenet connection
Sorry bout that. I suppose my other question about the nvidia drivers is most likely too silly to answer ??
dasbooter said:
Yes sorry I was struggling with the command for nmcli. I should have elaborated ... Tried various commands .. and this was what worked.
Code:
nmcli dev wifi
to list off the possible availables ap's then to join what you want
Code:
sudo nmcli dev wifi connect "whatever ap u want to connect to"
much easier to hunt down answers with a working intenet connection
Sorry bout that. I suppose my other question about the nvidia drivers is most likely too silly to answer ??
Click to expand...
Click to collapse
What question ?
You dont have to do anything with the driver as in 14.04 build from jrohwer, is pre installed.
Kingzak34 said:
What question ?
You dont have to do anything with the driver as in 14.04 build from jrohwer, is pre installed.
Click to expand...
Click to collapse
Thanks i was reading jrohwer's thread for the 14.04 image and he was discussing the fact that it took alot of work to get the nvidia drivers up and running and then gives his apt sources list for download but after what u said it sounds like this is for people who want to get there own images together with working nvidia drivers. So compiling your own modules. Sorry I just wasnt sure. Anyways thanks for the trouble. I have connected to the ap but cant get a connection out to the internet. Oh well maybe I will try that lubuntu image on the first page. Thanks
dasbooter said:
Thanks i was reading jrohwer's thread for the 14.04 image and he was discussing the fact that it took alot of work to get the nvidia drivers up and running and then gives his apt sources list for download but after what u said it sounds like this is for people who want to get there own images together with working nvidia drivers. So compiling your own modules. Sorry I just wasnt sure. Anyways thanks for the trouble. I have connected to the ap but cant get a connection out to the internet. Oh well maybe I will try that lubuntu image on the first page. Thanks
Click to expand...
Click to collapse
Sounds weird, you successfully connected but dont have access to internet ?
Correct command for connecting on AP with a password is
sudo nmcli dev wifi connect <ssid> password <password>
And yes, the files that jrohwer gave, is for those who want to create a 14.04 with nvidia driver working img.
Kingzak34 said:
Sounds weird, you successfully connected but dont have access to internet ?
Correct command for connecting on AP with a password is
sudo nmcli dev wifi connect <ssid> password <password>
And yes, the files that jrohwer gave, is for those who want to create a 14.04 with nvidia driver working img.
Click to expand...
Click to collapse
Ya its at a hospital with no wpa type encryption only a login web page with name and password. I am most certainly connected ifconfig shows I have pulled a IP address etc etc. I have been reading about similiar problems in other linux type threads where there is automatic redirection to the login page. I actually use an app hellowifi to automatically enter the info in katkiss 4.4.2 so I am actually having trouble getting the address of that login page lol. I will give it a try at home where i have a wpa2 encrypted connection
dasbooter said:
Ya its at a hospital with no wpa type encryption only a login web page with name and password. I am most certainly connected ifconfig shows I have pulled a IP address etc etc. I have been reading about similiar problems in other linux type threads where there is automatic redirection to the login page. I actually use an app hellowifi to automatically enter the info in katkiss 4.4.2 so I am actually having trouble getting the address of that login page lol. I will give it a try at home where i have a wpa2 encrypted connection
Click to expand...
Click to collapse
Ho yeah I see, sometimes I cannot get login at the university hotspot, cause it doesnt want to redirect to login page.
I dont think you'll got problem with a 'normal' router.

Categories

Resources