yashsingh1/xdaforums huggingface dataset:
[G1 Android Development] pdspatrick:
I like how the bootloader overuses the sleep command. Cleaned it up a bit + fixed the ext2 thing for those who care...

# Based on Saurik's remount.sh - modified by Mark Walker of http://www.androidfanatic.com
# Email admin@androidfanatic.com

clear

mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
echo "Android Filesytem remounted as read/write"

export kit=/sdcard/debian
export bin=/data/local/bin
export mnt=/data/local/mnt

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

modprobe ext2

mknod /dev/loop2 b 7 0

clear
echo " "
echo " a888a "
echo " d888888b "
echo " 8P YP Y88 "
echo " 8|o||o|88 "
echo " 8. .88 "
echo " 8 ._. Y8. "
echo " d/ 8b. "
echo " .dP . Y8b. "
echo " d8: ::88b. "
echo " d8 Y88b "
echo " :8P :888 "
echo " 8a. : _a88P "
echo " ._/ Yaa_ : .| 88P| "
echo " \ YP | 8P \. "
echo " / \._____.d| .| "
echo " --..__)888888P ._.|"
echo " "
echo " "

mount -o loop,noatime $kit/debian.img $mnt

mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys

sysctl -w net.ipv4.ip_forward=1
echo "Type EXIT to end session"
echo "Make sure you do a proper EXIT for a clean kill of Debian!"

chroot $mnt /bin/bash

busybox umount -f /data/local/mnt/dev/pts /data/local/mnt/proc /data/local/mnt/sys /data/local/mnt

busybox losetup -d /dev/block/loop2

echo "Debian Down...Goodbye!"

There it is all cleaned up of its sleeps and useless prompts :P....boots kinda faster now...gotta keep the penguin tho....
[G1 Android Development] gmaster1440:
Fixing Debian mount problems during "bootdeb"

Here is the fix for:

right after you run

su ./installer.sh

and right before you run

su bootdeb

run:

modprobe ext2

Still getting errors? Feel free to reply.
[G1 Android Development] amvella:
Hey man, thanks a lot it worked. :D
[G1 Android Development] keatonreckard:
or you can simply rename the attached bootdev.sh.txt to bootdev.sh and put it in your debian folder and its good as new
[G1 Android Development] arqueware:
As info:

[If you decide to start SSH,] remember to stop the ssh service before you exit/quit Debian, else you may get umount errors.
[G1 Android Development] foxtrickle:
Nice, good call Noctem, works every time now that I added that in. Thanks.
[G1 Android Development] Meltus:
cheers for this, was wondering how to fix it :D
[G1 Android Development] no6969el:
I am getting simliar errors..

nsmod: cannot insert 'unionfs': invalid module format

mount: mounting /dev/block/loop2 on /etc failed: No such file or directory

link failed file exists

link failed file exists

link failed file exists

link failed file exists

link failed file exists

link failed file exists

link failed file exists

link failed file exists

link failed file exists

link failed file exists

link failed file exists

rmdir failed for /root, Not a directory

link failed file exists

mount: mounting /dev/block/loop2 on /sbin failed: No such file or directory

mount: mounting /dev/block/loop2 on /dev failed: No such file or directory

mount: mounting devpts on /dev/pts failed: Device or resource busy
[G1 Android Development] Freedomcaller:
woot was going crazy for like an hour trying to get it running! this helped thanks!
[G1 Android Development] sangeet.003:
how to stop it any command to do it ???
[G1 Android Development] arqueware:
stopping ssh server before exit

/etc/init.d/ssh stop
[G1 Android Development] sangeet.003:
After doing all this still i get the same error... What to do can u give the installer.sh which u used??
[G1 Android Development] glock30:
Any luck with this... I get the same error
[G1 Android Development] montana111:
debian laods but wont mount

