[Eee Pad Transformer Q&A, Help & Troubleshooting] shaola:
[Q&A] How to build/modify your own linux image for eMMC install Debian sample inside

This thread is for help and support with all linux distributions instalable in eeepad asus transformer. I will explain how to build your own image file or modify existing one in order to use lilstive OLife script.

As ubuntu is the most popular distro, please, all de questions related with ubuntu post them in lilstevie's thread.

You can install any distribution with arm architecture support, but you'll need to make some tweaks in the image in order to work propperly. As my experience in linux is most of it related with debian is the distro i will give the best support, but i'll try to answer every question you ask.

I've chosen debian armHardFloat port instead of debian armel fore many reasons, you can read about this port here:

http : //wiki. debian.org/ArmHardFloatPort

This port is still young so right now there are packages still unaviable to install but they are entering in wheeze day to day. If you preffer to use armel instead or armhf you can always do, you will loose improvement but you will have (at the time of writting this) less packages aviable. In the future (not far away) it will be the best option.

Building your own image:

There are many ways to create a image file but because we are going to need qemu in order to debootstrap the instalation the easiest way to create it is with qemu-img

qemu-img create debian-armhf.img 400M

I have only given 400M of space because is going to be a minimal instalation without desktop enviroment, it could be smaller but, just in case, that's the size i've chosen. The transfer with OLife it will be faster if the image is smaller.

When you boot for your first time you will find an error because there is no valid MSDOS partition table, this is ok, nothing happens because of that but if you want to avoid it use fdisk to create a partition table

fdisk debian-armhf.img

we need now to give format to the filesistem:

mkfs.ext4 debian-armhf.img

It will ask if you really want to do because it's not an ordinary partition and you have to type "s" to proceed

Now whe have ready the image and we have to mount it in some folder to install debian in it:

mount -o loop debian-armhf.img debian

asuming debian as the created folder for that.

We are ready to debootstrap de instalation:

debootstrap --verbose --arch armhf --foreign --include=btrfs-tools,locales,kbd,wpasupplicant wheezy debian http://ftp.de.debian.org/debian

this will make the first step to install wheezy armhf, --foreing parameter is because the target architecture is different from the host one and it's going to stop before de second-stage, it will include the packages btrfs-tools locales and kbd, you can add as many as you want but it will be always faster if you install them manually once installed in the transformer. I didn't install ssh server because i have a dock, but if you don't have it will be needed to complete the instalation with a remote shell, but you can also install packages later with chroot after the second stage.

In order to be able to chroot we will need qemu-user-static, with armhf it's needed 1.0 version with armel it's not necesary, it can be any version not too old. Also if you have an i386 system it's recomendable to install an amd64 kernel to do chroot or debootstrap will fail configuring cron. Actually i think in this sample image there is anacron instead of cron because there was an issue i thought it was related with that but later twb found out the problem was another different and now it's solved.

we will add qemu-arm-static to the instalation to be able to chroot

cp /usr/bin/qemu-arm-static debian/usr/bin/

we chroot to the new enviroment:

chroot debian

and execute the second stage of debootstrap:

./debootstrap/debootstrap --second-stage

After finish the instalation we will set the root password

passwd

and now it's ready, you can make tweaks, install packages (as ssh if you need it) or whatever you want, but you will have to add a repository to /etc/apt/sources.list in order to install any packages.

In this image and debootstrap proccess i've used german repositories because are the fastest for me, but you can use another one, right now it's neede also experimental repository to have working touch screen, but as soon xserver-xorg-input-evdev with full multitouch support enters sid as it won't be necesary

example of /etc/apt/sources.list

http://ftp.de.debian.org/debian unstable main contrib non-free
http://ftp.de.debian.org/debian experimental main contrib non-free

I have already installed in this image necesary packages for that and experimental repositories won't interfiere unless you pass the parameter for apt-file so you can forget about this if you want, but if you are building your own image apt-get install -t experimental xserver-xorg will do the work.

