Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Ubuntu in a chroot

  1. #1
    Resident
    Join Date
    Apr 2011
    Posts
    542
    Thanks
    31
    Thanked 92 Times in 43 Posts

    Ubuntu in a chroot

    UPDATE02 SEP 2011: This experiment is abandoned: I have switched to Gentoo instead. Step-by-step directions here.

    06052011.jpg

    Just a heads-up that I got Ubuntu Linux working in a chroot on my Adam. I basically followed the instructions here, but with many differences -- in particular,
    1. The scripts there remount the system in read-write mode -- I don't do that. (I avoid touching the system at all. This should be perfectly safe.).
    2. The scripts there install binaries in system locations -- I don't do that. I install everything on sdcard2, I don't touch sdcard at all. In particular, binaries go in /mnt/sdcard2/bin, the mount point of the image is /mnt/sdcard2/mnt, and the image and related stuff go in /mnt/sdcard2/ubuntu (you need to create that directory and then unzip the provided ubuntu.zip into it).
    3. Instead of lxde, I start gnome-session in my xstartup file.

    The version of Ubuntu is Karmic Koala which is about 18 months old now. I will see if I can get Natty working the same way.

    Caveats:
    1. If you get a "resource busy" error in the loopback mount step, move all applications from sdcard onto your phone (preferences->applications->manage apps). Also, ensure that loopback and EXT2 are in the kernel (they are in the Beast v2.2 kernel, which I'm running).
    2. The first time I tried this I got an error that the file was too big. So I reformatted sdcard2 (formerly vfat) in ext4. I think this is a good idea anyway.
    3. The touchscreen doesn't follow the mouse -- tapping moves the mouse pointer to that location, but dragging does nothing.
    4. Keyboard produces wrong keys -- both the virtual keyboard (Tapatalk) and an external USB keyboard. I suppose the keymap needs to be changed.
    5. The "disk size" of the ubuntu installation is the size of the .img file -- if you are a serious user, you need a bigger disk. It should be possible to extract the .img file directly into a directory on sdcard2, if the card is formatted as ext4. I plan to try that, too...
    6. The linux environment is all running as root (chroot root, not android root), which is fine since it's a chroot into an image file at the moment, but if it ever graduates into serious use, one needs to be able to run it as a regular user. That should be doable.

    Anyway, I expect to fix issue 4, and hopefully also issue 3 (suggestions welcome). I will update with a detailed post at that time -- right now I'm still playing around with it
    Last edited by rsidd; 09-02-2011 at 04:26 AM. Reason: link to updated thread

  2. The Following 8 Users Say Thank You to rsidd For This Useful Post:

    androq (09-03-2011), antfoe (09-13-2011), arete77 (05-07-2011), dr01d (05-06-2011), fabirulo (05-09-2011), imtiyazee (05-09-2011), KwisatzH (07-10-2011), N0BBY (05-08-2011)

  3. #2
    Regular
    Join Date
    Apr 2011
    Posts
    155
    Thanks
    47
    Thanked 6 Times in 6 Posts
    Nice !!! All the best going forward !!!

    Cheers
    My Mobile Gadgets Garage
    Original iPhone
    Moto XT720 running Cronox
    Notion Ink Adam LCD 3G - Jelly Bean
    Moto Atrix - Gingerbread
    LG Optimus 4X HD
    Nexus 7 - Jelly Bean

  4. #3
    Regular
    Join Date
    Apr 2011
    Posts
    212
    Thanks
    17
    Thanked 22 Times in 11 Posts
    Instead of lxde, I start gnome-session in my xstartup file.
    Nice! Now why dint I think of that :\

  5. #4
    Resident
    Join Date
    Apr 2011
    Posts
    542
    Thanks
    31
    Thanked 92 Times in 43 Posts

    Not a ROM!

    Note to mods - this is not a ROM! I'm running Beast ROM. I get the linux environment, which runs in a chroot, via a vnc viewer app (on beast). The chroot works because android is linux. The chroot contains only the ubuntu userland, one can't run the ubuntu kernel.

  6. #5
    Member
    Join Date
    May 2011
    Posts
    72
    Thanks
    0
    Thanked 9 Times in 8 Posts

  7. #6
    Member
    Join Date
    May 2011
    Posts
    72
    Thanks
    0
    Thanked 9 Times in 8 Posts
    idk if this is a double post by me but see: http://forum.xda-developers.com/show...9#post13487229

    we'd love some help... weve got it running and if you look through the thread there are methods of making your own linux image... development has slowed so fresh brains are appreciated...

  8. #7
    Resident
    Join Date
    Apr 2011
    Posts
    542
    Thanks
    31
    Thanked 92 Times in 43 Posts
    tmckenn2 - thanks. I will look into it, but it looks like you guys are developing a ROM. I don't intend to do that - I'm happy with a chroot, so I can have the best of both worlds. If I can resolve the keyboard issue (I think mouse is nearly resolved, it's the interaction between VNC server and client), the idea is that I can get a small USB keyboard too, and travel with this combo rather than my 17 inch laptop.

  9. #8
    Member
    Join Date
    May 2011
    Posts
    72
    Thanks
    0
    Thanked 9 Times in 8 Posts
    Nope we are working on both. I'd advise looking through the thread there is a lot of info including the fix for the keyboard, as well as some nice scripts for shutting off Vincent and stuff. Also posted I'd. Way of accessing the file system outside of the chrooted Ubuntu... and we are working on a native Ubuntu method that allows both Ubuntu and android... not just Ubuntu.

    Check it out... btw your right it is an interaction between the Vnc and client having to do with keyboard mapping.

    Issue3 can be fixed by using androvnc and changing input method....
    You cannot just extract the image to the wdcard and run it as the commands in the scripts ask for an image to mount.... though I guess if youbremove those commands and just mount the files maybe it would work.... the alternative method is to use the script I made over on xda to create a larger image

    And finally issue 1... you are correct in that fix but IMO the better way of doing it is to change the script to have losetup and mount on loop99 the reason being is for each app on SD there is a loop device, but if you just make the loop Huber really high, you avoid that problem
    Last edited by tmckenn2; 05-08-2011 at 08:40 AM.

  10. #9
    Resident
    Join Date
    Apr 2011
    Posts
    542
    Thanks
    31
    Thanked 92 Times in 43 Posts
    tmckenn2 -- I went through the thread. You guys seem to have done a lot of work, but unfortunately I didn't find a keyboard fix. I found it in an ubuntu forum -- it seems to be some strange interaction between tightvnc and gnome-session, nothing to do with android. I put in a bogus keymap name in gconf-settings (see herehere) and that fixes it -- mostly. It doesn't get the ctrl and alt keys (xev doesn't even recognise the key presses) but one can use the vnc program to send those keys when necessary -- however, it certainly rules out using emacs for now. Any suggestions? It seems to be a low-level android issue, so not solvable short of writing a different keyboard driver...

    I tried natty but while I can chroot into a shell easily enough, it seems impossible to bring up the gnome/unity desktop -- it is, I think, too tightly tied up with upstart, which doesn't work inside a chroot (unless it is supported outside the chroot). I don't expect to do much more on this, but will upload my karmic setup, for those who are interested.

  11. #10
    Resident
    Join Date
    Apr 2011
    Posts
    542
    Thanks
    31
    Thanked 92 Times in 43 Posts
    I figured out that all USB keyboard key-presses -- CTRL, ALT, etc -- are in fact visible inside the linux chroot: running "evtest /dev/input/event9" shows up every keypress with the correct keycode. They are also visible to Android at the event interface level: "getevent /dev/input/event9" shows them all. But the Android system swallows them somewhere before they get to the VNC viewer, so the VNC viewer does not pass them on to the "remote" desktop.

    I will see if I can hack the VNC viewer to send "proper' key events from the USB keyboard. I am unfamiliar with Android but I had a look at the viewer's code, it doesn't seem too hard. For linux to be usable to me, I need the modifier keys -- ctrl, alt -- to work properly. Otherwise, I can get a full gnome desktop on karmic, and may eventually succeed with some sort of desktop on natty, but it is useless to me and my work, and the adam will remain a toy...

Page 1 of 2 12 LastLast

Remove Ads

Similar Threads

  1. Gentoo in a chroot (step-by-step instructions)
    By rsidd in forum Adam ROM Development
    Replies: 71
    Last Post: 04-24-2012, 04:54 PM
  2. Porting of Ubuntu Linux on Adam
    By TechGeek in forum Adam ROM Development
    Replies: 84
    Last Post: 11-09-2011, 12:22 PM
  3. Replies: 14
    Last Post: 10-23-2011, 05:30 PM
  4. can i install 'ubuntu' on my vega?
    By bbinnggooo in forum Vega General Discussion
    Replies: 4
    Last Post: 09-14-2011, 05:42 AM
  5. Ubuntu on a Galaxy Tab 10.1
    By RikR in forum Galaxy Tab 10.1/10.1v General Discussion
    Replies: 3
    Last Post: 07-21-2011, 12:25 PM

Search tags for this page

bootubuntu.sh

,

bootubuntu.sh download

,
chroot img file
,
chroot into ubuntu
,
chroot ubuntu android
,
chroot ubuntu keyboard error
,
fsrw mountonly unionsf
,
gentoo chroot ubuntu
,
ubuntu chroot in gentoo
,
ubuntu chroot larger themes
Click on a term to search for related topics.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •