[Asus Transformer TF700] rss351:
Failed attempt to build ubuntu rootfs from scratch

I've burned quite a bit of time trying to build a ubuntu rootfs.img file from scratch, with little success. I've followed your guidance in the above text files, as well as the directions in the tf300 forum. I've tried starting from the armhf ubuntu core images as well as building a custom image using debootstrap and schroot. Images from the 12.10 and 13.10 ubuntu-core versions fail to boot.

I'm suspecting that I'm missing something (both conceptually and in the execution) regarding the kernel/boot.cfg/zimage/initrd files (which I don't really understand). Can I simply push the rootfs.img file to /data/media/linux/and boot into it, or do I need to do something in addition (such as include a kernel and initrd images)? I've noticed that neither rabit's ubuntu 12.10 or your lubuntu 13.04 rootfs files contain anything in the /boot directory. My impression was that the kernel and initrd and boot files were loaded onto the device memory with the installer.

When I boot my tf700 and select the rootfs-ubuntu_core_1310.img with Rabit's menu, it says:

Trying to mount virtual disk rootfs file: /data/media/linux/rootfs-ubuntu_core_1310.img
FSCK checking...
...
Mouting fs...
Found init

Starting Linux
----MOUNT ROOT---
Mounted: /dev/mmcblk0p8 on /root/mnt/android/data type ext4 (rw,noatime,nodiratime,user_xattr,acl,commit=60,barrier=1,data=writeback,discard)
/dev/loop0 on /root type ext4 (rw,noatime,nodiratime,errors=remount-ro,user_xattr,commit=60,barrier=1,data=ordered,discard)
----DONE----

====SYSTEM START====

It then stays at this screen and does nothing, instead of bringing up a terminal as I hoped. Loading the rootfs (as a .tg.lzma file instead of as a .img file) with the installer gives the same result.

Any advice would be much appreciated. What am I missing?

Fair disclosure, I am still using rabit's 0.8.3 installer and CROMI 3.5 (Android 4.1). I have yet to upgrade the bootloader for fear of adding complexity and breaking more things. Perhaps one day I will upgrade.

Thanks!!!

For those interested, here is how I created the rootfs.img file from the ubuntu-core rootfs. This is adapted from https://wiki.edubuntu.org/ARM/RootfsFromScratch/QemuDebootstrap.

# These commands are to be run from a host computer, and AS ROOT.
# First download a core image from http://cdimage.ubuntu.com/ubuntu-core/releases/13.10/release/
wget http://cdimage.ubuntu.com/ubuntu-core/releases/13.10/release/ubuntu-core-13.10-core-armhf.tar.gz

# Next, create a blank, pre-sized image file
dd if=/dev/zero of=rootfs-ubuntu_core_1310.img bs=1 count=0 seek=500M

# Format it to ext4
mkfs.ext4 -b 4096 -F rootfs-ubuntu_core_1310.img

# Mount the filesystem
mkdir -p mount_rootfs
chmod go+rx mount_rootfs
mount -o loop rootfs-ubuntu_core_1310.img mount_rootfs

# Extract the tar to the rootfs image
cd mount_rootfs
tar -xzf ../ubuntu-core-13.10-core-armhf.tar.gz
cd ..

# Umount the .img file
umount mount_rootfs

# Push to tf700 with adb
# adb push rootfs-ubuntu_core_1310.img /data/media/linux/rootfs-ubuntu_core_1310.img

Also, for those interested, I attempted to create a rootfs with debootstrap using (again, run as root):

mkdir /srv/chroot/saucy_tf700

# This will include the necessary wireless debs recommended by workdowg.
debootstrap --foreign --verbose --arch=armhf --variant=buildd --components=main,universe \
--include=network-manager,wireless-tools,iw,libiw30,libnl-3-200,libnl-genl-3-200,dhcpcd,net-tools,nano \
saucy /srv/chroot/saucy_tf700 http://ports.ubuntu.com/

# Setup schroot
# Create schroot config file
cat - > /etc/schroot/chroot.d/saucy_tf700.conf <<EOF
[saucy_tf700]
description=Ubuntu 13.04 Saucy for the TF700 (armhf)
directory=/srv/chroot/saucy_tf700
root-users=root
type=directory
users=ubuntu
EOF

# Copy qemu executable
mkdir -p /srv/chroot/saucy_tf700/usr/bin
cp /usr/bin/qemu-arm-static /srv/chroot/saucy_tf700/usr/bin

# schroot
cd /srv/chroot/saucy_tf700
schroot -c saucy_tf700 -u root

# Second stage debootstrap
/debootstrap/debootstrap --second-stage

# Edit etc/apt/sources.list and configure some APT sources
cat - > /etc/apt/sources.list <<EOF
deb http://ports.ubuntu.com/ubuntu-ports/ saucy main universe multiverse restricted
deb-src http://ports.ubuntu.com/ubuntu-ports/ saucy main universe multiverse restricted

deb http://ports.ubuntu.com/ubuntu-ports/ saucy-updates main universe multiverse restricted
deb-src http://ports.ubuntu.com/ubuntu-ports/ saucy-updates main universe multiverse restricted

# deb http://ports.ubuntu.com/ubuntu-ports/ saucy-backports main universe multiverse restricted
# deb-src http://ports.ubuntu.com/ubuntu-ports/ saucy-backports main universe multiverse restricted

deb http://ports.ubuntu.com/ubuntu-ports/ saucy-security main universe multiverse restricted
deb-src http://ports.ubuntu.com/ubuntu-ports/ saucy-security main universe multiverse restricted

EOF

# Run apt-get to install additional packages
apt-get update
apt-get upgrade
apt-get install ubuntu-minimal iputils-ping rsyslog alsa-utils ssh sudo software-properties-common python-software-properties openssl

# Install X11 and windowmanger if desired

#Add user
groupadd ubuntu
useradd -m -g adm -G root,sudo,users,audio,video,netdev,plugdev,bluetooth -s /bin/bash ubuntu
echo "ubuntu" >> passwd ubuntu

#Fix internet permissions, recommended by workdowg
echo "inet:x:3003:root,ubuntu" >> /etc/group
echo "net_raw:x:3004:root,ubuntu" >> /etc/group

# Here is a (incomplete) list of files that might need to be modified or copied from rabit's rootfs. I like the heredocument approach to editing.
# Init stuff:
# etc/init/tf700.conf, etc/init/zramswap.conf, etc/init/zram-config.conf
# Hostname, network, and users/groups stuff:
# etc/lsb-release, etc/issue, etc/fstab, etc/hosts, etc/hostname, etc/resolv.conf, etc/network/interfaces,
# etc/shadow, etc/gshadow, etc/group,
# Graphical stuff:
# etc/X11/xorg.conf, etc/X11/xkb/symbols/tf201dock, etc/default/keyboard
# etc/rc.local, etc/lightdm/lightdm.conf, etc/lightdm/lightdm-gtk-greeter.conf,

# Exit chroot
exit

# Create .tar.lzma file -- adapted from rabit's file. The --exclude options probably are not necessary in this case
# run this from within the saucy_tf700 directory
# Also, I am unsure if . or * .??* (last argument) should be used to gather the files.
# . places the files under subdirectory ./ in the .tar file, while * .??* places them at the root level. I am unsure if the effects are the same.

tar --create --preserve-permissions --lzma --file="../rootfs-saucy_tf700.tar.lzma" --exclude=lost+found --exclude='proc/*' --exclude='proc/.*' --exclude='sys/*' --exclude='sys/.*' --exclude='dev/*' --exclude='dev/.*' --exclude='tmp/*' --exclude='tmp/.*' --exclude='var/cache/apt/archives/*.deb' .

Probably using livebuild and pbuilder is better. Unfortunately, when the rootfs is unpacked and installed with rabit's installer, it doesn't boot, giving an error about being unable to find init or /sbin/init.

Thanks!!