i just spent all night trying to get debian working on my g1 and now that i finally got everything set up, i type in "sh bootdeb.sh" and debian loads up, but nothing mounts and then it kicks me out and and says "reverted back to android console"

and im back in android. what did i do wrong?

also, the directory where bootdeb.sh is located is in /sdcard/debian/debian/

could that be the problem? i dont know why i would need two debian folders when one seems perfectly good. dont know how it happened tho, or how to fix it...
[G1 Android Development] jigabite:
Debian update/install issues

I'm having issues getting a Debian image installed and I was wondering if someone had seen the same thing before.

I've tried the "easy" method discussed here on JF 1.3 - JF 1.41. I've even replaced the image included in the "easy" method with the one generated by saurik. All seem to do the same thing... The only thing I haven't done is bypass the "easy" method and just follow saurik's guide.

I get everything copied over and I can boot debian. Everything appears to function properly (IE i can SSH into the pre-made image), but once I try and do an apt-get update, it errors out. The usual error is something like:

------------------------------------------------------------------------------

gzip: stdin: invalid compressed data--format violated

Err http://ftp.de.debian.org lenny/main Packages

Sub-process gzip returned an error code (1)

And it goes on to say a few other things...

------------------------------------------------------------------------------

In the past I've also had segmentation faults when trying to apt-get update... and a few times it errors out with:

-------------------------------------------------

Reading package lists... Error!

E: Problem parsing dependency Depends

E: Error occurred while processing 'insert random file' (NewVersion1)

E: Problem with MergeList....

---------------------------------------------------

I've seen errors like this before but usually doing some kind of apt-get clean combined with removal of the cache/lists/etc fix the problem. Not the case here.

I've tried installing programs without doing an apt-get update... but they error out as well.

As far as I can tell, I'm following the instructions as indicated. I've noticed that when I chmod 4755 *, there are no permission changes in the /sdcard/debian folder. Also, when I run the onetime script, there are things such as 'mount: devpts already mounted or /dev/pts busy' displayed before it asks me for a password.

I've downloaded multiple times from multiple sources... md5s match and I've transferred over the USB cable and through a card reader. SD card has been formatted as FAT and FAT32. I've also performed wipes.

I'm also assuming that I don't have to install any kind of busybox since that is already included in the JF images?

I would really appreciate any help you guys could offer. I would LOVE to have Debian working...

Thanks!
[G1 Android Development] unrafa:
Image looks defective (even sometimes debian installer is defective since its an element always under development)

Remove the debian image, and start over using saurink's method to create your own debian image (you have to skip every line related to installing busybox ext.2 loop. and any other modules since JF 30 and up have it already installed) finish the install from the phone (bootstrap second stage) and dont let the phone sleep while doing this or u may corrupt the image again. once debian is installed again you can continue with other method of setting it up / configuring it
[G1 Android Development] jigabite:
So I made my own image....

chroot $mnt /debootstrap/debootstrap --second-stage

I: Installing core packages...

W: Failure trying to run chroot / dpkg --force-depends --install var/cache/apt/archives/libc6_7-18.armel.deb

Any suggestions :)

Thanks!
[G1 Android Development] unrafa:
pdspatrick:

Thanks for the cleaned script, so much usless sleep commands...

forceshield:

All debian packages are listed here, http://www.debian.org/distrib/packages

if you do a search for *****x you will see theres *****x for debian stable,testing and sid under many arquitectures, even arm, but not armel. G1 is armel. bad luck.

someone knows exatly the advantages of using unionfs scripts? i really dont understand it.
[G1 Android Development] inpherno3:
everything is working great now. Debian is running with no problems what so ever.... BUT there were a few changes that needed to happen

1. rename the bootdeb to bootdeb.sh

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

if you are getting unable to mount messages when trying to boot into the shell you need to modprobe ext2 than run the bootdeb.sh

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

2. modprobe ext2 (adds the ext2 module)

3. run it with sh bootdeb.sh

4. once in you need to run the intial runonce script as indicated on full tutorial (which will set a root account password for future use, which is required btw)

5. after that it worked perfectly fine and booted into the shell. Not much can be done w/ it at this point other than working on a flawless x11 config file that would support the architecture the g1 runs on (arm and the whole nine yards) which from what im reading, people are already well on their way to a GUI
[G1 Android Development] t1n0m3n:
So... How would I make an "Anycut" shortcut to this? I would like to "replace" my terminal with the Debian terminal so I can do cool stuff... I notice that this "distro" has what I have been waiting for for a while and that is nmap.

sh /sdcard/debian/bootdev.sh inside of an anycut shortcut doesn't work...

Still experimenting though..
[G1 Android Development] Tactical Fart:
Will this work right under RC33? I read on another forum that it might need an updated ext2.ko and unionfs.ko. I'm still running RC30 but plan to move to RC33 soon. Should I go ahead and update, or hold off before I get debian? (I have root and plan to keep it the way.)

As a completely unrelated question, can a file downloaded under debian then moved somewhere else like /sdcard/downloads, or does it have to stay in debian?
[G1 Android Development] unrafa:
Tactical Fart.

Debian (the whole operating system) is installed inside a file (debian.img), inside your memory card (/sdcard/debian/debian.img). This file is like a hard disk, and the script posted before (same as you probably have) mounts (/sdcard/debian/debian.img under android's folder /data/local/mnt

So yes you can copy and move downloaded files, just remember to use the script (debian loader) removing the chroot line and:

cp /data/local/mnt/etc/passwd /sdcard

Will copy debian's passwd file to the root of sdcard.

and

cp /etc/passwd /data/local/mnt/

will copy your android's passwd file into debian's root.

the whole process of installing debian involves creation and configuration of debian.img or if you already have it, only in the execution of the script which the only thing it does is creating variables in memory and prepare the terrain (in memory) to load debian, nothing is changed and doesnt matter which version of JF you have, all needed to load debian is in JF.30 or above.

sorry to all debian purists for the lame explanation. Sure it have mistakes but its going to the point

P.D: ./program -a -i -o -v -d4 -g -j -w -r2 -e <<----- Thats not command line arguments, iTS BULL****. Stop being lazy with arguments devs please use full words!!
[G1 Android Development] Tactical Fart:
Debian install error?

I did the easy debian install guide, and executed the installer.sh without a hitch. But when I ran "sh bootdev.sh" it gave me this.

a888a
d888888b
8P YP Y88
8|o||o|88
8. .88
8 ._. Y8.
d/ 8b.
.dP . Y8b.
d8: ::88b.
d8 Y88b
:8P :888
8a. : _a88P
._/ Yaa_ : .| 88P|
\ YP | 8P \.
/ \._____.d| .|
--..__)888888P ._.|

mount: mounting /dev/block/loop2 on /data/local/mnt failed: Invalid argument
mount: mounting devpts on /data/local/mnt/dev/pts failed: No such file or directory
mount: mounting proc on /data/local/mnt/proc failed: No such file or directory
mount: mounting sysfs on /data/local/mnt/sys failed: No such file or directory
Custom Linux Pseudo Bootstrapper V1.0 - by Mark Walker
WEB: http://www.androidfanatic.com

EML: admin@androidfanatic.com

Starting init process
INIT: Debian booting.....
Running Linux Kernel
net.ipv4.ip_forward = 1
AutoMounter started
Type EXIT to end session
Make sure you do a proper EXIT for a clean kill of Debian!

chroot: cannot execute /bin/bash: No such file or directory
umount: can't forcibly umount /data/local/mnt/dev/pts: No such file or directory
umount: can't forcibly umount /data/local/mnt/proc: No such file or directory
umount: can't forcibly umount /data/local/mnt/sys: No such file or directory
umount: can't forcibly umount /data/local/mnt: Invalid argument
Filesystems have unmounted
losetup: /dev/block/loop2: No such device or address
Loopback device shutdown - success
Debian down
Coded by Mark Walker
http://www.androidfanatic.com

