How to add bind mount in redhat kickstart?

Posted on

How to add bind mount in redhat kickstart? – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about linux, redhat, kickstart, , .

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.

Solution :

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

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.

Leave a Reply

Your email address will not be published.