LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Installing 2.6 kernel from Slackware Disc-2 (https://www.linuxquestions.org/questions/slackware-14/installing-2-6-kernel-from-slackware-disc-2-a-327786/)

halo14 05-27-2005 03:30 PM

Installing 2.6 kernel from Slackware Disc-2
 
I just installed Slackware-current and the 2.6.11.9 kernel from Disc #2 from the latest (5-18-05) Slackware-current set. It was MUCH easier than I had expected it to be, so I thought I would share for other Slackware users who may want a 2.6 kernel without the hassle of compiling a new one.

I used the one from the CD because it's a good general base, and for whatever reason, I just couldn't get a decent kernel compiled on Slack. So here's how I did it, basically, it's nothing more than what it tells you to do in the README.initrd file.

The latest Slackware discs all include an optional 2.6 kernel so this should work the same on the 10.1 discs as well. I just like to use Slackware-current because it's still very stable. More so than 'stable' versions of distro's like Fedora, Mandrake, etc.. in my experience.

Step 1 - Installation
Install Slackware. I generally don't try to install a trimmed down version from the start. Rather, I install everything except KDE and GNOME(which isn't even available on the new discs).

Step 2 - Mount Disc #2 and cd to 2.6 kernel directory
After the installation is complete, login as root and mount the Slackware installation disc #2.
Code:

cd /mnt/cdrom/testing/packages/linux-2.6.11.9
Step 3 - Install 2.6 kernel files
Here is where you'll find the 'README.initrd' file which explains how to install the 2.6 kernel if you are using anything other than ext2 filesystem.
You can 'ls' to see the available files, but you want to be sure you have the kernel, kernel modules, and makeinitrd(included in the installation if you choose everything) installed.
Code:

installpkg kernel-generic-2.6.11.9-i486-1.tgz
installpkg kernel-modules-2.6.11.9-i486-1.tgz

Now, I used pkgtool to make sure I had 'mkinitrd' installed, you may want to do the same. If it's not installed, install it at this time.

Step 4 - Make initrd for necessary modules
Okay, the point of initrd is an initial ramdisk file system with which to load modules the kernel will need in order to boot. This includes things like filesystem modules, disc controller modules, etc. Since I'm running an IDE system with reiserfs, the only thing I need initrd to load is the reiserfs modules.
Code:

cd /boot
mkinitrd -c -k 2.6.11.9 -m reiserfs

This will do two things. It will create the /boot/initrd-tree containing the initrd filesystem. It will also create the actual initrd(initrd.gz). Another example, if you are using ext3 filesystems:
Code:

mkinitrd -c -k 2.6.11.9 -m jbd:ext3 -f ext3 -r /dev/hdb1
In this example, there is a root partition at /dev/hdb1 that is ext3. Note: to use ext3 you need both jbd and ext3 (I don't know what jbd is so don't ask ;))

Step 5 - Make necessary changes to LILO
If you's like, you can enter 'ls' in /boot to see the files we now have. Among others, you should see 'vmlinuz-generic-2.6.11.9' and 'initrd.gz'.

Now to make the changes to /etc/lilo.conf, use your favorite text editor(I prefer 'vi' or 'mcedit'. Add the following under your previous kernel:
Code:

#Linux bootable partition config begins

image = /boot/vmlinuz-generic-2.6.11.9
  initrd = /boot/initrd.gz
  root = /dev/hda1
  label = Linux-2.6.11.9
  read-only
#Linux bootable config ends

Save and exit the editor. Now run /sbin/lilo. If you see the 'Added Linux-2.6.11.9', you should be okay. Go ahead and reboot.

When you reboot, select the 'Linux-2.6.11.9' entry and see if it works, it should.

Everything should work except sound at this point. This is because you are still using the old 2.4.30 alsa-drivers.

Mount the cd #2 again. In the same directory where the 2.6.11.9 kernel packages are, there is the alsa-drivers for it as well.
Code:

cd /mnt/cdrom/testing/packages/linux-2.6.11.9
installpkg alsa-driver-1.0.8_2.6.11.9-i486-1.tgz
alsaconf

It should recognize your sound card (if it's supported) and all should be working.

I had an excellent experience with this, that doesn't necessarily mean yours will be the same. Good luck to all, and please post additional tips that I might have missed.

AxXium 05-27-2005 03:52 PM

I was hoping someone would write this.
Can't wait to try it.
Thanks!

halo14 05-27-2005 04:03 PM

:) no problem. I thought there should be one. I knew there was a 2.6 kernel on the discs but I thought it was just the sources. So this is a nice way to get it done, and quickly too!

You may still want to read the README.initrd, but my steps should work.

halo14 05-27-2005 09:25 PM

might this be worthy of a sticky from a mod??

gbonvehi 05-27-2005 09:28 PM

It would be cool, it could also go in SBing's FAQ. It's a shame most users don't read or search before asking but would be great for those who does :)

samael26 05-28-2005 02:27 AM

Just to add a few thingies. Your way of doing it worked for me, so I proudly run a 2.6.10 kernel at the
moment, so what you suggested was correct, i.e. it should work from the standard bought Slackawre CDs.
But I would just want to make things a little easier for ordinary Slack beginners like me.
1. Install Slack, okay, but with Reserfs support, because ext3 is a pain (add to reinstall changing the filesystem)

2. Why bother with cd /mnt/cdrom... Just open your home directory with Konqueror (I am talking to people installing KDE) mount your CDrom by clicking on Peripherals, open a new instance of Konqueror (click on the little wheel, top right-hand corner :D ) then, just copy kernel-generic.., kernel-modules.. and alsa-drivers...

3. At this point, if you have made a full install (better to have even the superfluous than lacking something..), you can make your initrd as shown in the "README.initrd" you have in the directory on the CDRom.

4. Then, just follow the excellent tutorial in it and you're done !

all praises to halo14 for making us think about using the cdrom ! (I didn't even notice there was an extra kernel) shame on me :p

unixfool 05-28-2005 12:57 PM

Quote:

Originally posted by samael26

1. Install Slack, okay, but with Reserfs support, because ext3 is a pain (add to reinstall changing the filesystem).

Saying that ext3 support is a pain is subjective. It depends on your expertise level, IMO. This is one thing I hate about Linux: there are so many flavors of this and that software that its hard to get objective opinions because EVERYONE has a favorite or chose whatever works without hassle. Also, it wouldn't be a pain if one were already using ext3 in the first place (like I am).

Quote:


2. Why bother with cd /mnt/cdrom... Just open your home directory with Konqueror (I am talking to people installing KDE) mount your CDrom by clicking on Peripherals, open a new instance of Konqueror (click on the little wheel, top right-hand corner :D ) then, just copy kernel-generic.., kernel-modules.. and alsa-drivers...

Because commandline is common between every known Linux distribution, more so than Konqueror or pick-your-filemanager-and-place-here. Remember that there will always be multiple ways of doing a specific task with *nix. His way was no-nonsense, quick and easy and could probably be done quicker than trying to move files with konqueror.

Quote:


all praises to halo14 for making us think about using the cdrom ! (I didn't even notice there was an extra kernel) shame on me :p

Yeah, I've been using Slackware's CDROM kernels for quite awhile...much quicker than hacking a kernel.org kernel, especially if you're not picky about what's included in a given kernel. :)

samael26 05-28-2005 01:18 PM

QUOTE :

"Because commandline is common between every known Linux distribution, more so than Konqueror or pick-your-filemanager-and-place-here. Remember that there will always be multiple ways of doing a specific task with *nix. His way was no-nonsense, quick and easy and could probably be done quicker than trying to move files with konqueror."

Don't think I did not try that but that did not work and I doubt it will because if people do what is stated
in the examples, they will end up trying to mount a root partition on hdb

QUOTE : mkinitrd -c -k 2.6.11.9 -m jbd:ext3 -f ext3 -r /dev/hdb1

, which, as you may know corresponds
to the cd-rom drive, or to a second hard drive, which is not the most common config. That was the stupid thing I did and I suppose I won't be the only one.. I wonder how it was in the READ.Me file at all...
I think your reaction comes from a patronizing attitude towards some people (which I am part of) who sometimes wish nothing other than using a file manager to get things done.

Nothing more than a statement : I tried the way suggested, it didn't work, I tried as I explained, it worked ;)

unixfool 05-28-2005 02:18 PM

Quote:

Originally posted by samael26
QUOTE :
I think your reaction comes from a patronizing attitude towards some people (which I am part of) who sometimes wish nothing other than using a file manager to get things done.

Nothing more than a statement : I tried the way suggested, it didn't work, I tried as I explained, it worked ;)

You are correct! :) I don't mean to 'patronize', though. I'm old-school and have no problem administrating a machine from the commandline full-time. Back when I first started using Linux (I started with Slackware v3.3), there wasn't as many GUI tools as there are currently, and those that were available weren't exactly stable. I learned to depend on CLI. Even now, at work, I maintain 40 servers remotely and due to their secure nature, I have to rely only on SSH sessions to admin those machines.

I thought halo14's instructions were fine. Each person who uses it will put their spin on them, adding or taking away from them, catering them to their own needs and wants...this is what Linux is all about. What you said about using Konqueror may have worked for you and I'm sure some people are glad you shared that bit of information but from what I read, it seemed that you were saying that "cd /mnt/cdrom..." was a bit tedious or abnormal. The 'cd' command was in use long before Konqueror and is fine for the purpose. Using your method only moves the files to another directory, but you'll still have to use 'installpkg' on them, which is going to require a shell, unless Konqueror has some hidden abilities that most don't know about. :)

dannyl 05-28-2005 05:45 PM

KDE has a package install program that I have had very good luck with every thing I have installed with it.

jumico 06-18-2005 12:12 AM

This worked for me. But on my 10.1 discs it has kernel 2.6.10 so just make sure it matches your kernel and compare his instructions with the one in your intrid readme. Mine were slightly different. Thanks I finally got this set up.

win32sux 06-18-2005 12:33 AM

Quote:

Originally posted by jumico
My kernels gereric and module end like this. i486-1
but my mkintrid thing is like this. i486-2
Does this matter. what do I do. Mkintrid was already installed.

the 1 and the 2 refer to the package's version... a package version change (when re-packaged) doesn't affect the version of the software contained in the package itself...

the -2 simply means that it's the second time that package was packaged (without changing the actual software's version)... if the software version changes and a new package is made then you'll see the -2 drop back down to a -1, as it would be the first package made using the new software version...

dcdbutler 06-18-2005 08:28 AM

I've always done it this way on Slackware, but I usually install the headers and source code (kernel-source) packages as well. Is this just OTT, or are there some things which just won't function or install properly without them?
Cheers!

cheater1034 06-18-2005 10:06 AM

I prefer doing it from source, it's much better, and you get to configure it yourself.

You can also remove most modules you wont use, making a smaller kernel, and make what you need, except sound built in to the kernel.

http://www.linuxquestions.org/questions/answers/408

there's a guide posted by acidjuice, it's really helpful, or it was to me, since I never used lilo, and it helped with that part of it.

jumico 06-18-2005 01:21 PM

When I go to lib/modules/2.6 and then I click build it says this file doesn't seem to exist anymore. When I tried using make, it said lib/modules/2.6/build/.config no such file or directory. But when I go to 2.4 I can click on build with no problem. Does anyone know whats wrong.


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