LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Mobile (https://www.linuxquestions.org/questions/linux-mobile-81/)
-   -   Running Debian on Nexus 7 (native) (https://www.linuxquestions.org/questions/linux-mobile-81/running-debian-on-nexus-7-native-4175469137/)

RedKidneyBean 07-10-2013 08:03 AM

Running Debian on Nexus 7 (native)
 
I have looked around online and can't find anyone talking about putting Debian on the Nexus 7. Of course we could use chroot to run Debian but I was hoping for a little more.

Since Canonical have started supporting Ubuntu on the device we have a full Linux kernel running. Now from within this is it possible to just debootstrap on to a new partition and run off of this? Without access to a device I don't know how well partition editing works with the device.

The second problem I can see coming up is X11. I read that the Ubuntu distro uses the android window system to put everything up on screen. I presume that there is no easy way to support X on the device. Does anyone know if there is a work-around for this?

replica9000 07-14-2013 01:16 PM

I've run Debian on an Android phone via a chroot environment, and a VNC client to get a desktop going. I have no experience running a native install on an Android device, so I might not be much help.

You could always use Ubuntu's kernel config to compile a Debian kernel for the device, or bootstrap Ubuntu instead. Xorg is available for ARM devices. It would depend if there is support for the Nexus's display though. Also I'm not sure how much you could do with the partitioning. I would assume you need to keep the firmware partitions intact to avoid bricking the device. This is what my Android phone's partitioning looks like.

Code:

Disk /dev/block/mmcblk0: 15.7 GB, 15758000128 bytes
1 heads, 16 sectors/track, 1923584 cylinders
Units = cylinders of 16 * 512 = 8192 bytes

              Device Boot      Start        End      Blocks  Id System
/dev/block/mmcblk0p1  *          1          17        128  4d Unknown
Partition 1 does not end on cylinder boundary
/dev/block/mmcblk0p2              17          49        256  51 Unknown
Partition 2 does not end on cylinder boundary
/dev/block/mmcblk0p3              49        4094      32367  5d Unknown
Partition 3 does not end on cylinder boundary
/dev/block/mmcblk0p4            4094    1923584    15355920  5 Extended
Partition 4 does not end on cylinder boundary
/dev/block/mmcblk0p5            4095        4096          16  5a Unknown
/dev/block/mmcblk0p6            4097        4129        256  73 Unknown
/dev/block/mmcblk0p7            4129        6684      20442+ 5b Unknown
/dev/block/mmcblk0p8            6684        6716        256  5c Unknown
/dev/block/mmcblk0p9            6716        6844        1024  45 Unknown
/dev/block/mmcblk0p10          6844        6876        256  47 Unknown
/dev/block/mmcblk0p11          6876        7132        2048  46 Unknown
/dev/block/mmcblk0p12          7132        7260        1024  4c Unknown
/dev/block/mmcblk0p13          7260        7264          32  39 Unknown
/dev/block/mmcblk0p14          7264        8032        6144  34 Unknown
/dev/block/mmcblk0p15          8032        8160        1024  36 Unknown
/dev/block/mmcblk0p16          8161        8192        256  76 Unknown
/dev/block/mmcblk0p17          8193      13313      40960  77 Unknown
/dev/block/mmcblk0p18          13313      18433      40960  77 Unknown
/dev/block/mmcblk0p19          18433      19457        8191  74 Unknown
/dev/block/mmcblk0p20          19457      20480        8190+ 74 Unknown
/dev/block/mmcblk0p21          20481      24576      32768  7a Unknown
/dev/block/mmcblk0p22          24577      26625      16384  48 Unknown
/dev/block/mmcblk0p23          26625      28672      16383  71 Unknown
/dev/block/mmcblk0p24          28673      30720      16381+ 76 Unknown
/dev/block/mmcblk0p25          30720      31232        4096  4a Unknown
/dev/block/mmcblk0p26          31232      31744        4096  4b Unknown
/dev/block/mmcblk0p27          31744      32256        4096  59 Unknown
/dev/block/mmcblk0p28          32257      32768        4096  5a Unknown
/dev/block/mmcblk0p29          32769      192512    1277951  83 Linux
/dev/block/mmcblk0p30        192513      196318      30442  19 Unknown
/dev/block/mmcblk0p31        196318      196574        2047+ 33 Unknown
/dev/block/mmcblk0p32        196574      196574          4  88 Unknown
/dev/block/mmcblk0p33        196574      196606        256  23 Unknown
/dev/block/mmcblk0p34        196606      196608          16  89 Unknown
/dev/block/mmcblk0p35        196609      507904    2490367+ 83 Linux
/dev/block/mmcblk0p36        507905      548860      327647  83 Linux
/dev/block/mmcblk0p37        548860      548864          32  90 Unknown
/dev/block/mmcblk0p38        548865    1923584    10997760  c Win95 FAT32 (LBA)
/dev/block/mmcblk0p39          4095        4096          16  5a Unknown
/dev/block/mmcblk0p40          4097        4129        256  73 Unknown
/dev/block/mmcblk0p41          4129        6684      20442+ 5b Unknown
/dev/block/mmcblk0p42          6684        6716        256  5c Unknown
/dev/block/mmcblk0p43          6716        6844        1024  45 Unknown
/dev/block/mmcblk0p44          6844        6876        256  47 Unknown
/dev/block/mmcblk0p45          6876        7132        2048  46 Unknown
/dev/block/mmcblk0p46          7132        7260        1024  4c Unknown
/dev/block/mmcblk0p47          7260        7264          32  39 Unknown
/dev/block/mmcblk0p48          7264        8032        6144  34 Unknown
/dev/block/mmcblk0p49          8032        8160        1024  36 Unknown
/dev/block/mmcblk0p50          8161        8192        256  76 Unknown
/dev/block/mmcblk0p51          8193      13313      40960  77 Unknown
/dev/block/mmcblk0p52          13313      18433      40960  77 Unknown
/dev/block/mmcblk0p53          18433      19457        8191  74 Unknown
/dev/block/mmcblk0p54          19457      20480        8190+ 74 Unknown
/dev/block/mmcblk0p55          20481      24576      32768  7a Unknown
/dev/block/mmcblk0p56          24577      26625      16384  48 Unknown
/dev/block/mmcblk0p57          26625      28672      16383  71 Unknown
/dev/block/mmcblk0p58          28673      30720      16381+ 76 Unknown
/dev/block/mmcblk0p59          30720      31232        4096  4a Unknown
/dev/block/mmcblk0p60          31232      31744        4096  4b Unknown


RedKidneyBean 07-14-2013 08:02 PM

Thank you for replying. That is a lot of partitions there, I knew android had many but I had never looked at how many. Also the single FAT32 partition looks sort of silly...

Having spent some time thinking about it (I am still travelling and so haven't got my hands on the device yet) building the kernel ought to be ok, the Ubuntu install presumably contains all the necessary non-standard modules and drivers I'd need. Yes partitions might be a bit of a problem, people who have tried (although perhaps I have only seen the unsuccessful ones) have bricked the device. Their mistake was to delete the bootloader, so long as we can avoid doing this we at least shouldn't lose anything (and get to have reinstall fun when everything goes wrong!).

The real problem I believe is going to be Xorg, I have come across one or two people talking about it not supporting the display. Does anyone know if this is the case? The Canonical installer avoids using it in favour of the android window system, this suggests ot me that it is not supported.

Also if we decide that this is going to be impossible can we collate the reasons why? There is no information out there to explain what would/wouldn't work.

replica9000 07-15-2013 12:44 AM

Well there are 4 partitions on the device itself that could be used. The partitions that are normally mounted as /system, /data, /cache, and /emmc (or /sdcard [internal]), which is most of the internal storage anyway, plus you could also use the external sdcard as well.

I suppose the tricky part is dealing with HBOOT. Would the stock HBOOT boot a standard Linux kernel? Messing with HBOOT is a good risk of bricking the device if something goes wrong. Also, would the Debian kernel and ramdisk live on the /boot partition of the phone. That's only 16MB on my phone, would be a tight fit. I suppose if HBOOT stays intact, and can boot into recovery, everything could be easily reversed if necessary.

If X11 doesn't work natively, then a VNC setup could be used. It ran fine for me when I tried it.


All times are GMT -5. The time now is 03:05 PM.