[HOW-TO] Run Debian Armel on your N1 - Nexus One Q&A, Help & Troubleshooting

Hi all!
I want to share the way i have to run Debian on Nexus One
I'm editing my own install of deb-armel and ill upload to everyone but first i need to finish it
By now, we will use a qemu image ready and edit it to your needs
You'll need a SD parted with Amon_RA recovery, few files i'll upload later and some skills with Debian, of course hehe
Partition could be user-alike but i recommend:
Im using a microsdhc 8gb class-2 from my magic
- EXT3: 2gb (nice for install a lot of stuff)
- SWAP: 150MB
- The rest as fat32
You need also a rom with app2sd or mount ETX3 partition under /system/sd, im using Modaco's 1.3
First of all, im working on archlinux but this can be done on windows too using the qemu version for windows
Install qemu on your machine.
NOTE: Also you can start a new installation from 0 using images (iso) and info found on google
Now we will use the following QEMU images:
http://people.debian.org/~aurel32/qemu/armel/
We will download the followings Of course you can choose the small or normal version with X preinstalled (the X version preinstalled is not tested by me and i dont know if works)
debian_lenny_armel_small.qcow2 150M
initrd.img-2.6.26-1-versatile 2.1M
vmlinuz-2.6.26-1-versatile 1.2M
Put they in your home folder or where u want.
Now, lets run it.
Use the following command (run it from the folder you have the downloaded files) :
qemu-system-arm -M versatilepb -kernel vmlinuz-2.6.26-1-versatile -initrd initrd.img-2.6.26-1-versatile -hda debian_lenny_armel_small.qcow2 -append "root=/dev/sda1"
Wait a moment... Debian-armel running under qemu
Here are the configuration by default:
- Keyboard: British English
- Language: English
- Mirror: ftp.uk.debian.org
- Hostname: debian-armel
- Root password: root
- User account: user
- User password: user
Edit the system to fit your needs, im not going to explain how to do this, im asumming you know how to. If u don't, use the debian reference guide:
http://www.debian.org/doc/manuals/debian-reference/
Of course, you'll need to edit basic things as locales, network, ssh preferences, etc...
Edit your system, update, configure packages, etc...
Once edited and configured, quit you virtual machine.
Now, we are going to convert the qemu image to a raw image, mount the fs and copy to your SD
Assuming you still in the same folder as the qcow2 image of debian (for windows, google a little, im sure there are something to do the same):
qemu-img convert -O raw debian_lenny_armel_small.qcow2 debian.raw
With this will obtain the qcow2 converted to a raw file (without touching the original qcow2 file)
Now mount it where u want or follow this steps:
sudo mkdir /media/debian
Before mount, lets see where start the partition on the raw file:
sfdisk -l -uS debian.raw
U will see a list of partions under the raw file, use the first, like this one:
debian.raw1 * 63 20225834 20225772 83 Linux
Now, we know the / starts at 63, mount this partition
sudo mount -o loop,offset=$((63*512)) debian.raw /media/debian
Ok, we have our partition mounted now, lets make a copy in our EXT3 partition on SD.
Use the USB Storage function from android, sd card reader... and mount the EXT3 partition
Once mounted, copy everything from /media/debian to /media/yourSDext3mounted
cd /media/debian
sudo cp -a * /media/yourSDext3mounted/
If everithing works as expected, umount the systems /media/debian/ and /media/yourSDext3mounted or use the Android notif to disconnect the USB storage function
Check if everything is now in the SD EXT3. Open a terminal and adb shell
adb shell
cd /system/sd
ls
U'll see the Debian / extructure and the app & app-private
Of course dont worry about this, u can still using apps2sd and debian at the same time
Now, it's time to boot debian
We need some modded files from the G1 version to boot it:
Download from Megaupload: http://www.megaupload.com/?d=Q67SNOBC
Download from MediaFire: http://www.mediafire.com/?mxgcyk3whdt
Also, files attached to post (rename the extension to tar.gz)
Put the files into your FAT32 SD partition, no in a folder just in "/"
Now, it's time to give it a try
U have two ways:
Open a terminal window in your PC
adb shell
cd /sdcard/
sh installer.sh
sh bootdeb
Or:
Open up a terminal in your N1, like Terminal Emulator on Market
cd /sdcard/
sh installer.sh
sh bootdeb
PROFIT!!!
Enjoy your debian-armel on your N1
For the next chapter, how to run X with VNC Viewer
Bye and thanks for reading!

Looks like Klingon to me.

I have Debian running too now

Nice! Cant wait to try it out!

nice, i've been looking for a n1 debian how-to

Installing debian is pretty much the same as running it on your g1. I had it working the day after I got mine using the g1 instructions.

So, what's the reason or running debian on your phone?
Jst wondering
u

The reason by now is just fun hehe
But, if we can run it natively via fastboot, would be awesome hehe
Sorry for the delay guys, ill do it now, the last night was too late for me 4am here hehe
EDIT: Just give some time more, i going to try it with the Cm 5.0 beta 1