admin.androidfanatic.com

Reverted back to Android console
#

If it matters I'm running JF v1.42 RC33. Anyone know what epic mistake I made this time?
[G1 Android Development] unrafa:
same thing happened to me some days ago, somehow one folder disapeared and caused that errors

Just open terminal emulator or whatever you use to write commands to your phone and type:

su root

mkdir /data/local/mnt

then execute the script, it should introduce you to debian

and you better remove all nonsense "sleep" comands in that script you use if you have it.
[G1 Android Development] t1n0m3n:
1. Wiped and re-installed jf1.42 rc33

2. Logged in and synced

3. Copied the debian folder to /sdcard/debian

4. Followed the instructions

I get the same error as above.

I have a /data/local/mnt directory

What's going on?
[G1 Android Development] foxtrickle:
The easiest fix I've found is to edit (with notepad not wordpad) the bootdev.sh and add in:

busybox modprobe ext2

just after admin@androidfanatic.com(make sure to copy and paste two "squares" in between the email and busybox and leave two after it)
[G1 Android Development] inpherno3:
modprobe ext2

sh bootdeb.sh

done and it will load just fine, always modprobe ext2 before loading bootdeb
[G1 Android Development] Capt-CDD:
Would any other linux distos work

Ok I have a question. I have several of the old HP Jornadas running jlime ---

This is a Linux kernel for the arm processor and it has an icewm gui and many great apps built in. Most of the stuff is very low overhead as the jornada only has 64 meg of memory. In addition they have a fairly large repository of additional apps. I was considering trying this on the ext2 partition I created on my G1. Do any of you kernel level devs know if this could be made to work. I am fairly Linux fluent but not at the kernel build level. I have also used puppy Linux, a fairly robust distro with a 85 meg ISO with many great apps and it can import different distro repositories. Any thoughts or input would be appreciated.

I think this is the next step for the G1. You guys have done a great job with this and JFREKE is a KERNEL God in my book. Now that I am rooted some robust open source apps i.e. open office, abiword, gnumeric for the g1 would be sweet and make the G1 a handheld as well as a do it all phone.

Thanks, CDD

G1 - Rooted - JFv1.41 RC33
[G1 Android Development] chimeradojo:
RE: How to get Android's tiwlan0 into monitor mode for aircrack-ng

We need to write a driver that airmon-ng (bash script designed to turn wireless cards into monitor mode) can use

or

We need to write our own version of airmon-ng that does the same thing (detects the device and loads the apropriate driver)

See: Writing device drivers for Linux

Let's get started... and perhaps start a thread dedicated to this topic??
[G1 Android Development] blackgin:
I followed saurik's instruction, but now i don't know how to get debian running again!
[G1 Android Development] ross75:
ok im at this point but im having a problem

Finally, we get to mount the image! Note to use the filename you used for it. We will mount this "noatime" in order to minimize unneccessary writing to the flash memory part (which is both slow and will decrease its lifetime). Thanks goes to Lauren Weinstein for reminding me of that flag!

_ mkdir -p $mnt

_ mount -o loop,noatime $kit/debian.img $mnt

after i type

_ mount -o loop,noatime $kit/debian.img $mnt

i get that file or directory dosn't exist error

i went to the dir and it is there with no file in it

i have debian.img saved on sdcard/kit

what am i doing wrong?

im sure its some stupid little mistake but im not very good with linux

thanx for any help

Nevermind i used a script and bootloader i found in this thread and it worked fine instead of doing it manually
[G1 Android Development] a1t:
Some Errors

To whomever would like to help,

When attempting the mv bootdeb bootdev.sh command, it returns bootdeb not found.

I have also attached a screenshot of the terminal. I hope this helps.

