guardianproject / lildebi

UNMAINTAINED please adopt! we can no longer maintain this
https://guardianproject.info/code
GNU General Public License v3.0
229 stars 55 forks source link

Moto G "device or resource busy" #87

Closed cam13 closed 10 years ago

cam13 commented 10 years ago

Hi, sucessfully rooted Moto G, installing Lil Debi on it and "start Debian" will produce the following error: losetup /dev/block/loop0 /sdcard/debian.img root mount for everything Debian mount: mounting /dev/block/loop0 on /debian failed: Device or resource busy Mounting '/debian' failed, returned 255 Starting OpenBSD Secure Shell server: sshd using 0.4.6 from google play store

Any idea whats wrong?

rafapolo commented 10 years ago

I can confirm this same issue on Moto G.

SDkie commented 10 years ago

@cam13 and @rafapolo: try it again after rebooting the phone. Give the error logs(if any) when you try it 'first' time after rebooting phone.

SDkie commented 10 years ago

@cam13 and @rafapolo : you can also run 1) cd /data/data/info.guardianproject.lildebi/app_bin 2) ./stop-debian.sh /data/data/info.guardianproject.lildebi/app_bin /mnt/sdcard /sdcard/debian.img /data/debian

to free the resources.

SDkie commented 10 years ago

This happens because the scripts are not complete, to handle all the scenarios. eg. when cdebootstrap fails in create-debian-setup.sh, then the created image is not unmounted, which keeps the resources allocated.

eighthave commented 10 years ago

Yeah, the install script handles failure poorly. The short term solution is to make the "delete all" script clean up every possible thing from a failed install. A better solution is to try to report what failed in the install process. Right now, the only way to do that is look at the Install Log.

eighthave commented 10 years ago

But that still leaves the core cause of the issue reported here. losetup does not report any problems setting up the loopback device, but then it cannot be mounted because it is "busy". It seems that some devices have strange or flaky loopback device setups, I can't think what would be doing that.

Though technically a workaround, this problem would be solved by adding support to Lil' Debi for installing directly to the /data/ partition. That feature would have lots of other advantages as well.

lluis commented 10 years ago

I had the same error, then trying to manually mount debian (with /system/bin/mount):

Usage: mount [-r] [-w] [-o options] [-t type] device directory

but with /system/xbin/mount it worked and /data/data/info.guardianproject.lildebi/app_bin/shell worked too, but lildebi stills say "status: debian not mounted"

SDkie commented 10 years ago

@lluis can you tell me the procedure so that I can reproduce that error on my device ?

eighthave commented 10 years ago

@cam13 @rafapolo can you attach the install log to this bug report? It is available from the menu in Lil' Debi. Also, is the Moto G running Android 4.4 KitKat? If so, there are still unresolved issues with running root shells on 4.4.

rafapolo commented 10 years ago

I can't access the log anymore, but I can confirm that it was running KitKat.

On Tue, Jul 29, 2014 at 4:45 PM, Hans-Christoph Steiner < notifications@github.com> wrote:

@cam13 https://github.com/cam13 @rafapolo https://github.com/rafapolo can you attach the install log to this bug report? It is available from the menu in Lil' Debi. Also, is the Moto G running Android 4.4 KitKat? If so, there are still unresolved issues with running root shells on 4.4.

— Reply to this email directly or view it on GitHub https://github.com/guardianproject/lildebi/issues/87#issuecomment-50494950 .

Rafael Polo extrapolo.com

lluis commented 10 years ago

I was running KitKat 4.4 too, here you have the install log: http://pastebin.com/raw.php?i=E2vhhLdW @SDkie : after installing Debian, pressing Start Debian it shows the error about device busy, then I mounted manually /dev/block/loop1 to /debian but with /system/xbin/mount I attach the screenshot with the error: screenshot_2014-07-23-21-03-01

yesterday had a system update, not sure if it's related, but now I get different behavior, here you have more screenshots (don't know how to save the start log): screenshot_2014-07-30-08-26-31 screenshot_2014-07-30-08-26-41 screenshot_2014-07-30-08-26-53 screenshot_2014-07-30-08-26-58

salrodgom commented 10 years ago

I have a similar problem (and it was running witk kitkat too) with MotoG. I have attached the log file in: http://pastebin.com/F4J0rNjn

Details: manufacturer: motorola model: XT1032 product: falcon_reteu brand: motorola device: falcon_umts release: 4.4.4 incremental: 36 codename: REL SDK: 19

SDkie commented 10 years ago

@lluis : after system update, lildebi seams to be working fine for you!

lluis commented 10 years ago

@SDkie you are right, it's working now. I was getting "debian not mounted" like in #85, after replacing supersu with superuser it works fine now :)

SDkie commented 10 years ago

@lluis : thanks for your update :)