[UBUNTU][Testing] How-to install it on the Prime

Search This thread

lilstevie

Senior Recognized Developer
Apr 17, 2009
1,339
1,040
This is awesome :eek:) Would have liked to see the browser performance in the video if it's working, but seeing dual boot was sweet! I know the post said that some patches were required for android, does that mean we'll be locked to a certain ROM when using this, or will the patches be universal? I'm on AOKP, guessing if you're using CM9 OP, then the port shouldn't be hard at all.

Really nice work! Eargerly waiting a dual bootable, installer

Sent from my Transformer Prime TF201 using Tapatalk 2

I will supply 2 .patches for the kernels but the kernel will need to be built from source. unfortunately at this point in time they are unavoidable.
 
  • Like
Reactions: _motley and hartej

Deathbyfugu

Senior Member
Jan 2, 2011
357
69
I will supply 2 .patches for the kernels but the kernel will need to be built from source. unfortunately at this point in time they are unavoidable.

So excited for the eventual release of this. Thanks for all your hard work! Keep it up and keep us informed. I cannot wait to test this out - if you need any testers, I'd love to assist. What IRC channel are you using?

Sent from my ADR6425LVW using xda premium
 

lilstevie

Senior Recognized Developer
Apr 17, 2009
1,339
1,040
so over clocking in Ubuntu shouldn't be a problem ether then?

I personally do not believe that there is enough stability in this system as of yet to even think about overclocking.

So excited for the eventual release of this. Thanks for all your hard work! Keep it up and keep us informed. I cannot wait to test this out - if you need any testers, I'd love to assist. What IRC channel are you using?

Sent from my ADR6425LVW using xda premium

I am not in need of testers at this point in time, but you can always find me in #asus-transformer on freenode
 
  • Like
Reactions: Deathbyfugu

Loccy

Senior Member
Jul 12, 2005
836
115
I will supply 2 .patches for the kernels but the kernel will need to be built from source. unfortunately at this point in time they are unavoidable.

This may be a really dim suggestion - forgive me, I know naff all about the guts of kernels - but would your patches break the normal use of a kernel, ie if it was used with a normal Android ROM and no Ubuntu in sight, would it still boot? If so, maybe it'd be worth getting in touch with the kernel authors with a view to getting your changes built into their subsequent releases. That way you can just say "compatible wIth kernels xyz" and not have to worry about it.
 

lilstevie

Senior Recognized Developer
Apr 17, 2009
1,339
1,040
This may be a really dim suggestion - forgive me, I know naff all about the guts of kernels - but would your patches break the normal use of a kernel, ie if it was used with a normal Android ROM and no Ubuntu in sight, would it still boot? If so, maybe it'd be worth getting in touch with the kernel authors with a view to getting your changes built into their subsequent releases. That way you can just say "compatible wIth kernels xyz" and not have to worry about it.

with or without ubuntu there is no boot with the kexec process without at least the ATAGS patch. I would suggest either asking the devs of favorite kernels to implement the patches, cause it would be a lot of work for me to approach them individually to ask to implement the patches. I may post the patch and how to pack them later today ready for the system
 

hartej

Senior Member
Dec 10, 2004
159
54
with or without ubuntu there is no boot with the kexec process without at least the ATAGS patch. I would suggest either asking the devs of favorite kernels to implement the patches, cause it would be a lot of work for me to approach them individually to ask to implement the patches. I may post the patch and how to pack them later today ready for the system

I've developed kernels for the Xperia range of phones before, and still have my dev environment. I'll have a bash at building Motley's kernel this evening (https://github.com/motley-git/TF201-Kernel) and once booting successfully with that I can add any patches that lilstevie releases and upload the resulting image.

I'd be interested in how the boot process works though. I'm presuming that there are two different kernels stored in the boot partition and kexec copies the relevant one into memory and boots from it depending on the choice of the user?
 
  • Like
Reactions: beekay201

lilstevie

Senior Recognized Developer
Apr 17, 2009
1,339
1,040
I've developed kernels for the Xperia range of phones before, and still have my dev environment. I'll have a bash at building Motley's kernel this evening (https://github.com/motley-git/TF201-Kernel) and once booting successfully with that I can add any patches that lilstevie releases and upload the resulting image.

