Debian on the X10 - XPERIA X10 Android Development

[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.

Related

[DEV] Reworked process for running Ubuntu on Nexus One (Device busy error eliminated)

Few months ago, there was a post on XDA:
http://forum.xda-developers.com/showthread.php?t=718952
and a link to:
http://nexusonehacks.net/nexus-one-hacks/how-to-install-ubuntu-on-your-nexus-oneandroid/
They explain how to install and run Ubuntu on Nexus One.
But a lot of people got problems when running script bootubuntu and ubuntu.sh, and I was one of them.
After Cyanogen Mod 6.0 was released, I could successfully run Ubuntu according to given instructions, but later I discovered the two scripts (ubuntu.sh and bootubuntu) don't always work, and I found them very complex and unnecessary statements can be removed.
Since few months ago I've been refining the two scripts to make them able to boot Ubuntu with less likelihood to get error. I thought I would like to share my findings to everyone interested.
Here are some reasons why it's useful to have Ubuntu on Nexus One
1. Fully functional web browser Firefox
2. Fully functional office suite OpenOffice
3. Fully functional Linux terminal with lots of ultilities
4. Fully functional image manipulation tool Gimp
5. Ability to run lots of useful native Linux programs
6. Python, gcc, g++..
I'll talk about my findings in next few posts.
Post #2: simplify ubuntu.sh, remove unnecessary script files
Post #3: simplify bootubuntu, forcibly umount
Post #4: how to shutdown Ubuntu properly if terminal application was closed by Android
Post #5: a little script which should be run before exiting from Ubuntu
Post #6: how to start GNOME desktop (instead of LXDE) and get correct keyboard mapping
Post #7: a possible solution to loop device's "resource or device busy" error
About my Nexus One:
bought on 2nd March
Cyanogen Mod 6.0
IntersectRaven HAVS CM CFS 1020 kernel
Busybox 1.17
Radio 5.0.8
Gapps hdpi 20101020.1
Please don't hesitate to tell me if I made any mistake, I'm a Linux beginner because I taught myself Linux, my University will teach Unix next semester.
Attachment: ubuntu_scripts.zip
contains all modified scripts.
Finding #1:
In original Zip package, there are five scripts, but only two of them are actually used to install and boot up Ubuntu.
fsrw, mountonly, unionfs are not necessary to install and boot ubuntu, thus their reference can be removed from ubuntu.sh
Here is my simplified version of ubuntu.sh
#-------------------------------
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
rm -f /system/bin/bootubuntu
rm -r -f /data/local/ubuntu
cp -f bootubuntu /system/bin
cd /
echo "Type 'bootubuntu' to boot Ubuntu"
#-------------------------------
Simplified ubuntu.sh removed unnecessary statements to reduce risk of error.
Also I discovered:
Files in /sdcard/ubuntu can not be chmod, and it's unnecessary to chmod 4777 to them.
chmod 4777 /system/bin/* will cause some Android softwares to malfunction (e.g. Orbot), also it *possibly* cause some roms to fail to boot up next time (CM6.0)
Finding #2:
Here's my simplified bootubuntu script, there are minor changes to script flow and removed all unnecessary statements:
#-------------------------------
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
echo "SETTING VARIABLES"
export bin=/system/bin
export mnt=/data/local/ubuntu
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
if [ ! -d /data/local/ubuntu ]
then
mkdir /data/local/ubuntu
fi
echo "SETTING UP LOOP DEVICE"
losetup /dev/block/loop1 /sdcard/ubuntu/ubuntu.img
echo "MOUNTING"
mount -t ext2 /dev/block/loop1 /data/local/ubuntu
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
echo "SETTING UP NETWORK"
sysctl -w net.ipv4.ip_forward=1
echo "nameserver 208.67.222.222" > $mnt/etc/resolv.conf
echo "nameserver 208.67.220.220" >> $mnt/etc/resolv.conf
echo "127.0.0.1 localhost" > $mnt/etc/hosts
echo "Brought to you by NexusOneHacks.net and the open source community! "
chroot $mnt /bin/bash
echo "UMOUNTING"
umount -lfr $mnt/dev/pts
umount -lfr $mnt/proc
umount -lfr $mnt/sys
umount -lfr $mnt
losetup -d /dev/block/loop1
#-------------------------------
and it forcibly,lazily,read-only-if-failed umount $mnt, thus losetup -d will less likely to fail and eliminate the problem when booting ubuntu second time.
Finding #3:
If terminal application is terminated automatically by Android system, in this situation, the Ubuntu is not properly umounted.
Thus we change ubuntu.sh into:
#------------------------------
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
rm -f /system/bin/bootubuntu
rm -f /system/bin/exitu
rm -r -f /data/local/ubuntu
cp -f bootubuntu /system/bin
cp -f exitu /system/bin
cd /
echo "Type 'bootubuntu' to boot Ubuntu"
#------------------------------
and we create a new script named "exitu" in sdcard/ubuntu directory:
#------------------------------
export mnt=/data/local/ubuntu
echo "UMOUNTING"
umount -lfr $mnt/dev/pts
umount -lfr $mnt/proc
umount -lfr $mnt/sys
umount -lfr $mnt
losetup -d /dev/block/loop1
#------------------------------
remember to run "sh ./ubuntu.sh" to copy new exitu script into /system/bin.
Then whenever you went back to terminal, found Ubuntu terminal is gone, simply type exitu (remember to be su first) to exit ubuntu, then bootubuntu again to enter ubuntu terminal. It's harmless to execute exitu multiple times to ensure $mnt is umounted successfully.
Sometimes exitu still can not successfully remove loop1 assignment with /sdcard/ubuntu/ubuntu.img, but seems like it doesn't really matter, ubuntu still can boot up successful even loop1 was not unassigned successfully
Finding #4:
To reduce likelihood of getting "device or resource busy" error when removing loop device assignment, it's good to have this script in your Ubuntu, and run the script before exiting from Ubuntu:
#-------------------
export USER=root
vncserver -kill :1
vncserver -kill :2
sudo reboot
sudo halt
#-------------------
(remember, the script should be in your Ubuntu's file system, not your android's file system!)
run the script before you exiting from Ubuntu, this will greatly reduce likelihood of getting device or resource busy error when exiting.
Finding #5:
For those of you who prefer to enter GNOME desktop manually (no automatically start-up), this script may help, also this script should be able to fix androidVNC keyboard mapping problem:
(this script should be in Ubuntu)
#--------------------
cd /
rm -r -f tmp
mkdir tmp
cd /
export USER=root
export XKL_XMODMAP_DISABLE=1
vncserver -geometry 800x600
#--------------------
regarding the guide:
http://nexusonehacks.net/nexus-one-hacks/how-to-install-ubuntu-on-your-nexus-oneandroid/
if you would like to enter gnome and not to autostart desktop environment, please don't follow its instruction on making change to /root/.vnc/xstartup and /root/.bashrc
instead, create a script as I mentioned above, and run the script to bring up VNC server, and you will get GNOME desktop in VNC with correct keyboard mapping
Finding #6
If you're constantly getting "device or resource busy" error when mounting loop1 to /data/local/ubuntu, the reason might be caused by Android App2SD (Froyo version), if you have any software installed on SD card, it may cause all loop devices to be busy all the time (even newly created loop device!) And busy loop device can not be mounted, thus generates "device or resource busy" error message.
Most people had the same problem few months ago, when they execute bootubuntu, they get an error saying loop device is busy, and even changing loop device wouldn't help.
Now I think the reason is determined. After uninstalled all applications which are on SD card (or move all of them from SD card to internal storage), the Ubuntu can boot successfully without getting "device or resource busy" error when mounting loop device.
Edit 2010-11-04:
If bootubuntu gets executed before Android loads all app2sd applications, it is possible solves the loop device busy error even with App2SD applications installed. It requires a very perfect timing, today after few experiments on my phone, I worked out a process which can always boot up Ubuntu on my phone:
1. Reboot phone
2. as soon as you enter lock screen, unlock screen
3. quickly go to terminal emulator
4. become su by typing su and enter
5. type bootubuntu and wait (type it fast... practice )
-------------
1-5 must be done before SD "Checking for errors" notification disappears, if you fail to do so.. reboot and try again
------------
6. as soon as SD "Checking for errors" notification disappears, hit enter IMMEDIATELY
Now you should be able to enter Ubuntu terminal.
Do NOT exit from your Android terminal (don't press back or home button), wait 1-2 minutes for Android to load applications on SD card.
Once you reboot your phone, you'll need to repeat the above procedure again to enter Ubuntu successfully.
Also chmod 4777 is horrible from a security point of view. It makes all the system bin files writable by anyone and run with root privileges (setuid root).
Sent from my Nexus One using XDA App
houzuoguo said:
Finding #6
If you're constantly getting "device or resource busy" error when mounting loop1 to /data/local/ubuntu, the reason might be caused by Android App2SD (Froyo version), if you have any software installed on SD card, it may cause all loop devices to be busy all the time, thus loop device can not be mounted to /data/local/ubuntu anymore.
Most people had the same problem few months ago, when they execute bootubuntu, they get an error saying loop device is busy, and even changing loop device wouldn't help.
Now I think the reason is determined. After uninstalled all applications which are on SD card (or move all of them from SD card to internal storage), the Ubuntu can boot successfully without getting "device or resource busy" error when mounting loop device.
Click to expand...
Click to collapse
This is because with Froyo apps to SD android creates an encrypted loopback device for each app on the SD card, so depending on the number of apps on your SD card loop0-7 may be in use. I solve this by using a high loop number with losetup - loop99.
Sent from my Nexus One using XDA App
Use a higher loop device, the best option
It worked for me on loop7, but to be on the safe side, decided to use a higher loop number as suggested, but it requires to create the loop device as it doesn't exists, use mknod:
Code:
echo "SETTING UP LOOP DEVICE"
mknod /dev/block/loop99 b 7 99
losetup /dev/block/loop99 /sdcard/ubuntu/ubuntu.img
Now is working on loop99 too!. The clean up section for both bootubuntu and exitu scripts:
Code:
echo "UMOUNTING"
umount -f $mnt/dev/pts
umount -f $mnt/proc
umount -f $mnt/sys
umount -f $mnt
losetup -d /dev/block/loop99
rm /dev/block/loop99
I'm not sure about how I am cleaning up the new node, rm erases it... but is this the best method? rebooting the phone will erase the node anyway so maybe an if clause to test for the node loop99 before creating it will be better.
fralacos said:
It worked for me on loop7, but to be on the safe side, decided to use a higher loop number as suggested, but it requires to create the loop device as it doesn't exists, use mknod:
Code:
echo "SETTING UP LOOP DEVICE"
mknod /dev/block/loop99 b 7 99
losetup /dev/block/loop99 /sdcard/ubuntu/ubuntu.img
Now is working on loop99 too!. The clean up section for both bootubuntu and exitu scripts:
Code:
echo "UMOUNTING"
umount -f $mnt/dev/pts
umount -f $mnt/proc
umount -f $mnt/sys
umount -f $mnt
losetup -d /dev/block/loop99
rm /dev/block/loop99
I'm not sure about how I am cleaning up the new node, rm erases it... but is this the best method? rebooting the phone will erase the node anyway so maybe an if clause to test for the node loop99 before creating it will be better.
Click to expand...
Click to collapse
thanks a lot
I tried this idea already but it seems doesn't work under CM6.0...
and the problem was, every newly created loop device will always be busy, if app2sd is used. (Don't know why)
I'm going to try a different approach, I try to mount loop device to /data/local/ubuntu before Android mounts all app2sd applications
mathrock said:
This is because with Froyo apps to SD android creates an encrypted loopback device for each app on the SD card, so depending on the number of apps on your SD card loop0-7 may be in use. I solve this by using a high loop number with losetup - loop99.
Sent from my Nexus One using XDA App
Click to expand...
Click to collapse
thanks.
my finding is, Android froyo app2sd uses dm-xx loop devices for sd applications, for example, now I have three games on sd card, by entering mount in terminal, i read that
/dev/block/dm-0,dm-1,dm-2 are used.
After I removed all SD applications and reboot system, all of those dm-xxx devices are not mounted anymore.
Also the only difference between mount result with app2sd and mount result without app2sd is usage of dm-xx devices.
Finally I've found solution to the "device or resource busy" error
but it seems like people are now less interested in running Ubuntu on Nexus One
the original post got more than 35k hits and more than 200 replies
Hi houzuoguo!!
I'm trying to type bootubuntu when enter in system, but i think i'm not fast enough or that not work for me. Everytime i get:
# bootubuntu
SETTING VARIABLES
SETTING UP LOOP DEVICE
losetup: /dev/block/loop1
MOUNTING
mount: mounting /dev/block/loop1 on /data/local/ubuntu failed: Device or resource busy
mount: mounting devpts on /data/local/ubuntu/dev/pts failed: No such file or directory
mount: mounting proc on /data/local/ubuntu/proc failed: No such file or directory
mount: mounting sysfs on /data/local/ubuntu/sys failed: No such file or directory
SETTING UP NETWORK
net.ipv4.ip_forward = 1
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexistent
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexistent
bootubuntu: cannot create /data/local/ubuntu/etc/hosts: directory nonexistent
Brought to you by NexusOneHacks.net and the open source community!
chroot: can't execute '/bin/bash': No such file or directory
UMOUNTING
umount: can't forcibly umount /data/local/ubuntu/dev/pts: No such file or directory
umount: can't forcibly umount /data/local/ubuntu/proc: No such file or directory
umount: can't forcibly umount /data/local/ubuntu/sys: No such file or directory
umount: can't forcibly umount /data/local/ubuntu: Invalid argument
losetup: /dev/block/loop1: Device or resource busy
#
Whats the problem then?¿?
Thanks in advance.
devex said:
Hi houzuoguo!!
I'm trying to type bootubuntu when enter in system, but i think i'm not fast enough or that not work for me. Everytime i get:
# bootubuntu
SETTING VARIABLES
SETTING UP LOOP DEVICE
losetup: /dev/block/loop1
MOUNTING
mount: mounting /dev/block/loop1 on /data/local/ubuntu failed: Device or resource busy
mount: mounting devpts on /data/local/ubuntu/dev/pts failed: No such file or directory
mount: mounting proc on /data/local/ubuntu/proc failed: No such file or directory
mount: mounting sysfs on /data/local/ubuntu/sys failed: No such file or directory
SETTING UP NETWORK
net.ipv4.ip_forward = 1
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexistent
bootubuntu: cannot create /data/local/ubuntu/etc/resolv.conf: directory nonexistent
bootubuntu: cannot create /data/local/ubuntu/etc/hosts: directory nonexistent
Brought to you by NexusOneHacks.net and the open source community!
chroot: can't execute '/bin/bash': No such file or directory
UMOUNTING
umount: can't forcibly umount /data/local/ubuntu/dev/pts: No such file or directory
umount: can't forcibly umount /data/local/ubuntu/proc: No such file or directory
umount: can't forcibly umount /data/local/ubuntu/sys: No such file or directory
umount: can't forcibly umount /data/local/ubuntu: Invalid argument
losetup: /dev/block/loop1: Device or resource busy
#
Whats the problem then?¿?
Thanks in advance.
Click to expand...
Click to collapse
I worked on that problem for few weeks and finally I discovered, once I moved all SD applications back to Internal storage, loop1 no longer be busy.
Are you using Froyo app2sd?
houzuoguo said:
thanks a lot
I tried this idea already but it seems doesn't work under CM6.0...
and the problem was, every newly created loop device will always be busy, if app2sd is used. (Don't know why)
I'm going to try a different approach, I try to mount loop device to /data/local/ubuntu before Android mounts all app2sd applications
Click to expand...
Click to collapse
Some of us are still interested in this info but ubuntu runs pretty slow on the nexus. I say it would be nice to have the newest ubuntu (10.10) installed on the nexus one. Possibly the netbook remix version.
Lou2serious said:
Some of us are still interested in this info but ubuntu runs pretty slow on the nexus. I say it would be nice to have the newest ubuntu (10.10) installed on the nexus one. Possibly the netbook remix version.
Click to expand...
Click to collapse
thanks haha, good to hear that I'm not the only one still interested in running Ubuntu on Nexus One.
I'm thinking, if Nexus Two can be overclocked to 1.4Ghz, together with top class SD card, the speed will be enough to run Ubuntu fluently.
Hi! Thanx for ur work! It helped me.....
Now i´m having another issue....i´m triying either to resize the ubuntu.img to make it bigger so i can install the stuff i want ( clean install has 100 mb left) or (preffered option) mounting my sdcard so i can install the native programs from there...any ideas?¿
I think the simple way is just to create another file bigger.
funkatiko said:
Hi! Thanx for ur work! It helped me.....
Now i´m having another issue....i´m triying either to resize the ubuntu.img to make it bigger so i can install the stuff i want ( clean install has 100 mb left) or (preffered option) mounting my sdcard so i can install the native programs from there...any ideas?¿
Click to expand...
Click to collapse
You might want to build your own rootfs - check this site out - it worked great for me.
https://wiki.ubuntu.com/ARM/RootfsFromScratch

[WIP] [DEV] [HOWTO] Ubuntu on Nook Color! UPDATE 1/5/11

DISCLAIMER: You know the risks, bricking, breaking etc. I'm not, nor is anyone else responsible if something goes wrong with your device, especially should it turn into a cave troll and bludgeon someone to death.
You will have to be rooted for this to work.
Update 1/5/11
Changed the install and loader scripts re-compressed and uploaded, new download link. Stream lined the installation process (removed 5 steps)
Update 1/4/11
reflect changes to ubuntu.sh and bootubuntu scripts and streamlining the process. Added screenshots
_________________________
I was over at nexusonehacks.net and looking at the ubuntu on nexus one hack and was thinking that this could be ported to the nook color. The idea is to run ubuntu from an img on the sd card.
The following is a modified version of the "how to" orginally posted here
http://nexusonehacks.net/nexus-one-hacks/how-to-install-ubuntu-on-your-nexus-oneandroid/
Credits
The guys at NexusOneHacks
xda user munday who has modified the scripts to work for the nook color
Devs at XDA Developer for the Ubuntu ARM image for HTC HD2
Saurik (Jay Freeman) for the Debian G1 script, which was hacked for Ubuntu on Nexus One! and then re-hacked for the Nook Color by munday
Here we go:
1) Go download the ubuntu file here: http://www.megaupload.com/?d=67BU4Y3T
2) Extract the contents using 7zip http://www.7-zip.org/download.html
3) Copy the extracted folder "ubuntu" to the root of your SD card
4) Unmount the nook from your pc, go into the app NookColor Tools (if you don't have it download it here courtesy of Ben 74 and click All Settings->Development then uncheck Auto Mount. This will prevent the SD card from being mounted automatically when plugged into the PC
5) Plug the Nook back into your pc and open a command line then navigate to your android sdk folder ie C:\android-sdk or wherever you have it and type
Code:
adb devices
Hit enter and make sure that the nook color comes up (should be the SN of your Nook)
Note: This can also be done from terminal emulator instead of adb...but it is kind of a pain
6) Now we want to go into the command line on the nook so type
Code:
adb shell
Hit enter and this should bring up a "#" sign.
7) Type
Code:
su
hit enter (I do this just as a force of habit)
8) Now we navigate to the ubuntu folder we just copied to our sd card by entering
Code:
cd /sdcard/ubuntu
hit enter. To confirm you are where you want to be you can type
Code:
ls
and it should list the contents of the ubuntu folder.
9) Run the setup script ubuntu.sh by entering the following:
Code:
sh ./ubuntu.sh
hit enter
10) Now type
Code:
bootubuntu
and hit enter
11) So now we have ubuntu command line up and running which should look like:
Code:
[email protected]:/#
We will need to get some packages to run a gui and then connect to it via VNC client. So we need to update a few things first. Type:
Code:
apt-get update
then
Code:
apt-get install tightvncserver
now we need the gui elements so enter this:
Code:
apt-get install lxde
12) Type the following:
Code:
export USER=root
vncserver -geometry 1024×600
this sets the resolution...you can change it to play around, but the native resolution for the nook is 1024x600. This is also where you will set the password for your vnc server...make sure to remember it
13) Next, we are going to add the following to /root/.vnc/xstartup file using cat command: (hit enter after each line and ignore the fact that it looks like it does it twice)
Code:
cat > /root/.vnc/xstartup
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey
icewm &
lxsession
After hitting enter after the last line press "Ctrl+D" twice then press enter
14) We need the vnc server to start every time we start ubuntu, type this:
Code:
cat > front
export USER=root
cd /
rm -r -f tmp
mkdir tmp
cd /
vncserver -geometry 1024×600
Same as before, hit enter after each line then after hitting enter for the last line press "Ctrl+D" twice then press enter.
15) Enter this
Code:
cat front /root/.bashrc > temp
Then
Code:
cp temp /root/.bashrc
16) Now on the nook open up your vnc viewer app (android vnc viewer or PocketCloud...or whatever you use)
Use the following settings:
Host Address: 127.0.0.1 (some don't require this)
Password: the password you set up in step 16
Port: 5901
Save and then click connect and you should be up and running on ubuntu! To leave ubuntu type exit from adb. This should kill ubuntu. Exit adb and then you can disconnect the nook from your pc.
To start ubuntu from the nook open up a terminal emulater and type:
Code:
bootubuntu
Hit enter, this should bring up the [email protected], hhen press "Home" key and open up your vnc app. Now you are ready to rock your Linux tablet!
You could also use gscript lite to automate the process of starting ubuntu so you don't have to type it in the terminal everytime. You can get gscript lite from the market or download the file I have attached.
It does seem a little laggy..just a little...for now anyway
To exit ubuntu: Disconnect the vnc client then hold the "Home" key (I use button savior which brings up a nice little task manager) and click the Terminal emulator when it pops up under running tasks. Once you are back in the terminal you can type:
Code:
exit
to shut down ubuntu.
Enjoy and make sure you thank munday and the guys at nexusonehacks and all the devs who helped make it possible.
-devastator
EDIT:
I noticed that after rebooting the nook would hang at the "Future of reading" screen....if this happens turn the device off remove the sd card the turn the nook back on. It should boot fine. After it's finished you can return the sd card and mount it. This is strange and I'm looking into it. I'm not sure if this is limited to me or if it is universal to all nooks. It also still fails at shutting ubuntu down for some reason. I'm still looking into this.g into this.
I got it going, just needed a few "busybox"-es here and there . It needs some work, right now to get X you have to use VNC.
It's sluggish but a bit more work might just yield something a bit more usable. I'll play more tomorrow night.
Here's my scripts:
ubuntu.sh
Code:
mount -o remount,rw /dev/block/mmcblk0p5 /system
busybox modprobe ext2
rm -f /data/local/bin/fsrw
rm -f /data/local/bin/bootubuntu
rm -f /data/local/bin/unionfs
rm -f /data/local/bin/installer.sh
rm -f /data/local/bin/mountonly
mkdir /data/local/mnt
#busybox clear
rm /system/bin/fsrw
rm /system/bin/bootubuntu
rm /system/bin/unionfs
rm -/system/bin/mountonly
busybox cp -f fsrw /system/bin
busybox cp -f bootubuntu /system/bin
busybox cp -f unionfs /system/bin
busybox cp -f mountonly /system/bin
cd /sdcard/ubuntu
busybox chmod 4777 *
cd /system/bin/
busybox chmod 4777 *
cd /
#busybox clear
echo " "
echo "Ubuntu Chroot Bootloader v0.1"
echo "Ubuntu Bootloader is now installed!"
echo "This process does NOT damage Android OS!"
echo " "
echo "Original Installer by Charan Singh"
echo "Modified for Ubuntu Chroot by Max Lee at NexusOneHacks.net"
echo " "
echo "To enter the Debian Linux console just type 'bootubuntu'"
bootubuntu
Code:
mount -o remount,rw /dev/block/mmcblk0p5 /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
busybox mknod /dev/loop2 b 7 0
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
busybox 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 " "
busybox 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
Then just followed the instructions at nexusonehacks.
note: to run bootubuntu i had to use sh and the use the full path:
Code:
# sh /system/bin/bootubuntu
other note: I was using adb not a term app on the nook.
Obligatory video
I can't post links yet so check: youtube.com/watch?v=TnXfZ6aagn8 for a really boring video
EDIT: switched the names, DOH!
I also had to use sh and the full path also. Thanks for the update on the script...gonna try it in the morning (it's 2am here) will also see if I can help to get it running smoother. What class SD card are you using? I imagine a class 4 or higher would yeild better results as far as responsiveness goes.
The sd is a class 2 that came in one of my dev phones. I'll pick up a faster one tomorrow after work and test it out.
It's just about 3am here now, we must be in the same time zone.
I'm going to bed now, but first here's a modded version of the script you had originally posted that also works now.
bootubuntu
Code:
#!/bin/sh
mount -o remount,rw /dev/block/mmcblk0p5 /system
export kit=/sdcard/ubuntu
export bin=/system/bin
busybox [ ! -d /data/local/ubuntu ] && mkdir /data/local/ubuntu
export mnt=/data/local/ubuntu
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
busybox mknod /dev/loop1 b 7 0
busybox losetup /dev/block/loop1 /sdcard/ubuntu/ubuntu.img
mount -t ext2 /dev/block/loop1 /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
busybox 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 " "
busybox 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
busybox losetup -d /dev/loop1
#unregistering the loopback device just seems to die. need to fix or remove.
I'll look at the N1 formus tomorrow too and see if they have made progress in getting X to run fast or without need for VNC.
Nice work, I am addicted in seeing the crazy crap people are doing everyday.
Couldn't sleep so I'm messing around with it now...I'm using a class 4 and have it up and running. It does seem to be a little laggy, but I don't have a class 2 to compare it to. Let me know what you find out, I'll keep playing with it also to see if I can get it to be more responsive...but we are definately on our way to having a great little linux tablet in addition to android. You should also be able to use this for other builds of linux also by just changing out the .img file to a flavor of your choosing. I'm excited
I have also updated the OP with the how to and credits. Really appreciate your help munday.
I noticed that after rebooting the nook would hang at the "Future of reading" screen....if this happens turn the device off remove the sd card the turn the nook back on. It should boot fine. After it's finished you can return the sd card and mount it. This is strange and I'm looking into it. I'm not sure if this is limited to me or if it is universal to all nooks.
Edit:
Running into some strange occurrences...it appears that when you type exit from the terminal to kill ubuntu, I believe ubuntu stays running...anyway, I'm going to bed and will work on it more tomorrow.
devastatorx said:
You should also be able to use this for other builds of linux also by just changing out the .img file to a flavor of your choosing. I'm excited
Click to expand...
Click to collapse
Are there any increased risks with changing the version you use?
Well, you will want to make sure that the build supports ARM based devices.
munday said:
Then just followed the instructions at nexusonehacks.
note: to run bootubuntu i had to use sh and the use the full path:
Code:
# sh /system/bin/bootubuntu
Click to expand...
Click to collapse
I fixed this, the scripts were backwards, I have updated the OP to reflect the changes and bootubuntu now works
devastatorx said:
I fixed this, the scripts were backwards, I have updated the OP to reflect the changes and bootubuntu now works
Click to expand...
Click to collapse
sweet, i can't wait to get home to play more!!!
I've tried running ubuntu.sh from the terminal emulator (With su) and from ADB, and have not had success with either.
The readout is:
Code:
': File existste '/system/bin
': File existste '/system/bin
': File existste '/system/bin
: not found
: not found
cd: can't cd to /sdcard/ubuntu
: not found
: No such file or directory
: not found
cd: can't cd to /system/bin
: not found
: No such file or directory
: not found
cd: can't cd to /
: not found
: not found
Ubuntu Chroot Bootloader v0.1
Ubuntu Bootloader is now installed!
etc., etc.
Is there a problem with how I copied the script? I assume the first part about the file existing is due to this being the third or fourth time I've tried running the script (Unsuccessfully), but I've no idea how to interpret the rest.
Thanks
munday said:
sweet, i can't wait to get home to play more!!!
Click to expand...
Click to collapse
I sent you a message
Link3737 said:
I've tried running ubuntu.sh from the terminal emulator (With su) and from ADB, and have not had success with either.
The readout is:
Code:
': File existste '/system/bin
': File existste '/system/bin
': File existste '/system/bin
: not found
: not found
cd: can't cd to /sdcard/ubuntu
: not found
: No such file or directory
: not found
cd: can't cd to /system/bin
: not found
: No such file or directory
: not found
cd: can't cd to /
: not found
: not found
Ubuntu Chroot Bootloader v0.1
Ubuntu Bootloader is now installed!
etc., etc.
Is there a problem with how I copied the script? I assume the first part about the file existing is due to this being the third or fourth time I've tried running the script (Unsuccessfully), but I've no idea how to interpret the rest.
Thanks
Click to expand...
Click to collapse
Try using these, just unrar and then copy them in your ubuntu folder, if it asks to overwrite just click yes...also you have autmounting of the sd card turnned off in nook color tools settings right?
Yeah, it must have been an error on my end. Using the updated scripts you posted worked like a charm.
Thanks!
Link3737 said:
Yeah, it must have been an error on my end. Using the updated scripts you posted worked like a charm.
Thanks!
Click to expand...
Click to collapse
Good to hear!
I'm currently working on making this a port to the SD card so that with the sd card in it boots into ubuntu from power off, and with the sd card out it boots to android then you replace the sd and use it for storage like normal. It will also run a lot snappier....well that's the idea anyway.
devastatorx said:
Good to hear!
I'm currently working on making this a port to the SD card so that with the sd card in it boots into android from power off, and with the sd card out it boots to android then you replace the sd and use it for storage like normal. It will also run a lot snappier....well that's the idea anyway.
Click to expand...
Click to collapse
Booting from SD in the same fashion as Nookie Froyo? That sounds like it would give a huge performance boost over the current method, I can't wait to see what you come up with.
This should be acheivable using the method mentioned in this topic:
http://forum.xda-developers.com/showthread.php?t=873243 thanks to clockworx.
Currently looking into this
devastatorx said:
This should be acheivable using the method mentioned in this topic:
http://forum.xda-developers.com/showthread.php?t=873243 thanks to clockworx.
Currently looking into this
Click to expand...
Click to collapse
I was thinking the exact same thing, the nook seems to like booting from sd, so we should be able to set up the partitions like the foryo sd and edit the init.rc and env.txt to boot ubuntu instead of android. Just a theory though. It's my plan for tonight anyway.
munday said:
I was thinking the exact same thing, the nook seems to like booting from sd, so we should be able to set up the partitions like the foryo sd and edit the init.rc and env.txt to boot ubuntu instead of android. Just a theory though. It's my plan for tonight anyway.
Click to expand...
Click to collapse
I also stumbled across this: http://androix.org/ Which talks about a native android xserver which does a way with the vnc aspect altogether. I downloaded and attempted to install but I get the error "There is a problem parsing the package" and I haven't had any luck plus there isn't much documentation.
Let me know how it goes munday, I'll be working on the same thing later (have to take the fiance out for dinner)
question
I was just curious, after installing ubuntu can we install flash as we would had we booted linux from netbook?

[W-I-P][DEVELOPMENT] Dual / Multi Boot Project: Devs Only

{ LONG POST WARNING }
{ NOT FULLY WORKING YET}
{ NEEDS A LOT OF FURTHER DEVELOPMENT }
Hey everyone I had thought of making this Dual Booting system work along side recovery… because initially (with FreeX10-alpha) it was not possible to have both recovery & dual boot...
Thank you zdzihu & jerpelea for your great work on FreeX10-alpha, which booted off SDCARD… I got inspiration to try and make this work for FreeX10-beta4 based on the amazing work that u guys did! Thank you jerpelea for all your feedback on my repeated messages when I was testing this a few months back (hope I didn’t bother u too much with questions )...
zdzihu & jerpelea u are truly LEGENDS!!!
[This is just my personal opinion] Really hoping that some devs can take interest in this to provide compatible files (ramdisks, system files) for this to work… may be as an add-on to their main roms… please don’t keep bothering devs to create ramdisks for booting off SDCARD… they are already very busy trying to make our X10 better with faster and stable ROMS/MODS/etc… this is just an additional feature…
The basic idea was to use the chargemon booting scripts provided in FreeX10-alpha and to try and make FreeX10-beta4 to boot off SDCARD…
Initially I used the img files which came with FreeX10-alpha and wiped the image to then put FreeX10-beta4 on it… while doing so I realized that all of the symbolic links were not getting copied correctly (obviously)… so I started from scratch with blank ext2fs images…
Later I thought of using clean/base nandroid/recovery backups as they are already working/preconfigured system of FreeX10-beta4…
Following is a small How-To on converting NANDROID/RECOVERY images (with yaffs fs) to ext2 fs images keeping the symlinks intact!!
I have used Ubuntu for these steps.
I have attached blank_files.7z which contains precompiled ext2fs images:
system.img [size: 256 MB]
data.img [size: 512 MB]
cache.img [size: 128 MB]
To resize or create newer ext2fs images:
[APP] Windows: Create Your Own Data.img Maker Application, +/- From Existing data.img
U can use the commands provided there even in linux to create/resize these images...
We will keep the NANDROID images at:
Code:
/home/user/nandroid_imgs/test1/
and EXT2 FS images at:
Code:
/home/user/ext2fs_imgs/test1/
while temporary mounts points will be made at:
Code:
/home/user/mntpts/
We will be using unyaffs from here:
[How-To] Extracting/Accessing Recovery/Nandroid backup (.img) files
Extracting files from the nandroid/recovery backups:
Code:
cd /home/user/nandroid_imgs/test1
mv system.img /home/user/nandroid_imgs/test1/system/
cd /home/user/nandroid_imgs/test1/system/
sudo unyaffs system.img
mv system.img ../.
mv data.img /home/user/nandroid_imgs/test1/data/.
cd /home/user/nandroid_imgs/test1/data/
sudo unyaffs data.img
mv data.img ../.
mv cache.img /home/user/nandroid_imgs/test1/cache/
cd /home/user/nandroid_imgs/test1/cache/
sudo unyaffs cache.img
mv cache.img ../.
Loop mounting ext2 fs files:
Code:
sudo mount -t ext2 -o loop,rw,noatime,nodiratime /home/user/ext2fs_imgs/test1/system.img /home/user/mntpts/system/
sudo mount -t ext2 -o loop,rw,noatime,nodiratime,nosuid,nodev /home/user/ext2fs_imgs/test1/data.img /home/user/mntpts/data/
sudo mount -t ext2 -o loop,rw,noatime,nodiratime,nosuid,nodev /home/user/ext2fs_imgs/test1/cache.img /home/user/mntpts/cache/
Recursively copy all files (preserving symlinks) from extracted yaffs images to mount points
Code:
sudo cp -r -p /home/user/nandroid_imgs/test1/system/* /home/user/mntpts/system/.
sudo cp -r -p /home/user/nandroid_imgs/test1/data/* /home/user/mntpts/data/.
sudo cp -r -p /home/user/nandroid_imgs/test1/cache/* /home/user/mntpts/cache/.
Unmount the mounts:
Code:
sudo umount /home/user/mntpts/system/
sudo umount /home/user/mntpts/data/
sudo umount /home/user/mntpts/cache/
Ok now that the ext2fs iamges are populated with working files copy them onto SDCARD…
I have placed it at:
Code:
/sdcard/FreeX10
lets move on to the chargemon script...
This is, as of now, based off xRecovery chargemon (modified from FreeX10-alpha)
Code:
#!/system/bin/busybox sh
# modified chargemon for recovery + dual boot from NAND/SDCARD
/system/bin/charger
cat /dev/input/event2 > /dev/keycheck&
sleep 3
kill -9 $!
# intact recovery
if [ -s /dev/keycheck ]
then
# remount rootfs rw
mount -o remount,rw rootfs /
# Umount MTDs
umount -l /data
umount -l /cache
# Extract recovery
cd /
rm -r /sbin
rm -f etc
tar -xf /system/bin/xrecovery.tar
# Umount system
umount -l /system
chroot / /init
fi
echo "check if reboot into SDCARD OS was called"
if [ -e /data/local/tmp/rebootsdcardos ]
then
echo "Booting from SDCARD!"
# FreeX10-alpha code follows with slight modifications!!!
# remount rootfs rw
mount -o remount,rw rootfs /
busybox chmod 0777 /dev -R
busybox chown 0.2000 /dev/oncrpc -R
rm -r /sdcard
cd /
mkdir sd
chmod 777 sd
rm init*
rm logo.rle
rm default.prop
tar -xf /system/bin/sdcardos_ramdisk.tar
# Umount system,data,cache
umount -l /system
umount -l /data
umount -l /cache
# Check and mount SD Card
dosfsck -y /dev/block/mmcblk0p1
sleep 5
mount -t vfat -o rw,noatime,nodiratime /dev/block/mmcblk0p1 /sd
sleep 5
# Mount system and data ext2 images
losetup /dev/block/loop1 /sd/FreeX10/system.img
sleep 5
losetup /dev/block/loop2 /sd/FreeX10/data.img
sleep 5
losetup /dev/block/loop3 /sd/FreeX10/cache.img
sleep 5
e2fsck -y /dev/block/loop1
e2fsck -y /dev/block/loop2
e2fsck -y /dev/block/loop3
mount -t ext2 -o rw,noatime,nodiratime /dev/block/loop1 /system
sleep 5
mount -t ext2 -o rw,noatime,nodiratime,nosuid,nodev /dev/block/loop2 /data
sleep 5
mount -t ext2 -o rw,noatime,nodiratime,nosuid,nodev /dev/block/loop3 /cache
sleep 5
# zdzihu: hack-fix
if [ -e /data/data/com.android.providers.telephony/databases/telephony.db ]; then
/system/bin/chroot / /init
exit
fi
# Chroot :)
chroot / /init
# jump out of chargemon to skip NAND booting
exit
fi
echo "Booting from NAND!"
# remount rw
mount -o remount,rw rootfs /
cd /
rm -r /sdcard
rm init*
rm logo.rle
rm default.prop
tar -xf /system/bin/ramdisk.tar
# zdzihu: hack-fix
if [ -e /data/data/com.android.providers.telephony/databases/telephony.db ]; then
/system/bin/chroot / /init
exit
fi
chroot / /init
Recovery is intact so u can get into recovery the normal way… (press/tap back key after seeing SE text logo)
OS on NAND (normal system on MTD) will boot by default…
To reboot into OS on SDCARD issue the following commands in terminal emulator/adb shell:
Code:
touch /data/local/tmp/rebootsdcardos
reboot
NOW the OS should start booting off the SDCARD…
It completes commands in chargemon and then BootAnimation can be seen…
BUT HERE IS THE PROBLEM!
Check LOGCAT here: http://www.mediafire.com/?phxm3uqzp0dzzhb
here is wht J had to say:
jerpelea said:
as you can see in logcat
1.your prelink is not ok
2.you don't have something ok in initrd
3.you dont have all permisions ok on data
Click to expand...
Click to collapse
From my limited understanding we yet have to make a proper ramdisk (sdcardos_ramdisk.tar)… I feel the init.rc file has to be changed especially the following line (based off FreeX10-beta4 ramdisk):
Code:
mount yaffs2 [email protected] /system rw remount
mount yaffs2 [email protected] /data nosuid nodev
mount yaffs2 [email protected] /cache nosuid nodev
As for Multi-Booting:
We can keep adding different sections to chargmeon:
Code:
/data/local/tmp/rebootsdcardos1
/data/local/tmp/rebootsdcardos2
etc…
OR
possible solution for having both recovery and dual boot
and similarly keep adding ramdisks in NAND /system:
Code:
sdcardos1_ramdisk.tar
sdcardos2_ramdisk.tar
etc
So we can have as many OS/ROMs on SDCARD as u have free space… though we need to make specific ramdisks for each…
Hope this was slightly useful… and waiting for feedback from advance users on how we can get this working....
Lol, you're working very hard Doom! Keep going!
Doom! You are making enormous progress and helping a lot with Other Devs.
A Combination of a good rom and one of these additional Dual Boot would make x10 better than any Android mobile SE could deliver.
Thank you and I really pray to give SE a run for their money!
for someone thats always saying hes not a developer you sure as hell seem to know what your doing!
Keep up the great work, i hope to see this working flawlessly that would be awesome to be able to dual boot.
Whats the next steps in the project?
BULL3TPR00F said:
for someone thats always saying hes not a developer you sure as hell seem to know what your doing!
Keep up the great work, i hope to see this working flawlessly that would be awesome to be able to dual boot.
Whats the next steps in the project?
Click to expand...
Click to collapse
well i am not exactly a ROM developer and dont know much about how to compile libs/sources/etc...
next step is that we need to make compatible system files & ramdisk (init.rc) for dual booting
DooMLoRD said:
well i am not exactly a ROM developer and dont know much about how to compile libs/sources/etc...
next step is that we need to make compatible system files & ramdisk (init.rc) for dual booting
Click to expand...
Click to collapse
You may not be a rom developer but your an amazing commited x10 modder
Sent from my X10i TripNMiUI using XDA App
DooMLoRD said:
well i am not exactly a ROM developer and dont know much about how to compile libs/sources/etc...
next step is that we need to make compatible system files & ramdisk (init.rc) for dual booting
Click to expand...
Click to collapse
I am also excited buddy..... Once i get through my experiments i will surely like to focus on this as this will allow us to have more then one version of ROM on one machine.
Based on your first post
all i can get is we are getting the boot animation but not going after that.
i would suggest following things based on my experiments with ubuntu work.
use loops above 10 coz i suspect some loops are already in use during my ubuntu boot i am watching that loop7 is already created so i would suggest avoiding it.
also as we have been adding debug "we have reached here" style code can we do the same here that might help us.
also can we find any debug-able place i mean place where we can track the progress to get the position inside the rom so that we can understand except logcat where we are.
any progress or hurdles buddy.....
i am eager to test this .....
anantshri said:
any progress or hurdles buddy.....
i am eager to test this .....
Click to expand...
Click to collapse
sorry man havent had time to do any further testing for this... have been very busy with some personal work and kernel manager scripts...
DooMLoRD said:
sorry man havent had time to do any further testing for this... have been very busy with some personal work and kernel manager scripts...
Click to expand...
Click to collapse
Keep up the good Work Doom. ! and thx for your work
Sorry if its no help but there's a thread in the x10 mini pro section
http://forum.xda-developers.com/showthread.php?t=1084555
Sent from my SEX10 using XDA App
These are great news, keep on developing!
sent from my x10i with wolfbreaks CM 6.1.3 v006 undervolted, bb67
rtblittlebrown said:
Sorry if its no help but there's a thread in the x10 mini pro section
http://forum.xda-developers.com/showthread.php?t=1084555
Sent from my SEX10 using XDA App
Click to expand...
Click to collapse
they have posted exactly the same thing!
read my 1st post in this thread and then read the first few posts there
Ohk so since we now have one more option in Xrecovery i am back to my old suggestion.
however this time i will post my thought out in open so that if someone has required skills and time then they can work on .
I have an idea of using xrecovery as a boot menu.
process would be
1) Xrecovery to start everytime. (this needs some consideration.)
2) To have a timeout value if any key pressed before that then remain in menu otherwise boot to the os.
3) inside menu we should have options of all O.S. / ROM (os coz my intention are to run linux off dualboot) available with selection options.
4) ON selection it will just be the same procedure as already using in xrecovery 1.0 to handover the command to a script. and let it load.
5) boot menu if possible could be controlled by an outside file which we can edit just like grub.conf in linux.
Note : This will requires good understanding of booting process of X10i and c skills as xrecovery is written in complete c.
anantshri said:
Ohk so since we now have one more option in Xrecovery i am back to my old suggestion.
however this time i will post my thought out in open so that if someone has required skills and time then they can work on .
I have an idea of using xrecovery as a boot menu.
process would be
1) Xrecovery to start everytime. (this needs some consideration.)
2) To have a timeout value if any key pressed before that then remain in menu otherwise boot to the os.
3) inside menu we should have options of all O.S. / ROM (os coz my intention are to run linux off dualboot) available with selection options.
4) ON selection it will just be the same procedure as already using in xrecovery 1.0 to handover the command to a script. and let it load.
5) boot menu if possible could be controlled by an outside file which we can edit just like grub.conf in linux.
Note : This will requires good understanding of booting process of X10i and c skills as xrecovery is written in complete c.
Click to expand...
Click to collapse
point no.1 is easy... not an issue..
abt point 2 i think that too would be possible... a while loop with sleep function & wait for input/keppress
pt3 the newer xrecovery v1.0.0 already has something similar may be we can look into it to add "Boot NAND system" as first option
point no. 5 if possible WILL BE BRILLIANT!!!
@anantshri
dude may be these guys can help us:
http://forum.xda-developers.com/showpost.php?p=14354231&postcount=49
DooMLoRD said:
they have posted exactly the same thing!
read my 1st post in this thread and then read the first few posts there
Click to expand...
Click to collapse
Oops sorry..
Sent from my SEX10 using XDA App
rtblittlebrown said:
Oops sorry..
Sent from my SEX10 using XDA App
Click to expand...
Click to collapse
no dude thanks for the info... i have already contacted those guys for help... lets see may be they can help us out to get this working!!!
dual boot hint by Z
http://forum.xda-developers.com/showthread.php?t=1107111
something related

[Q] Mount Problem

Hello everyone.
So I've rooted my alcatel one touch 890d(running android 2.2.2 with kernel 2.6.32.9).
After that i installed a terminal emulator and busybox.
I've managed to get the sdk and connect to device using the adb shell.
I was thinking about having a decent linux emulated OS with chroot, after finding tons of broken links and some scripts for it (automatic installation of ubuntu/debian) and found out that to mount and ext2 img file, created using:
dd if=/dev/zero of=1.img bs=1MB count=0 seek=5
mke2fs 1.img
I will need to do the following(modified by me and yes, as root, and there is a directory /mnt/sdcard and the file downloaded to /mnt/sdcard/download/1.img):
mknod /dev/loop1 b 7 0
losetup /dev/block/loop1 /mnt/sdcard/download/1.img
mount -t ext2 /dev/block/loop1 /mnt/sdcard/tmp
But when i use last command i get:
mount: no such device.
But when i try
mount -t yaffs2 /dev/block/loop1 /mnt/sdcard/tmp
the error is different:
mount: invalid argument
So my question, why doesn't it work ?
Thanks in advance.

[Q] [SOLVED] Is there kernel loop support for our device ?

Hi,
As the title says, Is there Kernel loop support for our LG Optimus L9 ?
I'm trying to mount a loop file created on debian on the device, but I get the error
ioctl LOOP_SET_FD failed: Device or resource busy
Click to expand...
Click to collapse
.
This is what I did --
Loop file created on debian and formatted with ext4.
On Optimus L9 with CM10.1, in terminal emulator,
$su
#losetup /dev/block/loop0 /storage/sdcar1/file
#mount -o remount,rw /system
#mkdir /system/temp
#mount -rw -o loop -t ext4 /dev/block/loop0 /system/temp/
ioctl LOOP_SET_FD failed: Device or resource busy
#
Click to expand...
Click to collapse
Is our kernel having loop support. If yes, am I doing anything wrong? The file gets successfully mounted in Debian.
EDIT:
using "busybox mount" solved the issue.
Tried adding busybox to the mount command and voila it worked.
#busybox mount -rw -o loop -t ext4 /dev/block/loop0 /system/temp/
Click to expand...
Click to collapse
You just taught me something new, thanks.
Can you upload your img, I would really like to check this out, or can you direct me to a thread so I can learn some more.
Sent from my LGMS769 using xda app-developers app
kuma82 said:
You just taught me something new, thanks.
Can you upload your img, I would really like to check this out, or can you direct me to a thread so I can learn some more.
Sent from my LGMS769 using xda app-developers app
Click to expand...
Click to collapse
The one I created is over 100MB. I had a html tutorial containing 12,000 files. I don't want to put those files on sdcard and mess it up. So, I used this block device.
I have created a sample "temp.img" file with a size of 500KB. It contains a single text file. I'm attaching it and you can check it out.
Below is the way i created and mounted it.
Code:
# "temp.img" md5 b97642fed817fa3f1a0cc6dc64b6c40d
# remount rootfs rw.
mount -o remount,rw /
# create mount point.
mkdir /mnt/temp
# chmod mountpoint.
chmod 777 /mnt/temp
# create block file.
dd if=/dev/zero of=/storage/sdcard0/temp.img bs=1024 count=500
# this creates 500 KB file. I can't seem
# to get bs=1M argument working on android.
# so bs1024 x count = target file size (=count times in KB).
# query free loop device. (will be /dev/block/loopx)
losetup -f
#attach block file with free loop.
losetup /dev/block/loop0 /storage/sdcard0/temp.img
#create file system.
mke2fs -T ext2 /dev/block/loop0
# And finally mount it
busybox mount -o loop -t ext2 -rw /dev/block/loop0 /mnt/temp
# For unmounting
busybox umount /mnt/temp
And it isn't encrypted. I don't need encryption, and i can't even seem to figure out how to encrypt it.

Categories

Resources