[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

flavours pitfall


I have been pulling my hair out on a curious problem, which I finally resolved and I felt I should share it with you guys.

I installed ezjail, created the basejail and created a new jail based on a custom flavour. As always, everything went smoothly :) That is, until I logged in to the jail and wanted to install some stuff via ports. I got the following error after running 'make install':

make: no system rules (sys.mk)

That looked kinda serious... First I suspected the method I used to create the basejail: Since ezjail 3.0 supports binary updates via freebsd-update (albeit not yet officially), I have been succesful in setting up jails without ever touching cvsup or csup. I install the basejail via 'ezjail-admin install -h ftp.XX.freebsd.org -r 6.3-RELEASE -p -m' and then I immediatly update it to the latest security patches with 'ezjail-admin update -u'. No more sup files, no more /usr/src :) Worked great so far, until now it seemed...

The problem however turned out not to be with my novel, still unofficial method, but with my custom flavour! I wanted to have som default files for new users in my jails, so I created a usr/share/skel directory in my flavour in which I put all my customized dot files. Big mistake apperantly, since in ezjail jails usr/share is a symlink to /basejail/usr/share. And it got overriden by my usr/share directory in my custom flavour! So when I started my jail, it missed a big and important part of its base system!

So I just wanted to warn you guys here: when you customize your flavour, don't create directories (or files) that should be symlinks to the basejail!

Also, I suggest that in the future ezjail should not overwrite the symlinks to the basejail when applying a flavour. It should instead give a warning when first creating and/or starting the jail! Or, if that is not possible, there should at least be a big warning in the manual describing this behavior!!

Of course, I have my 'make' problem solved now, but I still want my custom skeleton files... I guess I have no other option then to put them in the basejail, right? All ezjails will then have to same skeleton files, regardless of flavour, but I guess I can live with that...