read on


This is what I did to get ubuntu up and running:

Install andowook 1.51 with stock kernel (works well with Tux_mind's kernel)
install ES file explorer
go into settings and choose root access, go up to / , and mount /, /sytem (first 3 options)
go into settings and choose show .files (3e option)
install BetterTerminal and let it download the extra files (bussybox).

On your TF prime:
go to tux_mind's blog http://lifeinarootshell.blogspot.it

download this files

3.1.10 kernel for 'any' distro - zImage
root_chooser v6 initrd - root_chooser6.gz (downloads as initrd.gz !)
android stock kernel with kexec patch - android_kernel
android stock initramfs - android_initr

Now on your PC:
Go to http://lifeinarootshell.blogspot.it
Read it! all of it!

Download ubuntu by clicking the big ubuntu logo. this will download: ubuntu-12.04-preinstalled-desktop-armhf+ac100.tar.gz
And: files for any linux distro - root_patch.tar.gz
(And : fastboot.blob under part 4)

Make a new directory ubuntu and place both files in it.
Go in this directory and extract first the ubuntu tarball by typing:
tar -xzf /ubuntu-12.04-preinstalled-desktop-armhf+ac100.tar.gz <enter>

and next extract the root_patch by typing:
tar -xzpf /root_patch.tar.gz <enter>

Format your SD-card as ext4 (you can use Gparted for this)

Copy all the directory's from your ubuntu-directory to the root (/) of your SD-card.
You do not have to copy the tarballs (saves you time)

Unmount your SD-card and eject it, place it in the TF prime.
CAVE: android can't read (or "see") an ext4 SD-card, maybe you get an error "empty card". This is not a problem!

Back on your TF prime
Use ES file explorer and go to the / of your prime and then go to the /data directory
make 3 new directory's:
1) .kernel.d (the dot infront has to be there!)
2) boot
3) mmc

Copy the downloaded file's to /data/boot (android_kernel, android_initr , zImage, initrd.gz)
If the first 3 files have a .txt extension then remove this.

Go to the /data/.kernel.d
and make 2 new files:
1e file: android
and put this in it as plain text:

android
/dev/mmcblk0p8:/boot/android_kernel:/boot/android_initrd

Save the file and delete the android.bak file if it exist

2e file: ubuntu

Copy as plain text:
ubuntu
/dev/mmcblk0p8:/boot/zImage:/boot/initrd.gz
+newroot=/dev/mmcblk1p1:/:/sbin/init

Save it and remove the ubuntu.bak file.

For the last part start up Better terminal.
become root bij typing su <enter> and wait until you get asked if you would give Better Terminal acces. Choose Yes.

Mount the SD-card by typing this:
mount /dev/block/mmcblk1p1 /data/mmc <enter>

