Linux on Pixel C : Running ubuntu xenial in a LXC container (27 september)

Search This thread

Samt434

Member
Sep 10, 2015
43
126
Hi guys,

Today i wanted to share with you some of my work to run linux on the pixel C. :D

First of all i'm not responsible for anything, so try this but i can't guarantee that it works for you and that you won't break your tablet (even though normally it should work ;) ).
Secondly this thread is for people who know how to use correctly adb, fastboot and linux console, instructions are not very detailed here, so if you're stuck try a bit to search, you will learn a lot !

So first what is LXC ?


LXC (Linux Containers) is an operating-system-level virtualization method for running multiple isolated Linux systems (containers) on a control host using a single Linux kernel. (wikipedia)

We are gonna use this technology to run ubuntu on Pixel C (we will even be able to access to the GPU drivers in the future, i'm currently working on it)


So first, we need a special kernel where cgroups are activated.

Please download and flash my modified stock kernel for nrd90r :
https://drive.google.com/file/d/0BzWwMqZZvtXSZjNzdDB6MVBqd0E/view?usp=sharing

Code:
fastboot flash boot boot.img

Try to see if you can run su in the tablet, otherwise you will have to install supersu.

Now, install busybox so that we have some tools to help us a bit : https://play.google.com/store/apps/details?id=ru.meefik.busybox&hl=fr :)

Download now lxc compiled with PIE support for Pixel C and the ubuntu rootfs (here is a 32bit version, 64bit is also working fine on my tablet :) ) :
https://drive.google.com/open?id=0BzWwMqZZvtXSTnJBbS1LbGo0MUE

send it to the pixel C :
Code:
adb push lxc.tar.gz /sdcard/

Now extract the archive in /data
Code:
adb shell
su
tar xvzf /sdcard/lxc.tar.gz -C /data/

Now run ubuntu and enjoy ! :highfive:
Code:
# open a terminal as root on the tablet
# execute :
/data/lxc/startSystem

If everything goes well, you will see ubuntu booting ;)
Welcome to Ubuntu 16.04 LTS!

Set hostname to <u3>.
[ OK ] Reached target Remote File Systems (Pre).
[ OK ] Listening on /dev/initctl Compatibility Named Pipe.
[ OK ] Listening on Journal Socket.
[ OK ] Listening on udev Control Socket.
[ OK ] Reached target Swap.
[ OK ] Listening on Journal Audit Socket.
[ OK ] Reached target Remote File Systems.
[ OK ] Listening on Journal Socket (/dev/log).
[ OK ] Reached target Encrypted Volumes.
[ OK ] Started Forward Password Requests to Wall Directory Watch.
[ OK ] Listening on Syslog Socket.
[ OK ] Listening on udev Kernel Socket.
...

user : ubuntu
password :ubuntu

Internet will work out of box if your tablet has a net access, you can install, remove things using apt :)

What is going on for this project :

