[MESSAGE TO MODS, I could not include urls so have added spaces to pass spam filter.. please change?]
Well now we finally have root on our shiny devices I decided to crack open
the beers and get to work getting debian running on the X10..
the process is actually pretty straight-forward.
(as it turns out the x10's kernel already has support for most things needed
such as the ext2 filesystem)
-- step 1--
firstly we need to create a debian image for the phone, there are a few already out there but you can use the following to create your own
Code:
apt-get install debootstrap
dd if=/dev/zero of=debian.img seek=749999999 bs=1 count=1
mke2fs -F debian.img
mkdir debian
mount -o loop debian.img debian
debootstrap --verbose --arch armel --foreign lenny debian [ht]tp:[//]ftp. de. debian. org/debian
umount debian
how ever if you would prefer to use a ready built one (recomended for less techies ) you can get one from: rapidshare. com/files/161776007/debian-armel-750.img.bz2
(had to include spaces in the url to pass spam filter, could a mod please change this?)
now copy this too the root of your sdcard and make sure its called debian.img
-- step 2 --
I have created a script to do most of the other work for you:
Code:
alias b=busybox
export PATH=/data/local/bin:/usr/bin:/usr/sbin:/bin:$PATH
b mknod /dev/loop0 b 7 0
b mount -o loop,noatime /sdcard/debian.img /data/local/mnt
echo 'nameserver 4.2.2.2' >data/local/mnt/etc/resolv.conf
b chroot /data/local/mnt
mount -t devpts devpts /dev/pts
mount -t proc proc /proc
mount -t sysfs sysfs /sys
rm -f /etc/mtab
ln -s /proc/mounts /etc/mtab
put this in your sdcard to.
-- step 3 --
Finally in any terminal emulator cd to the location of the startdeb.sh file
and do the following:
Code:
chmod 777 ./startdeb.sh
./startdeb.sh
!! and your done !!
you should now be within the debian system.. i suggest running
Code:
apt-get update
and installing what ever apps you want
(my first choices were gcc, python and tightvncserver)
[ EXTRA ]
now your on debian you can use
Code:
apt-get install tightvncserver
to get the xwindow system and the vnc server
now set both your HOME and USER variables
Code:
export HOME=/root
export USER=root
(or what ever user you choose)
and run
Code:
tightvncserver
(your also gonna have to download lxde and do a few other bits of setup
have a look around for X11 "Ported" to android post on these forums)
you could also change the config so that the desktop is displayed
at the right size for the screen
just use a vnc client from the market to connect to your GUI
Kool. I had ubuntu running on my htc touch pro once but wasnt really worth having apart from the cool factor. This looks promising.............. ill wait a while till I play around, the rooting factor is still new and I dont see the major gain to root yet.
Way awesome, thanks for the guide.
Nice work, will give this a try after I get the R2B rooted on my phone.
Next step for me would be to get the arm cross compilation toolchain and start porting goodies for the android....
wow this looks sooooo awesome!! any screen shots? don't make me google
when i try mounting debian.img using ur cmd i got following error
Code:
Usage: mount [-r] [-w] [-o options] [-t type] device directory
seems my mount requires -t parameters, so i try again, but still having error
Code:
mount -o loop,noatime -t ext2 /sdcard/debian.img /data/local/mnt
ioctl LOOP_SET_FD failed: Device or resource busy
please help thanks!
aget1 said:
when i try mounting debian.img using ur cmd i got following error
Code:
Usage: mount [-r] [-w] [-o options] [-t type] device directory
seems my mount requires -t parameters, so i try again, but still having error
Code:
mount -o loop,noatime -t ext2 /sdcard/debian.img /data/local/mnt
ioctl LOOP_SET_FD failed: Device or resource busy
please help thanks!
Click to expand...
Click to collapse
Are you running the script as root? If you not you might wanna try that.
This may sound kind of noobish, but would this be a dual-boot (I.e. running both android and debian on different boots of the phone, or would this be debian, until you reset the phone to be android again.
Sent from my X10a using XDA App
ddewbofh said:
Are you running the script as root? If you not you might wanna try that.
Click to expand...
Click to collapse
Still the same
Code:
whoami
whoami: unknown uid 0
mount -o loop,noatime -t ext2 /sdcard/debian.img /data/local/mnt
ioctl LOOP_SET_FD failed: Device or resource busy
aget1 said:
Still the same
Code:
whoami
whoami: unknown uid 0
mount -o loop,noatime -t ext2 /sdcard/debian.img /data/local/mnt
ioctl LOOP_SET_FD failed: Device or resource busy
Click to expand...
Click to collapse
And I assume you're either running the script or doing those commands manually? Including the mknod part?
ddewbofh said:
And I assume you're either running the script or doing those commands manually? Including the mknod part?
Click to expand...
Click to collapse
i run the script and found no luck, so i type in both adb and console, of coz mknod is done, either mkdir /data/local/mnt is done or not gives the same result, tried also mounting without loop,noatime and gives
Code:
mount: Block device required
would it be rooting problem or mount problem?
also tried losetup -d /dev/loop0, no luck
Code:
losetup: /dev/loop0: Device or resource busy
Keegan_P said:
This may sound kind of noobish, but would this be a dual-boot (I.e. running both android and debian on different boots of the phone, or would this be debian, until you reset the phone to be android again.
Sent from my X10a using XDA App
Click to expand...
Click to collapse
i see this to be a remounting of debian system on your phone, no modification on your phone so no, no dual boot
anybody can post a video tutorial please?
and the debian and android works together or just debian?
thx
A video tutorial would be amazing.
Sent from my X10a using XDA App
I will upload a video tutorial asap but at the moment I am having to use a 3G dongle for my internet (just moved out, am poor.. all donations to [email protected] on paypal ;-)) also this runs along side (or on top of) android so you'll still be able to get your texts and calls.. finally there are already a lot of debian apps compiled for ARM systems so have a look to see if the app you want is on apt (make sure you've run apt-get update first) please pm me if you have any problems
Thanks,
Sam Aldis
I tried to run it on the latest firmware and it seems loop device kernel module is not available in it.
Also the script is not fully functional :
you need to 'mkdir /data/local/mnt/'
also it's '/data/local' instead of 'data/local'
I haven't spend much time on this, so it's not working for now on my phone.
So help is welcome
Quick question:
Has anyone at all gotten this to work?
nope. I doubt it.
mod edit:..
sorry for stupid me, i don't know i can create loop device more than loop 0
i create loop0,loop1,loop2,loop7 and try mounting again, it success this time
so here is my script:
Code:
#!/system/bin/bash
export PATH=/data/local/bin:/usr/bin:/usr/sbin:/bin:$PATH
if [ ! -d /data/local/mnt ]
then
mkdir /data/local/mnt
fi
if [ ! -b /dev/loop2 ]
then
mknod /dev/loop0 b 7 0
mknod /dev/loop1 b 7 0
mknod /dev/loop2 b 7 0
mknod /dev/loop7 b 7 0
fi
if [ ! -d /data/local/mnt/bin ]
then
mount -o loop,noatime /sdcard/debian.img /data/local/mnt
fi
echo "nameserver 4.2.2.2" >data/local/mnt/etc/resolv.conf
chroot /data/local/mnt
mount -t devpts devpts /dev/pts
mount -t proc proc /proc
mount -t sysfs sysfs /sys
rm -f /etc/mtab
ln -s /proc/mounts /etc/mtab
Edited:
I just brick my device after some more work, every command even ls do no output, reboot machine freezes at sony ericsson logo, now i am re rooting the device......
Edited 2:
Should be not the problem of debian, seems working fine.
hi,
how can i mount system.ext2 file inside an android rom...
i'm not booting from this system.ext2 file!
Code:
# mount -t ext2 -o loop /sdcard/futureshock.miui.german/system.ext2 /mount/system
mount -t ext2 -o loop /sdcard/futureshock.miui.german/system.ext2 /mount/system
ioctl LOOP_SET_FD failed: Device or resource busy
i'm just getting this error...
thx for help
Hello
Have you find anti solutions ?
Thanks
futureshock said:
hi,
how can i mount system.ext2 file inside an android rom...
i'm not booting from this system.ext2 file!
Code:
# mount -t ext2 -o loop /sdcard/futureshock.miui.german/system.ext2 /mount/system
mount -t ext2 -o loop /sdcard/futureshock.miui.german/system.ext2 /mount/system
ioctl LOOP_SET_FD failed: Device or resource busy
i'm just getting this error...
thx for help
Click to expand...
Click to collapse
This system from castes an insertion ohm ?
You need to ask something like this in the Android section not Windows.
hello, i tried this tutorial to mount my sdcard over wifi. i like to sync my music with clementine. not only copy paste. so i need to mount the sdcard. but when i tried the following command i got this msg.
Code:
[email protected]:~$ sudo mount -t cifs //192.168.1.2/sdcard/ /media/android -o user=roni,uid=roni,gid=roni,nounix,file_mode=0770,dir_mode=0770
mount: block device //192.168.1.2/sdcard/ is write-protected, mounting read-only
mount: cannot mount block device //192.168.1.2/sdcard/ read-only
[email protected]:~$
can anyone tell me what am i doing wrong?
I had this problem too! Fixed by changing the following:
Code:
Command response:
mount: block device //192.168.0.3/sdcard/ is write-protected, mounting read-only
mount: cannot mount block device //192.168.0.3/sdcard/ read-only
syslog:
[17508.618475] Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE
[17508.618481] CIFS VFS: Send error in SessSetup = -13
[17508.618593] CIFS VFS: cifs_mount failed w/return code = -13
Changed user to username
Added password to the mount command (I got a logon failure message in the syslog if I didn't, rather than getting prompted as the article suggests)
Gave me error:
Code:
Command response:
mount: //192.168.0.3/sdcard/ is not a valid block device
syslog:
[17544.645324] CIFS VFS: cifs_mount failed w/return code = -6
Solution: removed the trailing slash from the SMB address
So my final command was:
Code:
sudo mount -t cifs //192.168.0.3/sdcard /media/stewart-android -o username=stewart,password=p4ssw0rd,uid=stewart,gid=stewart,nounix,file_mode=0770,dir_mode=0770
Obviously you'll need to change userids, ip addresses and passwords to match your settings
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.
I am trying to install Debian in a chroot on RN3 (snapdragon) . Current ROM is V8.1.1.0.MHOMIDI (MIUI8) .
I followed this guide and created ext4 img file. But on mouting it returns error.
Code:
mount -o loop ,noatime -t ext4 /sdcard/debian.img /mnt/linux
It returns ""ioctl LOOP_SET_FD failed: Device or resource busy"
Plz guide me How to mount img file.