I'd be interested in how the boot process works though. I'm presuming that there are two different kernels stored in the boot partition and kexec copies the relevant one into memory and boots from it depending on the choice of the user?

the kexec host kernel is on flash, when you select an option from the menu it loads the kernel into ram, sets a tag in ram, writes out the atags then triggers a hard reboot.

when it reboots the decompressor code from the host kernel checks the kexec tag in memory, then locates the guest kernel, the patch to the guest kernel is to 1) speed up the time it takes to decompress, due to it being outside the standard 256MB that it expects it takes forever without this patch. 2) to copy the modified ATAGS over the ones supplied by bootloader, this is to specify location of initrd in memory, and new commandline that was supplied
 

YoMarK

Senior Member
Sep 15, 2007
440
88
Offtopic, but can't help but notice that you don't have the "boot loader is unlocked"(or is it?) text in the upper left corner of the screen when the prime if powering on.
 

lilstevie

Senior Recognized Developer
Apr 17, 2009
1,339
1,040
Offtopic, but can't help but notice that you don't have the "boot loader is unlocked"(or is it?) text in the upper left corner of the screen when the prime if powering on.

I have not updated past .14 (when we started working on this stuff) and the "bootloader is unlocked" text is only in the latest revision of the bootloader.

EDIT: I hear actually it is in the latest few revisions, from .21 on
 
  • Like
Reactions: YoMarK

barryflanagan

Senior Member
Aug 17, 2009
260
78
Dublin
barry.flanagan.ie
Thanks guys.
I found a more "direct" method last night and it works.
Just wrote a shell script dd-ing the blob directly to the partition.
Now I can start the script and directly reboot to ubuntu without using cwm/twr at all.
On the linux side I have the same script dd-ing the Virtuous Prime blob and doing a reboot.
This seems to be the most direct way of doing things until dual-boot will be possible.

Sent from my Transformer Prime.

Yeah, using the same method as you and it works a treat. I hope that lilstevie releases a standard boot img so that we can still use this method rather than needing a modified android kernel - at least until the main ROMs support the necessary kernel mods.
 

Snake X

Senior Member
Dec 20, 2011
58
2
so will we need to patch the 2 patches in addition to the installation package or will that be included? Any way to make other distro's of linux boot on this device or does each img need to be modded to install? Also kudos to getting the latest version of ubuntu working :D the method i found u had to use it via vnc and it was only ubuntu 9 and everything but the shell via terminal emu was rly laggy :L so thanks again :D

If it were possible i would love to get linux mint 13 maya working somehow on this but ubuntu will work fine for what I need.
 

jellydroid13

Senior Member
Oct 15, 2011
784
187
Really excited for this. It's the only thing stopping me from selling my prime for the new MS surface pro.
 

Emblema

Senior Member
Jun 5, 2006
488
49
54
Cagliari
Originally Posted by jimmyxxx
Thanks guys.
I found a more "direct" method last night and it works.
Just wrote a shell script dd-ing the blob directly to the partition.
Now I can start the script and directly reboot to ubuntu without using cwm/twr at all.
On the linux side I have the same script dd-ing the Virtuous Prime blob and doing a reboot.
This seems to be the most direct way of doing things until dual-boot will be possible.

Sent from my Transformer Prime.
Yeah, using the same method as you and it works a treat. I hope that lilstevie releases a standard boot img so that we can still use this method rather than needing a modified android kernel - at least until the main ROMs support the necessary kernel mods.


There is a guide on how to install using this method?
 

barryflanagan

Senior Member
Aug 17, 2009
260
78
Dublin
barry.flanagan.ie
Really excited for this. It's the only thing stopping me from selling my prime for the new MS surface pro.

I would have thought that the fact the MS Surface stuff is vapour might be a good reason to hold off too :)

---------- Post added at 10:41 AM ---------- Previous post was at 10:38 AM ----------

There is a guide on how to install using this method?

No, there is no guide for doing this. To be honest I am reluctant to put one up. If you know what you are doing in both Linux and Android, you can figure it out yourself, but if you don't you can easily totally brick your Prime.
 

jimmyxxx

Member
Jan 12, 2012
46
7
There is a guide on how to install using this method?

This is not an install method. It's a post-install scripting to enable 'painlesss' dual-booting.

1. You should have a terminal app on your android side (e.g.: better term pro, but any ssh / local console would do)
2. Copy ubuntu-boot-blob from this post to $HOME/ubuntu.blob
3. open terminal/ssh tool
4. on command prompt type:
su -
cd $HOME
vi ubuntuboot.sh

5. Paste following code into vi editor:

#!/bin/bash
clear
echo "Installing Ubuntu Bootloader ..."
cd $HOME
dd if=$HOME/ubuntu.blob of=/dev/block/mmcblk0p4
reboot

6. After that press following keys: ":" "x" ">>RETURN<<" to save changes

7. Type in terminal:
chmod +x ubuntuboot.sh
./ubuntuboot.sh

8. Now the bootloader will be saved in the staging area and after 2 reboots your system should start ubuntu.

9. Do the same thing on the ubuntu side, but now using the boot.blob of your rom instead of ubuntu.blob
The boot.blob is mostly found somewehere in the zipped rom. Just extract it, save it under $HOME/android.blob ($HOME assumes you are root)
Then type the following in terminal:

sudo su -
cd $HOME
vi androidboot.sh

10. Now paste following lines into vi:

#!/bin/bash
clear
echo "Installing Android Bootloader ..."
cd $HOME
dd if=$HOME/android.blob of=/dev/block/mmcblk0p4
reboot

12. After that press following keys: ":" "x" ">>RETURN<<" to save changes

13. Type in terminal:
chmod +x ./androidboot.sh

14. With this command you reboot to android:
./androidboot.sh

Hope this helps ...

Sent from my Transformer Prime.
 

jimmyxxx

Member
Jan 12, 2012
46
7
This is not an install method. It's a post-install scripting to enable 'painlesss' dual-booting.

PS: in better term pro $HOME is located under:

/data/data/com.magicandroidapps.bettertermpro/home

and the 1st line in your shell script should be:

#!/data/data/com.magicandroidapps.bettertermpro/bin/bash

You can additionally install the smanager app from the market on the android side and link the script.
By doing this you have a '2 click boot to ubuntu'

Sent from my Transformer Prime.
 

barryflanagan

Senior Member
Aug 17, 2009
260
78
Dublin
barry.flanagan.ie
Ah, we are not actually using the same method.

I don't use the staging partition and blob method. I first take a dd image of the boot partition under both Android and Linux, and then when I want to switch I write whichever one back directly to the boot partition. It saves the double boot requirement, and also does not require digging around in the distro files for the boot blob.

This is not an install method. It's a post-install scripting to enable 'painlesss' dual-booting.

.......

9. Do the same thing on the ubuntu side, but now using the boot.blob of your rom instead of ubuntu.blob
The boot.blob is mostly found somewehere in the zipped rom. Just extract it, save it under $HOME/android.blob ($HOME assumes you are root)
Then type the following in terminal:

sudo su -
cd $HOME
vi androidboot.sh

10. Now paste following lines into vi:

#!/bin/bash
clear
echo "Installing Android Bootloader ..."
cd $HOME
dd if=$HOME/android.blob of=/dev/block/mmcblk0p4
reboot


/dev/block/mmcblk0p4 is incorrect under Ubuntu. It is /dev/mmcblk0p4

You would also be better doing:

dd if=$HOME/android.blob of=/dev/mmcblk0p4 && reboot

...this way the reboot only happens if dd was successful in writing the blob. Otherwise you could be rebooting into a corrupted blob in staging.