jairuncaloth said:
Installing debian is pretty much the same as running it on your g1. I had it working the day after I got mine using the g1 instructions.
Click to expand...
Click to collapse
I couldnt get chmod or installer.sh from the g1 instructions to work. I tried it both with bacon and modaco 1.3. I skipped the jesusfreak part though so maybe thats why. Anyway seeing confirming instructions would be nice.

Because the g1 files need to be modded first
I have it running it under modaco 1.3 and now im going to try it with the new b1 from cyanogen

Guide ready
Enjoy it!

Hi,
i have one question about debian. Is the network traffic routed trough android, or does debian has direct access to the wlan adapter for monitor mode and aircrack ?
meld0

it's using the same ip and mac, so is shared for both
If there are the apropiate drivers maybe, don't really know

Calling Linux Experts!!! hehe
Is there any way to create a boot.img bootable via fastboot to run the ext3 partition of sdcard with debian?

Driskol said:
Calling Linux Experts!!! hehe
Is there any way to create a boot.img bootable via fastboot to run the ext3 partition of sdcard with debian?
Click to expand...
Click to collapse
sorry for being noob in this matter but, why do i need debian on my phone? what does it give me?
amir

The answer is a choice, Android or a Full Desktop OS with Firefox, Thunderbird, OpenOffice, etc...

When its booting I'm getting an error:
/system/bin/bootdeb: line 61: chroot: command not found
Doing "find / -name chroot" only returns binaries within the debian image.
Any ideas?

Driskol said:
The answer is a choice, Android or a Full Desktop OS with Firefox, Thunderbird, OpenOffice, etc...
Click to expand...
Click to collapse
How well does Firefox run?
Can anyone take some pics or video?

Any instructions for creating and mounting linux as an img file instead of using separate partitions?

tetlee said:
When its booting I'm getting an error:
/system/bin/bootdeb: line 61: chroot: command not found
Doing "find / -name chroot" only returns binaries within the debian image.
Any ideas?
Click to expand...
Click to collapse
Maybe your rom doesn't have Busybox
EDIT: Im going to make a img version tutorial
Of course, this version was without the highmem kernel, now with more ram, more flawlessly

Related

Cannot install Debian on JF 1.5 US? Help?