I'm currently trying to use the GPU drivers using libhybris so that in the future we can run wayland on pixel C and have a fully working linux environnement ! (KDE, gnome)
see here for KDE, we need to port this : http://blog.bshah.in/2016/05/02/plasma-mobile-new-base-system/
I need help for this (because it's difficult). For this, we will have to patch bionic so that we can use libhybris. All the devs can contribute here :))

If you're happy of this work and you want to have more detailed instructions please pay me a beer ! Because developing for Pixel C is time consuming ;)
paypal.me/MathieuTournier
 
Last edited:
Whenever you get around to posting the 6.X kernel, I'd be happy to help test this on Dirty Unicorns 10.3 stable. I've wanted a non-virtualized Ubuntu install on my Pixel C for a while so I can use it to replace my laptop for research, and an LXC seems like a great way to make that happen.

Thanks for taking the time to work on this!
 

pivotraze

Senior Member
Feb 12, 2011
134
10
Perryville, MD
I'm looking forward to using this on my Pixel C once there is a graphical environment.

While you are working on the GPU, is it possible to install XServer/Gnome/etc along with a VNC server and connect to it via a VNC client on Android? If so, could you quickly explain how to do it with this?
 

Kyuubi10

Senior Member
Feb 21, 2014
726
544
Yo OP, wouldn't it be better to use Arch Linux for this project? You know, considering the better documentation for Arch, and bigger cooperation of the community?
Great attempt though, if I get a Pixel C as planned I would like to test this! :D

---------- Post added at 09:09 AM ---------- Previous post was at 09:06 AM ----------

@Samt434 forgot to quote you lol.
 
  • Like
Reactions: brando56894

DollarUsername

New member
Sep 2, 2016
4
0
How does this compare to Linux Deploy? I've got Ubuntu running with Linux Deploy using the android XSDL X server for display and it runs pretty well.
 

rekrapg

Senior Member
Aug 10, 2009
312
375
Brisbane
as a massive linux fan & a Pixel C owner, i'm watching this project closely. Love to hear what's coming in a look ahead. Personally, my preference would be to be able to install a linux OS natively as a sole OS (any live ARM version) but anything that can be done to un-androidify the Pixel C would be awesome.
 

Samt434

Member
Sep 10, 2015
43
126
New update, new kernel based on stocked for NRD90R ;) (note that this kernel doesn't include dm verity)
And i have a surprise : https://youtu.be/4B8unHrbZK4
Weston and XWayland are now running well on Pixel C ! (using the DRM framebuffer)
I can't say when i will publish it, it still need some more time (there are still some stability issues...), and i have a lot of other things ongoing.
But i will publish it soon ;)

Thanks a lot for your support !
 

ArangeLTX

Member
Feb 16, 2010
29
1
New update, new kernel based on stocked for NRD90R ;) (note that this kernel doesn't include dm verity)
And i have a surprise : https://youtu.be/4B8unHrbZK4
Weston and XWayland are now running well on Pixel C ! (using the DRM framebuffer)
I can't say when i will publish it, it still need some more time (there are still some stability issues...), and i have a lot of other things ongoing.
But i will publish it soon ;)

Thanks a lot for your support !
Thanks for your work!
The Youtube link is private.
 

TheBready

Senior Member
Jun 12, 2015
67
26
Berlin
Is it possible to start Linux from the terminal after the initial setup with adb?

Is there a tutorial to setup Wayland or is it ready to go. I would love to use my Pixel C for Java development with eclipse. Would this be possible or would it be a pain in the a**?
 

Samt434

Member
Sep 10, 2015
43
126
Is it possible to start Linux from the terminal after the initial setup with adb?
Yes

"Is there a tutorial to setup Wayland or is it ready to go. I would love to use my Pixel C for Java development with eclipse. Would this be possible or would it be a pain in the a**? "
Yes it would be possible and would even run well !
About Wayland and weston, there is no tutorial and it's not ready to go currently (the demo is not currently based on LXC). The demo is from my lastest developpments, it requires still some dev before being published. But i hope to publish it soon :highfive:
 

recicchini

