4 Answers
4

Don't think about Android as a heavily modified Linux distribution. Because it's not. The nearly only thing that Android shares with a Linux distribution is the kernel. And even this component is modified. Also other core components, like the libc, differ.

Android has no /etc/fstab

You don't need /etc/fstab to mount an partition. But there is IIRC no mount command either.dev_mount should work (root required). To answer your questions title: All startup system mounting is done with the/etc/vold.fstab helper script.

this will remove the noexec, nosuid and nodev flags, but it will still be vfat fs. You can make links to this fs but not from within. The remount does not survive a reboot, because the vold.fstab file will be read and they will be remounted at reboot with the noexec flags.

If you reformat any of your external storage to anything other than vfat, then they will not be remounted at reboot, and any apps that you have moved to any external storage will not be usable. If you don't intend to use external storage for apps then you can unmount your external storage and use busybox mke2fs DEVICE to make it ext2. Use busybox newfs_msdos DEVICE to return it to vfat and make it usable again.

Note busybox mkfs.vfat is broken, you will get something like

lseek: Value too large for defined data type

so don't waste your time. All of this assumes you are rooted, and have a working busybox binary.

Android-specific init programs are found in device/system/init. Add LOG messages to help you debug potential problems with the LOG macro defined in device/system/init/init.c.

The init program directly mounts all filesystems and devices using either hard-coded file names or device names generated by probing the sysfs filesystem (thereby eliminating the need for a /etc/fstab file in Android).

Elsewhere /etc/vold.fstab and /etc/vold.conf are mentioned. I have them on my device under CM 7.1 but I'm not sure of how they are used.

It kind of is hardcoded, but it kind of isn't. There's an init.rc file that lives in your ramdisk, so you can pull your boot.img, extract your ramdisk, and then modify the init.rc and repack it again (briefly discussed here, and Tiamat's source is a good example of setting mountpoints in init.rc)
–
eldarerathis♦Oct 13 '11 at 18:18