Ok, well I started from scratch (deleted both .img and .sh files) and it's still not working.
I have all the apps installed (and yes rooted, SU works just fine)
I used Ubuntu Installer app to download the image zip (tried both the large and small img)
I downloaded the .sh file from the first post
The /sdcard-ext/ubuntu/ folder now has two files: "ubuntu.img" and "ubuntud4.sh"
All ^M characters have been removed from .sh file
Still no joy...
Ideas? What am I missing?
In terminal, I can set SU permissions and the mount/cd commands work just fine...it's the last sh command that spits out a bunch of errors about not being able to create/find the directories.
I'm going to format the sdcard and try again...any help is appreciated.
Update: Even after re-formatting the SD and following the steps exactly, no luck!
check to make sure that the entire path
/data/local/mnt/ubun
exists. the 'mkdir' command will fail if any of the intervening dirs aren't there, so if you have...
that was it...i manually created the directories and then the .sh was able to run without errors.
thanks everyone for feedback! ubuntu on my lapdock is much nicer than the moto webtop.
I have the 500, I'm still torn between the two but I guess at this point I'm stuck with it.
Have u used the usb ports much? I'm curious about the functionality of those.
So your hard-keyboard doesn't work in Terminal? I don't know that I can help, mine just worked.
I have the 500, I'm still torn between the two but I guess at this point I'm stuck with it.
Your never stuck with a toy on XDA ;>
for pid in `lsof | grep "\/data\/local\/mnt\/ubun" | awk '{print $2}'`
do
kill $pid
done
for pid in `lsof | grep "\/data\/local\/mnt\/ubun" | awk '{print $2}'` ; do kill $pid ; done
##########################################
#Ubuntu boot script V5 for Android #
#Built by Zachary Powell (zacthespack) #
#Thanks to everyone at XDA! #
#Modified to work with the D4 by Zeroktal#
##########################################
perm=$(id|cut -b 5)
if [ "$perm" != "0" ];then echo "This script requires root! Type: su"; exit; fi
/etc/init.d/webtop-shutdown.sh
mount -o remount,rw /dev/block/mmcblk0p5 /system
mount -o remount,rw,exec,suid /dev/block/vold/179:1 /mnt/sdcard-ext
export kit=/sdcard-ext/ubuntu
export bin=/system/bin
export mnt=/data/local/mnt/ubun
export USER=root
export REZ=1024x768
mkdir $mnt
export PATH=$bin:/usr/bin:/usr/local/bin:/usr/sbin:/bin:/usr/local/sbin:/usr/games:$PATH
export TERM=linux
export HOME=/root
if [ -b /dev/block/loop254 ]; then
echo "Loop device exists"
else
busybox mknod /dev/block/loop254 b 7 254
fi
losetup /dev/block/loop254 $kit/ubuntu.img
mount -t ext2 /dev/block/loop254 $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
/system/xbin/busybox mount -o bind /sdcard-ext $mnt/sdcard
/system/xbin/busybox sysctl -w net.ipv4.ip_forward=1
echo "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "nameserver 8.8.4.4" >> $mnt/etc/resolv.conf
echo "127.0.0.1 localhost" > $mnt/etc/hosts
echo "Ubuntu is configured with SSH and VNC servers that can be accessed from the IP:"
ifconfig lo
echo " "
busybox chroot $mnt /root/init.sh
echo "Shutting down Ubuntu ARM"
/etc/init.d/webtop-restart.sh
for pid in `lsof | grep "\/data\/local\/mnt\/ubun" | awk '{print $2}'`
do
kill $pid
done
export mnt=/data/local/mnt/ubun
umount $mnt/sdcard
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
losetup -d /dev/block/loop254
#!/bin/bash
#############################################
# Asks User to screen size and saves as REZ #
#############################################
#echo "Now enter the screen size you want in pixels (e.g. 800x480), followed by [ENTER]:"
#read REZ
#REZ=960x540
##############################################
# Pick which desktop environment to use, this#
# is done by having a xstartup file for each #
# desktop, then renaming the one you want to #
# use to 'xstartup' before boot #
##############################################
#echo "Please select which Desktop environment you want to use, type the number to select it then press [ENTER]"
#echo "1 - LXDE"
#echo "2 - Gnome"
#echo "Make your Selection:"
#read DESKTOP
DESKTOP=1
if [ $DESKTOP == 1 ]
then
mv /root/.vnc/lxstartup /root/.vnc/xstartup
fi
if [ $DESKTOP == 2 ]
then
mv /root/.vnc/gxstartup /root/.vnc/xstartup
fi
###########################################
# Tidy up previous LXDE and DBUS sessions #
###########################################
rm /tmp/.X* > /dev/null 2>&1
rm /tmp/.X11-unix/X* > /dev/null 2>&1
rm /root/.vnc/localhost* > /dev/null 2>&1
rm /var/run/dbus/pid > /dev/null 2>&1
############################################################
# enable workaround for upstart dependent installs #
# in chroot'd environment. this allows certain packages #
# that use upstart start/stop to not fail on install. #
# this means they will have to be launched manually though #
############################################################
dpkg-divert --local --rename --add /sbin/initctl > /dev/null 2>&1
ln -s /bin/true /sbin/initctl > /dev/null 2>&1
###############################################
# start vnc server with given resolution and #
# DBUS server, (and optionally an SSH server) #
###############################################
vncserver :0 -geometry $REZ
dbus-daemon --system --fork > /dev/null 2>&1
/etc/init.d/ssh start
echo
echo "If you see the message 'New 'X' Desktop is localhost:0' then you are ready to VNC into your ubuntu OS.."
echo
echo "If VNC'ing from a different machine on the same network as the android device use the 1st address below:"
##########################################
# Output IP address of android device #
##########################################
#ifconfig | grep "inet addr"
echo
echo "If using androidVNC, change the 'Color Format' setting to 24-bit colour, and once you've VNC'd in, change the 'input mode' to touchpad (in settings)"
echo
echo "To shut down the VNC server and exit the ubuntu environment, just enter 'exit' at this terminal - and WAIT for all shutdown routines to finish!"
echo
###############################################################
# Spawn and interactive shell - this effectively halts script #
# execution until the spawning shell is exited (i.e. you want #
# to shut down vncserver and exit the ubuntu environment) #
###############################################################
/bin/bash -i
#########################################
# Disable upstart workaround and #
# kill VNC server (and optionally SSH) #
# Rename used xstartup to its first file#
#########################################
vncserver -kill :0
if [ $DESKTOP == 1 ]
then
mv /root/.vnc/xstartup /root/.vnc/lxstartup
fi
if [ $DESKTOP == 2 ]
then
mv /root/.vnc/xstartup /root/.vnc/gxstartup
fi
/etc/init.d/ssh stop
I did this, and ubuntu is running correctly through vnc, which is incredible! Thanks! But once I rebooted my droid, it booted to the eye, and then kept rebooting there, in an endless loop, and never booted until the battery died. Anyone know how to fix this, or have any suggestions how to proceed?
Thanks in advance.
Notes:
* It does not have to be on the external SD, but if you put it on the internal SD you will have to modify things as needed-- if you dont know what needs to be changed, just put it on the external SD.
** Screen size can be whatever you want it to be, but 960x540 is the size of the D4 screen.
*** This is a fairly involved process... especially when it comes to editing the .sh file in vi things can get very frustrating and hard, but just take your time and you will get it. As always, doing anything with root access on your phone, especially on the command line has risks. I am not responsible if anything goes wrong with your phone... proceed at your own risk!
mount -o remount,rw,exec,suid /dev/block/vold/179:1 /mnt/sdcard-ext
mount -o remount,rw,exec,suid /dev/block/vold/179:57 /mnt/sdcard