Hey, Im following
http://www.androidfanatic.com/cms/community-forums.html?func=view&catid=9&id=2248
For how to set debian up. However chmod 4755 * fails for me saying operation not permitted when I am cd /sdcard/debian I read through a couple other posts on google and the site above where it says people can on versions pre 1.5 but once on 1.5 US it breaks the su whitelist some?
Anyways, Anyone have some ideas for me, as the google trail went cold for me as the people who had this issue was already at the end of the threads with no resolve or joy. Thanks. =)
too much in 'yo chmod!
hey i have set up mine. you just gotta forget about the chmod and just skip it and do the rest of the steps then type exit. then once it reboots, just type
su
cd /sdcard/debian
sh bootdeb
then it should be running
Yea I thought so too on the chmod step, so I tried going to the next, the installer.sh and said not allowed or something.
I tried running boot debian and so, and it came up with the load screen, then it had a chmod issue and then the G1 restarted. So what am I missing here? =/
hmm, im not entirely sure. when i installed it i simply
su
cd sdcard/debian
chmod 4755 *
su sh ./installer.sh
exit
su
cd sdcard/debian
sh bootdeb
Well I was reading other posts, Could it be a issue that Im already running apps off the EXT2 part of my SD card? I have the debian files on the FAT32 area. I saw some people saying that might be a cause of the issue?
if your debian dir is on fat32, you need to delete the first line of installer.sh script
Ok did that and the installer.sh ran did alot of not found errors then when I tried to bootdeb it looked like it was trying to load, then it rebooted the G1. =/
Any other ideas? Also if I wanna try to uninstall the work it did, what does it create to delete?
Mysticales said:
Ok did that and the installer.sh ran did alot of not found errors then when I tried to bootdeb it looked like it was trying to load, then it rebooted the G1. =/
Any other ideas? Also if I wanna try to uninstall the work it did, what does it create to delete?
Click to expand...
Click to collapse
Which image are you using? There's one for fat32 and one for ext2. Try this: download fat32 version http://www.androidfanatic.com/cms/unofficial-app-repo.html?func=fileinfo&id=21
you may need to remount when entering the following commands in the terminal
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
place zip file on sdcard. go to terminal and enter:
su
unzip "whatever_your_debian_file_is_named".zip (not sure what its called)
cd "whatever_your_debian_file_is_named"
cp installer.sh /sdcard/gscript
then go to Gscript and load installer.sh, before you save, delete the line that says "./fsrw"
then save this edited script as installer1.sh
go back to terminal
cp /sdcard/gscript/installer1.sh /sdcard/debian
cd /sdcard/debian
su
sh ./installer1.sh
sh ./bootdeb
if that doesnt work out try rebooting and doing these commands
cd /sdcard/debian
sh ./bootdeb
to delete, go to debian directory then
rm -r debian
afaik, all the data from debian is self-contained in debian.img
Ill try that, btw yea I have that file you linked to. But before I do this, the stuff your mentioning, wont affect the fact that I have my apps installed to the SD right? Mounting and unmounting things.
Mysticales said:
Ill try that, btw yea I have that file you linked to. But before I do this, the stuff your mentioning, wont affect the fact that I have my apps installed to the SD right? Mounting and unmounting things.
Click to expand...
Click to collapse
No, your apps should be safe. If you're using the link I posted, you need to put debian on /sdcard which is fat32
you're apps2sd should be mounted at /system/sd and should be unaffected by your debian installation/uninstallation.
I'm not sure if remounting /system is required, but i think it allows you permissions so you can use the utilities in /system/bin. I would remount just to save myself time.
Btw, I could not chmod my debian directory, but debian runs fine for me.
jonnybueno said:
to delete, go to debian directory then
rm -r debian
afaik, all the data from debian is self-contained in debian.img
Click to expand...
Click to collapse
Oops, my bad. Should be:
cd /sdcard or cd /system/sd depending on where you put your debian directory
the you can
rm -r debian
Jonny your great. =) The remounting thing worked! Then ran the installer, got alot of not found, but after that all, I booted into Debian, and did the onetime.sh to set the unix pw.
(Which for the record to anyone in the future doing a search on this once your in debian, do cd scripts and enter that folder and type sh onetime.sh )
Now onto the next step and adding a GUI Which gonna attempt that all now.
Edit: And Grr... not gonna try to do the rest of the repos on EDGE connection.. Gotta wait till I get home. =( (Wifi rules for linux starts lol)
I think the image we installed is only 750MB so from what I've read, it is advisable to resize your debian img. Thats another world of brain hurt for me... but there is this guy with this thread who is offering to upload his custom image.
http://forum.xda-developers.com/showthread.php?t=528262
5 more votes by the end of the day and maybe he'll upload it.
Well... I already did the resize heh. Got a 2.3GB image on right now, which fits on my 4GB, since I have a 1GB EXT2 Partition and rest is fat32.
I used ubuntu to make a image and mount both images and copied the data from one into the other, then did the tasks after I booted debian again to get everything smooth again. =) But I wont stop him from uploading his image if it has a GUI already installed, which is what im after atm. =)
Update, So far having a lil issue getting the desktop to show up on VNC, however I did get other tasks done and stable running. Also came across this post which is vital as the default install seems to want to give you a repo that 404s too much so before you start your tasks, after you install debian and get into it, do this stuff.
ZilverZurfarn said:
For those (like me) who get errors when apt-get'ing thightvncserver and/or lxde:
(from the thread at androidfanatic.com)
instructions
cd /etc/apt
nano sources.list
now add
deb http://ftp.debian.org/debian lenny main contrib non-free
deb-src http://ftp.debian.org/debian lenny main contrib non-free
after the first one
then hold down the trackball and hit o
then hit return (to save the new sources.list)
then hold the trackball and hit x (to exit nano)
then type
apt-get update
apt-get install tightvncserver
apt-get install lxde
That did the trick for me at least.
/Mats
Click to expand...
Click to collapse
yeahhh
now my problem is that debian is restarted all time
error
chroot: can't change root directory to /data/local/mnt: No such file or director
y
Well While mine worked, sorta, I just went with the 1 click debian install thread, made life a lil easier. Heh.

Debian on LG P500 !!

