Image

Imagejhf wrote in Imagelinux

fstab-fu needed

I've run into what seems like a limitation in the way fstab is handled for the second time, so I thought I'd ask and see if there might be more to the fstab "standard" than I know.

The more recent problem I've hit is wanting to mount /usr loopback from an image file on another partition (a Mac OS X hfs+ partition, in this case). The problem is that since all the non / filesystems are mounted in parallel, the /mnt/osx filesystem where the image file lives isn't yet mounted when mount -a tries to mount the image file.

(I can't fsck it either, because fsck is run before mount -a. This might be less of a problem, depending on whether the kernel can run journal recovery on a non / ext3 filesystem, which I can't test right now.)

It seems there must be a "standard" way to specify an order for filesystems to be mounted (how else then could, say, /, /usr and /usr/local be separate filesystems?) but I can't figure out what it is. Any ideas? I'm not keen on modifying my init scripts, if it can be avoided.

The other problem is similar, but complicated by NFS:
nineveh:/home    /mnt/home   nfs     tcp,rw 0 0
/mnt/home/files  /home/files binding bind   0 0
(where the last line is equivalent to mount --bind /mnt/home/files /home/files.)

IIRC (it's been a while since I've tried this), since NFS filesystems get mounted after mount -a, /home/files ends up being the directory under the NFS /mnt/home filesystem. To get around this, I just ended up creating a script later in the init sequence which does the mount --bind, but this just feels wrong. (I don't want to use a symlink rather than a --bind mount either, because it ends up being user-visible and occasionally breaking things.)

Is there a better way around this? Thanks!