As I said in my previous post, lots of opportunity to brick your prime.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 20
    -----------
    HOW-TO: Ubuntu on Asus Transformer Prime TF201

    Port by lilstevie (thank you for your hard work)
    --------

    DISCLAIMER:
    I wrote this how-to from my experience installing successfully Ubuntu on my Prime.
    I am in no way responsible for what you do with your Prime, even when you are following my instructions.
    There is always the risk of making it worse, hardbricking your device, and this risk is completely down to you !
    This is not a final version. This port is currently very unstable !
    Install Ubuntu on your TF201 for testing purposes only !


    HOW-TO Unbrick your Prime (or not...):
    http://xdaforums.com/showthread.php?t=1514088

    --------

    VERSION:
    v0.1: First version of the tutorial

    ABOUT:
    - Working:
    Wifi – Same patch as for the TF101
    Keyboard (if you have a dock)
    USB Host (if you have a dock)

    - Partially working:
    Graphics Acceleration (only 2D at this point)
    Touchscreen (it works but every few touches are off target by 1/2 the screen)

    - Not working:
    Bluetooth
    Trackpad
    Sound
    Sensors (ALS, Gyroscope, Accelerometer, GPS, magnetometer)
    Shutdown, Reboot, Suspend

    --------

    Links:
    Bootimage http://173.244.200.139/ports/prime-sdlinux.blob
    RootFS http://173.244.200.139/ports/ubuntu-prime.img.gz
    Fastboot http://alpharev.nl/wintools.zip

    MD5:
    9625d336062b2ff7eb9530dd5e48fb9e prime-sdlinux.blob
    1a59e7918c199a85f805cb62ca130dae ubuntu.img
    81238957a42b207213442cba7eeff684 wintools.zip

    --------

    Hardware:
    Asus Transformer Prime TF201 (bootloader unlocked & with data/charge cable)
    A computer with Linux installed
    MicroSD card of at least 4GB (a fast card is better)

    --------

    Pre-requisities:
    1. You need to have an already unlocked Prime.
    To unlock it, use the official Asus Bootloader Unlock Tool APK on Android.

    2. You need to have the latest ClockWorkMod (CWM) Recovery installed to easily backup & restore your device.
    To install it, you can use the Android tool 'ROM Manager' from Play Store if you system is already rooted.
    Otherwise, you can use the 'Fastboot' tool along with this tutorial (BE CAREFUL!):
    HOW-TO 1: http://www.theandroidsoul.com/install-cwm-5-8-2-0-on-transformer-prime/
    HOW-TO 2: http://xdaforums.com/showthread.php?t=1576937

    (You can also install the Touch version of CWM to avoid destroying your volume buttons while navigating :D)
    CLASSIC : http://download.clockworkmod.com/recoveries/recovery-clockwork-5.8.2.0-tf201.img
    TOUCH : http://download.clockworkmod.com/recoveries/recovery-clockwork-touch-5.8.1.8-tf201.img

    3. Before trying to do anything with your device, make a full nandroid backup of the current WORKING Android system.

    To do that:
    - Reboot on CWM (see the sticky, at the end)
    - Navigate to 'backup and restore', then 'backup'
    - Wait until the full backup is done...

    --------

    - INSTALL Ubuntu -

    Introduction:
    To have a working Ubuntu system on the Prime, you have to:
    - Extract the root file system on your MicroSD card
    - Flash the bootimage right on the device

    While installing Ubuntu, the only thing you modify about Android, is the bootimage. You leave the system intact,
    so you'll be able to do a pseudo-dualboot between Ubuntu, and Android (we'll see that later).

    HOW-TO:
    Extraction of the root filesystem:
    - Connect your MicroSD card on the computer running linux (ex: /dev/sdc)
    - Umount all current partitions from the card
    - Using fdisk, fully erase it, rebuild partition table, and create one partition (ex: /dev/sdc1)
    - Format it in 'ext4' (ex: $ mkfs.ext4 /dev/sdc1)
    - Using 'dd' command, extract the 'ubuntu.img' filesystem to the recently created partition
    (ex: $ dd if=ubuntu.img of=/dev/sdc1)
    - Wait until extraction completes... (It takes a while...)
    - Mount the partition to verify that the extraction completes successfully (ex: $ mount /dev/sdc1 folder)
    - Umount it, eject the card and put it on the Prime (ex: $ umount /dev/sdc1)
    - Your Ubuntu filesystem is ready to use !

    Flashing the bootimage (BE CAREFUL!):
    - Reboot in fastboot mode (see the sticky, at the end)
    - Connect the Prime to the computer, and be sure the drivers are correctly installed
    You can find the drivers here: http://xdaforums.com/showthread.php?t=1426502
    - Extract the fastboot archive 'wintools.zip' and move the file 'prime-sdlinux.blob' in the same folder
    - Execute the command: fastboot -i 0x0b05 flash boot prime-sdlinux.blob
    (WARNING! This command will overwrite the bootimage of your Prime! Be sure you know what you're doing!)
    - Wait until the flash completes... (it generally takes a few seconds...)
    - When the blue progress bar is full, on the Prime, hold the Power switch to reboot the device
    - Be sure that the MicroSD card is in the Prime
    - Your Prime is now booting on Ubuntu, you should see some text displaying on the screen
    - Wait until the system initializes... (It takes a while for the first boot...)
    You should see kernel verbose booting, displaying something saying the system is resizing a partition
    on the MicroSD card...
    - Your Ubuntu system is installed ! You can do the graphical basic setup, then do a hard reboot of the device !
    - Good luck with your freshly installed Ubuntu on your awsome Asus Transformer Prime !

    --------

    - RESTORE Android -

    Introduction:
    After installing Ubuntu, to have Android back on the Prime, you have to:
    - (OPTIONAL: Do a full nandroid backup to be able to restore the Ubuntu bootimage directly from the CWM later)
    - Simply restore the Android bootimage from the nandroid backup made before the installation of Ubuntu

    HOW-TO:
    To do that:
    - Reboot on CWM (see the sticky, at the end)
    - Go to 'backup and restore', then 'advanced restore'
    - Choose the Android backup made before installing Ubuntu
    - Choose 'Restore boot' option
    - Wait until the restore is done...
    - Choose 'reboot system now' to boot in Android

    --------

    - DUALBOOT Android/Ubuntu -

    Introduction:
    We can note that the both systems are installed on two different storage devices.
    Android is directly on the device and Ubuntu is on the MicroSD.
    The only thing that changes between the two systems is the bootimage.
    If you have a nandroid backup of each WORKING systems, you can do an advanced restore of the boot 'boot.img'
    of Ubuntu to boot it from the MicroSD card, or restore the boot of the Android backup to boot on Android !

    HOW-TO:
    To do that:
    - Reboot on CWM (see the sticky, at the end)
    - Go to 'backup and restore', then 'advanced restore'
    - Choose the correct backup (the Android one, or the Ubuntu one)
    - Choose 'Restore boot' option
    - Wait until the restore is done...

    --------

    STICKY:
    - Booting the Prime on recovery mode (CWM):
    1. Power off the device (using Android, or by a long press of the power switch)
    2. Power it on, by keeping simultaneously pressed the power switch and the volume down button
    3. When text displays on top of the screen, release all, and press the volume up button
    4. Wait a few seconds and CWM will appear on the Prime...

    - Booting the prime in fastboot mode:
    1. Power off the device (using Android, or by a long press of the power switch)
    2. Power it on, by keeping simultaneously pressed the power switch and the volume down button
    3. Wait until the message saying 'OS will coldboot in 10 seconds' etc... then release all buttons
    4. Use the volume down button to select the USB icon
    5. Validate with volume up
    6. You can connect your device to a computer to send fastboot commands...
    17
    Here is a video of the current status.


    There is a blog post coming soon.
    10
    You have pubblished new files ?
    We are anxiously awaiting :D

    there is a major bug with the 3.1 kernel which is holding things up at the moment, there is a race condition which means the boot needs to be broken out into an initrd shell and resumed to work
    10
    Can You write on How-to for install one distro complete ?

    no, and the reason will make you happy!
    just now i've got kexec works! :laugh:

    PLEASE STOP TESTING ROOT_CHOOSER v5.
    configuration files syntax will change for support external kernel loading.

    so, let me make root_chooser v6 and a custom kernel for boot everything.
    i'll update you soon!

    Cheers!
    9
    i did it!
    the touchpad WORKS!
    ensure to have xf86-input-synaptics package installed ( on ubuntu should be 'xserver-xorg-input-synaptics' ).

    as usually you can find everything here: https://github.com/tux-mind/tf201-dev
    for update your TF201 follow this guide: http://wiki.gentoo.org/wiki/Asus_Transformer_Prime#INSTALLING_THE_KERNEL

    we ALWAYS provide the source code, for now all our kernel changes are in the JB15.patch file.
    if you want to contribute i'll add you to the repository collaborators.

    cheers!