[Defy General] mihovil13:
Try changing the script files using Notepad++ to this (delete all the text and replace with this)

ubuntu.sh

echo " "
echo "Ubuntu Chroot v0.2-anant-netbook"
echo "This process does NOT damage Android OS!"
echo " "
echo "Original Script by Charan Singh"
echo "Modified for Ubuntu Chroot by Max Lee at NexusOneHacks.net"
echo "Xperia Customized by Anant shrivastava http://anantshri.info "
echo " "
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
echo "Cleaning up old Chunks . . ."
rm /system/bin/tuxcmd
rm /system/bin/starttux
rm /system/bin/stoptux
echo "Creating necessary directories"
if [ ! -d /data/local/mnt ]
then
mkdir /data/local/mnt
fi
#copy the files to places
echo "Setting up files"
cp -f starttux /system/bin
cp -f stoptux /system/bin
cp -f tuxcmd /system/bin
echo "Ubuntu is now configure!"
echo " "
echo "to Start ubuntu type 'starttux'"
echo "once ubuntu started use tuxcmd to gain shell"
echo "when you want to shutdown type 'stoptux'"

starttux

#Mount SYSTEM RW
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
#exporting useful variables
export kit=/sdcard/ubuntu
export bin=/system/bin
export mnt=/data/local/mnt
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
# Mounting Image to the farthest loop point
# FIXME : check if mount sucessfull otherwise abort whole process.
mknod /dev/block/loop255 b 7 255
busybox losetup /dev/block/loop255 $kit/ubuntu.img
busybox mount -t ext2 /dev/block/loop255 $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
# Mounting SD Card inside the CHROOT
busybox mount -o bind /sdcard /data/local/mnt/sdcard
#seting environment
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 "Brought to you by NexusOneHacks.net and the open source community! "
echo "Customized by Anant shrivastava http://anantshri.info"
echo "Ubuntu configured to use it just type 'tuxcmd'"

tuxcmd

mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
export kit=/sdcard/ubuntu
export bin=/system/bin
export mnt=/data/local/mnt
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
echo "Brought to you by NexusOneHacks.net and the open source community! "
echo "Customized by Anant shrivastava http://anantshri.info"
echo " "
busybox chroot $mnt /bin/bash

stoptux

#Cleanup
#After exit command is executed clear it all up
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
export kit=/sdcard/ubuntu
export bin=/system/bin
export mnt=/data/local/mnt
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
echo "Cleaning the Ubuntu leftover and returning back the memory to Android."
echo "by Anant Shrivastava http://anantshri.info "
echo "Shutting down Ubuntu"
sync
busybox umount -l $mnt/sdcard
busybox umount -l $mnt/dev/pts
busybox umount -l $mnt/proc
busybox umount -l $mnt/sys
busybox umount -l $mnt
busybox losetup -d /dev/block/loop255
mount -o remount,ro -t yaffs2 /dev/block/mtdblock3 /system
echo " "
echo "Please reboot to properly unmount Ubuntu"
echo "Specially If you recieved an error before this line"

You maybe even don't have to go type tuxcmd after the starttux shell, if the shell changes to root:localhost automatically, then just type ui