[Q&A] Install or Mount (IOM) | Create chroot on device in minutes

Search This thread

ONDR4SH3K

Senior Member
Nov 15, 2009
162
28
Opava
Sony Xperia P - CM11 4.4.2

Error with
Code:
handle_error mke2fs -qF -t $fs_type $IMGLOC/$IMGNAME

Needed another command.
 

Attachments

  • Screenshot_2014-01-26-21-54-27.png
    Screenshot_2014-01-26-21-54-27.png
    70.1 KB · Views: 2,812
  • Like
Reactions: Maromi

userdelroot

Senior Member
Aug 7, 2010
331
157
Florida
Sony Xperia P - CM11 4.4.2

Error with
Code:
handle_error mke2fs -qF -t $fs_type $IMGLOC/$IMGNAME

Needed another command.


I figured that was gonna be an issue.
There are so many variants when it comes to device / busybox, I tried to get around that by including my own binary but fail on my part i guess...


Anyways.

Fix this line
Code:
LINE: 310             handle_error mke2fs -qF -t $fs_type $IMGLOC/$IMGNAME
to
Code:
handle_error mk2fs.ext2 $IMGLOC/$IMGNAME
 

ONDR4SH3K

Senior Member
Nov 15, 2009
162
28
Opava
I figured that was gonna be an issue.
There are so many variants when it comes to device / busybox, I tried to get around that by including my own binary but fail on my part i guess...


Anyways.

Fix this line
Code:
LINE: 310             handle_error mke2fs -qF -t $fs_type $IMGLOC/$IMGNAME
to
Code:
handle_error mk2fs.ext2 $IMGLOC/$IMGNAME

I rewrite with mke2fs -F $IMGLOC/$IMGNAME this working well.

But another problem with debootstrap. See attachment. So it's end of testing, isn't it?
 

Attachments

  • Screenshot_2014-01-26-22-11-35.png
    Screenshot_2014-01-26-22-11-35.png
    69.2 KB · Views: 1,151

userdelroot

Senior Member
Aug 7, 2010
331
157
Florida
I rewrite with mke2fs -F $IMGLOC/$IMGNAME this working well.

But another problem with debootstrap. See attachment. So it's end of testing, isn't it?


hmm...
I had that error initially also and I corrected it, probably should of documented what I fixed...

in the terminal type
uname

Is that a valid command?


change install-or-mount
Code:
LINE :333     handle_error debootstrap --no-check-gpg --extractor=ar --arch=armhf --foreign $DIST $MOUNT $MIRROR
to
Code:
 handle_error debootstrap --no-check-gpg --extractor=ar --arch armhf --foreign $DIST $MOUNT $MIRROR
 
Last edited:

ONDR4SH3K

Senior Member
Nov 15, 2009
162
28
Opava
hmm...
I had that error initially also and I corrected it, probably should of documented what I fixed...

in the terminal type
uname

Is that a valid command?

Yes, it print Linux. I try another deboostrap. You use VERSION='1.0.40~ubuntu0.4'. So I find new one.

EDIT: New debootstrap with the same error.
 
Last edited:

ONDR4SH3K

Senior Member
Nov 15, 2009
162
28
Opava
hmm...
I had that error initially also and I corrected it, probably should of documented what I fixed...

in the terminal type
uname

Is that a valid command?


change install-or-mount
Code:
LINE :333     handle_error debootstrap --no-check-gpg --extractor=ar --arch=armhf --foreign $DIST $MOUNT $MIRROR
to
Code:
 handle_error debootstrap --no-check-gpg --extractor=ar --arch armhf --foreign $DIST $MOUNT $MIRROR

Sry, not working, but I deleted line with checking architecture and I got new error. See attachment.

EDIT:

I use:
sh install-or-mount -i -n linux.img -m /data/local/chroot -l /data/local -o precise -0
Rewrited mk2fs line in install-or-mount file to: mke2fs -F $IMGLOC/$IMGNAME
Deleted if [ -z "$ARCH" ] || [ -z "$HOST_OS" ]; then error 1 WHATARCH "Couldn't work out current architecture" fi line in deboostrap file

I think if I deleted this line, chroot not mounted correctly and bootstrap can't continue. So we need figure out, how fix architecture error.

I found this: http://uyirpodiru.blogspot.cz/2012/08/debootstrap-error-e-couldnt-work-out.html
 

Attachments

  • Screenshot_2014-01-26-23-57-20.png
    Screenshot_2014-01-26-23-57-20.png
    72 KB · Views: 715
Last edited:

userdelroot

Senior Member
Aug 7, 2010
331
157
Florida
Sry, not working, but I deleted line with checking architecture and I got new error. See attachment.

EDIT:

I use:
sh install-or-mount -i -n linux.img -m /data/local/chroot -l /data/local -o precise -0
Rewrited mk2fs line in install-or-mount file to: mke2fs -F $IMGLOC/$IMGNAME
Deleted if [ -z "$ARCH" ] || [ -z "$HOST_OS" ]; then error 1 WHATARCH "Couldn't work out current architecture" fi line in deboostrap file

I think if I deleted this line, chroot not mounted correctly and bootstrap can't continue. So we need figure out, how fix architecture error.

I found this: http://uyirpodiru.blogspot.cz/2012/08/debootstrap-error-e-couldnt-work-out.html

All the errors you are getting I did get at one point, I forgot how I fixed them, cause I was working on another project..

Ill do some testing, as I am working on the code right now.
Ill post when I find a solution to those..

Also before continuing I wanted to just let you know.
the debootstrap requires 'ar' archiver which I do not believe comes with CM.
busybox ar

That is why I included my own version.

I may have some work arounds tho so give me a few..
 

ONDR4SH3K

Senior Member
Nov 15, 2009
162
28
Opava
All the errors you are getting I did get at one point, I forgot how I fixed them, cause I was working on another project..

Ill do some testing, as I am working on the code right now.
Ill post when I find a solution to those..

Also before continuing I wanted to just let you know.
the debootstrap requires 'ar' archiver which I do not believe comes with CM.
busybox ar

That is why I included my own version.

I may have some work arounds tho so give me a few..

New vesion 0.2 in attachment. Is on the way.

EDIT: I put busybox from /sbin to /system/xbin and it looks like deboostrap working, but you have error with Release. Attachment no.3.
Thanks for helping.
 

Attachments

  • Screenshot_2014-01-27-14-32-55.png
    Screenshot_2014-01-27-14-32-55.png
    38.9 KB · Views: 460
  • Screenshot_2014-01-27-14-33-21.png
    Screenshot_2014-01-27-14-33-21.png
    59 KB · Views: 454
  • Screenshot_2014-01-27-14-56-18.png
    Screenshot_2014-01-27-14-56-18.png
    69.1 KB · Views: 457
Last edited:

userdelroot

Senior Member
Aug 7, 2010
331
157
Florida
I'm confused

Does touch work? Or do we need OTG cables

You need root, and an android device.
No OTG cables..
It build's a chroot image on the device, with android running in the background.
You can run X windows (only LXDE currently because it is lightwieght) on the device and then vnc into it from anywhere, even a desktop...

There are other tools out there for this however, they require you to download the images. Which are usually between 1gig - 4gigs.
Instead of downloading the images, this creates the image and only downloads approximately 200megs for the packages.
 
  • Like
Reactions: raisage

userdelroot

Senior Member
Aug 7, 2010
331
157
Florida
New vesion 0.2 in attachment. Is on the way.

EDIT: I put busybox from /sbin to /system/xbin and it looks like deboostrap working, but you have error with Release. Attachment no.3.
Thanks for helping.

Yea, crap, that was my bad, I should check where the system busybox is installed. It should default to /system/xbin
But some roms I guess put it in /system/sbin ? Possibly a typo on the rom developers part? LOL

Anyways, I will add code to correct this.

EDIT: How did you fix image 2?, as it should stop at the error in image type every time.
At any rate, image 2 error is because it can't find sh. in the install-or-mount/bin directory type this..
ls -l bin/

Make sure sh is symlinked to /system/bin/sh or /system/xbin/busybox if not that is causing the error in picture 2
it should look like this...

ls -l bin/

sh sh -> /system/xbin/busybox

If you don't see that do the following:

cd /data/local/install-or-mount
busybox touch bin-configs/sh
rm -rf .bin-configs-done




if you have something like that it should be ok, however to be safe since you moved you your busybox
from inside install-or-mount
rm -rf .bin-configs-done
Yes there is a DOT in front of bin-configs-done
 
Last edited:

cliff p

Senior Member
Oct 4, 2011
250
173
Seoul
I receive a permission denied error with debootstrap as welluploadfromtaptalk1390865882675.jpg

Edit: crap I didn't see all the replies up there :)
Sent from my GT-N7105 using Tapatalk
 
Last edited:

ONDR4SH3K

Senior Member
Nov 15, 2009
162
28
Opava
I fix it other way:

mount -o remount,rw /system
cp busybox /sbin /system/xbin
mount -o remount,ro /system

I hope that commands are fine.

I has no solution for fetch Release error, yet. I tried rewrite URL, but unsussesful.

Its in scripts folder line mirror_styles Release


Sent from my Xperia P using xda app-developers app

---------- Post added at 01:06 AM ---------- Previous post was at 01:00 AM ----------

Already testing on armv7 device dual core. OP must fix a few errors but you can try it.

Sent from my Xperia P using xda app-developers app
 
Last edited:

Top Liked Posts