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

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read this

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

Postby TonyRG on Thu Nov 01, 2012 8:13 am

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.
Linux Mint Debian Edition; Dual core Pentium T4400; Intel Mobile 4 Series Chipset Integrated Graphics Controller; Mobile Intel® GM45 Express Chipset; Intel 82801I (ICH9 Family) HD Audio Controller
TonyRG
Level 1
Level 1
 
Posts: 1
Joined: Tue Oct 30, 2012 6:34 am
Location: North Wales

Linux Mint is funded by ads and donations.
 

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

Postby widget on Sun Nov 04, 2012 3:49 pm

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.
Dell XPS 420 Core2 Quad Q 6600, audigy5.1, Radeon HD 6450 - currently 4 320Gb HDD, Debian Squeeze for secure use, Debian testing for daily use, Debian Sid for fun.
widget
Level 3
Level 3
 
Posts: 167
Joined: Thu May 14, 2009 2:49 am
Location: S.E. Montana


Return to Newbie Questions

Who is online

Users browsing this forum: No registered users and 5 guests