we have ready now our image but it need some files and tweaks to make everithing work in the eepad.

From here you can apply this to any arm image you want to test.

(all the files needed are in the attached file files.tar.gz in the rigth folders)

we need to add modules and firmware, i've extracted them from lilstive ubuntu.img

strictly necesary are:

/lib/firmware/nvram.txt
/lib/firmware/brcm/*

but you may need another ones if you are going to use external hardware, that's on you.

there are also two folder in /lib/modules one is for the asus kernel and the other one for chrome os kernel, i suggest to add both of them because it's just a bit space and you will be able to use the image with both kernels.

In order to make wifi work i've made /etc/modprobe.d/options.conf file with some parameters found in one of the threads of lilstevie and /etc/modules with the modules to load.

You will also need to configure /etc/network/interfaces and /etc/wpa_supplicant/wpa_supplicant.conf all this files are in the attached files.tar.gz but wpa_supplicant.conf is not because it depends of each ones wifi, but there is a wpa_supplicant.conf.example and you can always google for it a bit. If you don't have a dock make sure you do this correctly or you won't be able to connect to the internet and ssh device to continue instalation easily

if you want to be able to use adb (wich is really usefull if you for example did not correctly configure wpa_supplicant) you will have tu add also "/usr/bin/adbd" and /etc/init.d/adbd"

I've modify the original init.d script to avid LSB tags missing warning error, it's not really necesary rsyslog as previous service started but ... it works.

In order to make adb service start automatically we will execute (inside the chroot of course)

update-rc.d /etc/init.d/adb defaults

This may be different in non debian based distributions, but you can always ln manually to rcX.d

Finally, there is the "bug" it has made me think something was wrong and change cron with anacron, when you boot it appears to stop booting starting a service (cron, dbus, deppending what you have installed) but it isn't you can login pressing ctrl + alt + F2 (touchpad key),

we think it's related with the bootloader and default tty as 7 or something like that.

As workaround add in /etc/rc.local "chvt 1" (without quotes) just before exit 0 line

Because there is not oem-installation like in ubuntu after the first boot there are a couple of things to do, we have to resize the image to fit the partition, change password, configure locales and xorg keyboard-layout (if you have more than one locales) add an user and include in relevant groups and maybe more in the future so i've made a postinstalation.sh script included in /usr/bin:

#!/bin/sh
echo "Making online resize of the root partition"
partition=`mount -l | grep " / " | awk '{print $1}'`
resize2fs $partition
echo "changing root password"
passwd
echo "configure locales"
dpkg-reconfigure locales
echo "configure xserver keyboard layout"
dpkg-reconfigure keyboard-configuration
echo "configure localtime"
dpkg-reconfigure tzdata
echo "Please anter a user name"
read username1
adduser $username1
echo "adding user to relevant groups"
adduser $username1 audio
adduser $username1 video
adduser $username1 netdev
adduser $username1 plugdev
adduser $username1 bluetooth

adduser to bluetooth will fil because there is not installed any bluetooth manager so there is not bluetooth group yet, and remeber tu use OLife script to inject bluetooth firmware in order to have bluetooth working.

And that's it i think i haven't miss anything but i will update this when needed. You can now install your image with lilstevie's OLife script, you will have to rename it to ubuntu.img from now. If everithing went ok you can now install the desktop enviroment you prefer, on screen keyboard or whatever you like.

I haven't test network manager and i've only tested kde-netbook, but there are still broken dependencies and it's a bit slow. This will improve as soon as we have hardware acceleration (if we ever do), and armhf port goes ahead.

Lilstevie is going to host my images and maybe OLife script will have more options in the future, but from now you can download from here:

http://dl.dropbox.com/u/60048492/debian-armhf.img.tar.gz

(md5sum inside)

http://dl.dropbox.com/u/60048492/files.tar.gz

All credits and many thanks for lilstevie and twb for all the help they gave me.

I will apreciate any correction not only in this process but also in my english grammar/ortography