NEW USER THEREFORE LINKS ARE IN ATTACHMENT ...
What i did ...
1. Download the debian installer from here
LINK#1 IN ATTACHMENT
uploaded with the updated installer script and bootdeb script ...
2. Download to replace the bootdeb file in debian with the bootdeb file below
LINK#2
3. Download to replace the installer.sh in debian directory with the installer
below
LINK#3
3. Unzipped the file on my computer. This created a directory called "debian".
4. Moved the whole debian folder in the root directory of memorycard (root)
using the data cable. After this I disconnected the cable.
4. Opened ConnectBot in p500, choosed local connection.
Download it here : LINK#4
5. Became root by typing: su -
6. Entered the debian directory in memory card:
cd /sdcard/debian
7. Launched the installer script:
sh installer.sh
8. Entered Debian console:
bootdeb
9. Launched the setup script: /scripts/onetime.sh
10. This should be the whole thing.....
but i got the error in executing installer.sh
the error for ext2.ko in /lib/modules
so i pushed the .ko file in the megatron ROM
and the final rom is here...
LINK#5
But it is still giving me error
I NEED HELP TO FIGURE OUT IN RUNNING DEBIAN TO THIS PHONE !!!
STEPS ARE HERE :
LINK # 6
What is debian?
Its another operating system for pc's...!!
SAME LIKE THE UBUNTU...
lekhwani said:
What is debian?
Click to expand...
Click to collapse
It's a Linux distribution where Ubuntu took it's code as its base.
@ashupulse: This one's easier: http://www.droidforums.net/forum/droid-hacks/58908-how-install-ubuntu-droid.html
Look's like booting Debian and controlling it with a VNC client. Will test this one. Wanna see how well X11 works (though I doubt I can get it starting in the first place)
Note: If you're using a custom ROM or kernel taken from this forum, you may have ext2 support already. If unsure, check again in the threads. If you're using apps2sd, you have ext2 support.
Where Ubuntu *takes it's base from, the experimental software repository in Debian.
Sent from my VM670 using XDA App
Installer.sh is working now !!!
Alrght i have got the installer working
but the problem is now with
bootdeb !!
Any help would be appreciated !!!
ashupulse said:
NEW USER THEREFORE LINKS ARE IN ATTACHMENT ...
What i did ...
1. Download the debian installer from here
LINK#1 IN ATTACHMENT
uploaded with the updated installer script and bootdeb script ...
2. Download to replace the bootdeb file in debian with the bootdeb file below
LINK#2
3. Download to replace the installer.sh in debian directory with the installer
below
LINK#3
3. Unzipped the file on my computer. This created a directory called "debian".
4. Moved the whole debian folder in the root directory of memorycard (root)
using the data cable. After this I disconnected the cable.
4. Opened ConnectBot in p500, choosed local connection.
Download it here : LINK#4
5. Became root by typing: su -
6. Entered the debian directory in memory card:
cd /sdcard/debian
7. Launched the installer script:
sh installer.sh
8. Entered Debian console:
bootdeb
9. Launched the setup script: /scripts/onetime.sh
10. This should be the whole thing.....
but i got the error in executing installer.sh
the error for ext2.ko in /lib/modules
so i pushed the .ko file in the megatron ROM
and the final rom is here...
LINK#5
But it is still giving me error
I NEED HELP TO FIGURE OUT IN RUNNING DEBIAN TO THIS PHONE !!!
STEPS ARE HERE :
LINK # 6
Click to expand...
Click to collapse
I just dont want to flash megatron again to use that kernel modules...Can u tell us how to integrate that kernel modules in our "existing ROMS"..i mean i dont want to flash again.. HElp i was looking into this and then luckily u came up with this..Thnx
seems like i m near to it , let u know if support could be added to the default O.S !!
Hi,
i was too wondering about using debian on our phone, and found this: http://www.saurik.com/id/10
It is basicaly just installing debian into image, which you can mount then and use its bash in chroot mode.
You can see some screenshots of htop, midnight commander or gcc-avr compiler (thats why I wanted debian).
PS: That thing with unionfs did not work for me yet, but i have notice I did something wrong, so I will give it one more try.
EDIT: yep, if you add unionfs patch to your kernel, it is working too.
Tasssadar said:
Hi,
i was too wondering about using debian on our phone, and found this: http://www.saurik.com/id/10
It is basicaly just installing debian into image, which you can mount then and use its bash in chroot mode.
You can see some screenshots of htop, midnight commander or gcc-avr compiler (thats why I wanted debian).
PS: That thing with unionfs did not work for me yet, but i have notice I did something wrong, so I will give it one more try.
EDIT: yep, if you add unionfs patch to your kernel, it is working too.
Click to expand...
Click to collapse
How do i patch the kernel n i m also using the blog u mentioned..It just doesnt boot
You do not need to patch kernel in any way if you dont wanna unionfs (which you dont). To be honest, I dont remember what exactly I had to do - I just followed the tutorial and tried to solve problems, there was something with loop devices I think.....
Well, I will try to install it one more time on clean rom tomorrow and write some tutorial.
We need a ROM that has bash, right?

[DEV-ADDON]DS7Ubuntu v1.0 --- Text Based Ubuntu 11.04 running on Dell Streak 7!

