Click to See Complete Forum and Search --> : RH 7.1 kernel 2.4.2 configure and re-compile for Tekram DC315 support


msobik
10-17-2001, 10:28 AM
Hi all,

I just wanted to post a quick "how I did it" so that other's might not
run into the same pitfalls that I did. I just recently configured and
recompiled my first kernel, woohoo! Thanks to some help from the
great people in this forum and a lot of reading on the web, I was able
to get everything working. Here are some of the major things that bit
me.

Here's my setup:

RH 7.1 running the 2.4.2 kernel.
Intel system

/usr/src/linux/ is really /usr/src/linux-'version'/

I undertook this task to gain support for my Tekram DC315 SCSI
adaptor. I got the drivers from:

ftp://ftp.suse.com/pub/people/garloff/linux/dc395/

As of this writing (10/17/2001), the drivers were up to date and came
with good instructions on installation.

1) Make SURE you have a full system backup (especially the origial
kernel). I was stupid and accidentally wrote over my original
kernel before I was ready and the system wouldn't boot.
Fortunately I had full backups and an emergency boot floppy and
was able to restore my original system. If this is your first
kernel compile you'll probably need some part, if not the whole,
backup.

2) Have a copy of the Kernel HOWTO handy. You can find it at
www.linuxdoc.org. (http://www.linuxdoc.org.) Oh yeah, make sure you actually read and follow
it :)

3) Follow the step by step instructions in the "15 minute" section of
the HOWTO with the following modifications:

a) before you "make xconfig" make a backup of
/usr/scr/linux/.config to something like ~/config.keep. This is
your current configuration, and if you don't want to change
anything, you can just load this file and add the necessary
support or modules.

b) then "make mrproper". This step is missing from the Kernel
HOWTO and as as result, some necessary files are not linked
properly and others are not removed. (This will remove your
.config file, hence a) above). You can skip the "make clean"
since "make mrproper" takes care of removing old files.

4) After you "make dep" and "nohup make bzImage &" I suggest renaming
your module dir to keep your current modules intact in case
something happens and you need to revert to your old system
configuration.

"mv /lib/modules/'version' /lib/modules/'version'.orig"

Now, if you forgot to add support for something-or-other (I did,
and had to recompile no less than four times to pick up
everything!) you can:

"mv /lib/modules/'version'.orig /lib/modules/'version'"

and have your original module dir back (remember to boot your
original kernel when you revert back).

5) Now you can "make modules" and "make modules_install" INSTEAD of
"make modules install". I don't know what the difference is, they
both _seem_ to work, but from what I read "make modules_install"
is what you want. Can someone enlighten me?

6) Follow the HOWTO from there on out and you should be good to go.

If you keep (and load) your old .config from "make xconfig" and make a
backup of your original kernel you should have no trouble. I had
problems because I didn't keep my old .config and had to keep
re-configuring (while adding needed options) and re-compiling until I
had loaded/installed all the features and modules that I had in my
original system config.

If you run into trouble, at the lilo graphic prompt, "ctrl-x" and hit
<tab>. This will give you your boot options in text mode. Pick your
old kernel followed by 'single'. If you old kernel is called
"old_kernel" you would type:

"old_kernel single"

This will get you into single user mode where you can revert to your
original module directory (see step 4) and reboot the system with
"shutdown -r now". On reboot, pick you old kernel (this time without
the "single") and you should boot right back into your original system
where you can fix problems and re-configure/re-compile if necessary.

If you have problems with X try booting with

"old_kernel 3"

This gets you into init mode 3 and from the prompt you can type
"startx" and debug X without it starting/failing/restarting
infinately. X puts debug messages into:

/var/log/XFree86.0.log

You can see which config file you're using and what's going wrong (I
had problems with USB mouse support - check the USB HOWTO for good info).

Hope this helps someone out. If you need help, I'm by no means an
expert, but maybe I can point you in the right direction. Don't
hesitate to email me. I know it sucks to feel like you really screwed
something up and have nobody to help you! Good luck, and let me tell
you, when you finally get everything up and running correctly for the
first time, it really feels good.

Mike