Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

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

share|improve this answer

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.