LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   How Do You "Drop In New Kernel" For Slack? (https://www.linuxquestions.org/questions/slackware-14/how-do-you-drop-in-new-kernel-for-slack-443337/)

drlouis 05-12-2006 11:34 PM

Quote:

Originally Posted by Alien Bob
I can expand that post of mine, if people are interested. What I'd like to know, if my story added more insight after having processed DaOne's "kernel compile guide for 2.6"? What did you miss in either threads that you feel is missing from the "newbie" point of view?

I'm thinking of copying the instructions into my Wiki so that I can polish it further and make it more "sticky" - like the two posts up here in the Slackware forum.

Eric

The thing that sets your write up apart from the other write ups I've seen is all the wordiness the others writers put in between steps, which is great for explaining whats going on, but tends to make me lose the continuity of the process. I like Old Fogie's idea to link to pages with further explanation. Also some other write ups even said 'do this and that step as outlined in this write up from previous versions' which again is totally do-able, but makes it that much harder to follow. I like how yours lays it out. I can "see" the process more easily.

I hope that doesn't make it sound like I dont appreciate the effort the others have done, just saying why I liked yours so much. I think it'd be awsome if you expanded it, especially since I'm about to take the leap and compile a 2.6 kernel on my laptop(last 2.6 compile didn't go real smooth (on my old desktop) so I'm a bit nervous since my system is working like a clock so far).

Alien Bob 05-16-2006 06:47 AM

I copied my kernel compile guide over to my Wiki pages and will keep updating it there. Thanks to Old_Fogie, I added a chapter on verifying the kernel archive's GPG signature.
I will also add this link to my original post in the thread. Comments are welcome on the "discussion" tab in the Wiki page.

Eric

Old_Fogie 06-02-2006 09:56 PM

hiya, well i'm running a make right now following your site and this thread at same time.

I'm going to try and use the same kernel that slack current is runnning. I wanna see if I can get video to work for me in slack10.2 w/the latest ATI drivers.

You know I'm going thru your site and still finding some things I didnt know, or catch my eye :D

Let's hope it works.

Old_Fogie 06-02-2006 10:54 PM

hmmm...doesn't this need to be two lines?

Quote:

cd /boot rm System.map
look like this:

Quote:

like this:
bash: cd /boot
bash: rm System.map
I tried it as one line like you had, and console said: ln: `System.map': File exists

Old_Fogie 06-02-2006 10:56 PM

and should I do this at all?

Quote:

ln -s config-custom-2.6.16.19 config
in my /boot directory before I do lilo?

win32sux 06-02-2006 11:05 PM

Quote:

Originally Posted by Old_Fogie
hmmm...doesn't this need to be two lines?

yeah... it's a typo... you could also just separate the commands using a semicolon...
Code:

cd /boot
rm System.map

or
Code:

cd /boot ; rm System.map
Quote:

Originally Posted by Old_Fogie
and should I do this at all?
ln -s config-custom-2.6.16.19 config
in my /boot directory before I do lilo?

doesn't really matter... lilo won't care either way... config links like that are usually just to make things easier for the user... so for example, like, to look at my current config i'd just need to do a "less /boot/config" instead of typing-out the whole version number and stuff...

Old_Fogie 06-02-2006 11:55 PM

Oh Ok thank you.

Hey I got my radeon working in a 2.6.16.19 kernel now :D

I told all the fella's in the DRI in slackware thread at http://www.linuxquestions.org/questi...90#post2275190

Thanks again Eric.

I never thought of using the generic config from testing to use for me now here. I had been using a 2.4 upgraded to a 2.6.10 and then tried going up to higher, and I couldnt seem to get it right.

Now off to add in real time Anti-Virus protection and play w/my Dazuko. :D

Bye.

drkstr 06-03-2006 01:58 AM

I like this thread, it has all of my favorite posters in it :)

I had a quick question about this:
Quote:

echo $DISPLAY
sudo -i
xauth merge ~alien/.Xauthority
export DISPLAY=:0.0
I don't have a big background as far as Linux knowledge goes, I just kind of figure stuff out by playing around and reading my system files (which could probably be quite dangerous ...good thing I have nothing important on my computer) Anyways, root being denied access to my users X sessions was really starting to piss me off so I was able to fix it by doing this as root:
Code:

ln -sf /home/username/.Xauthority ~/.Xauthority
which I had to add to my '/root/.bashrc' since it broke every time I reloaded X. I was wondering what the difference was between your method and mine. I'm not really sure what my method actually does, other then the fact that it seems to work. Does your method add anything extra or is it more secure/less buggy? I only ask because I'm not just happy with something working, I like to know why something works. If anyone could elaborate more on what is going on behind the scenes with all this .Xauthority stuff, I would greatly appreciate it.


Also, in regards to kernel compiling; I am a pretty lazy person so I made a small bash script called 'makekernel' that backs up my existing kernel to vmlinuz.old/System.map.old then runs all the commands to build the kernel in '/usr/src/linux'. This way lilo always has the option to boot to the last good kernel and I only have to run one command to backup/build my new one. Just wanted to put that out there for any other lazy people that might read this.

regards,
...drkstr

**edit**
oops, I meant vmlinuz, not bzImage

Old_Fogie 06-03-2006 02:03 AM

Quote:

Originally Posted by drkstr
I like this thread, it has all of my favorite posters in it :)

I also :D


Quote:

Originally Posted by drkstr
Also, in regards to kernel compiling; I am a pretty lazy person so I made a small bash script called 'makekernel' that backs up my existing kernel to bzImage.old/System.map.old then runs all the commands to build the kernel in '/usr/src/linux'. This way lilo always has the option to boot to the last good kernel and I only have to run one command to backup/build my new one. Just wanted to put that out there for any other lazy people that might read this.

WOW that's really, really intense.

drkstr 06-03-2006 02:09 AM

Quote:

WOW that's really, really intense
:D Thanks but it's not as hardcore as it sounds:

Code:

#!/bin/bash
#/usr/local/sbin/makekernel

cp /boot/vmlinuz /boot/vmlinuz.old
cp /boot/System.map /boot/System.map.old

cd /usr/src/linux
echo
make clean && make && make modules && make modules_install && make install

And in my lilo.conf:
Code:

#Linux bootable partition begins
image = /boot/vmlinuz.old
  root=/dev/hda2
  label = Linux.old
  read-only
# Linux bootable partition config ends

Not much to it. I just typed the commands into a text editor instead of the console.

regards,
...drkstr

Old_Fogie 06-03-2006 03:28 AM

this part here the "make clean" i've seen written on the net a few times, that and "make mrproper"

would that be done on a sytem that already has a custom kernel sitting on it?

for example tonight, I compiled this new kernel on a new install of slack. so i should think that I dont need to do "make clean" right. But additional kernel compiles I probably should?

does that sound right?

win32sux 06-03-2006 04:01 AM

Quote:

Originally Posted by Old_Fogie
this part here the "make clean" i've seen written on the net a few times, that and "make mrproper"

would that be done on a sytem that already has a custom kernel sitting on it?

for example tonight, I compiled this new kernel on a new install of slack. so i should think that I dont need to do "make clean" right. But additional kernel compiles I probably should?

does that sound right?

if you have previously run mrproper on the source you are building, then no - you won't need to run mrproper again (although it doesn't hurt)... as for the clean, it's recommended that you do NOT skip the clean before you start the build (make bzImage, etc.)...

http://www.digitalhermit.com/linux/K...ild-HOWTO.html

Alien Bob 06-03-2006 07:41 AM

Quote:

Originally Posted by drkstr
Anyways, root being denied access to my users X sessions was really starting to piss me off so I was able to fix it by doing this as root:
Code:

ln -sf /home/username/.Xauthority ~/.Xauthority
which I had to add to my '/root/.bashrc' since it broke every time I reloaded X. I was wondering what the difference was between your method and mine. I'm not really sure what my method actually does, other then the fact that it seems to work. Does your method add anything extra or is it more secure/less buggy? I only ask because I'm not just happy with something working, I like to know why something works. If anyone could elaborate more on what is going on behind the scenes with all this .Xauthority stuff, I would greatly appreciate it.

Well, your method works OK, and there is nothing wrong with it as long as you are the only user on your computer.
Basically, you make the user root use the X "magic cookies" for your own account that are stored in your own ~/.Xauthority file, so that as far as X is concerned, there is no difference between user "you" and user root accessing the X display. If you were to create a second user account "you2" and that account were to run X, then again you would not have the possibility for that user "you2" to do "su -" and start X applications as root.

My way of doing things is better if you have more than one user account on your computer that you use to run X sessions. The command
Code:

xauth merge ~alien/.Xauthority
exports the X cookies out of "alien"s ~/.Xauthority file and merges these with any cookies already present in root's ~/.Xauthority file. That way root can accumulate X authority cookies from many users.

A second reason to avoid making a symlink is that I never like symlinks that point from root's homedirectory to files in other users' homedirectories - it adds a way to hack into root's account if you mess with the file that the symlink points too.

NOTE:
By the way Old_Fogie, I fixed that typo in the Wiki page.

Eric

jimX86 06-03-2006 10:07 AM

Quote:

Originally Posted by Alien Bob

* enable 4GB of RAM. The Slackware default setting is to only support ~800 MB of your RAM, so any additional installed RAM is never used! (under "Processor type and features" > "High Memory Support (4GB)").

My newest box is an AMD64 with 1Gb RAM. I've been playing with it for over a month, but I'm still using the stock kernel. I just checked, and sure enough, I'm missing some RAM. I hadn't even noticed. One thing's for sure, Linux keeps me humble. Every time I learn something new, I realize that there are 100 more things I don't know.

Thank you for the information.

egag 06-03-2006 10:20 AM

i allways use the same steps to install a new kernel, exept that
i keep the sources in my home directory.
( i just have a dir. ~/kernels/ )

that has some advantages like:
-no need to be root to place and extract the sources.
(extracting tar archives as root is "dangerous" )
-root doesn't need the X-screen as you do the config step as normal user.
-if you want to do a fresh ( clean )install for some reason, you don't have to backup the
tarball of the kernel you use ( if you have a separate /home partition )

this is also the advised method to install a kernel.
see the README-file in the kernel-sources.
is there any special reason to use /usr/src instead ?

egag


All times are GMT -5. The time now is 04:46 AM.