Thanks to all that would like to help. I have combed through the forums and it looks like even after the posted troubleshooting, it seems to fix others just not my error.

<EDIT> Problem resolved. skipped step upgraded RC## 1.4 and a-ok
[G1 Android Development] Sirus20x6:
cant get it to work

# cd /

# cd /sdcard/debian

# ls

bootdeb ext2.ko installer.sh unionfs

debian.img fsrw mountonly unionfs.ko

# su installer.sh

su: unknown id: installer.sh

# su ./installer.sh

su: unknown id: ./installer.sh

# sh installer.sh

su: unknown id: ./fsrw

mkdir: cannot create directory '/data/local/mnt': File exists

Custom Debian Bootloader is now installed! Quick huh?

This process does NO damage to your Android underlying OS!

Courtesy of http://www.androidfanatic.com

Installer by Mark Walker (ghostwalker)

To enter the Debian Linux console just type 'bootdeb'

PS: Be sure to run /scripts/onetime.sh as root from the shell after your FIRST ' boot'.

# bootdeb

Android Filesytem remounted as read/write

insmod: /lib/modules/2.6.25-01843-gfea26b0: No such file or directory

insmod: /lib/modules: No such file or directory

insmod: ext2.ko: module not found

mknod: /dev/loop2: File exists

a888a

d888888b

8P YP Y88

8|o||o|88

8. .88

8 ._. Y8.

d/ 8b.

.dP . Y8b.

d8: ::88b.

d8 Y88b

:8P :888

8a. : _a88P

._/ Yaa_ : .| 88P|

\ YP | 8P \.

/ \._____.d| .|

--..__)888888P ._.|

mount: cannot setup loop device: No such file or directory

mount: mounting devpts on /data/local/mnt/dev/pts failed: No such file or direct ory

mount: mounting proc on /data/local/mnt/proc failed: No such file or directory

mount: mounting sysfs on /data/local/mnt/sys failed: No such file or directory

Custom Linux Pseudo Bootstrapper V1.0 - by Mark Walker

WEB: http://www.androidfanatic.com

EML: admin@androidfanatic.com

Starting init process

INIT: Debian booting.....

Running Linux Kernel

net.ipv4.ip_forward = 1

AutoMounter started

Type EXIT to end session

Make sure you do a proper EXIT for a clean kill of Debian!

chroot: cannot execute /bin/bash: No such file or directory

umount: forced umount of /data/local/mnt/dev/pts failed!

umount: cannot umount /data/local/mnt/dev/pts: No such file or directory

umount: forced umount of /data/local/mnt/proc failed!

umount: cannot umount /data/local/mnt/proc: No such file or directory

umount: forced umount of /data/local/mnt/sys failed!

umount: cannot umount /data/local/mnt/sys: No such file or directory

umount: forced umount of /data/local/mnt failed!

umount: cannot umount /data/local/mnt: Invalid argument

Filesystems have unmounted

losetup: : No such device or address

Loopback device shutdown - success

Debian down

Coded by Mark Walker

http://www.androidfanatic.com

admin.androidfanatic.com

Reverted back to Android console

#
[G1 Android Development] Proxin:
This might be a stupid question... but I'm unsure how you're supposed to install this.

Do you execute these commands from ADB? Terminal on the phone?
[G1 Android Development] Proxin:
I'm having this same problem, once I've tried it.

Anybody have a solution? :/
[G1 Android Development] flyingfreak:
Try:

modprobe ext2

or

insmod /sdcard/debian/ext2.ko

before executing bootdeb
[G1 Android Development] Proxin:
It worked, thanks!
[G1 Android Development] Sirus20x6:
modprobe ext2 doesnt give any error but bootdeb has the same issues
[G1 Android Development] Sirus20x6:
for the record

#
# cd /sdcard/debian
# modprobe ext2
# sh installer.sh
Filesytem remounted as read/write
mkdir failed for /data/local/mnt, File exists

Custom Debian Bootloader is now installed! Quick huh?

To enter the Debian Linux console just type 'bootdeb'
PS: Be sure to run /scripts/onetime.sh as root from the shell after your FIRST ' boot'.

# bootdeb
Android Filesytem remounted as read/write
insmod: /lib/modules/2.6.25-01843-gfea26b0: No such file or directory
insmod: /lib/modules: No such file or directory
insmod: ext2.ko: module not found
insmod: /lib/modules/2.6.25-01843-gfea26b0: No such file or directory
insmod: /lib/modules: No such file or directory
insmod: ext2.ko: module not found
mknod: /dev/loop2: File exists
mount: cannot setup loop device: No such file or directory
mount: mounting devpts on /data/local/mnt/dev/pts failed: No such file or direct ory
mount: mounting proc on /data/local/mnt/proc failed: No such file or directory
mount: mounting sysfs on /data/local/mnt/sys failed: No such file or directory
Starting init process
INIT: Debian booting.....
Running Linux Kernel
net.ipv4.ip_forward = 1
AutoMounter started
Type EXIT to end session

chroot: cannot execute /bin/bash: No such file or directory
umount: forced umount of /data/local/mnt/dev/pts failed!
umount: cannot umount /data/local/mnt/dev/pts: No such file or directory
umount: forced umount of /data/local/mnt/proc failed!
umount: cannot umount /data/local/mnt/proc: No such file or directory
umount: forced umount of /data/local/mnt/sys failed!
umount: cannot umount /data/local/mnt/sys: No such file or directory
umount: forced umount of /data/local/mnt failed!
umount: cannot umount /data/local/mnt: Invalid argument
Filesystems have unmounted
losetup: : No such device or address
Debian down
http://www.androidfanatic.com
Reverted back to Android console
[G1 Android Development] flyingfreak:
Got the same problem, is there a solution?
[G1 Android Development] MUZIC:
will give this a try
[G1 Android Development] demonfriend1:
Can someone upload a working 3.5GB debian.img? Because i only able to use xp or vista. Super noob at linux. Plz help me out. Thanks
[G1 Android Development] Sirus20x6:
update: it seems if i export busybox into my path modprobe doesn't work.
[G1 Android Development] andonnguyen:
I made a 3.3GB image, but I have to go to work now, so Ill bzip2 compress it tonight, and host it, then post the link when its done.

Edit, when I get home, I'll create a 3.5GB image then upload it.
[G1 Android Development] andonnguyen:
I've posted a 3.5GB debian image here:

EDIT: Link taken down until issues are ironed out.

I'll have to test it again, but I have to wait for another sd card.
[G1 Android Development] demonfriend1:
The 3.5gb debian.img work. But can't install lxde, tightvncserver or even apt-get upgrade. I got lot of errors saying unable to fetch some archives.
[G1 Android Development] demonfriend1:
apt-get update seems fine, bu apt-get upgrade look like the 2nd pic. apt-get update lxde look like 2nd pics also and tightvncserver.
[G1 Android Development] Sirus20x6:
got it to work!!!!

all i had to do was type each command in the installer and bootdeb line by line.

I used cat to dump the file to the screen and then typed each one.

I don't know why just running the script doesn't work, but i now have debian and was able to apt-get update and upgrade and install lxde. now i'm just trying to get the vnc client apk but my lappy has some windows 7 beta issues with downloading, i guess i'll have to wget from the device.
[G1 Android Development] demonfriend1:
apt-get upgrade and i get fopen : permission denied. SOmeone help plz
[G1 Android Development] maydaysos:
how do i reset my GUI. i had everything working until i switched themes now only the mouse shows up no task bar or star menu.

is there a command to reinstall IceWM or reset it back to default?
[G1 Android Development] sonikamd:
heh, success (so far)!

A few speed bumps

but fairly by the book.
[G1 Android Development] demonfriend1:
HELP Help!!!!!