[HOW TO] linux native in sbk2 devices, purelinux and pseudo-dualboot methods

Search This thread

stonerhino28

Member
Jan 26, 2008
25
0
Thank you for all the help. I finally got Ubuntu installed and running off of y microsd card and it works fine.

One problem though.... when i boot back into Android, my WiFi does not work. In Ubuntu, it works fine. Any ideas? I am using the stock rom rooted with, I think, ViperMod. My recovery is Rouge based on CWM.

Thanks

Well i figured it out. if you are using an ASUS OTA ICS based rom, do not use the Android-CM9_Mar29-signed.zip. It, for some reason on all roms i tried that were based on the ASUS rom, made the wifi not work when i booted back into android. This included Revolver, Codename Android and one or two others. I will test with more roms over the next week but as for the ones i have used the correct boot image to flash is Android-Revolver4_1.3-signed.zip. Thank you for all the hard work to get this working, Its the whole reason that i got the Transformer ;)

Sent from my Transformer TF101 using XDA Premium HD app
 

stonerhino28

Member
Jan 26, 2008
25
0
Oh and i forgot to ask, has anyone successfully been able to get the sound working through the speakers? Also how does getting the hardware acceleration working look? Has any body successfully gotten that to work. From what I have seen it doesn't look promising. Thanks again.

Sent from my Transformer TF101 using XDA Premium HD app
 

MrMuffin24

Member
Mar 14, 2012
14
0
The kernel compiled from git that shaola posted recently has sound fixes, however it has issues with wifi. Hardware acceleration is still being worked on by the devs, see the DEV Ubuntu thread and the Q&A Ubuntu thread for more info.
 

gangrif

Senior Member
Mar 30, 2011
126
13
So, i'd really like to try this out. I have a question or two first.


I'm on an sbk2 tf101. And i think i'd like to use your pseudo-dual-boot off of an img on the sd card.

I'm running CM9.

Your instructions say to flash the ubuntu zip to boot ubuntu, and flash the android zip to boot android. Which is fine, this is close enough to user-friendly dual-boot for me.

You also mention that you're using the Revolver kernel in your android.zip.
So.. what's that going to do to my CM9 install the first time i switch back?

Or, could i just flash cm9 to get back to cm9? What about my data? Am i fine as long as I dont wipe before booting back to CM9?

Thanks,.

---------- Post added at 03:10 PM ---------- Previous post was at 02:33 PM ----------

So... I read like, 2 posts in and realized you already addressed my questions. Sorry, i've been up since 4 am... attention to detail isnt all the fluent at the moment.
 

gangrif

Senior Member
Mar 30, 2011
126
13
Installed and running! Wonderful! It's a little less of an experience without a dock though. THat onscreen keyboard works, but its sort of a pain.

Guess i'll have to start saving for a dock. :D

Just a thought, i heard that a lot of android got ported upstream to the Linux 3.3 Kernel. Does that help this project at all?
 

gangrif

Senior Member
Mar 30, 2011
126
13
This is actually working really well!
On my linux workstations i usually run enlightenment. So i gave building e17 a shot on the tf101,

Built, and its great! it has a touchscreen mode, beats the pants off of the stock ubu onscreen keyboard! Im on it right now. With some work, this could replace android on the tablet for me!
 

4512jth

Senior Member
May 2, 2008
65
28
Can I use the kernels from the other topic (with 3D enabled) if I am using the mountloop version or would I have to compile the kernel myself with source changes so it will mount off of SD card?
 

jozka.1

Senior Member
Apr 9, 2011
216
91
We must compile kernel from source and combine with initrd with mount loop.
I've tried, but no success. :(
 
Well i figured it out. if you are using an ASUS OTA ICS based rom, do not use the Android-CM9_Mar29-signed.zip. It, for some reason on all roms i tried that were based on the ASUS rom, made the wifi not work when i booted back into android. This included Revolver, Codename Android and one or two others. I will test with more roms over the next week but as for the ones i have used the correct boot image to flash is Android-Revolver4_1.3-signed.zip. Thank you for all the hard work to get this working, Its the whole reason that i got the Transformer ;)

