LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 07-29-2003, 05:23 AM   #16
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69

Can you provide a link to that how to so I (and others possibly) can examine it?

I've personally never had to mess with my includes on a new kernel, and have since then compiled a number of applications that would have otherwise needed them (such as ALSA). Nor have I ever had to mess with the asm directories, same deal there. However, I'd like to read over the documentation anyway to get a feel for what's going on exactly

Cool
 
Old 07-29-2003, 06:54 AM   #17
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Original Poster
Rep: Reputation: 129Reputation: 129
This was in Jeremy's hard drive performance thread, posted by lokee. I'd like to give him the credit for unearthing such a good manual. Perhaps you can alert Big John to this doc - I think he'd eat it up!

Read this:
http://tldp.org/LDP/solrhe/Securing-...ution-v2.0.pdf
The section which interests us for now is: Chapter 5, General System Optimization and Chapter 6, Kernel Security and Optimization.

When I installed Debian, it was my intention to compile a kernel and keep it lean, so there are no packages I can't do without right now. I had to manually change the mouse, adding z axismapping (is that right?) but there's so much hardware Debian didn't find. Another reason for compiling the kernel before really taking off.

Hope this helps, and I will continue to watch the progress of you experienced veterans. I tuned my hd according to this guide, and it's pretty fast now.

debian:/home/servant# hdparm -tT /dev/hda

/dev/hda:
Timing buffer-cache reads: 128 MB in 0.30 seconds =426.67 MB/sec
Timing buffered disk reads: 64 MB in 1.35 seconds = 47.41 MB/sec

I want to add a special note, that you can see reading this thread. The person who helped me, mrhyde, took the time to install Debian on a machine just to see exactly how it handled adding scripts during the boot process, since it's different that his distribution. This is a prime example of the wonderful help that is given daily in LQ. Without LQ, I don't think a lot of us would stick around to grow past the newbie stage.

You're one of those guys, too, MasterC!

 
Old 07-29-2003, 08:25 AM   #18
Strike
Member
 
Registered: Jun 2001
Location: Houston, TX, USA
Distribution: Debian
Posts: 569

Rep: Reputation: 31
Quote:
Originally posted by mrhyde
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!
This is waaaaaaaaaaaaaaaaaaaaaaaay too much work. Generally, if you have to do something like this to get it working in Debian, you are doing it the hard (read: wrong) way. windsorjax's link points to the right solution. Here is a direct link to the post on debian-user:

http://lists.debian.org/debian-user-0010/msg01322.html

Summary: install hwtools, drop hdparm settings in /etc/init.d/hwtools

Now isn't that much easier?
 
Old 07-29-2003, 08:35 AM   #19
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Original Poster
Rep: Reputation: 129Reputation: 129
Thanks Strike.

Out of respect for mrhyde, who spent his time installing Debian and verifying that his information worked, I did it his way. And guess what, it works great! The other link posted had a conflicting opinion, and my browser timed out trying to reach the link you posted, but I will look at it when I can get there.

I did see that it could be done differently, also. Now isn't that the beauty of Linux? You can take different roads to accomplish the same task. And from mrhyde's instructions, I learned just a little about: writing scripts, making symlinks, and how Debian uses different run levels and init.d. Plus, I didn't have to download and install a package that I would only use once.

Thanks for all your help!

 
Old 07-29-2003, 08:41 AM   #20
mrhyde
Member
 
Registered: Jul 2003
Location: Europe
Posts: 198

Rep: Reputation: 30
Yes maybe it is the wrong for Debian Administrators, however it is the standard for SVR4 clones, using distro specific tools for administration is not going to help you much if you are moving from system to system or distro to distro, there are very few vanilla networks around these days!!
 
Old 07-29-2003, 08:53 AM   #21
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Original Poster
Rep: Reputation: 129Reputation: 129
mrhyde, can you expound any on the /usr/include/asm and /usr/include/linux issue? I want to build the kernel now, and want to make it monolithic, but this information is still somewhat puzzling to me.

I don't see any symlink between /usr/include/asm and /usr/src/linux/include/asm-i386 but it does look as if they have the exact same files.

Am I correct in assuming that way the author says does also apply to Debian, and therefore, I should do it exactly as he says?

TIA

P.S. I also didn't download the Openwall kernel patch. There is one for 2.4.21, but I don't think I could folly all the directions and install it properly at this point - so I chose to omit that patch - though I certainly would like to have been able to use it.

Last edited by Bruce Hill; 07-29-2003 at 08:57 AM.
 
Old 07-29-2003, 09:38 AM   #22
mrhyde
Member
 
Registered: Jul 2003
Location: Europe
Posts: 198

Rep: Reputation: 30
I haven't had time to read into it fully Chinaman, I have been to the market and now I'm off to Ikea to purchase a new Futon! If I spend too much time in front of the computer the missus will have me!! I think you mentioned you were not too worried if things go wrong for you, experiment with it, you'll learn far more. I am using a SuSE box at the minute as I am planning to deploy SuSE on my next job, the default installation does not include the kernel source, however it does include these directories, what might be an idea, if this is similar to your setup, rename the directories in question, " mv /usr/include/linux /usr/include/linux.old " link your kernel source directories as stated in the manual, that way if it turns out to be a disaster you can rescue the system easily!! Got to go!
 
Old 07-29-2003, 11:25 AM   #23
Strike
Member
 
Registered: Jun 2001
Location: Houston, TX, USA
Distribution: Debian
Posts: 569

Rep: Reputation: 31
Quote:
Originally posted by mrhyde
Yes maybe it is the wrong for Debian Administrators, however it is the standard for SVR4 clones, using distro specific tools for administration is not going to help you much if you are moving from system to system or distro to distro, there are very few vanilla networks around these days!!
Yes, but SVR4 systems are how old? The way I see it is the old "work smarter, not harder" way. If you're going to administer a Debian system, why not use the excellent facilities it provides? The Debian team put a lot of work into what they produce and they all use it themselves, so they design it specifically for people like them to be comfortable with administering on a day-to-day basis. Just because something is in more widespread use doesn't make it a better choice ...
 
Old 07-29-2003, 11:29 AM   #24
Strike
Member
 
Registered: Jun 2001
Location: Houston, TX, USA
Distribution: Debian
Posts: 569

Rep: Reputation: 31
Quote:
Originally posted by Chinaman
And from mrhyde's instructions, I learned just a little about: writing scripts, making symlinks, and how Debian uses different run levels and init.d.
Unfortunately you didn't really learn how Debian uses them. Debian, while it does use SysV-style init, comes with a number of nice tools for managing it. See this post for more info on those. You shouldn't have to ever make your own symlinks via ln in Debian.

Quote:
Plus, I didn't have to download and install a package that I would only use once.
But the thing is you'd use it EVERY time you boot. That's kinda the whole point. I'd never advocate for someone to install a package they wouldn't use (and if you think you'd only use it once, install it and remove it, it's just that simple).
 
Old 07-29-2003, 12:48 PM   #25
rockmumbles
LQ Newbie
 
Registered: Jul 2003
Location: Podunk, Idaho
Distribution: Debian
Posts: 28

Rep: Reputation: 15
Look in /etc/init.d and see if bootmisc.sh is there
#
# bootmisc.sh Miscellaneous things to be done during bootup.
#

I put my "rc.local stuff" in there, as I was told bootmisc.sh is equivalent to rc.local.

-rock
 
Old 07-29-2003, 01:50 PM   #26
mrhyde
Member
 
Registered: Jul 2003
Location: Europe
Posts: 198

Rep: Reputation: 30
Strike why are you going to such lengths to contradict me? You refer to the wonderful job that Debian team did on developing there tools, good for them, the Red Hat team have done a wonderful job developing their tools, eg " redhat-config-packages, redhat-config-network " I don't use them, these are my personal configuration methods. Answering chinamans post developed into a discussion about the now infamous rc.local file, that is it. Nowhere in the post did I criticize Debian, you or anything else for that mater, I merely discussed a topic with chinaman. Now to be honest with you all I can say is, you are probably right, you are probably the most wonderful Debian administrator in the world, and I say fair play to you, I may be wrong but in my eyes, all the modern UNIX clones, whether they are BSD style or SVR4 or like linux a bit of both, I will try to administer them in a traditional manner. That is my personal preference, I use this site to contribute to the linux community, people like you are putting me off. It would probably be better for you to criticize MS products and achieve an aimless negative goal. Isn't it this very frame of mind that has the IT industry in the state it's in " My tools are better than yours " bla bla bla
 
Old 07-29-2003, 04:28 PM   #27
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Original Poster
Rep: Reputation: 129Reputation: 129
Stike,

You made a good, valid point. So did mrhyde. But you are incorrect in assuming that because *I didn't do it the Debian way* that I didn't learn anything. When someone is learning a new OS, they are taking an enormous amount of new information into their brain. Our brain was designed by God in a much more efficient manner than any OS designed by man. We are all unique, even to our fingerprints and DNA. We all do things differently. In this instance I chose to follow the course of the one who had been "walking me through it" (even though at one point I was rude to him) and had invested his time to double-check that his advice actually worked. (Note: many posts in LQ are from other newbies who are just guessing, and want to help.)

You may like to know that the method you described has also been entered in my little Linux notebook. If I write the same startup script when I install Gentoo, maybe I'll use that method, if it works there. However, information is received by each of us in different ways. Some can receive new information via "Stikeinfo -Uvh -f minus Chinamaninfo rm -rf /*" while others may prefer the experience to be "Stikeinfo -h plus Chinamaninfo echo $another_method" This may not work in programming, but perhaps you can "catch_my_drift."

The most wonderful thing about Linux is the community - and the Linux Questions community is, for the most part, highly intelligent and very cordial. I don't know how long you've been a sysadmin, or at what level. It really doesn't matter, except for this reason. When you give me information in a post that includes a flame or criticism of someone else, that tends to cause me to shy away from your posts. There is quite enough criticism of another man's methods if one wants to find such. We (yes, me included) continue to criticize M$ Windoze (see?), but there are things it may do that Linux will not do. That doesn't include crashing and releasing patches for previous mistakes. Linux does these, also. Because both systems are programmed by fallible men, who make mistakes. Most people in these forums still have a Windoze OS installed that they boot into on occasion - some more than others.

From a point of view, may I ask you a question? Why do you post in these forums? Is it to achieve recognition for your knowledge and experience, or to lend a hand in those specific areas where others have a need and you have an answer?

I will leave you with this, and though it's not original, it's going to be my sig, because I need to see it as much as you. People here call me all the time with Windoze questions, because they know I have a fair amount of knowledge. They don't call because I'm so brilliant, but because "I've been there, they don't want to read, and they know I'll help if I can." So, please, read my new sig:

Last edited by Bruce Hill; 07-29-2003 at 04:36 PM.
 
Old 07-29-2003, 09:29 PM   #28
mrhyde
Member
 
Registered: Jul 2003
Location: Europe
Posts: 198

