You are not logged in.

#1 2010-05-22 19:35:32

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,965
Website

chroots and cross-device linking: suggest alternatives

I've just installed a lightweight 32-bit chroot following the guide in the wiki.

The problem is that /opt on my system is a symlink to /usr/opt and /usr is on a different partition than root and /etc, so I can't create the hard links at the configuration step and symlinks won't work within a chroot (at least they shouldn't, although I haven't actually tried). I've simply copied those file for now just to test the set-up (it works).

It's probably better to avoid linking some of those files to preserve integrity of both systems, but some such as the resolv.conf need to be kept in sync.

What's the best way to do this? So far it seems that the easiest solution would be to simply create a script that copies relevant files into the chroot before changing into it, but I would prefer something automatic.


*edit*
I don't have enough space on my root partition for the chroot either, so installing it there is not an option.

Last edited by Xyne (2010-05-22 19:36:35)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#2 2010-05-22 19:58:53

Berticus
Member
Registered: 2008-06-11
Posts: 731

Re: chroots and cross-device linking: suggest alternatives

I would've also done the same thing you did, copying (or rsyncing) relevant files before changing. Although I'd put it in a wrapper script.

You could also use a daemon to watch for changes on those files and have it rsync/copy for you. I don't have any experience with fs change monitors, but fschange, audit, fcm, fileschanged, and fsniper (with inotail) look like some possible candidates.

Offline

#3 2010-05-22 20:05:04

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,965
Website

Re: chroots and cross-device linking: suggest alternatives

I like the daemon idea. I'll use a wrapper script until I have time to look into it.

Thanks.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

Board footer

Powered by FluxBB