New member
Feb 1, 2009
2
0
First off, just wanted to say you are a god, keep up the good work. I've wanted linux on my pixel c since I bought it. I was going to install it via the instructions in your first post but I'm a little confused as to whether it has GUI or not? I understand it's Ubuntu Xenial but some of your notes make it seem like it doesn't have a GUI yet? Is this the case?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 20
    Hi guys,

    Today i wanted to share with you some of my work to run linux on the pixel C. :D

    First of all i'm not responsible for anything, so try this but i can't guarantee that it works for you and that you won't break your tablet (even though normally it should work ;) ).
    Secondly this thread is for people who know how to use correctly adb, fastboot and linux console, instructions are not very detailed here, so if you're stuck try a bit to search, you will learn a lot !

    So first what is LXC ?


    LXC (Linux Containers) is an operating-system-level virtualization method for running multiple isolated Linux systems (containers) on a control host using a single Linux kernel. (wikipedia)

    We are gonna use this technology to run ubuntu on Pixel C (we will even be able to access to the GPU drivers in the future, i'm currently working on it)


    So first, we need a special kernel where cgroups are activated.

    Please download and flash my modified stock kernel for nrd90r :
    https://drive.google.com/file/d/0BzWwMqZZvtXSZjNzdDB6MVBqd0E/view?usp=sharing

    Code:
    fastboot flash boot boot.img

    Try to see if you can run su in the tablet, otherwise you will have to install supersu.

    Now, install busybox so that we have some tools to help us a bit : https://play.google.com/store/apps/details?id=ru.meefik.busybox&hl=fr :)

    Download now lxc compiled with PIE support for Pixel C and the ubuntu rootfs (here is a 32bit version, 64bit is also working fine on my tablet :) ) :
    https://drive.google.com/open?id=0BzWwMqZZvtXSTnJBbS1LbGo0MUE

    send it to the pixel C :
    Code:
    adb push lxc.tar.gz /sdcard/

    Now extract the archive in /data
    Code:
    adb shell
    su
    tar xvzf /sdcard/lxc.tar.gz -C /data/

    Now run ubuntu and enjoy ! :highfive:
    Code:
    # open a terminal as root on the tablet
    # execute :
    /data/lxc/startSystem

    If everything goes well, you will see ubuntu booting ;)
    Welcome to Ubuntu 16.04 LTS!

    Set hostname to <u3>.
    [ OK ] Reached target Remote File Systems (Pre).
    [ OK ] Listening on /dev/initctl Compatibility Named Pipe.
    [ OK ] Listening on Journal Socket.
    [ OK ] Listening on udev Control Socket.
    [ OK ] Reached target Swap.
    [ OK ] Listening on Journal Audit Socket.
    [ OK ] Reached target Remote File Systems.
    [ OK ] Listening on Journal Socket (/dev/log).
    [ OK ] Reached target Encrypted Volumes.
    [ OK ] Started Forward Password Requests to Wall Directory Watch.
    [ OK ] Listening on Syslog Socket.
    [ OK ] Listening on udev Kernel Socket.
    ...

    user : ubuntu
    password :ubuntu

    Internet will work out of box if your tablet has a net access, you can install, remove things using apt :)

    What is going on for this project :

    I'm currently trying to use the GPU drivers using libhybris so that in the future we can run wayland on pixel C and have a fully working linux environnement ! (KDE, gnome)
    see here for KDE, we need to port this : http://blog.bshah.in/2016/05/02/plasma-mobile-new-base-system/
    I need help for this (because it's difficult). For this, we will have to patch bionic so that we can use libhybris. All the devs can contribute here :))

    If you're happy of this work and you want to have more detailed instructions please pay me a beer ! Because developing for Pixel C is time consuming ;)
    paypal.me/MathieuTournier
    6
    Hi guys, sorry for the late answer. I will update everything so that LXC can run on the lastest android version soon ! :)
    There is a great anoucement coming ;) Stay tuned !
    6
    New update, new kernel based on stocked for NRD90R ;) (note that this kernel doesn't include dm verity)
    And i have a surprise : https://youtu.be/4B8unHrbZK4
    Weston and XWayland are now running well on Pixel C ! (using the DRM framebuffer)
    I can't say when i will publish it, it still need some more time (there are still some stability issues...), and i have a lot of other things ongoing.
    But i will publish it soon ;)

    Thanks a lot for your support !
    4
    Is it possible to start Linux from the terminal after the initial setup with adb?
    Yes

    "Is there a tutorial to setup Wayland or is it ready to go. I would love to use my Pixel C for Java development with eclipse. Would this be possible or would it be a pain in the a**? "
    Yes it would be possible and would even run well !
    About Wayland and weston, there is no tutorial and it's not ready to go currently (the demo is not currently based on LXC). The demo is from my lastest developpments, it requires still some dev before being published. But i hope to publish it soon :highfive:
    3
    Hi guys,
    Sorry I'm extremely busy with other projects, i'm also working on releasing something new (but not ready yet) for pixel C.
    I'm going to find the .config i used for that kernel as soon as possible, not sure i kept it unfortunatly.
    But if i remember well, you need systemd kernel requirements :
    https://github.com/systemd/systemd/blob/master/README

    And LXC requirements namespaces ;)