Editing /etc/default/rcS for a more friendly setup

Archived topics about LMDE 1 and LMDE 2
Locked
TonyRG

Editing /etc/default/rcS for a more friendly setup

Post by TonyRG »

With a fresh install of LMDE there are some issues with settings (for me at least), and most of them are held in the /etc/default/rcS file. To edit this file, open a terminal and type:

Code: Select all

sudo nano /etc/default/rcS
Mine currently looks like this:

Code: Select all

#
# /etc/default/rcS
#
# Default settings for the scripts in /etc/rcS.d/
#
# For information about these variables see the rcS(5) manual page.
#
# This file belongs to the "initscripts" package.

# delete files in /tmp during boot older than x days.
# '0' means always, -1 or 'infinite' disables the feature
TMPTIME=0

# spawn sulogin during boot, continue normal boot if not used in 30 seconds
SULOGIN=no

# do not allow users to log in until the boot has completed
DELAYLOGIN=no

# assume that the BIOS clock is set to UTC time (recommended)
#UTC=no # OBSOLETE; see /etc/adjtime and hwclock(8).

# be more verbose during the boot process
VERBOSE=no

# automatically repair filesystems with inconsistencies during boot
FSCKFIX=yes

# mount /run/lock as a tmpfs (separately from /run)
RAMLOCK=no

# mount /run/shm as a tmpfs (separately from /run)
RAMSHM=no

# mount /tmp as a tmpfs
RAMTMP=no
It's a lot easier to read when you realise that every line starting with a hash is not read by the computer, and is usually just there as a comment or description: it is also a good way of making a line ineffective, rather that deleting that line. I'll explain some of these settings, and why I have changed the defaults that were initially installed.

The "TMPTIME" setting of 0 means that the temporary files stored in /tmp are cleaned each time the computer is started. This is the default, and is obviously a huge improvement over Windows, where often third party applications are needed to prevent temporary files cluttering up the hard drive. In all honesty, I don't understand how SULOGIN and DELAYLOGIN might be useful, so I have left them at the default settings.

The UTC setting is quite important, especially for those of us dual-booting with Windows. Every time Windows shuts down, the system time is saved to the hardware clock in CMOS. If UTC is set as "yes" in /etc/default/rcS, LMDE behaves in a different way by setting the hardware clock to UTC and offsetting the system time from that. When LMDE saves the time to the hardware clock, resetting it to UTC, the time in Windows (which assumes the current system time is held in the hardware clock) is wrong. I set it to "UTC=no", but a hash was added to the start of the line by an upgrade, and a comment also added states that this setting is no longer used. This is good, because it was a source of great confusion to many users. The VERBOSE setting can be kept at the default of "no", unless you would enjoy seeing even more text scrolling up your screen at boot time.

I changed FSCKFIX to "yes", because I definitely do want filesystem errors checked and repaired. Unfortunately, LMDE set the wrong flags in /etc/fstab, so my home partition was not checked during boot (it is always a good idea to have a separate home partition). This was easily fixed, but outside of the scope of this post. To finish, LMDE set a number of system directories as tmpfs filesystems, which means they are stored in RAM rather than on the hard drive. First of all, I did not want /tmp to work this way, as it can cause problems with applications. As an example, DVD encoders sometimes store the contents of a DVD in /tmp temporarily, and a DVD can contain more data than the RAM that most of us have available, so obviously the application will complain that there is not enough space left on the device. Then, I saw a message during boot that /run/shm could not be mounted on tmpfs, because /run/lock had already been mounted as a tmpfs. I have much more hard drive space than RAM, and /tmp is cleaned on every boot, so I saw no problem with changing the default "yes" to a "no" on each of those lines.

If you are happy with your /etc/default/rcS, press CTRL+O to save and then CTRL+X to exit. If you have finished with the terminal, type "exit" to close the window.
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.
widget

Re: Editing /etc/default/rcS for a more friendly setup

Post by widget »

Interesting and informative. Thanks.

Just to add a note;
If you type exit to leave the terminal you will have that exit in your terminal history. If you use the up arrow to retrieve a previously used command this can be irritating.

Hit Ctrl + d to leave the terminal.

If you started a command running and realize you do not want it running hit Ctrl + c and it will take you back to the prompt.

You can restart the thing easily by hitting the up arrow to go back to the command you just quit.
Locked

Return to “LMDE Archive”