Now chroot using this:
chroot /data/mmc /bin/su <enter>
(you now see: root@localhost:/#)
Type in the next lines and replace USER with your name you want to use for loggin in:

groupadd -g 3003 inet <enter>
useradd -d /home/USER -m -s /bin/bash USER <enter>
usermod -aG adm,dip,plugdev,lpadmin,sudo,inet USER <enter>
passwd USER <enter>

You have to give your password twice as you will see.

The solution for the wifi is to add this line to /etc/modules file of your new ubuntu system:
bcm4329 iface_name=wlan0

(You can do this when you started up ubuntu, after changing the file save it and REBOOT the TF prime to take it effect.)

Shutdown android (this will take care of unmounting the SD-card etc..) and boot into fastboot mode.

Follow this from Tux_mind's blog: http://lifeinarootshell.blogspot.it

remember to download the fastboot.blob file first on your computer

step 4
flash kernel_chooser
WARNING: ensure to have created the android config.
first of all you have to choose what method to use for flash the image.
fastboot - it's an open source program that uses an open source protocol
nvflash - it's a closed source program that writes partitions using nvidia custom stuff
personally i prefer fastboot since i can look at his source code if i wish, while when you launch nvflash everything is a secret....
download the image :
fastboot.blob if you choose fastboot
nvflash.LNX if you choose nvflash
here you can find md5sums of the images for doing a check.
now connect you TF201 to your pc and shut it off. if you choose to use fastboot:
take your TF201
keep pressed the volume down button
press the power button until the tablet vibrates
release the volume down key after you see 4 icons
press volume down until the green USB icon being selected
press volume up
go to your pc
open a shell and type fastboot -i 0x0b05 flash boot /path/to/fastboot.blob
you should see a blue bar on your TF201

You are done!
If all went well your TF prime is rebooting and you see the 4 pinguins!

Follow what is on your screen and choose 1 for android and 2 for ubuntu

Good luck and enjoy.

REMEMBER:

Non of the work is mine! I only followed and used the work of others especialy: Tux_mind.

Greetings,

Jos.

42 comments:

  1. Hey

    nice, but i dont understand the part after:
    "For the last part start up Better terminal. [....]"

    u say: "mount /dev/block/mmcblk1p1 /data/mmc "

    but there is no directory data/mmc on sd Card.. Or do i have to type it on my prime?? but in what terminal?? android got no terminal??

    And in ubuntu the Asus directories are not shown (i use Ubunut 64 in virtualbox on my Windows 7 machine and im new to linux)

    ReplyDelete
  2. Sorry bit late to answer.
    For this last part you have to be on your TF prime.
    Better terminal is a android app (get it from play store). Start it and become su.

    by: "mount /dev/block/mmcblk1p1 /data/mmc" you mount the first partition of your SD-card on the /data/mmc directory you made yourself in a previouse step.....

    Hope this helps.

    Greetings Jos.

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. i have tried to mount it on cm10.1 and now im on androwook 2.2 and the mount command doesn't work on both...
      mount /dev/block/mmcblk1p1 /data/mmc ==> "Usage: mount [-r] [-w] [-o options] bla...."
      what am i doing wrong?

      Delete
    3. found a solution on the tf201_how_to site.
      "mount -t ext4 /dev/block/mmcblk1p1 /data/mmc"

      Delete
  3. Thanks for writing this! I followed your tutorial and now have Ubuntu running from the external SD!

    The logical progression would be to dual boot and run Ubuntu from the *internal* SD.

    Have you heard of anyone accomplishing this yet, possibly a tweak on the procedure you've already outlined?

    Thanks again for a great article!

    ReplyDelete
  4. absolute f*cken legend!!!
    I was on this for weeks! Then I realized I needed stock kernel (had CM9 before). Followed your guide, and now dual booting Ubuntu and android.

    Thanks dude.



    ReplyDelete
  5. Hey,
    i did everything as above but when i start my tablet now i get the message:
    https://www.dropbox.com/s/3e0csykcwpzaqiu/2013-07-21%2010.41.26.jpg

    As the Error says, there is no mmcblk0p8 file the /dev folder because its in /dev/block.
    So i tried by changing the plain text´s:

    ubuntu
    /dev/block/mmcblk0p8:/boot/zImage:/boot/root_chooser
    +newroot=/dev/block/mmcblk1p1:/:/sbin/init

    android
    /dev/block/mmcblk0p8:/boot/android_kernel:/boot/android_initrd


    but still same problem, maybe the fastboot.blob is searching there?? if yes any chance to change this? O_o

    ReplyDelete
    Replies
    1. I also tried to copy the mmcblk0p8 to /dev and mount mount it to /data but on every reboot the file gets deleted..
      here is a list of mount -v:
      https://www.dropbox.com/s/m756ughvhm55186/2013-07-21%2013.42.02.jpg

      Delete
    2. I guess it's been a long time, but I was having the same problem too. This is what worked for me:
      /dev/mmcblk0p8:/boot/zImage:/boot/root_chooser
      +newroot=/dev/sda1:/:/sbin/init

      I realized that my microSD card through the dock was being mounted in sda1.

      Delete
  6. Could somebody make a video how-to? Waiting for this since the beginning, but i´m not able to get it done :(

    ReplyDelete
  7. What a great guide..Thanks for everything. Just a quick question tho.
    I have successfully installed everything on my ATP by following this guide. The problem im experience atm is that when i select Ubuntu on the kernel chooser my prime would not load. It will simply respond with a blank screen and then it will boot back to the kernel chooser. My path on .kernel.d is correct. It seems to me that the system cannot load the files from my sd-card. Anyone else experiencing this problem?

    ReplyDelete
    Replies
    1. please post your config files via pastebin or similar.
      please post all contents of both folders: .kernel.d and boot.

      -- error explaination --
      the blank screen and reboot it's a kernel panic.
      init process die and after 10 secs the kernel reboot.

      Delete
  8. Hi, thanks for the fast reply. Digging a bit myself i can verify that the config files are correct since i managed to load other distros (Fedora 17 and another Ubuntu distro). It seems to me that the current linux distro is failing on load and thus the blank screen. Is there any other ubuntu distro in the repository that i can try?
    Also would you like me to open the files in my boot and paste them? Thanks in advance

    ReplyDelete
    Replies
    1. mmmm...maybe you found a kernel_chooser bug.
      tomorrow i will compile a version of kernel_chooser with the DEBUG flag on, if you don't want to wait you can do it youself by cloning from my repo: https://github.com/tux-mind/tf201-dev.
      anyway, tell me more.
      the TF201 reboot after you choose your OS ? can you see the asus boot logo?
      from what you wrote before i guess that it's a kernel_chooser bug or you are trying to boot a non-kexec kernel.

      refer to this page for downloads: http://androtransfer.com/?developer=tux_mind

      please contact me via email: massimo.dragano [at] gmail.com

      thanks for your help!

      Delete
  9. Hi man, i do get a reboot after i choose ubuntu which means that the systems goes for the selected kernel. I do see the Asus logo as well. Im not 100% sure if it is the kernel_chooser or the Linux distro tho. I will have a look myself after i finish my work. Thanks for the reply.

    ReplyDelete
  10. hi man, i followed your guide, i installed ubuntu distro not in the root directory ot the microsd, but in a folder called "ubuntu".
    at boot, when in root chose i select ubuntu, the screen remain black forever. the screen isn't off but it's always black.
    can you help me?

    content of file /data/.kernel.d/android:
    android
    /dev/mmcblk0p8:/boot/android_kernel:/boot/android_initrd

    content of file /data/.kernel.d/ubuntu:
    ubuntu
    /dev/mmcblk0p8:/boot/zImage:/boot/initrd.gz
    +newroot=/dev/mmcblk1p1:/ubuntu:/sbin/init

    content of directory /data/boot:
    android_initrd
    android_kernel
    initrd.gz
    zImage

    i have a doubts:
    in ubuntu kernel's directory in the sdcard (/ubuntu) i put the content (decompressed) of the file ubuntu-12.04-preinstalled-desktop-armhf+ac100.tar.gz and the content (decompressed) of the file root_patch.tar.gz. is it correct?

    thanks a lot!!

    ReplyDelete
    Replies
    1. hi unknown :)

      you are probably using the wrong device.

      sdcard is /dev/mmcblk1pX
      Where X is number of the partition on the sdcard, usually 0.

      sorry for the late reply.
      glad to help you.

      Delete
  11. Hi folks,
    I am also getting the black screen trying to boot into Ubuntu and wondered if there is a fix anywhere?
    I will maybe give the arch option a try incase this is an issue with the Ubuntu build.

    ReplyDelete
  12. Hi Jos
    That's great job! My TF201 runs Ubuntu quite smoothly and fast enough, but I have a problem to start internal GPS module.
    Do you know how to mount properly gps module? It should be done inthe same way as wifi (/etc/modules: bcm4329 iface_name=wlan0), I guess.
    Driver and iface_name=?, that's the question !
    Thanks in advance.
    RGDS
    Robert

    ReplyDelete
    Replies
    1. hi robert, i gps should be compiled in the kernel, so no module needed.

      probably you have to play a little with /proc/sys ... will give it a look ASAP.

      have a nice day :)

      Delete
  13. I've got an error below:
    FAILED (remote: (InvalidState))
    finished. total time: 5.142s
    any body knows how to fix it ? Thanks!

    ReplyDelete
    Replies
    1. hi ray,
      just google it a moment and i found that you are probably trying to flash the wrong image.
      please check the md5 of downloaded files before flashing.

      good luck ;)

      Delete
  14. Ciao! Purtroppo non riesco ad avviare Ubuntu nonostante abbia seguito per filo e per segno questa guida... in particolare dopo aver selezionato Ubuntu, il tablet mostra il logo di Asus seguito da una schermata nera, un riavvio, di nuovo il logo Asus fino a tornare alla schermata di selezione (mi sembra che un altro utente aveva lo stesso problema). Android invece funziona bene. Inoltre ho notato che nella selezione posso muovermi solo con i tasti della dock e non con i tasti del volume come indicato premendo H. Puoi aiutarmi in qualche modo? Grazie in anticipo!

    PS: scrivo in italiano, spero non sia un problema!

    ReplyDelete
    Replies
    1. please write in english, thus to allow the world known your problem and take advantage of that.
      the black screen after the asus logo can mean tens of problems.
      please post here your ubuntu config. ( /data/.kernel.d/ubuntu )

      sadly i broke the original cable of the TF201, i purchased a non-original one and now i can only charge it...

      Delete
    2. in /data/.kernel.d/ubuntu i copied the text:
      ubuntu
      /dev/mmcblk0p8:/boot/zImage:/boot/initrd.gz
      +newroot=/dev/mmcblk1p1:/:/sbin/init

      I also inserted the sd into the dock and replaced "mmcblk1p1" with "sda1" but it doesn't work.
      (I'm using androwook 1.51 with stock kernel)

      About the kernel chooser, only the vol down works (and the keyboard of course)

      Delete
    3. to debug the problem chnage the last line to:
      +console=tty1 newroot=/dev/mmcblk1p1:/:/sbin/init

      you will se a classic linux output on boot, thus to allow you to fnd out what is the problem.

      Delete
    4. I'm so so sorry but i can't see where the problem is (I think that "Kernel panic" is not a good thing". I uploaded the last screen and i'm trying to upload a slowmotion video to make readable every line.
      https://drive.google.com/file/d/0B-IcljXAUHFXbjNxdnAtaFBmNkU/edit?usp=sharing

      Delete
    5. the init script exit as it beign executed.

      are you sure that /sbin/init exists on /dev/mmcblk1p1 ?

      there is an hacky way to debug your trouble.

      change /sbin/init to /bin/bash, you will dropped into a bare shell.

      then, run the /sbin/init to debug what it's going wrong.

      remember to leave the console=tty1 option.

      good luck

      Delete
    6. Hey! I've formatted the SD card again and used Ubuntu live instead the VirtualBox. I don't kow what made it happen but now Ubuntu works on my TF201. Thank you!

      Delete
    7. Alessio,

      Can you tell me exactly how you used Ubuntu live, as I have had the same problem when booting ("kernel panic") and I can't debug it.

      Thanks

      Jerry

      Delete
  15. This comment has been removed by the author.

    ReplyDelete
  16. Hi, thank you for the work.
    I have a problem with the chroot command :
    mount sdcard on /data/mmc is ok but next, when i tried to chroot /data/mmc into /bin/su i got this message:
    " can't execute "/bin/su" no such file or directory "
    I'm running androwook 2.31 on a TF201. I'm using Terminal emulator in root mode.
    The sd card is correctly mount on /data/mmc (i can see the 2 files on the directory) but i can't find the /bin/su directory or file with es explorer.

    Next, first i was not able to mount the sd card before. I did after the busybox installation (don't really understand what i did...).

    So... please help !
    Thank you

    ReplyDelete
    Replies
    1. Probably you failed to extract the OS into the sdcard. Please try to reformat your sdcard and restart the how to.
      Also delete your current OS tarball and redownload it again. ( I remember that I published md5sums somewhere... )
      After the extraction check that /bin/su exists. If not please post here what you did.
      Forgive me if i don't post here md5sums link but I'm on mobile.

      Delete
    2. ok i will try this in a week, no time for the moment.
      thank you for your quick answer.
      i will post the result.

      Delete
    3. hi again,
      i just did what you sugest and it works. Actually, i think that i missed some files on the sdcard form the extracty path. error even in sudo copy.
      i extract the tarball directly into the sdcard/ubuntu/ dirtectory and it works fine.

      now i have another problem : my tf201 is not recognize into fastboot mode.
      fastboot is running on my tf201 (autoboot with my bootloader), fastboot package are installed, juste "waiting for devices"
      i tried with a android sdk update (iniatially installed for adb commands) but unsuccefully, it is still "waiting for device".

      i used fastboot on windows months ago, to install cwm bootloader and androwook. I had the same problem, don't remenber how i did...
      start boring me !

      thanks for your help...

      Delete
    4. Hi, happy to hear that it worked.
      Try to run the fastboot command with the "-i 0x0b05" option.
      Ensure to boot into fastboot by running "adb reboot fastboot" when android is running.

      Delete
    5. i found my problem after failed your advices.
      finally i decided to try "fastboot devices" and i got (don't remember if i have done this before) : "no permissions fastboot"
      strange, i don't really understand why. so i ran the same command with sudo and my pc saw my tf201!
      just fastboot again with sudo command and it works

      so i have to do the command : sudo fastboot -i 0x0b05 flash boot /path/to/fastboot.blob

      thank you... i think i'm stupid sometimes... hope i will succeed the next steps, next week, no time now

      ps: when i did "adb reboot fastboot" it reboot my tf201 but on android, no in bootloader mode.

      Delete
  17. This comment has been removed by the author.

    ReplyDelete
  18. Hi, thanks for the previous tricks.
    At tf201 startup, i got this error :
    mounting /dev/mmcblk0p8 on "/data" - no such file or directory
    i try all the methods described below with no success.
    i checked the /data directory, it exists (on sd-ext, sd-in and root path...don't know exactly which one to check)
    any idea? thks

    ReplyDelete
  19. I have successfully installed Ubuntu and Android as a dual boot by following these instructions.

    When I boot and login to Ubuntu, I cannot get the Wifi working. I set up my home network but Ubuntu keeps asking me for the router password. Any ideas on how to get over this hurdle?

    ReplyDelete
    Replies
    1. - Can you see your home network in the available ones ?
      - Can you connect to an open network ?
      - Can you connect to another secured network ?
      - Can you connect to another secured network which have the same name, password and encryption ?

      I suppose that the first answer is yes, if so the wifi driver is working.
      Use the hotspot feature of an Android device to quickly answer my last 3 questions ;)

      Delete