Kernel Configuration with Solaris 11.2 – system.d

Manually editing in or scripting around /etc/system finally belongs to the past. It still works and probably always will work but with Solaris 11.2 /etc/system.d was introduced and offers a more sophisticated and advanced way of handling kernel configurations. It is as easy as just use one file per kernel config or rather module.
So instead of adding your zfs_arc_max setting to /etc/system put your it in /etc/system.d/arc.max for example. During boot archive creation the configs from any file within /etc/system.d (except .* files) will be collected and added to a well known file called /etc/system.d/.self-assembly. The under /etc/system.d located files will be processed in a C locale ordering.
The order of how the kernel configurations will be read is first system.d and then the “old” system file. Means if you have the same entries with different values the system one will win.

System.d lets you have your kernel configs packaged up in IPS. No more sed or what ever you used. Together with pkg verify and maybe even compliance you can be sure that the configs you use are also the configs you wanted it to be.

For more professional and first-hand information check out Darren Moffat’s blog post.

Leave a Reply

Your email address will not be published. Required fields are marked *