Gentoo Linux base image - Galaxy Tab Pro 12.2, 10.1, 8.4 General

Hi everyone. Sorry if this doesn't belong here. I'm not allowed to post in the developers forum and this is my first post.
I am not trying to develop *for* my Galaxy Tab Pro 10.1... I'm trying to develop *ON* it. And Android itself has a very long way to go before it is worth anything as an OS to host a server dev environment. Terminal IDE and AIDE are cute and nice starts. But I need something more. So I installed a specialized Exynos 5240 optimized Gentoo image on mine. Since uboot (or any other open source bootloader) hasn't been deemed officially workable on the Tab Pro, I skipped even going down that road and am just running a chrooted environment with an X server.
I figured I'd upload the base image - it's just essentially a stage3 but with some more mobile dev friendly USE flags.
I started with this image for my custom environment but I figured without the bloat of my particular toolset (other than doc USE flag for case when I'm writing code on a plane and need a reference, which happens often), this might be useful for others.
Disclaimer: If you haven't rooted your Android or set up a chroot somewhere, if not android, this is neither the time nor the place to learn how. But if you got that part all figured out, here's a nice stage3 gentoo image optimized specifically for cortex-a15 processors.
Note that gcc didn't implement support for the cortex-a15.cortex-a7 tuning profile until gcc 4.9 which is still not ready for production on arm so this isn't as optimized as it can be once that happens. Please feel free to borrow this image, rebuild system appropriately tuned (and updated to latest versions) and upload here. I'm sure we'd all appreciate it.
LICENSING INFORMATION
By downloading this, you agree to
dubdubdub oracle com (technetwork/java/javase/terms/license/index.html)
I know the link is painful but read the license and complain about the inconvenience to the mods ... no parenthesis
Because the image includes the Oracle JDK since IcedTea can't do hardware float ABI on ARM
DOWNLOAD LINK: dubdubdub filedropper com (gentoo-cortex-a15imgtar)
(Sorry - can't post external links so copy and paste then fix without parens)
Thank you!
P.S. here's my little hacked together chroot launch script which I can only really execute by sourcing rather than executing. It's not a prod script but it works for my case. Gentoo is the directory inside the one that contains the script and is the root of the Gentoo chroot system.
Code:
#!/bin/sh
export PATH=/system/xbin:/system/bin:/system/sbin:$PATH
if [ ! -d Gentoo/usr/ ]; then
mount -t ext4 -o noatime,rw,seclabel /dev/block/mmcblk1p2 ./Gentoo
swapon /dev/block/mmcblk1p3
mount -t proc proc Gentoo/proc
busybox mount --bind /dev Gentoo/dev
mount -t devpts devpts Gentoo/dev/pts
ln -s /proc/self/fd Gentoo/dev/fd
mount -t sysfs sysfs Gentoo/sys
mount -t tmpfs tmpfs Gentoo/dev/shm
busybox mount --bind /sys/fs/selinux Gentoo/sys/fs/selinux
busybox mount --bind /storage/sdcard0 Gentoo/mnt/storage/sdcard0
busybox mount --bind /storage/extSdCard Gentoo/mnt/storage/extSdCard
busybox mount --bind /data Gentoo/mnt/data
busybox sysctl -w net.ipv4.ip_forward=1
fi
cp /etc/resolv.conf Gentoo/etc/resolv.conf
chmod 644 Gentoo/etc/resolv.conf
chroot Gentoo /bin/bash --login
umount Gentoo/mnt/data
umount Gentoo/mnt/storage/extSdCard
umount Gentoo/mnt/storage/sdcard0
umount Gentoo/sys/fs/selinux
umount Gentoo/sys
umount Gentoo/dev/shm
umount Gentoo/dev/pts
umount Gentoo/dev
umount Gentoo/proc
swapoff /dev/block/mmcblk1p3
umount Gentoo

Related

For your concideration: Getting around the locked bootloader and missing loop ko

This is my first post here, but I figured I'd share this since doesn't appear to have been done yet.
As I'm sure most of you know the locked bootloader introduces challenges to getting your favo(u)rite flavo(u)r of linux on to the Droid 2.
I expect that you have rooted your phone and have busybox installed/working...
Normally when one wants to do this they get a linux image file and mount it as a loop device and then chroot to it's mounted folder. Because one can create a loop device but can't mount it.
My solution has been a "simple" one but may not have been tried:
Extract the contents of the image on a separate system and then push everything to /data/local/mnt.
For instance I set up a loop device on Ubuntu:
losetup /dev/loop0 /home/usernamehere/distributionnamehere.img
mount -t ext2 /dev/loop0 /home/usernamehere/somemountfoldername​
Then I remove security stuff:
sudo chmod 777 /home/usernamehere/somemountfoldername
sudo adb shell
chmod 777 /data/local/mnt
exit
sudo adb push /home/usernamehere/somemountfoldername /data/local/mnt​
(Wait for the push to happen stop it when you see X11/X11/X11/X11 or remove that symbolic link before pushing. If you stop it you'll have to push the other folders separately)
After it's done the bootubuntu which points to that /data/local/mnt share (or /data/local/ubuntu or /data/local/debian or whatever) should throw a few errors about mounting which is expected because we haven't fixed the fact that loop devices aren't mountable, but since we pushed the files to the 'mount' directory, the script finds it anyways and chroots to the /data/local/mnt and runs /data/local/mnt/bin/bash (or /bin/bash from the chroot point of view.)
This will get you to the root prompt.
I'm still working on getting the bash: groups: message to go away, but I think that is just that I didn't get everything copied initially.
Also I have yet to finish setting up VNC.
Anyway I hope this helps some people out.
I may do a script or more complete instructions later if requested.
Thanks,
Sky Adams
Thanks, I've been stumped by this for awhile. Your method allowed me to push the files but my script still doesn't find it. I'm going to need you to post your bootubuntu script. I have an image from androidclone.com that has vnc setup already, just need to get it to execute.
Confirmed working on rooted Droid X. Used Lakia image from androidclone dot com
1) Partitioned 16GB SD: Shrink to 11.9 GB leaving ~4GB. Then create new ext3 partition in free space
2) mount ext3 partition and create the loop to the image as skrull mentioned above.
3) then just "[email protected]# cp -r pathtoloopiface/* pathto4gbmount/"
4) takes a while but preserves the symlinks to avoid the X11/X11/X11/ issue above. (I think the reason you were having problems with the bash at the end, was an incomplete adb transfer of the /usr folder and probably no /var transfer at all. At least that was the case when I tried.)
5) push and chmod 777 this bootubuntu script to /system/bin:
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
mount -t ext3 /dev/block/mmcblk0p2 $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
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 " "
echo " "
echo " "
echo "Ubuntu 10.10 - Laika Edition by Androidclone.com "
echo "Website:http : / /www . androidclone . com"
echo "Email:[email protected] . com"
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
# the fuser command below allows us to kill all processes using the mount.
# otherwise umount will fail and the vnc session will still be alive.
# if it fails just run the fuser and umount again manualy.
fuser -k $mnt
umount $mnt
6) make sure there is a path to /data/local/mnt on the device and just run 'bootubuntu' from a root shell. you should get: "[email protected]/#:"
7) read the site on androidclone dot com for details on logging into the already running vnc service for a full LXDE session.
8) happy hacking.
D2G
any idea if this could free up the bootloader for the D2G allowing us to modify radio?
No, this will not circumvent the bootloader to load custom kernels. But who cares. many of the things we want, added features etc., can be loaded up in the form of kernel modules. I am not proficient enough to be able to compile my own modules yet but i'm working on a few things.
Radio
Can a kernal module be used to change the radio?
Good share, thank you very much.
ARGH!
I have probably spent 8 to 10 hours trying to get Ubuntu to boot. It seems that I cannot mount the path it wants to mount.
I can as it would seem to do this in shell it self, but still have some errors.
Do you think if I SBF my Droid X then root it - then follow the directions this would work. I am at an end now...and frustrated

