[Q] Complete Linux Installer: dirname not found; Unable to mount the loop device - Android Q&A, Help & Troubleshooting

I could successfully install Ubuntu 13.10 via Complete Linux Installer under Android 4.4.2 (on a Nexus 5). If I reboot and then open Ubuntu 13.10, everything works fine. But if I close Ubuntu and open it again (without reboot), I get:
[email protected]:/ $
[email protected]:/ $ cd /sdcard/ubuntu
[email protected]:/sdcard/ubuntu $ su
sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh /sdcard/ubuntu/ubuntu.img
sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh /sdcard/ubuntu/ubuntu.img
[email protected]:/storage/emulated/legacy/ubuntu # sh /data/dcom.zpwebsites .linuxonandroid/files/bootscript.sh /sdcard/ubuntu/ubuntu.img
/data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh[39]: dirname: not found
Checking loop device... FOUND
mount: mounting /dev/block/loop255 on /data/local/mnt failed: Device or resource busy
Error: Unable to mount the loop device!
1|[email protected]:/storage/emulated/legacy/ubuntu #
What is the problem?

Hear hear. Same issue Galaxy S5 g900r4. SELINUX is permissive(finally).

Related

Need help with Chroot Ubuntu

I need some help with running chroot ubuntu on my TFP. I had the chroot BT5 ( http://forum.xda-developers.com/showthread.php?t=1428475 ) image running a week ago then I decided to try out my own image of ubuntu 11. I got it to run once using this process but now I get this:
Code:
# su
[email protected]:/ # cd sdcard/ubuntu/
[email protected]:/sdcard/ubuntu # sh bootubuntu.txt
mknod: /dev/loop5: File exists
mount: Invalid argument
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
net.ipv4.ip_forward = 1
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
bootubuntu.txt[23]: cannot create /data/local/ubuntu/etc/resolv.conf: No such file or directory
bootubuntu.txt[24]: cannot create /data/local/ubuntu/etc/resolv.conf: No such file or directory
Setting localhost on /etc/hosts
bootubuntu.txt[26]: cannot create /data/local/ubuntu/etc/hosts: No such file or directory
READY TO ROCK AND ROLL BABY!
Brought to you by NexusOneHacks.net and the open source community!
chroot: can't execute '/bin/bash': No such file or directory
Shutting down Ubuntu
failed: No such file or directory
failed: No such file or directory
failed: No such file or directory
failed: Invalid argument
losetup: /dev/block/loop5: No such device or address
1|[email protected]:/sdcard/ubuntu #
This is the bootubuntu script I am running:
Code:
#modprobe ext2
mount -o remount,rw -t yaffs2 /dev/block/mmcblk0p1 /system
export kit=/sdcard/ubuntu
export bin=/system/bin
if [ ! -d /data/local/ubuntu ]
then
mkdir /data/local/ubuntu
fi
export mnt=/data/local/ubuntu
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
export USER=root
mknod /dev/loop5 b 7 0
losetup /dev/block/loop7 /sdcard/ubuntu/ubuntu.img
mount -t ext2 /dev/block/loop5 /data/local/ubuntu
#mount -o loop,noatime -t ext2 $kit/ubuntu.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 "Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4"
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "Setting localhost on /etc/hosts "
echo "127.0.0.1 localhost" > $mnt/etc/hosts
echo "READY TO ROCK AND ROLL BABY! "
echo "Brought to you by NexusOneHacks.net and the open source community! "
echo " "
chroot $mnt /bin/bash
#After exit command is executed clear it all up
echo " "
echo "Shutting down Ubuntu"
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
losetup -d /dev/block/loop5
Help! I feel like I'm going crazy because this worked a week ago but now it doesn't.
Okay, I changed busybox from 1.19.3 to 1.19.2 and now I get this:
Code:
# su
[email protected]:/ # cd sdcard/ubuntu/
[email protected]:/sdcard/ubuntu # sh bootubuntu.txt
mknod: /dev/loop5: File exists
net.ipv4.ip_forward = 1
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
bootubuntu.txt[23]: cannot create /data/local/ubuntu/etc/resolv.conf: No such file or directory
bootubuntu.txt[24]: cannot create /data/local/ubuntu/etc/resolv.conf: No such file or directory
Setting localhost on /etc/hosts
bootubuntu.txt[26]: cannot create /data/local/ubuntu/etc/hosts: No such file or directory
READY TO ROCK AND ROLL BABY!
Brought to you by NexusOneHacks.net and the open source community!
chroot: can't execute '/bin/bash': No such file or directory
Shutting down Ubuntu
losetup: /dev/block/loop5: No such device or address
1|[email protected]:/sdcard/ubuntu #
Hmmm, is the Bash command line executable located in a different folder with ubuntu 11? Edit that bootubuntu sh file. Or maybe try removing the loop file under the /dev/ dir.
Thanks philleonard for responding. I checked and bash is definitely in /bin/ and I also tried deleting the loop5 file in /dev/ but that didn't help. Is it a bad image file? The weird thing is that I can't even get the BT5 image to run with the bt.sh script either. This is killing me.
I'm thinking that it's an issue with the loop device not mounting the ubuntu.img but not sure how to fix it.
Try changing: losetup /dev/block/loop7 /sdcard/ubuntu/ubuntu.img
to: losetup /dev/block/loop5 /sdcard/ubuntu/ubuntu.img
Hmmm, maybe try reinstalling busybox. Im running BT5 and Ubuntu 9.10 (I think it is) on my Transformer Prime. BT5 i installed through the script provided in this tutorial; http://forum.xda-developers.com/archive/index.php/t-1074723.html Its for the Xoom but seems to work just fine.
Cannot connect to VNC
Ive got [email protected] but when I try to connect to vnc i get this. Anyone care to elaborate? I cant apt-get install openssh-server it says failed to fetch. I try apt-get install tightvncserver and it says it cannot fetch. It says it cannot update when I run it. There is no sh run.sh command. I try to run export USER=root
vncserever -geometry 1200x800 and get command not found.
I type le or whatever and it pulls up my connections and I have the 127.0.0.1 port 5901 found but when I put it in the vncviewer it says connection rejected. Please can someone help me I am frustrated with ubuntu ever since trying to run it on my phone.

[Q] Linux on Android A200 Iconia

Hey XDA, long time listener first time caller.
I have an A200 rooted stock and am trying to boot Debian (or any other distro) on it.
I am a seasoned android dev, but new to linux in general. (yes i am aware that android is linux)
i am using the complete linux installer apk and extracting with archidroid. My path is /sdcard/debian/debian.img
i use the boot widget included and the following is my terminal output. i have been unable to find a solution and was hoping someone here would have some suggestions
[email protected]:/ $
[email protected]:/ $ cd sdcard/debian
[email protected]:/ $ /sdcard/debian $ su
[email protected]:/ $ /mnt/sdcard/debian # sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh sdcard/debian/debian.img
/data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh[34]: dirname: not found
/data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh[56]: dirname: not found
/data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh[56]: dirname: not found
Checking loop device... FOUND
/data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh[122]: /data/data/com.zpwebsites.linuxonandroid/files/busybox: cannot execute - Permission denied **<could this be a perms issue?**
Error: Unable to attach image to loop device! (Image = /sdcard/debian/debian.img)
1|[email protected]:/mnt/sdcard/debian #
EDIT** answered my own question. had to chmod /data/datacom...../busybox to 755 *********

Ubuntu on i9300

I have installed Googy Max dual boot kernel..i start terminal i installed busybox i unzipped ubuntu in ubuntu folder..and i have this error in terminal
Code:
[email protected]:/ $ su
[email protected]:/ # cd sdcard/ubuntu
cd sdcard/ubuntu
[email protected]:/sdcard/ubuntu # sh ubuntu.sh
sh ubuntu.sh
mkdir failed for /data/local/mnt, File exists
Loop device exists
ioctl LOOP_SET_FD failed: Device or resource busy
mount: Device or resource busy
net.ipv4.ip_forward = 1
ubuntu is configured with SSH and VNC servers that can be accessed from the IP:
eth0: No such device
BusyBox v1.21.1-Stericson (2013-07-08 15:58:11 BST) multi-call binary.
Usage: chroot NEWROOT [PROG ARGS]
Run PROG with root directory set to NEWROOT
Shutting down ubuntu ARM
failed: Device or resource busy
losetup: /dev/loop7: No such file or directory
1|[email protected]:/sdcard/ubuntu #
Sent from my GT-I9300 using Tapatalk 4
g9savvas said:
I have installed Googy Max dual boot kernel..i start terminal i installed busybox i unzipped ubuntu in ubuntu folder..and i have this error in terminal
Code:
[email protected]:/ $ su
[email protected]:/ # cd sdcard/ubuntu
cd sdcard/ubuntu
[email protected]:/sdcard/ubuntu # sh ubuntu.sh
sh ubuntu.sh
mkdir failed for /data/local/mnt, File exists
Loop device exists
ioctl LOOP_SET_FD failed: Device or resource busy
mount: Device or resource busy
net.ipv4.ip_forward = 1
ubuntu is configured with SSH and VNC servers that can be accessed from the IP:
eth0: No such device
BusyBox v1.21.1-Stericson (2013-07-08 15:58:11 BST) multi-call binary.
Usage: chroot NEWROOT [PROG ARGS]
Run PROG with root directory set to NEWROOT
Shutting down ubuntu ARM
failed: Device or resource busy
losetup: /dev/loop7: No such file or directory
1|[email protected]:/sdcard/ubuntu #
Sent from my GT-I9300 using Tapatalk 4
Click to expand...
Click to collapse
Check this bro !!
http://forum.xda-developers.com/showthread.php?t=2194237
Thnks solved but now nothing..i wrote the code and the resolution then vnc not connecting
Sent from my GT-I9300 using Tapatalk 4

Linux on Epinter CM10

I just got a clean install of CM10 on MB860 (no restore of any previous settings or apps) and tried Linux On Mobile. When I downloaded the Ubuntu Small image and tried to launch, I got the below error:
Code:
[email protected]:/ $
[email protected]:/ $ cd /sdcard
[email protected]:/sdcard $ su
[email protected]:/storage/sdcard0 # sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh /sdcard/ubuntu-13.10.SMALL.ext2.img
Checking loop device... FOUND
mount: mounting /storage on /data/local/mnt/external_sd failed: Invalid argument
No user defined mount points
net.ipv4.ip_forward = 1
Segmentation fault
Shutting down Linux ARM
umount: can't umount /data/local/mnt/external_sd: Invalid argument
umount: can't umount /data/local/mnt/dev: Invalid argument
I found one post on linux thread about a similar problem (invalid argument during mount) and the response suggested that the kernel might not support loopback devices. Has anyone been able to run linux on this combination? I would really appreciate any help on this.

[Q] My devices not support or what problem ubuntu 13.10 on complet linux install

[email protected]_T00J:/ $
[email protected]_T00J:/ $ cd /mnt/sdcard/ubuntu
[email protected]_T00J:/mnt/sdcard/ubuntu $ su
sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh /mnt/sdcard/ubuntu/ubuntu.img
sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh /mnt/sdcard/ubuntu/ubuntu.img
[email protected]_T00J:/storage/emulated/legacy/ubuntu # sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh /mnt/sdcard/ubuntu/ubuntu.img
MD5 file found, use to check .img file? (y/n)
n
Checking loop device... FOUND
losetup: /dev/block/loop255: No such file or directory
Error: Unable to attach image to loop device! (Image = /mnt/sdcard/ubuntu/ubuntu.img)
1|[email protected]_T00J:/storage/emulated/legacy/ubuntu #
if you know this issue please help me thank for you time

Categories

Resources