Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I would like to add a bind mount to my redhat server that gets reimaged via kickstart. Problem I am facing is, it looks like %pre is too early and %post is too late. For example I would like to take out /var and put it in a different real mount like /bigfs/var. I would like to do it before any writes to /var. Theoretically I can do it in post where I could tar current /var, create bind mounts, untar. This seems a clunky way of doing it, wonder if there is a better way to insert entries in /etc/fstab when new filesystems get mounted and get added to /etc/fstab.

share|improve this question
add comment

2 Answers 2

Use %post --nochroot to avoid chrooting into the installed system, then edit /mnt/sysimage/etc/fstab in that block.

share|improve this answer
add comment

The only way to manipulate /etc/fstab before the install is though the part command and that doesn't support bind mounts. I do the manipulation in the %post section as you describe.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.