Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
Driskol
Old
(Last edited by Driskol; 25th January 2010 at 01:42 PM.) Reason: New Edition for Debian-Armel
#1  
Driskol's Avatar
Senior Member - OP
Thanks Meter 0
Posts: 399
Join Date: Sep 2008
Location: Sevilla
Lightbulb [HOW-TO] Run Debian Armel on your N1

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!
Attached Files
File Type: zip debian booter for android.zip - [Click for QR Code] (1.6 KB, 63 views)
 
Henchman
Old
#2  
Senior Member
Thanks Meter 6
Posts: 801
Join Date: Mar 2007
Location: Sherman oaks
Looks like Klingon to me.
 
Driskol
Old
#3  
Driskol's Avatar
Senior Member - OP
Thanks Meter 0
Posts: 399
Join Date: Sep 2008
Location: Sevilla
I have Debian running too now
 
vtecbros
Old
#4  
Senior Member
Thanks Meter 0
Posts: 113
Join Date: Jul 2008
Nice! Cant wait to try it out!
 
kiosk77
Old
#5  
Member
Thanks Meter 3
Posts: 50
Join Date: Jul 2009
nice, i've been looking for a n1 debian how-to
 
jairuncaloth
Old
#6  
jairuncaloth's Avatar
Senior Member
Thanks Meter 3
Posts: 147
Join Date: Dec 2008
Location: Atlanta
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.
 
Henchman
Old
#7  
Senior Member
Thanks Meter 6
Posts: 801
Join Date: Mar 2007
Location: Sherman oaks
So, what's the reason or running debian on your phone?

Jst wondering
u
 
Driskol
Old
(Last edited by Driskol; 25th January 2010 at 11:40 AM.)
#8  
Driskol's Avatar
Senior Member - OP
Thanks Meter 0
Posts: 399
Join Date: Sep 2008
Location: Sevilla
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
 
kiosk77
Old
#9  
Member
Thanks Meter 3
Posts: 50
Join Date: Jul 2009
Quote:
Originally Posted by jairuncaloth View Post
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.
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.
 
Driskol
Old
#10  
Driskol's Avatar
Senior Member - OP
Thanks Meter 0
Posts: 399
Join Date: Sep 2008
Location: Sevilla
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

 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Windows-Based Multi-Tool for the Sony Xperia U

If you are a flashaholic and an owner of the Sony Xperia U, you may be interested in the … more

XDA University: Crafting Recovery-Flashable Packages

Those of us who use Linux on a day to day basis don’t think twice about sinking … more

Side-Swiping Multitasking with Kakudo

Recovering iPad users may still remember the multitasking function where you can swipe left or right to … more