DebianThis forum is for the discussion of Debian Linux.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I just got through using an abstract to tune my hard drive. http://tldp.org/LDP/solrhe/Securing-...ution-v2.0.pdf
However, it was written for RH7.1 and I am using Debian. After everything has been tuned, and the beast is running like a cheeta, the last instruction is:
Once you have a set of hdparm options, you can put the commands in your /etc/rc.d/rc.local file to run it every time you reboot the machine. Yeah, right!
That post doesn't make any sense. If I don't have a rc.local file in Debian, how would I use an editor to read about it? And if I am not using bsd or rh, how or why would I find out how they use it?
Sorry if I totally misunderstood your post. Can you just explain what you mean, or where I am to examine the contents of a file which isn't on my os.
I was referring to the boot.local file you mentioned, also you could create an rc.local file if you want, eg " touch /etc/rc.d/rc.local " link it to " ln -s /etc/rc.d/rc.local /etc/rc.local " and to " ln -s /etc/rc.d/rc.local /etc/init.d/rc3.d/S99rc.local " and so on, take a look at a Red Hat box and see how the file is linked!
Originally posted by mrhyde use your favorite editor to examine the comments in the file, eg rc.local on bsd or rh, the comments refer to how the file is used!
Now how would one examine a file which doesn't exist? One post you say examine rc.local on bsd or rh. Did you read my post carefully? I am running Debian.
The next post you say I was referring to the boot.local file you mentioned when I never mentioned a boot.local file.
The rest of your post is beyond me. Especially how you think I would take a look at a Red Hat box and see how the file is linked! While I'm at it, why don't I take a look at a Mac OS X?
I'm sorry, but your posts have gone right over my head - especially the symlink suggestion!?!?!
Sorry, I meant rc.boot, my mistake. Red Hat uses SV init, at different run levels the init process starts services or programs, the last file initialized at run level 3 and level 5 is the rc.local file ( /etc/init.d/rc3.d/S99rc.local ). Traditionally BSD system administrators use this file to start extra programs they have compiled od commands they wish to run before startup is complete. Debian, like Red Hat and SuSE are BSD clones that use the SV init process to start and stop programs. I suggested looking at a Red Hat system so you could see how the rc.local file is configured. If you create the rc.local file in /etc/rc.d/ and symbolically link it to the rc directories ( run level directories ) init will execute the commands you insert in that file.
Thanks for your patience. I awoke after only a couple hours sleep and read your post. I am GMT+8:00 - it's now 3:30 a.m. Please excuse my rude reply! Btw - I'm new to Linux - my background is doze.
Debian has a file /etc/init.d/rc which has the following comments at the start of the file:
#! /bin/sh
#
# rc This file is responsible for starting/stopping
# services when the runlevel changes.
#
# Optimization feature:
# A startup script is _not_ run when the service was
# running in the previous runlevel and it wasn't stopped
# in the runlevel transition (most Debian services don't
# have K?? links in rc{1,2,3,4,5} )
#
# Author: Miquel van Smoorenburg <miquels@cistron.nl>
# Bruce Perens <Bruce@Pixar.com>
#
# Version: @(#)rc 2.78 07-Nov-1999 miquels@cistron.nl
Could this be the file where I need to put the hdparm options?
If not, please explain to me how to symlink a rc.local file that I would create. Debian doesn't have /etc/rc.d, but in /etc there is:
rc.boot
rc0.d
rc1.d
rc2.d
rc3.d
rc4.d
rc5.d
rc6.d
rcS.d
Hope I haven't missed the point entirely, or confused you with this.
Here's what I did.
Create the file. " touch /etc/init.d/rc.local " make it executable " chmod +x /etc/init.d/rc.local ". Next we make the links, " ln -s /etc/init.d/rc.local /etc/rc.local " handy link for editing! Link to run levels, level 2" ln -s /etc/init.d/rc.local /etc/rc2.d/S99local " level 3 " ln -s /etc/init.d/rc.local /etc/rc3.d/S99local " level 5 " ln -s /etc/init.d/rc.local /etc/rc5.d/S99local " to test it insert a command like " touch /home/hello.chinaman " if the file is in /home after reboot it works, remove this command, put some comments in the file just in case some one inherits the system from you ( is a work machine? ). I hope this helps you understand how the scripts are executed at different levels, it may stand by you if you install a custom package and need to write a startup script!
Thank you so much! What kind of person installs an OS to *try something* for another person? If I knew how, I'd post this for everyone who visits LQ to read.
You wrote the help post so thoroughly that I copied and pasted your instructions, followed them to a t, and it all executed perfectly!
Now I will continue the process of compiling a new kernel.
That would led me into asking another question, if you please. The Securing-Optimizing-Linux-The-Ultimate-Solution-v2.0.pdf at tldp.org says,
Cleaning up the Kernel
It is important to be sure that your /usr/scr/asm and /usr/include/linux subdirectories are just symlinks to the kernel sources. Then it goes on to say to remove those two directories then rebuild new links that point to the same name directories under the new Linux kernel souce version directory.
This sounds correct to me, but I don't really know for sure if it is. Can you expound on that? I am in the process of compiling my first (monolithic) kernel for Debian, and if I totally mess it up, the worst case scenario is format and re-install. However, I'd rather not.
Thanks for your help. Wish I could repay you somehow!
Hello again, well the reason I tried that little job out yesterday, I suppose curiosity, I wanted to how the init process worked on debian. This is a very interesting question you are asking! I have got to read that tldp book before I give my opinion, just to make sure I am clear on everything.
NOTE: One I posted incorrectly - it's /usr/include/asm instead of /usr/scr/asm.
Okay, thanks. From the surface it looked okay, but there's a lot of stuff in my /usr/include/asm and /usr/include/linux subdirectories. And my experience is very limited in Linux.
The fastest explanation for linking these directories is; the author recommends the removal of the standard kernel, doing so will remove the original links from the /usr/src/linux directory. Building new links will ensure these #include directories are available, lets say that you remove the standard kernel, if you don't relink these directories they will not exist. If you then go to compile a new program that relies on headers from these directories you'll probably find it won't compile. ( It's possible the system won't boot either! ) I will look for a more detailed explanation of the uses of the headers in these directories and typical programs that use them, I also want to reread that document, it's very good!
Thanks. I am working on a couple of other issues right now, plus need to give some time to my family. When I can get back, I will re-read this post of yours, and read more about those headers.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.