7

I want to run fully functional Ubuntu on my Android device in chroot. But I have some trouble with upstart. In chroot "it will actually run /sbin/telinit", so how i can run upstart or replace it with something else?

2 Answers 2

5

You can't really run upstart itself in a chroot. For it to work, you'd need something like an LXC container. Unfortunately most Android kernels don't have the required options to allow LXC to work.

Without LXC, the way of getting a chroot on your phone is to run:

  • sudo debootstrap --foreign --arch=armhf precise precise
  • then copy precise/ to your phone
  • then on your phone (as root): chroot precise debootstrap/debootstrap --second-stage

That will give you a standard Ubuntu chroot on your phone, that you can then chroot into with "chroot precise /bin/bash".

You'll then need to mount /proc and /sys for it to be somewhat usable.

Should you be lucky enough to have a phone where the kernel and userspace works with LXC and can get it manually installed on your phone, the following should work:

  • lxc-create -t ubuntu -n my-container -- -r precise -a armhf
  • lxc-start -n my-container

This will create an Ubuntu 12.04 armhf container and start it, you'll then get the usual login prompt (login/password is ubuntu/ubuntu by default).

0

See Linux Deploy and my recent pull request which supports using Upstart in user session mode for running services in a chroot. I think this is a much better approach than symlinking /bin/true to /sbin/telinit.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .