[SOLVED] Creating directories early in boot process

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
excruciated

[SOLVED] Creating directories early in boot process

Post by excruciated »

Hello. I have never worked with Upstart and do not have time to read the entire cookbook right now. I am using Mint 13.

The Background:
In order to reduce writes to a solid state drive, I have /tmp mounted as tmpfs in fstab. Other directories that have a good amount of writes and contain files that I do not mind losing between boots are moved or symlinked to /tmp. I am trying to keep /tmp organized and wish to create a directory tree during boot so each symlinked directory gets its own directory in /tmp.

The Problem:
One of the symlinked directories is /var/log, which I wish to symlink to /tmp/log. This requires creating /tmp/log before logs are written else certain processes will not function properly or choose to write their logs elsewhere. It would be easy to create a new job for this in /etc/init, but by default this would not be executed early enough.

What is the best method for automatically executing a series of commands as early as possible in the boot process? I have accomplished a similar task using much simpler BSD-style init scripts in the past, so I am assuming it can be done with Upstart. Any solution (or a link to the solution) would be greatly appreciated.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
excruciated

Re: [SOLVED] Creating directories early in boot process

Post by excruciated »

Solved; added to the script in /etc/init/rc-sysinit.conf before the system initialization scripts are called.
Locked

Return to “Installation & Boot”