Ubuntu on Android - Xperia Play Q&A, Help & Troubleshooting

Has anybody got this working?
I've done some searching and a few people have said it works on the Play.
However:
Sent from my R800i using XDA

It works for me. It took me some time to get it working, but now it works. I tried several "ubuntu.img"s and "ubuntu.sh"s and I think I edited the ubuntu.sh that I'm using now and created some folders myself to be able to boot.
If I remember correctly, I used this app to download the files needed. The image that the app downloads is good because you can choose between Gnome and LXDE at startup. I'll post my ubuntu.sh file here so if the one from the app doesn't work and it's different from mine, try mine (it's attached)
All this was on the stock GB rom + kernel

I used the same app.
I tried your file:
Sent from my R800i using XDA

The screenshot isn't very good because it won't let me upload the full sized image. Incorrect filetype or something.
Sent from my R800i using XDA

$ export PATH=/data/local/bin:$PATH
$ su
# cd sdcard
# cd ubuntu
# sh ubuntu.sh
cut: not found
[: not found
[: not found
mknod: /dev/block/loop255: File exists
losetup: not found
mount: Invalid argument
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
mount: mounting /sdcard on /data/local/mnt/sdcard failed: No such file or directory
mount: mounting /sdcard/external_sd on /data/local/mnt/external_sd failed: No such file or directory
net.ipv4.ip_forward = 1
ubuntu.sh: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent
ubuntu.sh: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent
ubuntu.sh: cannot create /data/local/mnt/etc/hosts: directory nonexistent
Ubuntu is configured with SSH and VNC servers that can be accessed from the IP:
eth0: No such device
chroot: can't execute '/root/init.sh': No such file or directory
Shutting down Ubuntu ARM
failed.
failed.
failed.
failed.
failed.
failed.
losetup: not found
# su
# sh ubuntu.sh
cut: not found
[: not found
mkdir failed for /data/local/mnt, File exists
[: not found
mknod: /dev/block/loop255: File exists
losetup: not found
mount: Invalid argument
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
mount: mounting /sdcard on /data/local/mnt/sdcard failed: No such file or directory
mount: mounting /sdcard/external_sd on /data/local/mnt/external_sd failed: No such file or directory
net.ipv4.ip_forward = 1
ubuntu.sh: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent
ubuntu.sh: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent
ubuntu.sh: cannot create /data/local/mnt/etc/hosts: directory nonexistent
Ubuntu is configured with SSH and VNC servers that can be accessed from the IP:
eth0: No such device
chroot: can't execute '/root/init.sh': No such file or directory
Shutting down Ubuntu ARM
failed.
failed.
failed.
failed.
failed.
failed.
losetup: not found
#
Sent from my R800i using XDA

Does this folder exist on your device?
/data/local/mnt
If not, try creating it yourself, reboot, and see if it works.
I was getting this error too. After that I created some folders that were missing and it worked, but I can't remember which...
EDIT: also check if /data/local/mnt/etc exists, and create that too

Mnt existed but etc didn't. I created etc and got the same errors.
Sent from my R800i using XDA

What kernel and rom do you use?
Sent from my R800i using XDA

Stock kernel and TrueAncestor 1.4.
Sent from my R800i using XDA

Can you post what you get when you run the script without root permissions (before typing su)? Also, try updating busybox, if you don't have the latest version... If you look at the first error, it cannot find the "cut" command...
Sent from my R800i using XDA

Same error without su.
Sent from my R800i using XDA

Do you have busybox installed? What happens if you run "busybox" (in the terminal)?
Sent from my R800i using XDA

leots said:
Do you have busybox installed? What happens if you run "busybox" (in the terminal)?
Sent from my R800i using XDA
Click to expand...
Click to collapse
This:
$ export PATH=/data/local/bin:$PATH
$ busybox
BusyBox v1.16.2androidfull (2010-08-01 14:57:25 EDT) multi-call binary.
Copyright (C) 1998-2009 Erik Andersen, Rob Landley, Denys Vlasenko
and others. Licensed under GPLv2.
See source distribution for full notice.
Usage: busybox [function] [arguments]...
or: function [arguments]...
BusyBox is a multi-call binary that combines many common Unix
utilities into a single executable. Most people will create a
link to busybox for each function they wish to use and BusyBox
will act like whatever it was invoked as.
Currently defined functions:
[, [[, arp, ash, awk, basename, bbconfig,
brctl, bunzip2, bzcat, bzip2, cal, cat,
catv, chgrp, chmod, chown, chroot, cksum,
clear, cmp, cp, cpio, cut, date, dc, dd,
depmod, devmem, df, diff, dirname, dmesg,
dnsd, dos2unix, du, echo, ed, egrep, env,
expr, false, fdisk, fgrep, find, fold, free,
freeramdisk, fuser, getopt, grep, gunzip,
gzip, head, hexdump, id, ifconfig, insmod,
install, ip, kill, killall, killall5,
length, less, ln, losetup, ls, lsmod, lspci,
lsusb, lzop, lzopcat, md5sum, mkdir, mke2fs,
mkfifo, mkfs.ext2, mknod, mkswap, mktemp,
modprobe, more, mount, mountpoint, mv, nc,
netstat, nice, nohup, nslookup, ntpd, od,
patch, pgrep, pidof, ping, pkill, printenv,
printf, ps, pwd, rdev, readlink, realpath,
renice, reset, rm, rmdir, rmmod, route,
run-parts, sed, seq, setsid, sh, sha1sum,
sha256sum, sha512sum, sleep, sort, split,
stat, strings, stty, swapoff, swapon, sync,
sysctl, tac, tail, tar, tee, telnet, test,
tftp, time, top, touch, tr, traceroute,
true, tty, tune2fs, umount, uname, uniq,
unix2dos, unlzop, unzip, uptime, usleep,
uudecode, uuencode, vi, watch, wc, wget,
which, whoami, xargs, yes, zcat
$
Sent from my R800i using XDA

Updated Busybox and got new errors.
$ export PATH=/data/local/bin:$PATH
$ cd sdcard/ubuntu
$ su
# sh ubuntu.sh
Checking loop device... FOUND
losetup: /dev/block/loop255: No such file or directory
Error: Unable to attach image to loop device! (Image = ./ubuntu.img)
#
Sent from my R800i using XDA

The image unzipped in a folder so I moved it. It's now verifying the checksum.
I wonder what the next error will be...
Sent from my R800i using XDA

. .

. .

What happened? How did it extract? Tell me moar! Getting a new error is good. It seems there was a problem with your busybox installation
Were you using my script when you got this last error? (I'm asking because my script works for me, and I have stock Rom with doomkernel)
Sent from my R800i using XDA

I got it working.
The new error was just the image file being in a folder in the ubuntu folder, so I had to move it.
It must have been a BusyBox problem, it worked after updating it. I think I'm using the file you uploaded.
I've been messing around on it and it works ok. Can you get sound when playing music & videos? I'm assuming it might be possible cos there's a music player.
Also, I couldn't access my SD card, is there a way to do that?
Sent from my R800i using XDA

I don't think VNC supports sound :/ There might be another way though...
As for the SD card, it mounts on /sdcard (in the Ubuntu filesystem. If you select Gnome, you will see it on the desktop! I'd post two screenshots but they are in PNG format and it won't let me post them from my phone
EDIT: here are links to the screenshots on my Dropbox
http://db.tt/TxzhASdX
http://db.tt/Yyu8iwwN
Sent from my R800i using XDA

Related

[Guide] How to get Karmic Koala on your HTC Vision

So, for all of you guys down here that are Debian junkies, then you're gonna love this. I managed to get Ubuntu Karmic Koala on my G2 after a bit of messing around with adb. This is my first tutorial on xda-developers, so please tell me how I'm doing. Remember to hit the Thanks button at the bottom if you're satisfied
Code:
#Your warranty has been voided
#I am not the cause of any damage done to your device
#Should you accuse me, I will laugh at you
Reasons why you should follow this tutorial:
- It allows you to make use wide array of applications available in Debian/Ubuntu's repos.
- It doesn't overwrite the current Android operating system.
- It'll allow you to turn your G2, Desire Z, etc. into more than just a sub-par cellphone.
- If you're developing software/applications, this will give you the proper environment for you test them on, if you don't care for Virtualbox or don't have access to a computer at the current moment.
- This tutorial will make the best use of Android and Linux's open-source nature.
Please note that this DOES NOT replace Android nor is it a port of Ubuntu/Debian. Ubuntu/Debian support ARM EABI which is the underlying architecture of Android.
READ EVERYTHING BEFORE DOING ANYTHING. I KNOW IT'S LONG, I WROTE THIS TUTORIAL
For those of you that can't use, can't set it up, or don't care for adb, you can still get Ubuntu to work on your device using a Terminal Emulator app, but you're probably gonna be stuck at the command line. I haven't actually tried setting up the GUI using the Terminal, so I'm not 100% sure. Now, before I start the tutorial, you NEED to be rooted.
NOTE: Whenever you see a $ or a # sign, those are indicators for the next command. Please do not enter them as you're typing in the commands. The same goes for the "[email protected]:/#" sign.
Before we begin we will need the following:
On your phone, have the following installed and/or readily available
-androidVNC application
-Terminal Emulator app (use this to boot into Ubuntu shell)
-Busybox (preferably, the latest one. If you rooted your phone using the method on the xda wiki OR your custom ROM has it pre-installed, then continue)
- At least 2GB space free on your microSD card
- Loopdevice support for your ROM. I think Cyanogen and another kernel should do the trick.
On your computer have the following installed and/or on the desktop:
-Ubuntu Karmic Koala image. If you don't have it, download it from this link ->http://bit.ly/moghJ3
-adb installed and fully functioning on your computer
EDIT 4 June, 2011: For those of you having troubles getting the shell to boot up, I found an alternative bootubuntu file. Extract it and replace the one that comes with the image with this one http://bit.ly/j7zORF
Let's begin, shall we?
Step 1: Connect your phone to your computer. Make sure you have "USB Debugging" checked off in "Settings -> Applications -> Development", then mount your sd card.
Step 2: Transfer the extracted "ubuntu" folder to the root of your sd card [NOT IN ANY FOLDERS, JUST the sd card itself, for those of you who don't know]. It might take a few minutes, so you might wanna make yourself a little snack for the wait.
Step 3: When the file transfer is done, disable the USB connection, so we can make use of adb. This is where USB Debugging is CRUCIAL. Open up a command window/terminal, go to where adb is located and enter the following commands:
Code:
$ adb shell
$ cd /sdcard/ubuntu
# su
# sh ./ubuntu.sh
# bootubuntu
At this point, you've set up the Ubuntu shell, as indicated by the "[email protected]:/#" sign.
However, our shell is still incomplete. We're gonna need a GUI for actual usage. If you're fine with using the command line then stop here. If you want to give yourself a PC-like experience, then please continue. You might wanna connect to WiFi if you're in an area where your mobile data is inconsistent or restricted to an EDGE connection.
Step 4: With the command prompt/terminal window that contains your adb/ubuntu shell, let's continue entering some commands to get our GUI set up.
Code:
[email protected]:/# apt-get update
[email protected]:/# apt-get install tightvncserver
[email protected]:/# apt-get install lxde
[email protected]:/# export USER=root
[email protected]:/# vncserver -geometry 1024x800
After entering the last command, you'll be prompted to enter a password. It'll ask you to set up a second one, just press "n" then continue.
For the second and third commands, press "y" when prompted to then hit ENTER, so you can install the packages. The reason why we set the VNC server's resolution is because even though the G2/Dz's resolution is 800x480, a higher resolution will provide a better viewing experience. If you want it set up to your phone's resolution, then swap it with "800x480" to scale the server's resolution to your phone's screen size.
Step 5: Enter the following commands. After entering the first command, you'll notice there's no user indicator at the left side. DON'T PANIC. Just continue entering the following commands:
Code:
[email protected]:# cat > /root/.vnc/xstartup
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
icewm &
lxsession
Then, press Ctrl+D twice and press enter. You'll be back at "[email protected]:/#" (Conversely, if you're on Mac OS or Linux, just press Ctrl+D once)
Step 6: Go to your phone, and open up the androidVNC app. We're gonna need this to view our desktop. set the nickname to "root" and enter the password you set earlier. Set the port to "5901" and press connect.
Step 7a: And bam! You've got your own cool GNOME desktop! (Though in my experience, it switches over to lxde after a few uses.) Now, we need to get the VNC app to open up every time we boot into our shell. We need to enter a few more commands (yeah I know, it's getting a bit tedious at this point.)
Code:
[email protected]:/# cat > front
export USER=root
cd /
rm -r -f tmp
mkdir tmp
cd /
vncserver -geometry 1024×800
Again, you can replace "1024x800" with any screen resolution you desire.
Step 7b: Enter just a few more commands [trust me, we're almost done ]
Code:
[email protected]:/# cat front /root/.bashrc > temp
[email protected]:/# cp temp /root/.bashrc
Step 8: To check that everything is working, enter the following commands in your command prompt/terminal window that contains our adb/ubuntu shell that I hope you kept open all this time.
Code:
[email protected]:/# exit
# bootubuntu
And you're done! Give yourself a round of applause and a pat on the back, because now you have Ubuntu Linux running alongside Android. Yay!!!!!!
To boot into your shell AFTER you're done, use the Terminal Emulator app to access your shell:
Code:
$ su
# bootubuntu
That's it, you're finished.
Now, I don't know why this happens, but after rebooting your phone, it'll take a few extra seconds for your devices to start up. I think it's because of all the files that are in the phone's internal memory. I'm not sure. Also, the VNC server might not open up after you're done with the tutorial. It's only a minor setback, you can still manually open it yourself which is in itself relatively quick.
When you're done with the tutorial, be sure to type in "exit" in the terminal and press enter for a clean kill of Ubuntu. Otherwise, you're gonna have to redo the entire procedure.
If you have any questions, please email me at [email protected]
FAQ
- I don't have adb, can I still follow this tutorial?
A: Yes you can. However, you're probably going to be stuck at Step 3 with the command line. You can still use the shell, but you won't have a GUI.
- Why does my phone show a black screen after rebooting?
A: It's probably because of all the modding that's a result of the commands we entered.
Don't worry, Your phone will boot up normally. However, if this goes on longer than usual, you might have to install a different ROM. I've tested it on CM7 (Stable and Nightly), Stock G2 ROM, Virtuous 1.0.2, Virtuous G-Lite 1.0.2, and their respective ROM bases with no problems.
- I get an error that won't let me boot into the Ubuntu shell. Help me!!!!!
A: Yeah, you probably either downloaded an incomplete image OR you entered an important command wrong. I suggest deleting the ubuntu image from your sdcard and then copy the image you extracted onto your sdcard. Then what you have to do is redo the entire tutorial.
Interesting...
Sent from my T-Mobile G2 using XDA Premium App
Spastic909 said:
Interesting...
Sent from my T-Mobile G2 using XDA Premium App
Click to expand...
Click to collapse
What's interesting about this?
Edit: can't wait to try this!
Ouch. . .
It's my first tutorial. . .
I just want to know what he found interesting about this tutorial. No need to get so defensive over a comment some other guy made.
Sent from my T-Mobile G2 using XDA Premium App
Didn't mean any offense dude especially if you weren't trying to be rude. You know how the internet doesn't portray emotion very well in text. Just sounded snappy. Back on topic. Can't wait to try this!
Sent from my HTC Vision using XDA Premium App
I'm not much of a software junky, so what exactly would this do? It looks easy enough to accomplish, since most of it is done through terminal, but I kinda wanna know what this DOES xD
Sent from my HTC Vision using XDA Premium App
xsteven77x said:
Didn't mean any offense dude especially if you weren't trying to be rude. You know how the internet doesn't portray emotion very well in text. Just sounded snappy. Back on topic. Can't wait to try this!
Sent from my HTC Vision using XDA Premium App
Click to expand...
Click to collapse
Edit: Remember to hit that thanks button!
ohshootrawr said:
I'm not much of a software junky, so what exactly would this do? It looks easy enough to accomplish, since most of it is done through terminal, but I kinda wanna know what this DOES xD
Sent from my HTC Vision using XDA Premium App
Click to expand...
Click to collapse
Well, Ubuntu is a distribution of the Debian family of Linux.
Essentially, you have access to the plethora of apps that exist in Ubuntu/Debian's repos, and it's also possible to use this shell as a test monkey for applications that you might be developing.
Any idea if this will work with the new Ubuntu 11.04? Though I do hate the new layout
boost3d23 said:
Any idea if this will work with the new Ubuntu 11.04? Though I do hate the new layout
Click to expand...
Click to collapse
in theory, yes if the image has been compiled properly. also, the new layout technically can get overwritten with lxde or whatever desktop environment you installed.
reserved for future use.
im getting some errors in terminal when trying to set this up, im running mexdroid v3 android 2.3.4
C:\push\tools>adb shell
# cd /sdcard/ubuntu
cd /sdcard/ubuntu
# su
su
# sh ./ubuntu.sh
sh ./ubuntu.sh
modprobe: module 'ext2' not found
←[H←[Jmkdir: can't create directory '/data/local/mnt': File exists
←[H←[Jchmod: bootubuntu: Operation not permitted
chmod: fsrw: Operation not permitted
chmod: mountonly: Operation not permitted
chmod: ubuntu.img: Operation not permitted
chmod: ubuntu.sh: Operation not permitted
chmod: unionfs: Operation not permitted
←[H←[J
Ubuntu Chroot Bootloader v0.1
Ubuntu Bootloader is now installed!
This process does NOT damage Android OS!
Original Installer by Charan Singh
Modified for Ubuntu Chroot by Max Lee at AndroLinux.com ,G2Hacks.com and NexusOn
eHacks.net
To enter the Ubuntu Linux console just type 'bootubuntu'
# bootubuntu
bootubuntu
mknod: /dev/loop1: File exists
losetup: /dev/block/loop1: No such file or directory
mount: mounting /dev/block/loop1 on /data/local/ubuntu failed: Device or resourc
e busy
mount: mounting devpts on /data/local/ubuntu/dev/pts failed: No such file or dir
ectory
mount: mounting proc on /data/local/ubuntu/proc failed: No such file or director
y
mount: mounting sysfs on /data/local/ubuntu/sys failed: No such file or director
y
net.ipv4.ip_forward = 1
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexist
ent
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexist
ent
Setting localhost on /etc/hosts
bootubuntu: cannot create /data/local/ubuntu/etc/hosts: directory nonexistent
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
umount: can't umount /data/local/ubuntu/dev/pts: No such file or directory
umount: can't umount /data/local/ubuntu/proc: No such file or directory
umount: can't umount /data/local/ubuntu/sys: No such file or directory
umount: can't umount /data/local/ubuntu: Invalid argument
losetup: /dev/block/loop1: Device or resource busy
# bootubuntu
bootubuntu
mknod: /dev/loop1: File exists
losetup: /dev/block/loop1: No such file or directory
mount: mounting /dev/block/loop1 on /data/local/ubuntu failed: Device or resourc
e busy
mount: mounting devpts on /data/local/ubuntu/dev/pts failed: No such file or dir
ectory
mount: mounting proc on /data/local/ubuntu/proc failed: No such file or director
y
mount: mounting sysfs on /data/local/ubuntu/sys failed: No such file or director
y
net.ipv4.ip_forward = 1
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexist
ent
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexist
ent
Setting localhost on /etc/hosts
bootubuntu: cannot create /data/local/ubuntu/etc/hosts: directory nonexistent
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
umount: can't umount /data/local/ubuntu/dev/pts: No such file or directory
umount: can't umount /data/local/ubuntu/proc: No such file or directory
umount: can't umount /data/local/ubuntu/sys: No such file or directory
umount: can't umount /data/local/ubuntu: Invalid argument
losetup: /dev/block/loop1: Device or resource busy
#
teh5abiking said:
Well, Ubuntu is a distribution of the Debian family of Linux.
Essentially, you have access to the plethora of apps that exist in Ubuntu/Debian's repos, and it's also possible to use this shell as a test monkey for applications that you might be developing.
Click to expand...
Click to collapse
Seriously? Mmm, okay. I'm gonna try it sometime this week ;D
Sent from my HTC Vision using XDA Premium App
strker45 said:
im getting some errors in terminal when trying to set this up, im running mexdroid v3 android 2.3.4
C:\push\tools>adb shell
# cd /sdcard/ubuntu
cd /sdcard/ubuntu
# su
su
# sh ./ubuntu.sh
sh ./ubuntu.sh
modprobe: module 'ext2' not found
←[H←[Jmkdir: can't create directory '/data/local/mnt': File exists
←[H←[Jchmod: bootubuntu: Operation not permitted
chmod: fsrw: Operation not permitted
chmod: mountonly: Operation not permitted
chmod: ubuntu.img: Operation not permitted
chmod: ubuntu.sh: Operation not permitted
chmod: unionfs: Operation not permitted
←[H←[J
Ubuntu Chroot Bootloader v0.1
Ubuntu Bootloader is now installed!
This process does NOT damage Android OS!
Original Installer by Charan Singh
Modified for Ubuntu Chroot by Max Lee at AndroLinux.com ,G2Hacks.com and NexusOn
eHacks.net
To enter the Ubuntu Linux console just type 'bootubuntu'
# bootubuntu
bootubuntu
mknod: /dev/loop1: File exists
losetup: /dev/block/loop1: No such file or directory
mount: mounting /dev/block/loop1 on /data/local/ubuntu failed: Device or resourc
e busy
mount: mounting devpts on /data/local/ubuntu/dev/pts failed: No such file or dir
ectory
mount: mounting proc on /data/local/ubuntu/proc failed: No such file or director
y
mount: mounting sysfs on /data/local/ubuntu/sys failed: No such file or director
y
net.ipv4.ip_forward = 1
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexist
ent
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexist
ent
Setting localhost on /etc/hosts
bootubuntu: cannot create /data/local/ubuntu/etc/hosts: directory nonexistent
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
umount: can't umount /data/local/ubuntu/dev/pts: No such file or directory
umount: can't umount /data/local/ubuntu/proc: No such file or directory
umount: can't umount /data/local/ubuntu/sys: No such file or directory
umount: can't umount /data/local/ubuntu: Invalid argument
losetup: /dev/block/loop1: Device or resource busy
# bootubuntu
bootubuntu
mknod: /dev/loop1: File exists
losetup: /dev/block/loop1: No such file or directory
mount: mounting /dev/block/loop1 on /data/local/ubuntu failed: Device or resourc
e busy
mount: mounting devpts on /data/local/ubuntu/dev/pts failed: No such file or dir
ectory
mount: mounting proc on /data/local/ubuntu/proc failed: No such file or director
y
mount: mounting sysfs on /data/local/ubuntu/sys failed: No such file or director
y
net.ipv4.ip_forward = 1
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexist
ent
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexist
ent
Setting localhost on /etc/hosts
bootubuntu: cannot create /data/local/ubuntu/etc/hosts: directory nonexistent
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
umount: can't umount /data/local/ubuntu/dev/pts: No such file or directory
umount: can't umount /data/local/ubuntu/proc: No such file or directory
umount: can't umount /data/local/ubuntu/sys: No such file or directory
umount: can't umount /data/local/ubuntu: Invalid argument
losetup: /dev/block/loop1: Device or resource busy
#
Click to expand...
Click to collapse
I had this issue aswell.
To solve it firts fix your permissions in Rom manager.
Then install busy box.
This should then allow you to install ubuntu. (atleast it did with me)
Hope this is some help to you
teh5abiking said:
What's interesting about this?
Click to expand...
Click to collapse
The post dude.. would you rather I said boring? Settle down
Do u know what interesting means? It means I am interested in this..didn't think you could mistake that but guess I was wrong
Sent from my T-Mobile G2 using XDA Premium App
Spastic909 said:
The post dude.. would you rather I said boring? Settle down
Do u know what interesting means? It means I am interested in this..didn't think you could mistake that but guess I was wrong
Sent from my T-Mobile G2 using XDA Premium App
Click to expand...
Click to collapse
hey man, i just wanna know what you found interesting about the tutorial.
i wasn't trying to be3 a smart aleck.
I really don't know **** about linux except for the few times I've had to run it on a virtual machine for rooting certain phones or to check out a few programs. With linux installed on my phone,
does that mean that I would be able to run any linux based program? For example aircrack or something like it?
Edit: I basically want to know what the purpose of doing this would be. What it would enable me to do
* I'm just sayin......
gazlufc said:
I had this issue aswell.
To solve it firts fix your permissions in Rom manager.
Then install busy box.
This should then allow you to install ubuntu. (atleast it did with me)
Hope this is some help to you
Click to expand...
Click to collapse
installed newest version of busybox 1.19.0 and fixed permissions and still received the same errors :/
strker45 said:
installed newest version of busybox 1.19.0 and fixed permissions and still received the same errors :/
Click to expand...
Click to collapse
.
Create a backup of you current rom using Rom manager.
Then install a new rom from the developer section of the G2/Desire z
First install busybox.
Second fix permissions.
Third is reboot
open adb and now try the process this should now allow you to install ubuntu.

[Q] debdroid and calkulins v1.2 fc18

I am trying to get debdroid to start debian squeeze
The linux.img is in /sdcard/debdroid
After deploy from apk, no vnc or ssh so attempt from term
Term output:
Code:
$ export PATH=/data/local/bin:$PATH
$ su
# ash
~ # sh /system/bin/debdroid
Initializing chroot filesystem
mkdir: can't create directory '$/mnt/mnt/android': No such file or directory
mount: Invalid argument
Mounting proc, sysfs, dev, devpts
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
/sdcard/debdroid/share/ mounted to /mnt/share
Native Filesystem mounted to /mnt/android
Setting up DNS and Networking
/system/bin/debdroid: line 70: can't create /data/local/debdroid/etc/resolv.conf: nonexistent directory
/system/bin/debdroid: line 70: can't create /data/local/debdroid/etc/resolv.conf: nonexistent directory
/system/bin/debdroid: line 70: can't create /data/local/debdroid/etc/hosts: nonexistent directory
/system/bin/debdroid: line 70: can't create /data/local/debdroid/etc/hostname: nonexistent directory
Debdroid deployed succesfully, opening chroot.
mount: No such file or directory
chroot: can't execute 'bash': No such file or directory
chroot: can't execute '/bin/bash': No such file or directory
failed: No such file or directory
failed: No such file or directory
failed: No such file or directory
failed: No such file or directory
failed: No such file or directory
failed: No such file or directory
failed: Invalid argument
Exiting chroot
Filesystem unmounted
~ #
I dont have bash, is this the problem? Why isnt bash with busybox?
Shouldnt ash work?
BusyBox v1.19.2-cm71 static (2011-10-06 22:09 +0200) multi-call binary.
which zip and image?
You should really post this in the developers debdroid forum.
Which flashable zip and image did you download?
not enough posts
I cant post in dev, im too new.
Here are links to the zip and .gz that I dl'd.
I couldnt even post links. gititbit.ch/ ddba3
I couldnt even post links. gititbit.ch/ ddb4
rename or expand, bash for young
Did you expand the .gz to /sdcard/debdroid and name it linux.img or rename the .gz to linux.img?
not sure how thats supposed to work.
I see that bash is avail for the Young. Not sure why its not in calkulins rom...
Renamed the .gz
First i tried expanding it using estrongs fm. It gave the error "file size mismatch" and the resultant file was only 3.75G. I figured this was not the right way to do it and ended up just renaming the .gz to linux.img. Pretty sure thats how its supposed to go.
Maybe calkulin will include bash in his next rom.
post the output of debshell
post the output of debshell
debshell output
#
#
#
#
#
#
#
#
# sh debshell
init: must be run as PID 1
debshell: line 17: can't create /data/local/debdroid/etc/hostname: nonexistent directory
debshell: line 18: syntax error: unexpected "}"
#
#
#
You cannot simply rename the .gz to .img. Extract it on a computer then move it over to your sdcard as /sdcard/debdroid/linux.img. If ash is not working - bash is required because of the way functions are called in the script, however this should solve your issue once you extract the .img from the compressed download.

[Q] Ubuntu on desire z

i followed this( htt p:/ /androlinux.com/android-ubuntu-development/how-to-install-ubuntu-on-android/ ) tutorial to install ubuntu on my desire z but it doesn't work. i'm using miui rom, does that have anything to do with that?
my kernel is 2.6.35.14-cyanogenmod.
Been planing on trying this myself but it does say it will only work on dual core phones. Haven't confirmed if it can work on g2/dz
Sent from my HTC Vision using xda premium
confirming it worked here
———————————————
i didn't mean to flame you, nor to mock you in any kind of way
^^ what is your kernel?
ILWT CM7
———————————————
i didn't mean to flame you, nor to mock you in any kind of way
i get this errors
Code:
# su
su
# cd sdcard/ubuntu
cd sdcard/ubuntu
# sh ubuntu.sh
sh ubuntu.sh
modprobe: module 'ext2' not found
←[H←[J←[H←[Jrm: can't remove '/system/bin/fsrw': No such file or directory
rm: can't remove '/system/bin/bootubuntu': No such file or directory
rm: can't remove '/system/bin/unionfs': No such file or directory
rm: can't remove '/system/bin/mountonly': No such file or directory
chmod: bootubuntu: Operation not permitted
chmod: fsrw: Operation not permitted
chmod: mountonly: Operation not permitted
chmod: ubuntu.img: Operation not permitted
chmod: ubuntu.sh: Operation not permitted
chmod: unionfs: Operation not permitted
←[H←[J
Ubuntu Chroot Bootloader v0.1
Ubuntu Bootloader is now installed!
This process does NOT damage Android OS!
Original Installer by Charan Singh
Modified for Ubuntu Chroot by Max Lee at AndroLinux.com ,G2Hacks.com and NexusOn
eHacks.net
To enter the Ubuntu Linux console just type 'bootubuntu'
# bootubuntu
bootubuntu
losetup: /dev/block/loop1
mount: mounting /dev/block/loop1 on /data/local/ubuntu failed: Device or resourc
e busy
mount: mounting devpts on /data/local/ubuntu/dev/pts failed: No such file or dir
ectory
mount: mounting proc on /data/local/ubuntu/proc failed: No such file or director
y
mount: mounting sysfs on /data/local/ubuntu/sys failed: No such file or director
y
net.ipv4.ip_forward = 1
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexist
ent
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexist
ent
Setting localhost on /etc/hosts
bootubuntu: cannot create /data/local/ubuntu/etc/hosts: directory nonexistent
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
umount: can't umount /data/local/ubuntu/dev/pts: No such file or directory
umount: can't umount /data/local/ubuntu/proc: No such file or directory
umount: can't umount /data/local/ubuntu/sys: No such file or directory
umount: can't umount /data/local/ubuntu: Invalid argument
losetup: /dev/block/loop1: Device or resource busy
Looks like a couple files are missing. I got ubuntu to run quite well really (4GB image file with fluxbox, an office suite, media player, browser, pidgin, and several other apps). I didn't use that guide, I just grabbed the files and read the bash scripts to see what was going on.
Basically the zip you download should have an ubuntu.img file and about 4 other files. Make a folder on your sdcard (I called mine "ubuntu") and place all the files in the zip in that folder. Then use adb shell to connect to your phone and run.
Code:
[B]# sh ubuntu.sh[/B]
That will copy certain files to the system. Once that is done, you can run:
Code:
[B]# bootubuntu[/B]
As far as I know, you have to be using adb shell to run that and not using terminal emulator (though I may be mistaken). Once you run bootubuntu (from adb shell) you don't have to have your phone connected to the computer (until you reboot at least to run it again).

Cannot boot into ubuntu img file not found

@android:/ $ export PATH=/data/local/bin:$PATH
@android:/ $ cd mnt/sdcard/ubuntu
@android:/mnt/sdcard/ubuntu $ su
@android:/mnt/sdcard/ubuntu # sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh mnt/sdcard/ubuntu/ubuntu.img
Error: Image file not found!(mnt/sdcard/ubuntu/ubuntu.img)
1|@android:/mnt/sdcard/ubuntu #
this is my error. i've tried many things, any suggestions?
the image file is there, and ive downloaded it again, checked permissions, it is the large image from the complete linux installer app.
now i did some other things, and have gotten the responce:
$ export PATH=/data/local/bin:$PATH
$ cd mnt/sdcard/ubuntu
$ su
Segmentation fault
$ sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh mnt/sdcard/ubuntu/ubuntu.img
sh: can't open /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh
$
i re- rooted my device and am now coming up with the original error message again.
so, i added a \ to before mnt and now it says:
[email protected]:/ $ export PATH=/data/local/bin:$PATH
[email protected]:/ $ cd /mnt/sdcard/Ubuntu
[email protected]:/mnt/sdcard/Ubuntu $ su
[email protected]:/mnt/sdcard/ubuntu # sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh /mnt/sdcard/Ubuntu/ubuntu.img
Validating image checksum... /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh: line 74: /data/data/com.zpwebsites.linuxonandroid/files/busybox: Permission denied
FAILED!
Error: Checksum failed! The image is corrupted!
1|[email protected]:/mnt/sdcard/ubuntu #
so im going to download and add the large ubuntu file to the directory
same error: "dirname : not found"
I have the same error, "/data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh[29]: dirname : not found"
freewalk said:
I have the same error, "/data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh[29]: dirname : not found"
Click to expand...
Click to collapse
Use root explorer or es file explorer to check if
the folder exists. Also, running sh script should be written like this: sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh
ireakhavok said:
@android:/ $ export PATH=/data/local/bin:$PATH
@android:/ $ cd mnt/sdcard/ubuntu
@android:/mnt/sdcard/ubuntu $ su
@android:/mnt/sdcard/ubuntu # sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh mnt/sdcard/ubuntu/ubuntu.img
Error: Image file not found!(mnt/sdcard/ubuntu/ubuntu.img)
1|@android:/mnt/sdcard/ubuntu #
this is my error. i've tried many things, any suggestions?
the image file is there, and ive downloaded it again, checked permissions, it is the large image from the complete linux installer app.
now i did some other things, and have gotten the responce:
$ export PATH=/data/local/bin:$PATH
$ cd mnt/sdcard/ubuntu
$ su
Segmentation fault
$ sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh mnt/sdcard/ubuntu/ubuntu.img
sh: can't open /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh
$
i re- rooted my device and am now coming up with the original error message again.
so, i added a \ to before mnt and now it says:
[email protected]:/ $ export PATH=/data/local/bin:$PATH
[email protected]:/ $ cd /mnt/sdcard/Ubuntu
[email protected]:/mnt/sdcard/Ubuntu $ su
[email protected]:/mnt/sdcard/ubuntu # sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh /mnt/sdcard/Ubuntu/ubuntu.img
Validating image checksum... /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh: line 74: /data/data/com.zpwebsites.linuxonandroid/files/busybox: Permission denied
FAILED!
Error: Checksum failed! The image is corrupted!
1|[email protected]:/mnt/sdcard/ubuntu #
so im going to download and add the large ubuntu file to the directory
Click to expand...
Click to collapse
" $ su
Segmentation fault" This error prevents you from having real superuser. Try to reinstall the ROM without wiping data.
" Error: Image file not found!(mnt/sdcard/ubuntu/ubuntu.img)"
Make sure that the image really is there with root explorer or es file explorer.
" line 74: /data/data/com.zpwebsites.linuxonandroid/files/busybox: Permission denied"
It seems that the script is trying to use its own busybox. That is all I know from this issue.
Sent from my GT-I9100 using xda app-developers app
julle131 said:
Use root explorer or es file explorer to check if
the folder exists. Also, running sh script should be written like this: sh /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh
Sent from my GT-I9100 using xda app-developers app
Click to expand...
Click to collapse
The folder and the script exist, "…linuxonandroid/files/bootscript.sh". I have installed the app, "Complete Linux Installer", to my Galaxy Tab 10.1 (P7500). I have rooted my Galaxy Tab ("TAB"). The app also confirms that the path contains the target image (i.e. /mnt/sdcard/ubuntu/ubuntu.img).
However, when the app runs the bootscrip, there is an error message "/data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh[29]: dirname : not found". The code line is at below.
export imgfile=$(dirname $0)/ubuntu.img # Default image file, another can be set by using an argument
Could you please kindly let me know what goes wrong? Thanks in advance.
freewalk said:
The folder and the script exist, "…linuxonandroid/files/bootscript.sh". I have installed the app, "Complete Linux Installer", to my Galaxy Tab 10.1 (P7500). I have rooted my Galaxy Tab ("TAB"). The app also confirms that the path contains the target image (i.e. /mnt/sdcard/ubuntu/ubuntu.img).
However, when the app runs the bootscrip, there is an error message "/data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh[29]: dirname : not found". The code line is at below.
export imgfile=$(dirname $0)/ubuntu.img # Default image file, another can be set by using an argument
Could you please kindly let me know what goes wrong? Thanks in advance.
Click to expand...
Click to collapse
I can't test it in my tablet, because I'm not home. But when I get there I will test the app myself. You could try using the native Ubuntu from development section. Its kernel can dual boot ICS test 4.0.4.
Edit: worked for me. Here is the log
http://snipurl.com/24sad15
Remember that /mnt/sdcard is externalsd and /sdcard/ is internal memory.
Delete everything you downloaded and the app. Then redo everything, following the guide perfectly.
Sent from my GT-I9100 using xda app-developers app
Thanks and How to try native Ubuntu in Galaxy Tab?
julle131 said:
I can't test it in my tablet, because I'm not home. But when I get there I will test the app myself. You could try using the native Ubuntu from development section. Its kernel can dual boot ICS test 4.0.4.
Edit: worked for me. Here is the log
snipurl.com/24sad15
Remember that /mnt/sdcard is externalsd and /sdcard/ is internal memory.
Delete everything you downloaded and the app. Then redo everything, following the guide perfectly.
Sent from my GT-I9100 using xda app-developers app
Click to expand...
Click to collapse
Thanks a lot. I shall try again.
One more thing. How to try the native Ubuntu?
freewalk said:
Thanks a lot. I shall try again.
One more thing. How to try the native Ubuntu?
Click to expand...
Click to collapse
Its like installing a custom ROM. There is a topic for it in development section. You put archos.ext4 to /data/local (or was it /mnt/storage? Just read from the topic.) Then flash kernel from the same topic. To return just flash stock ROM and reinstall custom ROM. It doesn't affect to sde.
Sent from my GT-I9100 using xda app-developers app
freewalk said:
The folder and the script exist, "…linuxonandroid/files/bootscript.sh". I have installed the app, "Complete Linux Installer", to my Galaxy Tab 10.1 (P7500). I have rooted my Galaxy Tab ("TAB"). The app also confirms that the path contains the target image (i.e. /mnt/sdcard/ubuntu/ubuntu.img).
However, when the app runs the bootscrip, there is an error message "/data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh[29]: dirname : not found". The code line is at below.
export imgfile=$(dirname $0)/ubuntu.img # Default image file, another can be set by using an argument
Could you please kindly let me know what goes wrong? Thanks in advance.
Click to expand...
Click to collapse
I have the same issue, indeed that the 'dirname' can not be found.
the $PATH show the following 2 dirs '/system/bin:/system/xbin' and none of them contain 'dirname'.
might it be because I have rooted my galaxy note 2 N8000 with the stock image according method 1 on rootgalaxynote.com ?
rootgalaxynote.com galaxy-note-10-1-root/how-to-root-galaxy-note-10-1/
any help would be appreciated....
freewalk said:
"/data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh[29]: dirname : not found".
export imgfile=$(dirname $0)/ubuntu.img # Default image file, another can be set by using an argument
Click to expand...
Click to collapse
C'mon folks, It's all there for you in the error message!
It breaks down like this ; dirname is a program the tells you the directory name of an executable file location, well in reality it probably just trims the value pass in looking the last / the print everything before that i.e calling
Code:
dirname /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh
will give an out put of
Code:
/data/data/com.zpwebsites.linuxonandroid/files
this is normally part of busybox. Is suspect however that whatever busybox binary it's attempting to use does has not been configured to include dirname or at the very least the symlink hasn't been created so it would need to be called with a busybox prefix , i.e
Code:
export imgfile=$([B]busybox dirname[/B] $0)/ubuntu.img
or just save the f*****g about and hardcore imgfile to the path of the image file, for example
Code:
export imgfile=/mnt/sdcard/ubuntu/ubuntu.img
or wherever you're ubuntu.img is located, should be that simple, If you run into further trouble post the full content of the /data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh shell script. I suppose someone could tell the dev to add some sanity checking to his scripts if alot of people are running into this problem!
metacm said:
I have the same issue, indeed that the 'dirname' can not be found.
the $PATH show the following 2 dirs '/system/bin:/system/xbin' and none of them contain 'dirname'.
might it be because I have rooted my galaxy note 2 N8000 with the stock image according method 1 on rootgalaxynote.com ?
rootgalaxynote.com galaxy-note-10-1-root/how-to-root-galaxy-note-10-1/
any help would be appreciated....
Click to expand...
Click to collapse
already found the issue, busybox installation went wrong.... 'Busybox Installer' app didn't worked out, but luckly 'BusyBox free' did the work.
which version of busybox is installed
metacm said:
already found the issue, busybox installation went wrong.... 'Busybox Installer' app didn't worked out, but luckly 'BusyBox free' did the work.
Click to expand...
Click to collapse
can you tell which version of busybox is installed
same error
Hi all,
Sorry for my poor language...
I have same all of you dirname issue, bootscript.sh is in the path (tested with root explorer).
Can somebody tell me what is exactly this error "/data/data/com.zpwebsites.linuxonandroid/files/bootscript.sh[29]: dirname : not found".
Because we can understand 2 thinks :
1-dirname not found bootscript.
2-Busybox not found dirname.
Thank for your help.

[Q] Backtrack 5 install isn't working?

So I have done all the steps to installing Backtrack 5 on my SM-T210 correctly, but when i try to boot it up using "bootbt" i get an error like this:
"[email protected]:/ $
130|[email protected]:/ $ cd /storage/extSdCard/BT5
[email protected]:/storage/extSdCard/BT5 $ su
[email protected]:/storage/extSdCard/BT5 # sh bootbt
Loop device exists
open backing file failed: No such file or directory
mount: No such file or directory
mount: No such file or directory
mount: No such file or directory
net.ipv4.ip_forward = 1
bootbt[23]: can't create /data/local/mnt/etc/resolv.conf: No such file or directory
bootbt[24]: can't create /data/local/mnt/etc/hosts: No such file or directory
chroot: can't execute '/bin/bash': No such file or directory
Shutting down BackTrack ARM For Xoom
failed: No such file or directory
failed: No such file or directory
failed: No such file or directory
failed: Invalid argument
1|[email protected]:/storage/extSdCard/BT5 #"
any suggestions? Im new to android.
http://forum.xda-developers.com/showthread.php?t=1074723
This thread covers installing backtrack on the Xoom tablet. Also implies it can be installed on other devices. Last activity in the thread was in 2012 but there still may be some helpful information.
sent from a buggy xda app by some miracle

Categories

Resources