Sent from my Transformer TF101 using XDA Premium HD app

I believe you have to extract the blob file (kernel) from your rom and add it to your android flashable zip. Asus and AOSP roms uses different drivers for wifi.
 

jrohwer

Senior Member
Mar 4, 2011
424
286

jozka.1

Senior Member
Apr 9, 2011
216
91
shaola: Please could you post the .config, which you used at compile kernel (2.6.36)?

THX

E: nothing, I got the .config from /proc/config.gz - begginer
 
Last edited:

bcd234

Senior Member
Apr 15, 2012
64
3
I originally followed the instructions on page 1 and created a loopmounted image.

I was unable to resize the image, so I followed the steps to dual-boot from microSD.

I'm wondering if anyone would be able to provide me with instructions to remove the space in /internal storage/ which was used when I was trying to boot from a loopmounted image.

Thanks!
 

merjeu

New member
Feb 27, 2011
4
0
Here we go ... I bricked my TF101 b80, I have used gparted for resize my partition, rebooted well but when I have shut down it, my tablet don't want to power on, it stay in black screen. But I can connect it in apx mode. Anyway to restart it ? or I have bricked my device.
 

rmaniac

Member
Jun 24, 2009
28
1
Here we go ... I bricked my TF101 b80, I have used gparted for resize my partition, rebooted well but when I have shut down it, my tablet don't want to power on, it stay in black screen. But I can connect it in apx mode. Anyway to restart it ? or I have bricked my device.

To my understanding, a b80 is sbk2, it there is no way to save it if you can't boot to android or CWM. How long have you had it? Maybe you can try to get it fixed under warranty. I know with mine, I am given a 90day warranty (refub), but I have never clicked through or agreed to any terms that might violate it, so I would assume if I bricked it, they should fix it. Especially since you could fix it myself if they would just give us the damn key. Anywho. Sorry, maybe someone else has a better idea, but messing with internal partitions on a sbk2 device would be some rather dangerous waters to play in. I only partition my SD and when I mess with building linux kernels I make damn sure I am double check my steps.
 

Nairbly

Member
May 11, 2011
25
10
Anyone able to access their internal storage from ubuntu while using the loop-mount setup? I have tried mounting the partition but it says it is already mounted to /media but the files are not accessible.
 

ssciberras

Senior Member
Feb 29, 2012
133
5
Could not manage to do it yet.

I suspect that it is the root=./dev/loop that prevents it, but don't know how to get around it.
 

rmaniac

Member
Jun 24, 2009
28
1
Anyone able to access their internal storage from ubuntu while using the loop-mount setup? I have tried mounting the partition but it says it is already mounted to /media but the files are not accessible.

Easy greasy
mount -o bind /path/to/sd /path/to/dir/in/mounted/choot

Do this after you mount your partition or image, but before entering a chroot
 

Top Liked Posts

  • There are no posts matching your filters.
  • 21
    This is a guide for installing and running natively any linux distribution on tf101 devices with sbk2 bootloader, but with some tweeks it would work also in tfp devices.


    What is needed? you will need a rooted device with cwm recovery installed microsd for purelinux and a good microsd is recommended for one of the pseudo-dualboot options.
    This guide is also prepared to execute all the commands in a computer running linux and with adb prepared to work, but you can also do it in windows, just google a bit for abootimg, blobpack and adb.

    The binarys provided are precompiled for x86 system.

    I am going to use as example ubuntu but you can install any linux distibution making some tweaks that i am not going to explain in this thread because i already opened another one explaining this.

    DISCLAIMER: This is as safe as flashing custom roms (even a little bit less) you will always have a risk to brick your devices, I have a sbk1 device and in all my tests i haven't brick my device but i have the option of use nvflash so use it at your own risk

    There are two basic options, running purelinux and pseudo-dualboot, and this last one has different variants.


    Purelinux
    YES: you will have the option to go to stock with cwm recovery

    This will install ubuntu in the internal ssd in the data partition wich in tf101 is /dev/block/mmcblk0p7

    With this method you will lose all the data in your android rom so make backups if necesary.

    First of all we have to prepare the boot.img with the kernel and initrd, for that we will need abootimg, and a kernel already compiled, you either can compile your own kernel following lilsteive's, wiki instructions or use the one in OLIFE script. The initrd needed it's a bit diferent from OLIFE's one so i will attach the files needed at the end of this post.

    We have kernel image: 2636-zImage
    We have initd: initrd.img
    and we need a boot.cfg file with this inside:

    Code:
    bootsize = 0x800000
    pagesize = 0x800
    kerneladdr = 0x10008000
    ramdiskaddr = 0x11000000
    secondaddr = 0x10f00000
    tagsaddr = 0x10000100
    name = 
    cmdline = nvmem=128M@384M mem=1024M@0M vmalloc=128M gpt video=tegrafb console=tty0 usbcore.oldscheme_first=1 lp0_vec=8192@0x1fbed000 root=/dev/mmcblk0p7 ro quiet splash

    Now we can build boot.img with abootimg with this command.

    Code:
    ./abootimg-i686 --create boot.img -f boot.cfg -k 2636-zImage -r initrd.img

    Now we have created boot.img wich is ready to blobpack. It's VERY important to blobpack it to LNX partition to not overwrite cwm recovery.

    Code:
    ./blobpack kernelblob LNX boot.img

    Now we have kernelblob file and ubuntu.img. This is al we need to flash our device, but we can use a zip file suitable for cwm to flash the kernelblob. I will explain later in the pseudo-dualboot options.

    So now we place those files in a microsdcard and we reboot into cwm.

    Once in there we have to get a shell trough adb

    In some version of cwm you cannot see microsd but you see the sdcard, in that case you will have to manually mount the microsd.

    I don't remember right now if in cwm shell you are already root or not, but if not just su to gain permissions.

    Now this is the most risky part we have to dd the kernel blob to the correct partition, in this case is /dev/block/mmcblk0p4. As i said before we can flash the kernel blob also through a zip file.

    assuming we are in the folder where both files are:

    Code:
    dd if=kernelblob of=/dev/block/mmcblk0p4
    and now we flash ubuntu.img over data partition, but we have to be sure is unmounted, depending wich version of cwm recovery you may need to do it manually

    the command mount will show you if is mounted or not and if it is, umount it

    Code:
    umount /dev/block/mmcblkop7
    and then dd

    Code:
    dd if=ubuntu.img of=/dev/block/mmcblk0p7

    This will take some time, so be patient.

    And that's it, just reboot and go through oem instalation procedure and you have it.

    To go back to android you will only need to boot into cwm wipe everything to avoid problems reboot again into cwm and flash any rom wanted.

    With the last cwm version i had some trouble accesing to sdcard or microsd so i needed to delete a symbolik link (/sdcard was a symbolik link to /media/data and i don't know why) and create /sdcard folder, mount /dev/block/mmcblk0p7 over sdcard create a microsd folder and mount microsd manually over that folder.

    Pseudo-dualboot
    We have two options here, we can install over a microsdcard or put the image file in the internal sdcard.
    If you have a good 10 class microsd for me that's the best option if not, it will be much slower than the other option.

    Pseudo-dualboot over microsd

    The process here is almost the same than in pure linux, the diference is only that in the boot.cfg file rootfs parameter will be diferent partition:
    Code:
    bootsize = 0x800000
    pagesize = 0x800
    kerneladdr = 0x10008000
    ramdiskaddr = 0x11000000
    secondaddr = 0x10f00000
    tagsaddr = 0x10000100
    name = 
    cmdline = nvmem=128M@384M mem=1024M@0M vmalloc=128M gpt video=tegrafb console=tty0 usbcore.oldscheme_first=1 lp0_vec=8192@0x1fbed000 root=/dev/mmcblk1p1 ro quiet splash

    instead of /dev/mmcblk0p7 (wich is data partition of the internal sdcard) it will be /dev/mmcblk1p1 wich is the microsdcard)

    and instead of dd-ing ubuntu.img over internal sdcard we will dd to the microsd, we can do this also in cwm recovery or in a computer with sdcard reader.

    As i think it's less risky to dd things in your computer instead in cwm and you will need an ubuntu.zip and android.zip to change your operating system flashing the kernel trough cwm i've attached Ubuntu.zip to do that. It's already prepared for microsd instalation.

    If you compile the latest kernel (wich have some patches like the sound working) or you want to use it to purelinux instalation just do all the abootimg and blobpack proces and open ubuntu.zip and delete kernelblob and add your own one.

    You will also need an android.zip file with the android kernel you prefer to choose again android system to boot.

    I think it is aslo posible to do this with a pendrive is you have a dock, but i haven't tested it and i don't know if the kernel reads the usb devices soon enough to mount rootfs.

    If you want to try, just boot linux, see wich device in /dev/ is asigned to the usb and place the correct device in root=/dev/XXXX in the boot.cfg

    Pseudo-dualboot with loopmounted image placed in the internalsd

    Just place ubuntu.img in the internal sdcard and flash ubuntu-mountloop.zip to boot into ubuntu and flash android.zip to boot into android.

    There still are a couple of fixes to do, but i have no time right now and i am not using this configuration because i have sbk1 device so i won't be able to test and develop this but i will be glad to answer the questions i am able to.

    I've also added the latest kernel and modules compiled from git but i haven't test them.



    abootimg, blobpack and blobunpack files:
    http://dl.dropbox.com/u/60048492/transformer/blobutils-abootimg.zip

    ubuntu asus kernel (the OLIFE one, the git kernel has some fixes as sound enabling), initrd and boot.cfg
    http://dl.dropbox.com/u/60048492/transformer/kernel-initrd-boot.cfg.zip

    Unbutu-sdcard.zip (with kernelblob prepared for microsd installation)
    http://dl.dropbox.com/u/60048492/transformer/Ubuntu-sdcard.zip

    Android.zip (with revolver 3.1 default kernel)
    http://dl.dropbox.com/u/60048492/transformer/Android.zip

    Ubuntu-mountloop.zip for pseudo-dual boot with ubuntu.img placed in the internal sdcard
    http://dl.dropbox.com/u/60048492/transformer/Ubuntu-mountloop.zip

    Latest git kernel and modules precompiled
    http://dl.dropbox.com/u/60048492/transformer/kernel-and-modules-from-git.zip

    Thanks to rdnetto, Jhinta and of course lilstevie
    7
    How To - Step by step

    A few notes:
    • pseudo-dualboot over external microsd >> deletes all data on your external microsd card, but doesn't delete files on internal storage
    • pseudo-dualboot with loopmounted image placed in the internal storage >> doesn't delete files on internel storage (internal microsd)
    • how to resize img file (this you don't do in Ubuntu in TF):
      Code:
      dd if=/dev/zero bs=1G count=1 >> ubuntu.img
      e2fsck -f ubuntu.img
      resize2fs ubuntu.img
      bs=1G >> how much large, new size is 3GB
    • mount data from Android in Ubuntu:
      Code:
      mkdir ~/Android/; mount /dev/block/mmcblk0p7 ~/Android/
      after you find data in your home directory in folder Android

    I recommend use the last CWM > http://xdaforums.com/showthread.php?t=1213723 you need option flash package from internal storage

    For work all components follow here: http://xdaforums.com/showpost.php?p=25549030&postcount=1973 and http://xdaforums.com/showpost.php?p=26149064&postcount=2048
    You don't must nothing compile only apply change!




    Dualboot with loopmounted image placed in the internal storage (I recommend, it is faster and smoother than sdcard version)

    1. download http://lilstevie.geek.nz/ports/ubuntu.img.gz and extract ubuntu.img from .gz package to internal storage on /sdcard/
    (second mirror > http://www.ulozto.net/xyFaPBA/ubuntu-img-gz)

    2. download http://www.mediafire.com/?7f5fpatmgmg01ha and place to internal storage on /sdcard/

    3. download from http://www.mediafire.com/?labcx60jowrdx one package for back to Android(by the ROM you use) and place to internal storage on /sdcard/ *

    4. reboot into CWM recovery and flash the package Ubuntu.zip from 2. point

    5. reboot and you booting to Ubuntu :)

    6. you must add to /lib/modules/ this > http://www.2shared.com/file/843Sq6-J/3110tar.html

    Code:
    mkdir 3.1.10; tar -xzf 3.1.10.tar.gz -C 3.1.10; sudo cp -r 3.1.10 /lib/modules/

    7. reboot and enjoy

    When you want back to Android so reboot into recovery and flash your package from 3. point.


    Dualboot over external mirco sd:

    - your microsd card must have capacity more than 2GB (4GB is optimal)

    1. download http://lilstevie.geek.nz/ports/ubuntu.img.gz and extract ubuntu.img from .gz package to internal storage on /sdcard/

    2. open terminal emulator or run adb shell from your PC and enter the command:
    Code:
    dd if=/sdcard/ubuntu.img of=/dev/block/mmcblk1p1
    (mmcblk1p1 is external microsd card)

    - wait a few minutes
    - after succesful finished you can delete ubuntu.img
    - you don't see files in microsd card, but this is normal

    3. download http://dl.dropbox.com/u/60048492/transformer/Ubuntu-sdcard.zip and place to internal storage on /sdcard/

    4. download from http://www.mediafire.com/?labcx60jowrdx one package for back to Android(by the ROM you use) and place to internal storage on /sdcard/ *

    5. reboot into CWM recovery and flash the package Ubuntu-sdcard.zip from 3. point

    6. reboot and you booting to Ubuntu :)

    7. you must add to /lib/modules/ this > http://www.2shared.com/file/843Sq6-J/3110tar.html

    Code:
    mkdir 3.1.10; tar -xzf 3.1.10.tar.gz -C 3.1.10; sudo cp -r 3.1.10 /lib/modules/

    8. reboot and enjoy


    When you want back to Android so reboot into recovery and flash your package from 4. point.

    * when you can't find the package for your ROM or latest version so extract blob file from your ROM package .zip, rename to kernelblob and replace in Android-xxx.zip package

    Original post:
    Very thanks!

    A few questions:

    4
    I added to my guide the new kernel 3.1.10.

    Mount the data in Ubuntu:

    Code:
    mount /dev/block/mmcblk0p7 /path/to/any/folder
    2
    Very thanks!

    A few questions:



    Thanks, already corrected, and yes, that's an option, but the last version of ubuntu.img i think it's 2.0 GB and that one is 535MB or something like that, for all my tests i've used the 2GB one i think is inside OLIFE prime. But you can also build your own one with another distro. The question is wich type of instalation are you going to use, because in the native (internal or external) the image will be automatically resizes to fit the partition in the first boot so it doesn't matter, but in the loopmount one will keep the same size. So either of them would be a bad option.

    I will explain this later and wich options we have to increase the space.

    EDIT:
    http://xdaforums.com/showthread.php?t=1476835

    i have to rewrite that to correct grammar but it will help you understanding a couple of things
    2
    No, you must add files to /lib/modules/ in ubuntu, no in android!

    CD to where you have download package and:

    Code:
    mkdir 3.1.10; tar -xzf 3.1.10.tar.gz -C 3.1.10; sudo cp -r 3.1.10 /lib/modules/

    Or what is problem?