[Eee Pad Transformer General] Kingzak34:
How to change the linux location / How to have multiple linux installations

Here we are, so in order to have multiple linux instllations or change defaut linux installation location, you will need a Linux computer. ( Or a Virtual Machine, that's what I use, with Virtual Box for exemple.

You will need 3 tools to get it done too.

You can get it there abootimg, blobpack and blobunpack files at the end of first post ( Thanks to [MENTION=3385661]shaola[/MENTION] ).

I post the zip in attachement for mirror.

MORE INFORMATIONS ABOUT THESE TOOLS : http://xdaforums.com/showpost.php?p=13713619&postcount=3

Now you have to get in the Rootbind kernel, the blob file. Blob file in Asus ROM can contain any partition of the device ( System, kernel, recovery etc ). In this kernel blob, there is only the kernel partition. Soooo, here we go for some commands.

Open your linux computer

Place all four files in same place ( better to have a folder created for this ). I'll take exemple of ~/kerneltf/ It's a exemple, so adapt in consequencies of course.

Now you have your four files in same place, blobunpack, blobpack, and abootimg-i686 so let's start with commands :

Go to the desired place :

cd ~/kerneltf

Unpack the blob containing partition imgs

./blobunpack blob

This will create partitions img. The one that interest us is the .LNX partition. ( Here blob.LNX )

Now unpack the kernel parition img

./abootimg-i686 -x blob.LNX

This will create 3 files, bootimg.cfg, zImage and initrd.img

The file we want to edit is bootimg.cfg. so open it with a text editor.

You'll see the last line is a cmdline. At the end we have the location of linux system place.

For exemple here : root=/dev/mmcblk0p7 bind=/linuxroot that means, the folder takes place in mmcblk0p7 ( /data partition of device ) and is placed in /linuxroot folder. So with Android layout it means /data/linuxroot.

You can now change the location of your folder, so you have some choices :

1-Change the folder location or name. ( This can be used to have multiple linux systems )

So you have this part : root=/dev/mmcblk0p7 bind=/linuxroot

If you want to change folder place/name change this part : bind=/linuxroot into whatever you want

For exemple root=/dev/mmcblk0p7 bind=/linuxroot2 or root=/dev/mmcblk0p7 bind=/linuxroot3 ( To have more linux systems )

Or root=/dev/mmcblk0p7 bind=/Linuxroot/Linux1

ATTENTION as said in rootbind thread : Make sure, however, not to put the Linux rootfs to the "internal storage" (/data/media) or any subdirectories thereof. This plays havoc with the Android media scanner when re-booting into Android and your tablet may slow down to a crawl.

2-Change the folder location in order to have it on an other partition like SDCard

For this choice, a 2nd partition on your SDcard is greatly recommended and should be in ext4. ( Must be the second partition, it is better for general use of SDcard )

So root=/dev/mmcblk0p7 bind=/linuxroot will become root=/dev/mmcblk1p2 ( can be p3 p4 or more if you have more than 2 partitions in your sdcard to have several systems on your SDcard ) the bind argument must be deleted as it will not be used.

3-Change the folder location in order to have it on first partition on SDCard

The problem here if you want your linuxroot folder in you SDcard with your other files, is that sdcard MUST be formatted in ext4 and so will not be recognized directly by Windows ( Using MTP in the TF will work but not Storage Mount ) cause Windows doesnt support ext4 partition. It's definitively the worse choice IMHO. The precedent process is definitively better choice. More than that it could make MediaScanner in Android going crazy too ( a .nomedia can maybe do the trick but not sure ).

More again, it hasnt been tested at all so you're the only responsible, but if you want to do it :

For exemple, to put folder on SDcard, you should change root=/dev/mmcblk0p7 bind=/linuxroot to root=/dev/mmcblk1p1 bind=/linuxroot

This means your folder is in sdcard ( The one in the tab ) at root in /linuxroot folder. ( /storage/sdcard1/linuxroot in android )

THIS HAS NOT BEEN TESTED YET, I CANT TELL YOU IF IT WORKS OR NOT.

Sooo, now you seted up your new location ( BE SURE TO DONT TOUCH ANYTHING ELSE ON THE CMDLINE, ONLY THIS PART ):

We will now repack the kernel to get it flashable.

Once again, be sure that you didnt make mistake with the file, and you only edited root=/dev/mmcblk0p7 bind=/linuxroot this part without deleting something or got a typo error.

We will now update the new bootimg :

abootimg-i686 -u blob.LNX -f bootimg.cfg

Then we will rename old blob file to create a new one with our modified kernel:

mv blob blobold

Now, we will repack our blob in order to make a new flashable zip with our kernel:

./blobpack blob LNX blob.LNX

You're done, make a copy of the old zip, rename it as you wish ( avoid spaces in the zip title ) for exemple Linux_Loader_2.zip

Then open it, and replace the blob file with your new one.

Now you're good to flash. Be sure to install a linux system in desired location before flashing it of course. See post 1 for this !