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.
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:
bootsize = 0x800000 pagesize = 0x800 kerneladdr = 0x10008000 ramdiskaddr = 0x11000000 secondaddr = 0x10f00000 tagsaddr = 0x10000100 name = cmdline = [email protected] [email protected] vmalloc=128M gpt video=tegrafb console=tty0 usbcore.oldscheme_first=1 [email protected] root=/dev/mmcblk0p7 ro quiet splash
./abootimg-i686 --create boot.img -f boot.cfg -k 2636-zImage -r initrd.img
./blobpack kernelblob LNX boot.img
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:
dd if=kernelblob of=/dev/block/mmcblk0p4
the command mount will show you if is mounted or not and if it is, umount it
dd if=ubuntu.img of=/dev/block/mmcblk0p7
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.
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:
bootsize = 0x800000 pagesize = 0x800 kerneladdr = 0x10008000 ramdiskaddr = 0x11000000 secondaddr = 0x10f00000 tagsaddr = 0x10000100 name = cmdline = [email protected] [email protected] vmalloc=128M gpt video=tegrafb console=tty0 usbcore.oldscheme_first=1 [email protected] root=/dev/mmcblk1p1 ro quiet splash
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:
ubuntu asus kernel (the OLIFE one, the git kernel has some fixes as sound enabling), initrd and boot.cfg
Unbutu-sdcard.zip (with kernelblob prepared for microsd installation)
Android.zip (with revolver 3.1 default kernel)
Ubuntu-mountloop.zip for pseudo-dual boot with ubuntu.img placed in the internal sdcard
Latest git kernel and modules precompiled
Thanks to rdnetto, Jhinta and of course lilstevie