How to Run(Chroot) Linux(Ubuntu/Debian,etc.) in your Milestone 2

Chrooting Linux on Android is a very popular topic, and you can find many tutorials online. I am not going to post a detailed how to here.. but, I will explain the generalized steps for the process! If anyone have any questions or need help, feel free to ask!
Get Root Access on your phone
There are many ways to get root access; Easiest will be using z4root or SuperOneClick ! Rooting is mandatory because: You need to install Busybox; Need to mount file system, etc..​
Install SuperUser App from the Market
This application allows you to grant Root access to other applications (when needed). Depending on how you rooted your phone, superuser.apk may be already installed on your phone.​
Install Busybox App from the Market
Depending on how you rooted your phone, Busybox may be already installed on your phone. In any case install this app from the market and update your busybox to the latest version. Busybox is a set of commonly used linux commands, which are not available in android by default. Eg: cp, chroot, etc.​
Install Connectbot from Android market
Connect bot is a terminal client application for android. There are other alternatives but, I recommend Connectbot! Also Connectbot has SSH support, so if you are installing an SSH server on your Ubuntu, you can connect to it using connectbot and you may totally skip the VNC for GUI. Anyway, note that you need a terminal app to start the chroot daemon!​
Install AndroidVNCViewer from Android market
With androidVNCViewer we can get GUI access to our ubuntu! This App works so fine in my Milestone 2 with Ubuntu; It even supports mouse pointer!​
Download/build a Linux rootfs for your flavour of linux
Now, you need the Ubuntu/Debian/Other linux file system for your Phone's processor. Like most of the Android phones, Milestone 2 uses an ARM processor. And Ubuntu offers full support for ARM processors. It is so easy to build ubuntu for ARM(OMAP) platform using rootstock/bootstrap method. I used rootstock method for Ubuntu as explained here.
PS: For your first time, make sure you build, "Ubuntu Lucid" (just use the --seed/-s parameter of rootstock command. I was not able to use 11.04(Natty). Once you get Lucid to work, you can surely try yourself for the other versions! )​
Create a mountable .img file with a size suited for you
From rootstock, you will get a .tgz file! You will need to convert this to a mountable .img file.
In order to create an empty ubuntu.img file, use the followed command in your ubuntu-desktop's terminal; the last arguement (2048) specifies size of the Ubuntu rootfs (If you need much disk space when you are in ubuntu, use a large value here. Normally 2GB will be sufficient for you; even with GUI/VNC).
Code:
dd if=/dev/zero of=ubuntu.img bs=1MB count=0 seek=2048
Next, format our empty ubuntu.img with a suitable ext2/ext3/ext4 file system!
For Milestone 2, you should use ext3 (I think it does not support ext2). ext4 is supported only in Gingerbird+. So, you should use the appropriate command based on your mobile
Code:
mkfs.ext2 -F ubuntu.img
mkfs.ext3 -F ubuntu.img
mkfs.ext4 -F ubuntu.img
You can find out the suitable file system by opening Connectbot in your mobile and entering the followed command. In the output, look for words ext2/ext3/ext4!
Code:
su
mount
Once you format ubuntu.img with appropriate file system. We should temporarily mount the ubuntu.img in a somewhere and we should extract the armel-rootfs-xx.tgz to it. You can use these commands
Code:
sudo mount -o loop ubuntu.img /mnt
sudo tar -C /mnt -zxf armel-rootfs--xx.tgz
sudo umount /mnt
Download(and modify) or create a Shell script for automatically mounting your Chroot image
This is the most important part, we have to run a set of commands in our android shell to get into the ubuntu. To make things easier, we will write these command-sequence in a shell script, and whenever we need we simple call this script. Cool isn't it?. Basically this is what this script should do:
Code:
1. Check if there exists an ubuntu.img file as we specify in command line
2. Create a loop device with the ubuntu.img - ie. Make android(linux) believe that ubuntu.img is a mountable device.
3. Mount the newly created loop device to a folder. My script mounts the image to /data/local/chrootos
4. Set some environment variables in the shell
5. Mount the [I]devpts, proc, sysfs[/I] for the ubuntu!
6. Run the Chroot command. This command actually changes the root of file system to a new directory we specify. ie. we fake [B]/data/local/chrootos[/B] as the rootfs![B]/[/B]
Create a folder in your Phone's SD Card and copy one or more(If you want to choose between: Debian/Ubuntu/Puppy/etc) .img files and your shell script for booting linux into it.
Create a folder named .chroot in your SD Card. If you have a "." as the first character, this folder will be hidden in the Android File Browser. And will avoid you accidentally modifying these files.​
Get into your Phone's Shell through ConnectBot / USB-ADB / Terminal Emulator
Enter su in the terminal to get root access
Remount your Android filesystem to get write access to your phones
By default, the android file system is read only. So in order to write to the files sytem, we have to remount it with the following command.
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
Copy your bootscript to /system/bin so that you can easily start your LinuxIf you have downloaded my bootscript, the file name will be bl - short for boot linux. So, once you copied you will have your shell script at /system/bin/bl. Once we copy the shell script to the bin directory, it will work as a shell command.​
Start your linux and customize it
If you have done everything correctly so far, you can now boot into your ubuntu.img with the following command. Note that you do not need to specify the full file name "ubuntu.img".
Code:
bl ubuntu
Start your linux and customize it
If Chroot was a success, you will see the ubuntu shell prompt. And then you can start installing more stuff, etc. [email protected]:​
Downloads & Screenshots
Screenshots: http://goo.gl/PzVI0
My Shell Script for starting linux: http://goo.gl/il3nJ
My ubuntu.img: Coming Soon​Password
Code:
arunraj.in
Common Errors
The most common error will be when we are dealing with the "loop device". Because, according to the apps installed in your device, there may not be a free loop device available. If you are facing errors, feel free to ask me and I will try and help!​
Thanks, man! When I have time I'm gonna try it out.
Sent from my Milestone 2 XDA App
thanks for tutorial. will try this soon
Script didn't work :/
Gongui20 said:
Script didn't work :/
Click to expand...
Click to collapse
Do you get any error message?
Thanks !
It's very interesting.I will try it when I have some free time.
echo "Linux Chrooter: Chroot!"
chroot $mnt /bin/bash
Click to expand...
Click to collapse
/bin/bash didnt exist or something like that.
Gongui20 said:
/bin/bash didnt exist or something like that.
Click to expand...
Click to collapse
I think there was no free loop device available for mounting the image.
could run these commands as root and send me the output(the txt files created)?
Code:
mount > mount-list.txt
losetup -f > losetup1.txt
losetup /dev/block/loop1 /sdcard/.chroot/ubuntu.img > losetup2.txt
losetup1.txt
/dev/loop0
Click to expand...
Click to collapse
mount-list.txt
rootfs / rootfs ro,relatime 0 0
tmpfs /dev tmpfs rw,relatime,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
proc /proc proc rw,relatime 0 0
sysfs /sys sysfs rw,relatime 0 0
none /acct cgroup rw,relatime,cpuacct 0 0
tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/mmcblk1p21 /system ext3 ro,noatime,nodiratime,barrier=1,data=ordered 0 0
/dev/block/userdata /data ext3 rw,nosuid,nodev,noatime,nodiratime,errors=continue,barrier=1,data=ordered 0 0
/dev/block/cache /cache ext3 rw,nosuid,nodev,noatime,nodiratime,errors=continue,barrier=1,data=ordered 0 0
tmpfs /tmp tmpfs rw,relatime,size=2048k 0 0
/dev/block/pds /pds ext3 rw,nosuid,nodev,noatime,nodiratime,barrier=1,data=ordered 0 0
/dev/block/preinstall /preinstall ext3 rw,nosuid,nodev,noatime,nodiratime,barrier=1,data=ordered 0 0
/dev/block/vold/179:1 /mnt/sdcard vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:1 /mnt/secure/asec vfat rw,dirsync,nosuid,nodev,noexec,relatime,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /mnt/sdcard/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0
/dev/block/dm-0 /mnt/asec/com.rovio.angrybirdsrio-1 vfat ro,dirsync,nosuid,nodev,noexec,relatime,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/dm-1 /mnt/asec/com.rovio.angrybirds-1 vfat ro,dirsync,nosuid,nodev,noexec,relatime,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/dm-2 /mnt/asec/org.xbmc.android.remote-2 vfat ro,dirsync,nosuid,nodev,noexec,relatime,uid=1000,fmask=0222,dmask=0222,codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
Click to expand...
Click to collapse
losetup2.txt is empty.
Yeap, I faced the same error when I was doing it. If you notice the mount-list.txt, you can see that AngryBirds application is using /dev/block/dm-0 and /dev/block/dm-1. /dev/block/dm-2 is also in use.
You could try this:
Edit the script bl and replace /dev/block/loop1 in the script with /dev/block/dm-3. It might just do the trick.
Hey check this out:
http://androlinux.com/android-ubuntu-development/how-to-install-ubuntu-on-android/
Works on Asus TF101
Hi
Thanks for the guide. I got it running on my Asus TF101. I had to modify your script slightly :
The /system filesystem is mounted as ext4 (not yaffs)
The /system fs is mounted from /dev/block/mmcblk0p1
/dev/block/mmcblk0p1 /system ext4 rw,relatime,barrier=1,data=ordered 0 0
Click to expand...
Click to collapse
Apart from that no other changes were necessary.
Need Help!!!!
hi ~ I just put the img file in /sdcard/.chroot/.linux/ ,named ubuntu.img and edited the Script
but when I run the script ,there is a problem in line:
mount -t ext3 /dev/block/loop1 $mnt
it said:
Device or resourc busy
I have tried thousand ways and cost 5 days,but I can't solve it.....
can you help me?
sorry for my poor english...
losetup1.txt
/dev/loop0
I also replace /dev/block/loop1 in the script with /dev/block/dm-5,but I need use command :"mknod /dev/block/dm-5 b 7 0" first.
the error Screenshots and mount
echoeye said:
the error Screenshots and mount
Click to expand...
Click to collapse
Hi,
Which is your Mobile ?
Also -- Did you see reply #7, #8 on page 1 of this thread ?
There is another way to mount it without using the option -oloop
If you look into /dev/block you are going to find 8 loop devices, from loop0 to loop7. As android doesn't use that many loop devices it should be enough. You can mount it like this:
Code:
losetup /dev/block/loop7 /sdcard/ubuntu/ubuntu.img
mount -t ext3 /dev/block/loop7 /mnt/ubuntu
If your phone doesn't have a free loop device, you can create a new one, like this:
Code:
mknod /dev/block/loop99 b 7 99
losetup /dev/block/loop99 /sdcard/ubuntu/ubuntu.img
mount -t ext3 /dev/block/loop99 /mnt/ubuntu
The problem is you have apps installed to the sd card (and getting mount points busy), when it happens here I just open Titanium Backup and move External apps to internal.
No matter what I tried here, this script wouldn't work... So I used DebOnDroid app from defy forum, and when updated to GB. The app stopped working also, so I moved the ubuntu.img to /data/local/ and mounted from there, works like a charm!
This is the script I'm using /system/bin/buntu:
Code:
export mnt=/data/local/debian
export PATH=$PATH:/bin:/sbin:/usr/bin:/usr/sbin
export TERM=linux
export HOME=/root
export USER=root
echo "Linux Chrooter: Setup Networking"
sysctl -w net.ipv4.ip_forward=1
#necessary mount points
busybox mount -o loop $mnt/../debian.img $mnt
busybox mount -t devpts devpts $mnt/dev/pts
busybox mount -t sysfs sysfs $mnt/sys
busybox mount -t proc proc $mnt/proc
#extra mount points
busybox mount -o rw /system $mnt/mnt/s
busybox mount /data $mnt/mnt/d
busybox mount /sdcard $mnt/mnt/sd
echo "Linux Chrooter: Chroot!"
chroot $mnt /bin/bash
umount $mnt/sys
umount $mnt/proc
umount $mnt/dev/pts
umount $mnt/mnt/*
#somehow the commented lines didn't work...
#umount $mnt/mnt/d
#umount $mnt/mnt/s
umount $mnt
PS: when I copy a binary from ubuntu to /system/bin and chmod, it won't exec, why?
Sent from my Milestone 2 XDA App
r2beta0 said:
There is another way to mount it without using the option -oloop
If you look into /dev/block you are going to find 8 loop devices, from loop0 to loop7. As android doesn't use that many loop devices it should be enough. You can mount it like this:
Code:
losetup /dev/block/loop7 /sdcard/ubuntu/ubuntu.img
mount -t ext3 /dev/block/loop7 /mnt/ubuntu
If your phone doesn't have a free loop device, you can create a new one, like this:
Code:
mknod /dev/block/loop99 b 7 99
losetup /dev/block/loop99 /sdcard/ubuntu/ubuntu.img
mount -t ext3 /dev/block/loop99 /mnt/ubuntu
Click to expand...
Click to collapse
thank you very very very very very very very very very very very very very very very much!!!!
I made it!!!
oh yeah!~~~~
How is this different from using an app like linuxinstaller? Well, apart from doing it manually and the nerdy way of course?
Is it safer? I am intrigued by the possibility of having a working ubuntu in my pocket, but am wondering if I should go this way or try the app.
great guide though... i think this is the push i needed to finally try this.
Nice job! but i got this..
Nice job!
I got this
#bl ubuntu
bl: permission denied
#
;/

[DEV] Get Ubuntu running on SGS2 (via chroot)

http://forum.xda-developers.com/showthread.php?t=1028464
Anyone tried to do that on our SGS2?
I've did this already on my Hero and on my Desire... I have no time right now, but I will try to get it running.
I'm sure it will be super fast...
Edit:
http://galaxytabhacks.com/galaxy-ta...tall-ubuntu-linux-on-galaxy-tab-10-1-tabuntu/
They already did it on the Galaxy Tab. It's time to get it running on the SGS2!
Tried it and the LXDE image is working... very fast.
I can open the file manager and everything expect the Browser... also installed firefox but couldn't run it! I get the error:
Xlib: extension “RANDR” missing on display “:1.0″.
I think this has something to do with VNC... will try to reinstall tightvnc and see if it helps.
I'm surprised that nobody is interested in this...
I'd look at it at some point, other than the fact O2 cannot organise themselves to send out my SGS2.
I think a lot of people are still waiting on phones to arrive...
pulser_g2 said:
I'd look at it at some point, other than the fact O2 cannot organise themselves to send out my SGS2.
I think a lot of people are still waiting on phones to arrive...
Click to expand...
Click to collapse
pulser_g2, I think it's time to get that chroot working! I've tried again with another build with no luck. I think we need a special kernel... back when I had my desire I remember that it worked only with very few custom kernels.. because they had some parameter enabled but I can't remember which!
Under this link you can see people did the same on the Galaxy Tab 10.1:
http://galaxytabhacks.com/galaxy-ta...tall-ubuntu-linux-on-galaxy-tab-10-1-tabuntu/
On our SGS2 it would be epic... when we get it working we can just connect via VNC from our desktops to our SGS2 and use it as a PC!! Or via the viewer on the SGS2 itself... screen is big enough.
I hope someone can move this thread to the DEV forum so we can start working on it.
I started to work on running Ubuntu 11.04 on the SGSII yesterday, from scratch as I didn't find an existing way to do it. As I may need some kernel modules, I'm creating a virtualbox environment to cross-compile them.
I managed to run Ubuntu some time ago on my Xperia X10 so I already have some background on the subject so it might not take months to have it working.
I got debian running in chroot and managed to get xfce going. Not real useful at the moment but at least it works.
I just had to root the phone and followed the guide at saurik.com
Sent from my GT-I9100 using XDA App
Just got Ubuntu 10 running on my S2, loop device and ext4 is supported by the default kernel !
Hmm, strange... do you have root? I'm on VillainROM 1.4 with latest CF-ROOT and it doesn't work exactly because of loop devices!
d3sm0nd said:
Hmm, strange... do you have root? I'm on VillainROM 1.4 with latest CF-ROOT and it doesn't work exactly because of loop devices!
Click to expand...
Click to collapse
I'm using an insecure kernel with default firmware.
For loop device, you need to 'losetup /dev/block/loop0 /path_to_image' and not using /dev/loop0 (returned by default by losetup but this is wrong)
and after that 'mount -t ext4 /dev/block/loop0 /my_mount_dir'
ext4 is supporting ext2/ext3 too
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Still won't work. Here the script i'm using:
#modprobe ext4
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
export kit=/sdcard/ubuntu
export bin=/system/bin
if [ ! -d /data/local/ubuntu ]
then
mkdir /data/local/ubuntu
fi
export mnt=/data/local/ubuntu
export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH
export TERM=linux
export HOME=/root
mknod /dev/block/loop0 b 7 0
losetup /dev/block/loop0 /sdcard/ubuntu/ubuntu.img
mount -t ext4 /dev/block/loop0 /data/local/ubuntu
#mount -o loop,noatime -t ext4 $kit/ubuntu.img $mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
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 " "
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
losetup -d /dev/block/loop0
Click to expand...
Click to collapse
Sent from my GT-I9100 using XDA App
My self Debian image is working fine, this is the script I'm using
Code:
#!/system/bin/sh
mnt=/mnt/sdcard/debian/mountpoint
img=/mnt/sdcard/debian/debian.img
export PATH="$PATH":/usr/bin:/usr/sbin:/bin
export TERM=linux
export HOME=/root
export USER=root
export LC_ALL=C
[ -e "$mnt"/bin/bash ] || busybox mount $img "$mnt"
busybox mount -t proc proc "$mnt"/proc
busybox mount -t sysfs sysfs "$mnt"/sys
busybox mount -t devpts devpts "$mnt"/dev/pts
busybox mount -o bind /data "$mnt"/data
busybox mount -o bind /sdcard "$mnt"/sdcard
echo ""
echo " Debian GNU/Linux"
echo ""
busybox chroot "$mnt" /bin/bash
echo ""
echo "Dismounting..."
echo ""
busybox umount "$mnt"/sdcard
busybox umount "$mnt"/data
busybox umount "$mnt"/dev/pts
busybox umount "$mnt"/proc
busybox umount "$mnt"/sys
echo -e "Dismount debian.img [y/N]? \\c"
read fi;
[ "$fi" = "y" ] && busybox umount "$mnt"
h t t p://img13.imageshack.us/img13/2932/sgs2debian.png
d3sm0nd said:
Still won't work. Here the script i'm using:
Sent from my GT-I9100 using XDA App
Click to expand...
Click to collapse
I'm running as root ("su") so I can access /dev without trouble.
mknod is useless in your script, as loop device is already created.
The script I'm using (ugly as hell bot no time to optimize it) :
Code:
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
mkdir $mnt
losetup /dev/block/loop0 /sdcard/ubuntu/ubuntu.img
mount -t ext4 /dev/block/loop0 /data/local/mnt
mount -t devpts devpts $mnt/dev/pts
mount -t proc proc $mnt/proc
mount -t sysfs sysfs $mnt/sys
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 " "
chroot $mnt /bin/bash
Still won't work, mate
I also type su and I have root...
bootubuntu
mkdir failed for /data/local/mnt, File exists
losetup: /dev/block/loop0
Toolbox!
Toolbox!
Toolbox!
Toolbox!
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/mnt/etc/resolv.conf: directory nonexistent
bootubuntu: cannot create /data/local/mnt/etc/resolv.conf: directory nonexistent
Setting localhost on /etc/hosts
bootubuntu: cannot create /data/local/mnt/etc/hosts: directory nonexistent
READY TO ROCK AND ROLL BABY!
chroot: can't execute '/bin/bash': No such file or directory
Click to expand...
Click to collapse
Which ROM are you using? And do you have CF-ROOT kernel?
athurh said:
My self Debian image is working fine, this is the script I'm using
Code:
#!/system/bin/sh
mnt=/mnt/sdcard/debian/mountpoint
img=/mnt/sdcard/debian/debian.img
export PATH="$PATH":/usr/bin:/usr/sbin:/bin
export TERM=linux
export HOME=/root
export USER=root
export LC_ALL=C
[ -e "$mnt"/bin/bash ] || busybox mount $img "$mnt"
busybox mount -t proc proc "$mnt"/proc
busybox mount -t sysfs sysfs "$mnt"/sys
busybox mount -t devpts devpts "$mnt"/dev/pts
busybox mount -o bind /data "$mnt"/data
busybox mount -o bind /sdcard "$mnt"/sdcard
echo ""
echo " Debian GNU/Linux"
echo ""
busybox chroot "$mnt" /bin/bash
echo ""
echo "Dismounting..."
echo ""
busybox umount "$mnt"/sdcard
busybox umount "$mnt"/data
busybox umount "$mnt"/dev/pts
busybox umount "$mnt"/proc
busybox umount "$mnt"/sys
echo -e "Dismount debian.img [y/N]? \\c"
read fi;
[ "$fi" = "y" ] && busybox umount "$mnt"
h t t p://img13.imageshack.us/img13/2932/sgs2debian.png
Click to expand...
Click to collapse
Can you upload or give me a link of your image? Thanks very much
I'm using the image from here:
http://galaxytabhacks.com/galaxy-ta...tall-ubuntu-linux-on-galaxy-tab-10-1-tabuntu/
Maybe it's because of the image..
Sent from my GT-I9100 using XDA App
d3sm0nd said:
I'm using the image from here:
http://galaxytabhacks.com/galaxy-ta...tall-ubuntu-linux-on-galaxy-tab-10-1-tabuntu/
Maybe it's because of the image..
Sent from my GT-I9100 using XDA App
Click to expand...
Click to collapse
type :
losetup /dev/block/loop0 /sdcard/ubuntu/ubuntu.img
mount -t ext4 /dev/block/loop0 /data/local/mnt
(replace ubuntu.img and /data/local/mnt with your current image/dir)
if '/data/local/mnt' is empty then your image is broken.
Also type 'dmesg' to check why it's broken.
extract zip to sdcard
run 'sh /sdcard/debian/install.sh' to copy the script to /system/xbin
'debianboot' to enter chroot
the prompt will change to debian if everything goes well
type 'alias' to see some shortcuts
'startvnc' starts vncserver
host: localhost
password: debian
port: 5901
http://www.multiupload.com/9R1AKKTR6D
debian-SGS2.zip
md5 c63c7953dab56c375f6748baecc2915c
Using the HD2 port as basis, I got Ubuntu 11.04 running on our Galaxy SII :
Some applications don't run in the menus but most of them are ok (Firefox 5 at first!).
As Unity requires hardware acceleration, I was unable to enable it for now.
As usual VNC is needed, so it's not very smooth to use, but it seems to me that 11.04 is smoother than 10.10 on my device.
alx5962 said:
Using the HD2 port as basis, I got Ubuntu 11.04 running on our Galaxy SII :
Some applications don't run in the menus but most of them are ok (Firefox 5 at first!).
As Unity requires hardware acceleration, I was unable to enable it for now.
As usual VNC is needed, so it's not very smooth to use, but it seems to me that 11.04 is smoother than 10.10 on my device.
Click to expand...
Click to collapse
Could you please upload the image somewhere?
hey guys me and anantshri got BT5 running on SGS2!!!
check it out here:
[DEV] BACKTRACK 5 on SGS2 {chroot}

[HowTo] homebrew your custom Ubuntu image for Iconia A500

I'm posting this in a new thread as requested...
There is a simple way to preapare a custom Ubuntu image file compiled for ARMEL with only the packages and functionalities you need.
For this procedure you will need
- a linux machine with working ADB (I tried it on a x64 ubuntu machine)
- a rooted Iconia A500 with busybox installed
- a little knowledge about what you're doing, but just a little.
1. Install Rootstock
on your linux machine, open up the terminal and type
Code:
sudo apt-get install rootstock
If you use at least Ubuntu Karmic, it should automatically pull all the dependencies, otherwise you'll have to manually install Qemu and a newer debootstrap.
2. Create the tarball
you're ready to download the packages and prepare the tarball.
Remember: rootstock doesn't automatically include a kernel, so you'll have to manually include it in the package list
Here's the syntax for a basic run (run "man rootstock" for all the parameters):
Code:
sudo rootstock \
--fqdn [COLOR="Red"]<YOUR_CHOSEN_HOSTNAME>[/COLOR] \
--login [COLOR="Red"]<YOUR_CHOSEN_USERNAME>[/COLOR] \
--password [COLOR="Red"]<YOUR_CHOSEN_PASSWORD>[/COLOR] \
--imagesize [COLOR="Red"]<IMAGE_SIZE_IN_GB>[/COLOR]G \
--seed [COLOR="Red"]<LIST_OF_PACKAGES_SEPARATED_BY_COMMAS>[/COLOR]
Here's an example for a 2GB image with OMAP kernel and a complete Kubuntu-desktop distribution:
Code:
sudo rootstock \
--fqdn ubuntu \
--login ubuntu \
--password ubuntu \
--imagesize 2G \
--seed linux-image-omap,kubuntu-desktop
In --seed you can specify whatever package you want. You could start with just the kernel and build-essential, then add whatever you need. A good start could be like this:
Code:
--seed linux-image-omap,build-essential,lxde,tightvncserver,openssh-server
This will give you a running ubuntu with a very light, performance-oriented desktop environment (lxde) with ssh and vnc.
Remember: It's still possible to add new packages with apt-get from chroot whenever you want.
Once you have chosen the packages you want, you just have to press enter and rootstock will automatic download the packages and prepare the tarball.
You'll end up with a file named "armel-rootfs-<TIMESTAMP>.tgz"
3. Prepare the img file
This is very easy and quick:
Code:
dd if=/dev/zero of=arm_ubuntu.img bs=1MB count=0 seek=[COLOR="Red"]<SIZE_IN_MB>[/COLOR]
The seek parameter defines the size in MB of your image. make it as large as you want, it should at least be as big as the size you selected for the tarball (2G in my example).
Remember: 1 GB = 1024 MB
Now we format the image. Since the Iconia supports ext4 file system, we can use it!
Code:
mkfs.ext4 -F arm_ubuntu.img
You may want to pass other flags to define advanced options, labels and reserved blocks, but this is the least you need to make it work.
4. Decompress
Now we have to mount the img file in a loop:
Code:
sudo mount -o loop arm_ubuntu.img /mnt
and decompress the tarball into it.
Code:
sudo tar -C /mnt -zxf armel-rootfs-<TIMESTAMP>.tgz
It's done!
[OPTIONAL]
This is the right time to put custom scripts in /mnt/usr/bin like this one to start the vnc server with the correct geometry for the A500:
Code:
#!/bin/bash
rm -fr /tmp/.X1*
vncserver -geometry 1280x752
NB: the A500 screen is 1280x800, but the honeycomb statusbar (1280x48px) is always on top. To avoid panning to show the ubuntu menu bar, we just subtract those 48 pixels from the ubuntu vertical resolution.
Now we just umount it.
Code:
sudo umount /mnt
5. Load on the tablet and get it running
The script to mount and boot is derived from the one in the Backtrack 5 Thread.
Load the img file on the tablet with
Code:
adb push arm_ubuntu.img /sdcard/ubuntu/arm_ubuntu.img
It will take a loooong time and there's no progress bar, so just have faith.
Next, we prepare the boot script. The only thing you need to do is to put your username in (the one you chose in rootstock).
Code:
perm=$(id|cut -b 5)
if [ "$perm" != "0" ];then echo "This Script Needs Root! Type : su";exit;fi
mount -o remount,rw /dev/block/mmcblk0p5 /system
export kit=/sdcard/ubuntu
export bin=/system/bin
export mnt=/data/local/mnt
mkdir -p $mnt
export PATH=$bin:/usr/bin:/usr/local/bin:/usr/sbin:/bin:/usr/local/sbin:/usr/games:$PATH
export TERM=linux
export USER=[B][COLOR="Red"]<THE_USERNAME_YOU_CHOSE_BEFORE>[/COLOR][/B]
export HOME=/home/$USER
export stor=$mnt/home/$USER/storage
export sdcard=$stor/sdcard
export extsd=$stor/external_sd
export usb=$stor/USB_storage
if [ -b /dev/loop2 ]; then
echo "Loop device exists"
else
busybox mknod /dev/loop2 b 7 0
fi
mount -o loop,rw,noatime -t ext4 $kit/arm_ubuntu.img $mnt
echo "mounting storage devices in $stor..."
mkdir -p $sdcard
mkdir -p $extsd
mkdir -p $usb
busybox mount --bind /mnt/sdcard $sdcard
busybox mount --bind /mnt/external_sd $extsd
busybox mount --bind /mnt/usb_storage $usb
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 "nameserver 8.8.8.8" > $mnt/etc/resolv.conf
echo "127.0.0.1 localhost ubuntu" > $mnt/etc/hosts
busybox chroot $mnt /bin/bash
echo "Shutting down Ubuntu ARM for Iconia A500"
umount $sdcard
umount $extsd
umount $usb
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
Once done, we can save the file as startubuntu and adb push it to the tab. (the same folder as the img is fine)
Done! We run it by invoking the startubuntu script from the android terminal emulator (must be in superuser mode)
I hope you found this how-to useful.
And we use this distro via our tablets ssh client?
EDIT: sorry my bad Never read code while tired
Hi,
i am running ubuntu natty.
and i got this error:
...
Setting up wireless-crda (1.13) ...
Setting up linux-image-2.6.38-8-omap (2.6.38-8.42) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.38-8-omap
/bin/df: Warning: cannot read table of mounted file systems: No such file or directory
Not sure if it is fatal. rootstock has created successful the rootfs
reida010 said:
Hi,
i am running ubuntu natty.
and i got this error:
...
Setting up wireless-crda (1.13) ...
Setting up linux-image-2.6.38-8-omap (2.6.38-8.42) ...
Running depmod.
update-initramfs: Generating /boot/initrd.img-2.6.38-8-omap
/bin/df: Warning: cannot read table of mounted file systems: No such file or directory
Not sure if it is fatal. rootstock has created successful the rootfs
Click to expand...
Click to collapse
Same happened to me. Totally not fatal. the tarball is good.
For everyone out there:
I would like your help with testing. I have a crash on start problem with firefox in all the images I tried. Does any of you have the same issue?
Hi,
i get
Code:
Loop device exists
then i did
Code:
echo "$kit/arm_ubuntu.img"
and i get
Code:
/sdcard/ubuntu/arm_ubuntu.img
but then i get
Code:
mount: cannot setup loop device: No such file or directory
any ideas?
Because of firefox.
i read a while ago a tweet about a bug in meego and ubuntu in firefox for arm.
when it is this bug then you should try firefox trunk because it is fixed.
but i cannot refind it :-(
edit:
bugzilla.mozilla.org/show_bug.cgi?id=634594
I was searching for that today, thanks mate. Nice Tutorial =D
reida010 said:
Hi,
but then i get
Code:
mount: cannot setup loop device: No such file or directory
any ideas?
edit:
bugzilla.mozilla.org/show_bug.cgi?id=634594
Click to expand...
Click to collapse
i have the same problem. You should make loop file not in /mnt/sdcard, but in /mnt/external_sd.
Kh_Shad said:
i have the same problem. You should make loop file not in /mnt/sdcard, but in /mnt/external_sd.
Click to expand...
Click to collapse
That would apply only if you put the image file in the external MicroSD, if you have put it in the internal memory (as described in the tutorial) the path is /mnt/sdcard. Also, the speed of the internal memory is better.
Hi,
i found out how i can make it work
but it's strange.
i don't works when i do
Code:
sh ./startubuntu
but with this it works fine:
Code:
/system/bin/sh ./startubuntu
Is this maybe because i didn't use adb.
Someone told me that copy paste might change the permissions (what the ****! really?)
on my tablet startubuntu is not executable.
And it doesn't change anything when i do chmod 755 startubuntu
but after moving it to /system/bin chmod works fine.
After then i can always just run
Code:
su
startubuntu
and ubuntu is up and running.
(many thanks by the way :-D)
Sorry guys, will this method produce a native Ubuntu install similair to how Wubi works? Or is this like the chroot methods were we have to VNC into the distro from within Android?
It is native!!!
but you need vnc to access the xserver
On my n900 i used xephyr but i don't think this is working for android because afaik they don't use X. (n900 is so cool for linux geeks ;-D)
edit:
if you mean with 'native' that it will replace android -> no -> it is a chroot
Yeah that answered my question. Thank you
I'm not going to bother until there is a native distro running with full system resources. I guess with the current bootloader situation that day may never come :-(
It failed in creating the image for me... and it seems like a error in the package linux-image-2.6.38-8-omap
[TRIM]
Need to get 37.4 MB of archives.
After this operation, 98.3 MB of additional disk space will be used.
Get:1 //ports.ubuntu.com/ubuntu-ports/ natty/main wireless-crda armel 1.13 [15.0 kB]
Get:2 //ports.ubuntu.com/ubuntu-ports/ natty/main linux-image-2.6.38-8-omap armel 2.6.38-8.42 [19.8 MB]
Get:3 //ports.ubuntu.com/ubuntu-ports/ natty/main devio armel 1.2-1build1 [16.9 kB]
Get:4 //ports.ubuntu.com/ubuntu-ports/ natty/main flash-kernel armel 2.28ubuntu19 [13.1 kB]
Get:5 //ports.ubuntu.com/ubuntu-ports/ natty/universe kubuntu-mobile armel 1.218 [2720 B]
Get:6 //ports.ubuntu.com/ubuntu-ports/ natty/main linux-firmware all 1.52 [17.5 MB]
Get:7 //ports.ubuntu.com/ubuntu-ports/ natty/main linux-image-omap armel 2.6.38.8.22 [2394 B]
Fetched 37.4 MB in 5min 29s (113 kB/s)
Selecting previously deselected package wireless-crda.
(Reading database ... 9309 files and directories currently installed.)
Unpacking wireless-crda (from .../wireless-crda_1.13_armel.deb) ...
Selecting previously deselected package linux-image-2.6.38-8-omap.
Unpacking linux-image-2.6.38-8-omap (from .../linux-image-2.6.38-8-omap_2.6.38-8.42_armel.deb) ...
Done.
Selecting previously deselected package devio.
Unpacking devio (from .../devio_1.2-1build1_armel.deb) ...
Selecting previously deselected package flash-kernel.
Unpacking flash-kernel (from .../flash-kernel_2.28ubuntu19_armel.deb) ...
Selecting previously deselected package kubuntu-mobile.
Unpacking kubuntu-mobile (from .../kubuntu-mobile_1.218_armel.deb) ...
Selecting previously deselected package linux-firmware.
Unpacking linux-firmware (from .../linux-firmware_1.52_all.deb) ...
Selecting previously deselected package linux-image-omap.
Unpacking linux-image-omap (from .../linux-image-omap_2.6.38.8.22_armel.deb) ...
Setting up wireless-crda (1.13) ...
Setting up linux-image-2.6.38-8-omap (2.6.38-8.42) ...
Running depmod.
Failed to run depmod
dpkg: error processing linux-image-2.6.38-8-omap (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up devio (1.2-1build1) ...
No apport report written because MaxReports is reached already
Setting up flash-kernel (2.28ubuntu19) ...
Setting up kubuntu-mobile (1.218) ...
E: Second stage build in chroot failed !
E: Please see the log to see what went wrong.
Setting up linux-firmware (1.52) ...
I: Cleaning up...
dpkg: dependency problems prevent configuration of linux-image-omap:
linux-image-omap depends on linux-image-2.6.38-8-omap; however:
Package linux-image-2.6.38-8-omap is not configured yet.
dpkg: error processing linux-image-omap (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Errors were encountered while processing:
linux-image-2.6.38-8-omap
linux-image-omap
E: Sub-process /usr/bin/dpkg returned an error code (1)
I: Umounting temporary Image
I keep getting a failure also!
Ceck out both of my log files below.
tholmewood said:
Sorry guys, will this method produce a native Ubuntu install similair to how Wubi works? Or is this like the chroot methods were we have to VNC into the distro from within Android?
Click to expand...
Click to collapse
It is a chroot/vnc method, currently the only method available to run linux on this device, because of the locked bootloader... I seriously hope for a chance to dual boot in the future.
i was wondering what packages are needed in order to create an ubuntu netbook Edition? Is the A500 powerful enough for that kind of interface?
Thought you guys might be interested in this post.
http://forum.xda-developers.com/showpost.php?p=15156543&postcount=64
Have fun!
@p-ille
Have you tried firefox daily?
Did it work?
reida010 said:
@p-ille
Have you tried firefox daily?
Did it work?
Click to expand...
Click to collapse
Not really, my job is killing me these days... I'll try it asap!
sent from my Iconia A500
p-ille said:
Not really, my job is killing me these days... I'll try it asap!
sent from my Iconia A500
Click to expand...
Click to collapse
You realize what a pain that tutorial is to follow? Could you please provide a pre built image at least if asking for scripts is probably way too much?

[Q] does vegacomb support loop devices / chroot ubuntu?

hey guys, im trying to get chrooted ubuntu running on my vegacomb update 3 vega and am having problems.
Im following the guide here:
http://androlinux.com/android-ubuntu-development/how-to-install-busybox-on-your-android/
and keep getting the following errors:
/mnt/sdcard/ubuntu # bootubuntu
losetup: /dev/block/loop1
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
net.ipv4.ip_forward = 1
Setting /etc/resolv.conf to Google Open DNS 8.8.8.8 and 8.8.4.4
/system/bin/bootubuntu: line 22: can't create /data/local/ubuntu/etc/resolv.conf: nonexistent directory
/system/bin/bootubuntu: line 23: can't create /data/local/ubuntu/etc/resolv.conf: nonexistent directory
Setting localhost on /etc/hosts
/system/bin/bootubuntu: line 25: can't create /data/local/ubuntu/etc/hosts: nonexistent directory
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
Is it that vegacomb doesnt support loop devices:? Or am i missing something else? Ive checked and i have busybox installed and working correctly, but that doesnt seem to have changed anything?
Thoughts?
The vega does support loop devices, infact I have that setup running on my vega on vegacomb right now!
In order to get it working download the new scripts from the ubuntu on xoom section of the androlinux site, that worked for me fine!
Bear in mind, the version of ubuntu supplied in the image file is something like 9.10 which is very old, and the image is only 2gb which doesn't leave enough space for updating. Consider following their guide for building your own image.
Anyway, best of luck, I had to get over a few problems when installing it myself, but that may have been related to my setup, so if you have any problems I will keep an eye on this thread!
Happy Ubuntuing
Thanks for the reply, I will try the xoom scripts and see how I get on. I saw the section about building my own but wanted to try and easy 9.10 install first before building my own xubuntu 11.10. Il let you knw how I get on
Could you post your bootubuntu script up please?
I have tried lots of different loop device numbers but am getting no where!
I haven't altered my bootubuntu script at all from the default xoom one, I will post it at the bottom!
There are a few things worth checking for that may help your problems, check that the ubuntu folder on your sd card with the .img file in uses a lower case U, that caught me out the first time as my vega keyboard auto-capitalises.
Also did your ubuntu.sh script run without errors? It worked fine on mine with the old ubuntu.sh and the new bootubuntu script but you may want to try running the xoom shell script.
Hope this helps!
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 " "
echo "VERSION 0.9.5 BUGFIX April 2nd 2011"
echo "Brought to you for the Motorola Xoom by Thomas Sohmers, and Ubuntu by Canonical and the open source community!"
echo "This version is for people experiencing errors around step 7 of my Ubuntu install. Hope this fixes everything! If not, feel free to contact me. Sorry for the delay."
echo " "
echo "Ubuntu is now loaded and you should see a '[email protected]' terminal entry below thisÔøΩ if you do not, than Ubuntu has not successfully loaded. Have fun!"
echo " "
busybox chroot $mnt /bin/bash
#After exit command is executed clear it all up
echo " "
echo "Shutting down Ubuntu"
vncserver -kill :1
umount $mnt/dev/pts
umount $mnt/proc
umount $mnt/sys
umount $mnt
Right i must be missing something, i cant find the xoom section on the website so have tried your bootubuntu script in my folder but it still fails.
Can you post me a link to the xoom section of the site please so i can start over in case i missed something earlier in the process?
Thanks
right im missing something, even tried this setup here;
http://trsohmers.com/2011/03/06/how-to-run-ubuntu-on-the-motorola-xoom/
and still no luck. I have a rooted device but its almost as if the scripts are not running as root, i get permission denied messages when chmod 4777 and that shouldnt happen as root.
Im running 1.17 of busybox, not that it should matter. I am getting sick of this not working, no idea why, thinking i might have to bin vegacomb to at least work out where root might work (ie a simpler rom).
I can't remember the exact process, but I do remember getting this. I think I was missing the root login. Are you running these command as root? I think you have to use
su
Click to expand...
Click to collapse
. I haven't done this for quite some time so can't be 100% certain.
Heya, sorry it's been a while since I've been on the forums, it seems like something has more than likely gone wrong when you ran the ubuntu.sh shell script, can you post the output?
Sent from my X10 using XDA App

Categories

Resources