Rep: Reputation: 30
Chinaman just a quick follow up on the stuff we were discussing earlier. I have followed the instructions in the manual, but omitted all of the " Makefile " tuning parameters, and instead of removing the " /usr/include/ " directories I renamed them to *.old. From here I followed the directions in the manual, making the links as suggested; I added one extra link though, " ln -s /usr/src/linux-version /usr/src/linux ". To configure the kernel I used " make xconfig " (I had X11 installed) and followed the instructions fairly closly ( I have different hardware than the author was using ). The kernel is compiling as I write, I'll let you know how I get on tomorrow.
I will now attempt to answer the question you asked earlier ( I'll probably get loads of strike type comments now!! ) When removing the standard kernel packages, the include directories " /usr/include/asm and /usr/include/linux " are also removed automatically. Rebuilding them, makes them available to the system again. The standard for networking TCP/IP is the OSI model which consists of seven layers; 1 Physical; 2 Datalink; 3 Network; 4 Transport; Session; 6 Presentation; 7 Application. The kernel, as its name suggests is the core of the system, it takes care of the first four layers eg TCP, UDP, IPv4 and device drivers ( Note: the Physical layer is the hardware layer ). The top three layers are the application layers, they are the Web browser or ftp client or web server. Each program is made up of C coded files, to include the lower layer protocols, drivers etc the program designer will use " #include <example.h> " headers in the program. If we did not relink these directories and we attempted to compile, let us say an ftp client, the compiler would stop with an error like " example.h :file not found ". The standard path for the headers is " /usr/include ". **Strike made a remark that you hadn't learned anything about scripting, init scripts are made up of shell commands, by making a file initialize at a chosen run level that executes any shell command is a basic script**. I hope all this makes some kind of sense to you, I am only a novice network programmer so some of this information may be incorrect, I have been busy with family stuff and don't start University term until September, when I will cover these topics more seriously and under the guidance of an excellent professor!
 
Old 07-29-2003, 10:03 PM   #29
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Arch, Gentoo
Posts: 6,940

Original Poster
Rep: Reputation: 129Reputation: 129
mrhyde,

Thanks a bunch! Glad to hear you're dedicated to your family above your computer.

Strike's okay - he'll get over it, and he taught me something, too. And just for kicks while I was reading I wrote it in bootmisc.sh as rockmumbles suggested, because what he said is in the man and correct. I changed our previous entries to .old (just in case) and it worked the way he said also. That was easy - one line to add to one file and no program to download. Personally I prefer writing a small script to installing a package.

I hope I never get so narrow minded that I can't learn from others.

Wish I could be going to university to learn. Actually, I could, if I could speak Chinese and read Hanzi (Chinese characters). So for now, I'll continue learning in the school of hard knocks, and from guys like you, MasterC, rockmumbles, and strike.

Thanks. I'm anxious to hear how your kernel compiled.
 
Old 07-30-2003, 06:50 PM   #30
stiles
LQ Newbie
 
Registered: Jul 2003
Location: Houston, Tx.
Distribution: debian
Posts: 12

Rep: Reputation: 0
Ok here is another "strike type comment"

this is a debian discussion right? ok no /usr/include/{linux,asm} are not links to /usr/src/linux/include/{linux,asm}

Code:
ls -ld /usr/include/{linux,asm}
drwxr-xr-x    2 root     root         8192 Apr 14 17:20 /usr/include/asm
drwxr-xr-x   11 root     root        24576 Apr 14 17:20 /usr/include/linux
want to know why?

less /usr/share/doc/kernel-package/README.headers

so according to Linus on the topic of symlinking the kernel headers (from an email discussion from 1997 wich is in the above doc) "The symlinks have been a bad idea for at least a year now, and the problem is just how to get rid of them gracefully."

Debian was the first distro to solve the simlink kernel header problem which you just re-introduced. Anyways IMO you should compile kernels in /usr/local/src (though it doesn't really matter unless you do something off the wall like linking {linux,asm}). Also using make-kpkg is a good idea for a debian system.

Ohhh BTW how's it going Strike?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fresh 10 install, Optimizations RedShirt SUSE / openSUSE 5 10-30-2005 11:39 AM
distro optimizations Nightfrost Linux - Distributions 12 04-19-2005 01:51 PM
Slack optimizations? bluenirve Slackware 4 09-20-2004 06:58 AM
Have any optimizations in Linux? Arc4ne Linux - General 4 06-23-2004 10:11 PM
Memory Optimizations ? tjm Linux - Software 3 07-08-2003 05:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 08:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration