[DEV] Chroot Ubuntu

Search This thread

ltlollo

Member
Aug 13, 2009
17
1
Sorry about asking something totally different, but is there some way to get USB devices to work?
The main reason I tried this is to connect to the internet using my USB modem and wvdial. I installed wvdial, only to notice that /dev/ doesn't contain most of the commonly used stuff like sda hda and the one I'm looking for, ttyUSB0.
Any work around for this? Any other ext2 file systems that I can use (one that is fully compatible with eeepads usb ports and all).
BTW I don't think I can use the 3G enabler because I got a B80!

try
Code:
#modprobe usbserial && modprobe usb-uhci
then lsusb, you will see
Code:
Bus 00N Device 00N: ID aaaa:bbbb vendor_name
then
Code:
#modprobe usbserial vendor=0xaaaa product=0xbbbb

if you don't see any /dev/ttyUSBX you may need to grub the sources from git and include CONFIG_USB_SERIAL_XXXXXX (where XXXXX is the vendor) as a module.
Actually, i don't know if b80 can boot from a different kernel, but the problem is there, not in the rootfs (IMO)
 
Last edited:

DavidFong

Member
Jan 30, 2010
9
1
www.davidfong.info
I tried upgrading to natty (following information from davidfongs's posts on previous page). I did not get any errors the second time (after doing symlink for upstart workaround). However, I cannot get firefox or chromium to work. Firefox crashes right away. Chromium will retrieve content from website but displays blank page.

Any ideas?
Sadly, I found the same problem (I am using oneiric ocelot, and I upgraded firefox to version 10).

Firefox complains about not being able to access GLX.
Chromium won't run as root.

i must admit, i had no intention of running a web-browser inside of the ubuntu environment. It could be useful for some purposes, I guess. Especially if I could feed the USB through with the post just above (#101). Perhaps Ubuntu on ARM could handle USB encryption keys, such as the Medicare Australia key. That key can be used to login to some Australian government websites, when using Firefox's security settings. However, proprietary software, compiled for x86 Linux but not for ARM, is also required and it is likely that ARM versions of the security packages are not well maintained. I have used SSH on chroot Ubuntu/Android, however.
 
Last edited:

hoshi411

Senior Member
Oct 16, 2011
54
7
Why do we have to go through VNC? Why can't we just use x.org? Are there no geforce drivers for the transformer? are there no generic drivers? Is there really no way to use x.org? VNC is so slow and for devices without sbk we can not use nvflash to get linux booting with a rom....

running xorg directly would take care of all that. We wouldn't even need to reboot and when we were done we could start the android apk session running again....

This is the ultimate solution. How come we are still using vnc servers or nvflashing when we have chroot o_O
 

Top Liked Posts

  • There are no posts matching your filters.
  • 14
    here you go chroot ubuntu

    So you have a working rootfile system like hd2
    put the root file system on sdcard location /sdcard/ubuntu
    place the two files in /sdcard/ubuntu
    (run as root ) just install with -> sh install.sh And READ

    installing vnc

    in ubuntu linux terminal ->

    export USER=root
    vncserver -geometry 1024×750
    nano /root/.bashrc

    Add this to the beginning
    ###########################
    export USER=root
    cd /
    rm -r -f tmp
    mkdir tmp
    cd /
    vncserver -geometry 1280×750
    ########################### ctrl+x to save

    Thanks to,
    aligatro2010 4 resolution
    poltak11 4 helping you guyś with some more info

    now connect with your own password and port 5900 or 5901 ad localhost with VNC Android !!

    Just download the rootfs from the HD2 form

    Ubuntu Chrootenv. <- new
    11
    working

    Alright, confirmed to have this fully working via OP's method. Details follow:

    Get HD2 root filesystem:
    http://xdaforums.com/showthread.php?t=889433
    Download the link (torrent is fast). Extract it and find rootfs.ext2 in the linux folder. Copy that onto your TF and place it in the /sdcard/ubuntu/ directory (it's around 3GB).

    Get OP's scripts:
    Download from the link in the first post. Extract the zip and move the 2 files to the /sdcard/ubuntu/ directory on your TF.

    Alright, now we got what we want.

    Go into terminal emulator on your TF (any should hopefully work... I used BTE Pro).

    Type the following:
    Code:
    su
    Gives you root privileges... note: I'm not sure if this is needed... not too familiar with Android.
    Code:
    cd /sdcard/ubuntu/
    sh ubuntu
    You should now be "chrooted" into the Ubuntu environment. That is, you've changed the root to the Ubuntu root filesystem (don't worry if you don't understand this). It should look a bit like this:
    Code:
    root@localhost:/#

    Now to get up the VNC server so we can view a GUI (make sure you have internet connection at this step!!! We're just going to update package list and install a very small app):
    Code:
    apt-get update
    apt-get install tightvncserver
    Now you've got your vnc app installed in Ubuntu.
    Now to set it up for use:
    Code:
    export USER=root
    vncserver -geometry 1280x750
    Yep! That's all set up... but yeah, nothing's happening just yet.

    If you haven't already got a VNC client installed on your TF (note Android NOT Ubuntu), go here:
    http://code.google.com/p/android-vnc-viewer/downloads/list
    and get the latest one and install it on your device.

    Now go into the app and put a Nickname ("ubuntu" might be wise), your Password (if you made one), leave Address empty, and make Port 5901.
    If you want it to look nice, change Color Format to 24-bit color (4 bpp).

    Now press connect and you should be in your chrooted fully-functional Ubuntu.

    Oh yeah, if you want to automate this whole process so you don't have to do it everytime you reboot your TF or whatever, follow the instructions in OP about editing /root/.bashrc file. This file basically runs everytime the root user logs in... ie. everytime you start your chrooted Ubuntu. So it will do all this automatically, everytime you start (type sh ubuntu in terminal).

    Did I miss anything else?

    Please note:
    Jhinta is the brains behind this (and those HD2 guys who managed to port Ubuntu to ARM). If you get this working properly give some thanks to him. He's the one who wrote the scripts to do this all for you (those 2 files in the /sdcard/ubuntu/ directory). I'm just trying to make it a bit easier to understand for "non-linux nerds" and to help walk you through this. Because, really, it's pretty damn cool :p Even if you're not familiar with Linux or Ubuntu, try it out... you might just learn something!
    8

    dm-1113093026193.png


    So how does this works -->

    # DONT TOUCH FIRST LINE !!!!
    mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system ## lets mount the nand RW so that we can make folders
    echo "SETTING VARIABLES"
    export bin=/system/bin ## divine where bin is
    export mnt=/data/local/ubuntu ## divine where mnt is
    export PATH=$bin:/usr/bin:/usr/sbin:/bin:$PATH ## set path so that we can run things anywhere
    export TERM=linux ## divine term
    export HOME=/root ## divine home
    if [ ! -d /data/local/ubuntu ] ## if there go else create data/local/ubuntu
    then
    mkdir /data/local/ubuntu
    fi

    echo "MOUNTING"
    mount -t ext2 -o loop /sdcard/ubuntu/rootfs.ext2 /data/local/ubuntu ## mount a ext2 loop file from dir to dir
    mount -t devpts devpts $mnt/dev/pts ### mount android devpts in root (mnt/dev/pts)
    mount -t proc proc $mnt/proc ## same as above
    mount -t sysfs sysfs $mnt/sys ### same as above

    echo "SETTING UP NETWORK"
    sysctl -w net.ipv4.ip_forward=1 ## ip forward so that we have internet from android
    echo "nameserver 208.67.222.222" > $mnt/etc/resolv.conf ### as is
    echo "nameserver 208.67.220.220" >> $mnt/etc/resolv.conf ### as is
    echo "127.0.0.1 localhost" > $mnt/etc/hosts ## as is
    echo "All credits to original creator !!!!!!!"


    chroot $mnt /bin/bash #### finally lets chroot the dir and init /bin/bash meaning lets start a vm on that dir


    and thats all to chrooting
    3
    Alright, to you guys who don't understand (and I agree, the first post was a bit hard to understand), you need a few components first:
    OP's uploaded zip containing 2 files (scripts that kinda do all the hard stuff for you):
    - ubuntu
    - install.sh
    and
    a root filesystem

    The root filesystem is kinda like an image of Ubuntu and the kernel that had been ported to ARM by wizards, or something like that (correct me if I'm wrong please).

    I'm pretty sure OP wants us to use an Ubuntu root filesystem for the HTC HD2, found here:
    http://xdaforums.com/showthread.php?t=889433
    (the torrent was fairly speedy)

    Anyway, I just got this working with aligatro2010's link which takes us to a guide for getting this chrooting business happening on a Nexus One. But don't panic! The guide works for our Transformer too. So yeah, follow this if you want to get it up and running this way.
    But at the line that tells you to type:
    vncserver -geometry 1024×800
    Change the resolution to 1280x750. Thanks to aligatro2010 for correcting my resolution. :D

    Anyway, I'm going to try and get this working with the HD2 root filesystem as OP said, and will report back my success in a while.

    (Seriously the coolest thing I've found yet with my TF... I never thought you could do this... thanks OP!!!)
    1
    I installed from http://androidadvocate.com/?p=339 and it works great, but running ubuntu native would be much, much better.