Thankfully it's not really that hard to completely flash the tablet back to normalcy thanks to Nvidia's nvflash utility and the tablet's APX mode. I managed to put the tablet back to Asus's stock ROM. Regaining root logins and privileges was trivial and now I managed to put in my previous daily driver ROM, Android Revolution HD, back into my Transformer.
To make my tablet two times as useful as it was at that moment, I've decided to reinstall Debian Kit. It is unfortunate that I had forgotten to back up the loopback image stored in my tablet's internal SD storage, so I had to reconfigure everything from scratch again. With that, however, I had the opportunity to do something different: I planned to put Debian on my tablet's external SD card, which is inserted on the right side of the tablet itself, not the one on the keyboard dock.
It is important to note, however, that most external SD cards are significantly slower than internal SD storages put inside most phones and tablets. The external SD card I used is a cheap class-2 16GB that I bought from CD-R king (of all places), so needless to say, my Debian install is going to be slow as fuck. Installing a package from the repositories for example, takes quite a long time, with most of the time wasted on unpacking, setting up, and installing the packages.
I partitioned the external microSD using gParted on my Thinkpad, with 12GB partitioned as ext3 (this is what Debian will use) and the rest of the remaining space as a FAT32 partition, because I don't think I'll be needing an entire ~16GB worth of space for an OS residing within another OS, especially when most of my work is done on the command line. It's formatted as FAT32 because apparently that and NTFS are the most convenient file systems that Android natively automatically mounts on its own. Following the instructions of a Debian Kit installation, instead of the usual opt to install the loopback image on a rather small 2GB file in the internal storage, I did the following with mk-debian:
# mk-debian -i /dev/block/mmcblk1p1 -d precise -t ext3
Where
/dev/block/mmcblk1p1 corresponds to the 12GB ext3 partition that I had created earlier on my external microSD. Note that I did not use /dev/block/mmcblk1 because that corresponds to the entire block device, rather than one of its partitions.So Debian Kit did its thing and installed a minimal install of Debian that for some reason follows the apt repositories of Ubuntu 12.04 Precise, so I can't really tell if it's Debian or Ubuntu, though I'll just settle on calling it Debian for now. Anyway, I digress. After Debian had finished its usual setting-up, I began to set up my installation according to my specifications. I followed most of the stuff on the Debian Kit manual regarding
andromize, created a normal user for myself, adding sudo privileges for the said user, fixed the timezone being set in UTC by default, and reimporting my dot-config files from my Thinkpad. So far, so good.Once I let the tablet go to sleep, however, either when it automatically does after a time period of inactivity or when I close the lid with the dock connected, the block partition "disappears". That is to say, when I get back to my Debian install through the terminal, and do a command such as
ls, the command is strangely not found by the system. The same thing happened to cd. I then concluded that I the block disappeared and now I'm just running off the system from memory.I figured that it was something wrong with my ROM of some sort. I noticed that whenever external volumes (SDcards, USB drives) are inactive and the tablet goes into sleep, Android automatically unmounts them, then remounts them back again when I wake the device. I did a little research on this annoying behaviour and found out that it's a "feature" made by Asus. I then hypothesized that Asus was extremely bright to unmount the entire device rather than just the partitions that it can read (which is to say, when the ROM decides to unmount the FAT32 partition
/dev/block/mmcblk1p2, it takes the ext3 partition /dev/block/mmcblk1p1 along with it as well). Since Android Revolution HD branched itself out from the stock ROMs of Asus, the behavior persisted on my custom ROM.I figured that the ROM only does this on filesystems that it naturally (in a sense that I can see and use them on the native Android interface) detects and supports, like FAT32. So I repartitioned my external SD card again, only this time I made the ext3 partition take up the entire storage space on the device. After that I made Debian Kit install itself on the newer, larger partition.
That is currently my setup as of now and thankfully
/dev/block/mmcblk1 stops disappearing whenever my TF101 goes into sleep mode. However, I noticed that after a long uptime /dev/block/mmcblk1 eventually disappears again. I do not know at the moment if it happens during activity or inactivity, but very recently I left my Debian user account logged in overnight and when I tried to use it again the following morning it appears that my partition had disappeared once again. It's solvable with a reboot, but rebooting is tedious and takes some time.I will look further into this problem and check for any solutions. Hopefully it's something related to my ROM and not any of my hardware. If that's the case, I'll just take a look at some sweet Android 4.1.2 Jellybean ROMs, and try them on my tablet.