First of all, I need to give my thanks to great DevGhostofNet for his excellent work on getting Ubuntu 11.01 running on Xoom. I borrowed his template on this instruction page as I really don't have my template and using this way to show my appreciation to his work.
Second, I figured though I am not big dev by any means, hopefully any time I spent on such things can add some value to owners of either DS7 or Xoom, especially DS7, which really needs any effort on it in addition to testing help.
So I would throw in my two-cent hours/efforts to get this started. I see huge potential in it, though now it is quite WIP, because the non-graphical version is running well but not Gnome sessions.
1.What is working?
Shell Ubuntu 11.04
I modified the installation scripts to mount DS7 partitions correctly and copy some modified script into original image.
2. What is not working?
Gnome Session
I can install necessary components up to a point where the wall paper is loaded, sidebar is loaded but the guest system did not take/register input properly yet.
3. Why we care?
It has huge potential in it. It uses a part of your sdcard to run a guest system, and you can literally install all those great Ubuntu apps in it in future when more dev effort makes this happen.
4. What is the impact to my existing Android OS?
Minimal. The impacts are:
1. there will be ubuntu scripts in /system/bin/
2. Loop7 device will be borrowed while ubuntu is mounted.
3. under /sdcard, there is a folder ubuntu which pretty much contains everything
4. in LOST.DIR of your /sdcard, there may be lots of temp files if you experimented a lot of install/uninstall of this guest system.
If you still want to take a crack now.........
DISCLAIMER: I will not responsible for any bricked device. Please although this experiment won't affect your other files at all, but **** happens all the time, please do backup and understand what you are trying to do before proceed.
[Before Installation:]
1. You should know what you are doing at this step.
2. You have rooted your device already
3. You configured adb and have a terminal apps in your DS7. (Terminal apps can be found in market. Android Terminal seems to work fine)
4. You have a VNC client. (Android-vnc in market seems fine)
[Installation:]
1. Download the DS7Ubuntu files From my post at http://www.OpinionatedFool.com
2. Extract it into /sdcard/ubuntu folder
3. Open a terminal
Code:
su
cd /sdcard/ubuntu
sh ubuntu install
Just click yes when you are asked some questions. This process takes about 5 mins
reboot after installation
NOW after rebooting, you officially are running a text based Ubuntu 11.04
4. Open you terminal
Code:
su
ubuntu start
ubuntu shell
If you are interested to go further, I really encourage to because we need better devs to bring us further. I am willing to try more but it will take longer time as I have been away from Linux for a good 6 years.
5. After you are in Ubuntu Shell environment. you can do
Code:
vi /sbin/installubuntu
6. Inside installubuntu, the following are present:
Code:
#!/bin/sh
/usr/bin/apt-get -y -q update
/usr/bin/apt-get -y -q upgrade
/usr/bin/apt-get -y -q install python-software-properties
#/usr/bin/add-apt-repository ppa:unity-2d-team/unity-2d-daily
/usr/bin/apt-get -y -q update
/usr/bin/apt-get -y -q install tightvncserver xrdp
/usr/bin/apt-get -y -q install ca-certificates desktop-file-utils doc-base eog g
conf-editor gedit ghostscript-x gnome-about gnome-applets gnome-control-center g
nome-media gnome-menus gnome-nettool gnome-panel gnome-session gnome-session-can
berra gnome-system-monitor gnome-system-tools gnome-terminal gnome-themes-select
ed gnome-themes-ubuntu gnome-utils gtk2-engines gtk2-engines-pixbuf gucharmap hu
manity-icon-theme indicator-applet-session inputattach language-selector launchp
ad-integration lftp libgd2-xpm libgnome2-perl libpam-ck-connector libsasl2-modul
es libxp6 nautilus nautilus-sendto notify-osd rarian-compat screen smbclient sof
tware-center synaptic software-properties-gtk ttf-dejavu-core ttf-freefont ubunt
u-artwork ubuntu-extras-keyring ubuntu-sounds unzip update-manager update-notifi
er x-ttcidfont-conf xterm yelp zenity zip maximus
/usr/bin/dpkg-divert --local --rename --add /sbin/initctl
/bin/ln -s /bin/true /sbin/initctl
I am good up to completion of this step in the script above
Code:
/usr/bin/apt-get -y -q install tightvncserver xrdp
Then the following bulk apt-get process will cause issues. The main course is on gconf2 as far as I know.
I tried to install them separately after install gconf2, but it is not stably working.
i.e. sometimes I did install them all correctly, but sometimes I am getting segmentation error, which is annoying and requires wipe ubuntu folder and reinstall ubuntu.
I am too rusty on Linux now that better devs may figure it out easily.
[How to Uninstall it?]
In case you want to get rid of it. Here is how:
Through ADB or Terminal Simulator in your DS7
Code:
adb shell
su
mount -o remount,rw /dev/block/mmcblk3p3 /system
rm /system/bin/ubuntu*
mount -o remount,ro /dev/block/mmcblk3p3 /system
[Next Step]
Install and configure a working copy of Gnome-session on this successfully. Hopefully there will be Kernel Dev to have a Ubuntu kernel specifically for DS7? That will be the best.
We can then
1. Run Apache server and you will access your files through Dell Streak 7 as long as you are tethering in its own LAN. (or a lot more)
2. Run browsers in graphical version of Ubuntu on your DS7 so that you can do whatever with hulu or netflix or anything. Basically you are carrying a freaking DS7 laptop with you. with touch screen and huge mobility
[Notes]
1. pts need to mounted
2. use Unity-2d seems to be better than Unity
3. mtab need to be replace manually with the mtab I included in the zip file
4. kernel is not configured to have shared memory management ...
I'll definitely be following this thread with interest!
native ubuntu would be nicer rather than the crap of chrooted ones, they are just pointless IMHO as the device has to try and manage 2 oses at once, the 7 doesnt realy have the ram to manage that
Any updates on this project ?
Guess not :-(
Quick question to the op
Does wifi work so you can update / install packages?
If so, does it see the wifi cards chipset? I'm looking into getting aircrack-ng set up to tinker with. ( saves me from dragging out my laptop to test security on networks with my job )
Currently I'm using my Mac with kismac which does the job nicely , however, if I can use the ds7 under Ubuntu its one less reason to drag it along.
Can you copy the device information for me or does it act like a LAN card ?
Thanks !!
what is the latest development?
In a few weeks, i will tell my team to look at the cm7.1 things. I hope you will help us? I will send you a pm but remember me
ubuntu
is this still being worked on or attempted? or is there a ubuntu rom out already?
Is this anything like Ubuntu installer...
http://forum.xda-developers.com/showthread.php?t=1390351

[CHROOT] Running Arch Linux on the RARZ i

Right before the Introduction, I am not responsible for anything you do to you Phone, you are free to do or not to do what I am explaining to you so its on your own risk...
Introduction:
Ok guys so here we are, trying to install a Linux Distro on our awesome x86 Phone...
Damn this doesnt work because our Android is compiled in a different way than ARM Android so we have to wait for better Docs or someone who can get the bootloader to laod a different OS...
But you dont want to wait right?
So here we go, the only alternative:
Chroot into Linux
Description:
Chrooting lets you run annother Linux on top of the currently running Linux (what Android actually is...more or less).
So you mount an existing Linux and simply run it.
What I want to do:
I want to guide you through chrooting and setting up an Arch Linux on your RAZR i.
Requirements:
You need:
A micro SD card (I used a 8GB sized one but 4GB/more than 8 should also work, you just have to adjust some Steps)
An Arch Linux Image (I will give you a link)
(Not required but I will focus on this Platform because I use it myself and it works best, I guess)
A Linux PC running Virtual Box
Tutorial:
First you need an Arch Linux Image. Any other Linux Distro should work fine, but others also take up a lot more Space and Ubuntu for Example has many Problems running in Chroot (because Canonical did some S***).
I used this one:
Arch Linux 2012.10.06
Again, any Version should work fine, just took the latest one
So lets set up our System...
Start Virtual Box and create a new System.
Create a new Hard Drive and size it so it fits onto your micro SD.
I used 5 GB-7.5GB on a 8GB micro SD.
Insert the downloaded ISO FIle into the Virtual Box CD Drive and start your Virtual Machine.
Select the i686 mode (because or CPU is 32bit not 64bit)
If you have the wrong Keyboard Layout Follow this Keyboard Setup Keyboard Config
Next you need to partition the HDD: Partitioning the HDD
Now Install the Base System: Install the Base System
After this follow the next Steps on the Arch WIki (Generate an fstab, Chroot and configure the base system, Set the root password and add a regular user)
DO not reboot because you didnt create a Bootloader (not required for chrooting), instead go to the "Extra" Section and follow all Steps till troubleshooting (DO NOT REBOOT AND DO NOT STARTX this didnt work for, might for you, might not and then you have to cold reboot the VM)
Now you can reboot Again enter the Live System, load your keymap and chroot into the system
You might already install some Packages like a VNC server (pacman -S tightvnc) which will be required for a Graphical User Interface later...
To create the Image you need later, the easiest way for me to pull the Image out of the VM (which has no space for this Image) because the Virtual Box Plugin didnt work for me is sshfs.
I highly recommend to install an ssh server ond the sshfs system into you arch.
If you have done so, mount your PC from inside the VM so you can put the Image on your PC's HDD.
now to create an Image of your Arch theres one command and two ways:
You create an Image of the whole HDD (what I did)
You create an Image of the one Partition
I chose the first because i didnt want to put anything else on my micro SD, I cant confirm that the second way works but it is suppoes to so lets create the Image:
We make use of the Linux command dd, really, REALLY mke sure that you are executing from inside the VM since you can harm your HDD and dont forget the file extension....
First method:
Code:
dd if=/dev/sda of=/location/to/your/PC/HDD/imagefilename.img
The Second method (not confirmed):
Code:
dd if=/dev/sda1 of=/location/to/your/PC/HDD/imagefilename.img
where sda1 should be the partition you want to image...
This might take a loooooooong time
Now you have this Image, put your micro SD into an Adapter and put it into your PC.
Now find out the name of the SD, I used gparted and I found out that the name is sdc (could be sd + letter of alphabet)
Here the Ways split again:
The first Method completly overwrites anything that is on your microSD so make a backup, the second Way is just putting the created .img file onto the micro SD:
Method One:
Code:
dd if=/path/of/the/img/file of=/dev/sdc
Replace sdc with your micro SD letter, if you put in a wrong letter, you might overwrite your HDD so be careful, I am not responsible for what you do...
For me my Phone said, the micro SD is empty or has a wrong FIlesystem (its ext4) but you shouldnt care, we can mount it anyway...
Now copy the FIle mountscript.sh to the internal SD (the FIle is in this Posts Attachements)
Next open up a Terminal and type in:
Code:
cat /proc/partitions
You should get a list of all your Partitions, if you followed my Way, the last one should be your micro SD (look at the size) and called like mmcblk1p1
If you followed the Second Way, you dont need this Step...
Now type in the Terminal:
Code:
busybox sh /mnt/sdcard/mountscript.sh
the busybox in the beginning seemed required for me because our busybox is kinda strange...
You will be guide through a little setup, I hope it is selfexplaining...
When the script ran through successfully your terminal should look like [[email protected] /]#
In the next Post I will guide you through the Setup of the VNC Server
Any questions or something doesnt work? Just tell me
//Robert
Post reserved for VNC Tutorial
You can start by grabbing yourself this App...
Guess I forgot something
Added the mountscript as Attachemenet
did anybody try?
//Robert
this should fix network issues:
https://blog.tuinslak.org/socket-permission-denied
Hai Robbilie, After install with Ubuntu PC & turn off pc & All seem ok & at phone till [[email protected] /]# & open installed VNCwith name DLKS & 192.168.0.9 & port 5900 but cant handshake & also try many similar VNC still the same. Unlike our PC where on>boot>desktop shown & can play ? Pls advice. Thks.
i advice tiger vnc, but the console tells you the vnc server started?
btw its only 5900 when its on display 0 when its on display 1 its 5901 and so on...
the used display is shown in the console...
are you running the vnc from root?
How to run vnc from root? i only start separately,pls advice.Thks
if you have a vnc server installed in the chroot environment you need to run
vncserver -geometry 888x540
this is just to fit the phones resolution
I'm following your instructions for this. They are well written but I can't figure out the part about ssh and sshfs. What do you do for that step?
Is there seriously not an easier way such as opening the vdi image with some program and copying and pasting the files to my Windows desktop and then using something like IMGBurn to create an iso file and then convert it to an img file?
Ubuntu ?
Hello
I just see this old news when i would like to install Linux Mobile , any news about or link ?
http://www.firstpost.com/topic/prod...otorola-razr-i-video-9n_E6aapPSo-51417-1.html
Thanks
EDIT : http://sourceforge.net/projects/mpsdk/

[GUIDE]BackTrack 5 Chroot (Backtop2)

[Project dormant unless someone else picks it up]
NOTE: This is a chroot for the Webtop, not the Android+VNC chroot method.
Hi everyone, this is my first guide (I'm not sure I can call it that yet, or if this is in the right section) so bear with me.
I tried the Debian chroot guide (http://forum.xda-developers.com/showthread.php?t=1093790), and I really liked the idea, but I had too many apt-get issues and it often crashed my Webtop, so I tried building my own Ubuntu Lucid chroot using rootstock, but internet didn't work.
I later saw this: http://forum.xda-developers.com/showthread.php?t=1184161, but the links were dead and the scripts it referenced were out of date. I'll sort of combine the two guides here since Backtrack actually works surprisingly well.
Just on a side note though, I haven't fully tested the Backtrack tools, but the only thing I haven't found to work are the wireless tools.
Let's start!
Required:
-Rooted Atrix (with Blur based ROM)
-LXTerminal installed on Webtop
-Enough free space (around 4 GB just for room)
-7-Zip
-Some Linux/Unix distro native or in a VM
1. Install the easy-signed.zip from the Debian chroot guide:
http://forum.xda-developers.com/showthread.php?t=1093790
but the other files aren't needed.
Make a folder called WebTopMOD (case-sensitive) on either external or internal memory for later.
2. Look here for reference: http://forum.xda-developers.com/showthread.php?t=1184161, but the links are dead. Active links are here:
Part 1: http://www.mediafire.com/?x9cgxzdx84vc6uj
Part 2: http://www.mediafire.com/?xaoidipkg1o7vgo
Part 3: http://www.mediafire.com/?po3nznbxgvdipur
Use 7-Zip to uncompress the three files (called bt.7z.001,002,003) and you'll get a bt.img.
Full bt.img in a zip:
DL from Mega or from Google Drive
3. The image isn't usable in this state yet, since the image is formatted with ext2, and we need ext3.
Copy the image over to your Linux VM or computer on a easy-to-find directory, and open up a Terminal window (usually CTRL+ALT+T).
In Terminal, type this in:
Code:
cd <directory where you put bt.img>
mkdir tmp tmpbt
sudo mount -o loop bt.img tmpbt
dd if=/dev/zero of=linuxdisk count=0 bs=1MB seek=4096 (This is the size of the chroot image you want, in MB)
mkfs.ext3 linuxdisk (just type y when it asks)
sudo mount -o loop linuxdisk tmp
sudo cp -rf tmpbt/* tmp
sudo umount tmp
sudo umount tmpbt
[Sorry, made a mistake twice] Copy the newly made linuxdisk file to a directory named WebTopMOD on your internal memory or sdcard-ext (folder and file names are case-sensitive).
4. Start Webtop, then open LXTerminal, then start the chroot by typing in:
Code:
/usr/sbin/linux
and after it loads for a bit, you'll get an xterm window with the shell for Backtrack!
If you want to quit the Gnome session, closing xterm doesn't work, since by issuing the commands to kill the webtop processes, it also kills the webtop window manager, and if you do close it there's some kind of weird glitch with a small popup window constantly disappearing and reappearing. (It'll be a WIP for now I guess, the only full solution is to reboot your Atrix). It seems to have to do with the way the linux command mounts the chroot disk under loop50, I'll try and make something to fix this later.
-----------------Extras moved below-----------------------
Pictures:
Chromium Running
BT Desktop (Gnome)
BT Desktop with AIW
THANKS TO:
k.taylor89 for the original Backtop Method
SystemR89 for the Debian chroot and scripts to make this work
The original developers of the Backtop chroot image
And any others I may have forgotten!
Extras:
If you want a GUI (Gnome):
k.taylor89 said:
You first need to kill off all the webtop crap do this by typing the following in xterm.
"ps ax|grep awn|awk '{print $1}'|xargs kill"
"ps ax|grep panel|awk '{print $1}'|xargs kill"
Then start gnome by typing "gnome-session" in xterm.
Click to expand...
Click to collapse
If you want to take it step further and start Gnome after bootup, this isn't a full solution yet but you could edit your start-oshwt-1.sh and 2 scripts so that the chroot automatically starts on bootup without anything else in Webtop, and from there start gnome-session. I'm testing that now.
Installing Apps:
Since this is based off of Ubuntu Lucid, you can install anything from the Lucid repos, you just have to fix the sources list since the Backtrack sources don't seem to work.
Code:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.old (Backup just in case)
sudo nano -w /etc/apt/sources.list
Comment out (#) any line with the backtrack servers, and uncomment any line with the Ubuntu repos.
Press Control+X, Y, then Enter, then run apt-get update to update the repos.
Apps like Chromium install and run without a hassle (just run apt-get install chromium-browser), but I actually get the error "Bus error" for some reason when Chromium remains idle, it seems to be an unsolved bug in the version of Chromium for armel devices in the Lucid repos, if anyone else has a fix, please do tell.
First.
I think its only for lapdock ..........
3n3rg1c said:
First.
I think its only for lapdock ..........
Click to expand...
Click to collapse
Oh sorry yeah I forgot to mention that. I mean I guess if you have the mod that lets you use Webtop anywhere, that'll work too.
Hi,
The "Part 3: http://www.mediafire.com/?po3nznbxgvdipu" doesn't work.
Could you fix it.
Thank you.
sintoo said:
Hi,
The "Part 3: http://www.mediafire.com/?po3nznbxgvdipu" doesn't work.
Could you fix it.
Thank you.
Click to expand...
Click to collapse
Oh sorry I copied the link incorrectly, updated in OP.
i've gotten it running on my ubuntop model, when i ran it from the terminal it would not give me any issues when closing it back up. is there a way to only launch the gnome panel? running: gnome-panel in the terminal didn't work
etruj said:
i've gotten it running on my ubuntop model, when i ran it from the terminal it would not give me any issues when closing it back up. is there a way to only launch the gnome panel? running: gnome-panel in the terminal didn't work
Click to expand...
Click to collapse
I'm not sure if there is a way to start just gnome panel because of the way the chroot is implemented, since to run gnome-panel, an X session must already be running within the chroot and I need to figure that out.
My first two times i lUnched the session the wallpaper would flicker and then just the panels would come up. Now i get hit with the errors and loop pop ups. Maybe there is a way to launch the session then kill everything but the panel?
Sent from my MB860 using xda app-developers app
etruj said:
My first two times i lUnched the session the wallpaper would flicker and then just the panels would come up. Now i get hit with the errors and loop pop ups. Maybe there is a way to launch the session then kill everything but the panel?
Sent from my MB860 using xda app-developers app
Click to expand...
Click to collapse
The workaround I found worked so far was to modify the start-oshwt-2 script so that it would run a very slightly modified version of the script that automatically starts gnome-session (gnome-panel alone is really stubborn, still haven't figured that out) and doesn't start whatever window manager in WebTop to avoid flickering errors and panel only errors (but of course you don't have access to anything from the actual WebTop, but you could also have start-oshwt open a Terminal window from WebTop too).
Can you attach the script?
Sent from my MB860 using xda app-developers app
etruj said:
Can you attach the script?
Sent from my MB860 using xda app-developers app
Click to expand...
Click to collapse
Just rename it to linux, and copy it to wherever you like on your Atrix. You can also copy it to a directory within your terminal path.
This isn't my script, it's from the Debian chroot, just modified to automatically start gnome-session (credit to SystemR89)
You might need to chmod +x the file.
Also, if you want to start it automatically from start-oshwt-2.sh, make sure you copy the file to a directory within the terminal path, and add the line
Code:
sfalv -i "linux"
and comment out any other line that starts a different X window manager.
running "sudo gnome-panel" gives me the panel while staying inside the original ubuntop. i think i can just swap out that one line in your script to get it working. thanks! also noticed my chrome crashes after a few minutes, ill post the error code and screen grabs soon but was wondering if you ever experienced anything like it?
etruj said:
running "sudo gnome-panel" gives me the panel while staying inside the original ubuntop. i think i can just swap out that one line in your script to get it working. thanks! also noticed my chrome crashes after a few minutes, ill post the error code and screen grabs soon but was wondering if you ever experienced anything like it?
Click to expand...
Click to collapse
Yes, in fact. It's a bus error, and I tried to fix it, but the fix doesn't work (and it only seems to affect Chromium).
Sorry for bumping such an old thread, but I was wondering if anyone wanted to take this project over, since I don't have an Atrix anymore and don't have anything to work with.
Thanks.

Categories

Resources