I'm trying to change a Nexus 5 to use dm-verity module. For that I need to:

1. invoke an utility called *veritysetup* during boot **before** /system is mounted;
2. (this utility will will create a new device called /dev/mapper/devname);
3. let /system be mounted on /dev/mapper/devname, **not** the actual partition.

It looks like the mountpoint is configured on fstab.hammerhead (device/lge/hammerhead). In fact I have another mod working by changing this file. So this seams like the easy part.

I know some filesystems are mounted by init.c (system/core/init), like /dev and /proc, and some are mounted on init.hammerhead (system/core/rootdir), like /acct. But I can find where the request to mount /system is.

Any ideas?