CentOSThis forum is for the discussion of CentOS Linux. Note: This forum does not have any official participation.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I want to mount .iso file after every booting of system. I know in centos-7 the /etc/rc.local file is not executable and need to change permission to run it like previous version. But i have made the changes but still after booting the .iso file is not mounted. Please advise.I have used the below command in rc.local file and make it executable.
Actually, you can have noauto but use the root cron to still mount it. I do that with several of my very large filesystems (12TB) to avoid a fsck on reboot but allow for manual fsck.
@reboot alias for cron see "man 5 crontab"
In my script I mount the drives and bounce the smb service as part of the start-up after all other things have loaded.
Are you referring to the fsck that happens based on the number of mounts that were done or the number of days since the last fsck run?
If so, there is no need for having scripts to handle those filesystems, you can simply use tune2fs to disable those fsck runs at boot, have a look at the -c and -i options.
/etc/rc.local or /etc/rc.d/rc.local are no longer executed by default due to systemd-changes. (as mentioned in the first post, but just to be sure)
to still use those, you need to make /etc/rc.d/rc.local executable:
chmod +x /etc/rc.d/rc.local
If the script is executable, it should be executed at boot when you add a line containing
to /etc/rc.local (which is a symlink to /etc/rc.d/rc.local)
to be sure that your script is executable, just do a chmod +x /root/scripts.sh
To debug your problem, it would be a good idea to redirect the output of the script (if there is any) to a logfile to be sure if the script has been executed or not.
i have another frustration with fedora. why is it that if i put my thumb drive in /etc/fstab and i boot up with it unplugged, the machine will drop me in a minimal root shell ?
Because systemd bails out when you add incorrect definitions to your fstab. Filesystems that are not present every time have to get either the general "noauto" mount option or the systemd specific "nofail" mount option (which states that the filesystem is only "wanted", but not "required"). Having none of them in an entry in an entry of fstab means that this filesystem is considered to be present at boot. If such a filesystem is not present this is a non-recoverable error and the system rightfully drops to a shell, so that the admin can fix the situation, instead of trying to boot a system to a possibly inconsistent state.