LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-14-2006, 06:57 PM   #1
andre.it
LQ Newbie
 
Registered: Mar 2006
Posts: 9

Rep: Reputation: 0
kernel


Guys,

I need a kernel with suport of my hardware raid(adaptec 2610SA), but the orther kernels(sata.i,raid.s...) of slackware don't detect my sata hd.
Can i copile a new kernel in orther pc and make o boot disk with this new kernel to install the slack?
with yes, how can i do that?



thanks a lot


André Luís
 
Old 03-14-2006, 08:01 PM   #2
nadroj
Senior Member
 
Registered: Jan 2005
Location: Canada
Distribution: ubuntu
Posts: 2,539

Rep: Reputation: 60
i found the necessary driver files for your hardware--however i cant help further as i havent had to or needed to compile my own kernel.

http://www.cs.fsu.edu/~baker/devices...s/scsi/aacraid
 
Old 03-15-2006, 05:38 AM   #3
angeloio
LQ Newbie
 
Registered: Aug 2004
Location: Athens, Greece
Distribution: Slackware
Posts: 4

Rep: Reputation: 0
Hope this will help! Complete Instructions...

Installing a new Kernel source
From what I've read of other Linux distributions, they have the possibility of providing modified kernels and what you read may inform you not to install your new kernel source in /usr/src/linux. That is not the case for Slackware. If Pat makes the kernel source available in a package, you can install that (using "installpkg") and it will be correctly placed in /usr/src/linux-version with a symlink pointing to it as /usr/src/linux.

If you download the source from The Linux Kernel Archives you just need to untar it to /usr/src, then create a symlink.
cd /usr/src
tar xvzf /filepath/filename
ln -s linux-version linux (replace version with the version of the kernel)

Ok, it's now installed. But now we want to create a new kernel with it right?

Compiling a new Kernel
Compiling a new kernel takes some time and practice. I only say this because I can't seem to get a kernel "right" on my first try and end up doing it again until I do get it the way I want it. This of course is only my opinion.

The benifits of compiling your own kernel outway the minor hassle of doing so though. Your kernel will only have the "features" you want, and should be smaller than the one that ships with Slackware.

First you can create a file in your source directory like this:
mcedit /usr/src/linux/makeK

#!/bin/bash
#make mrproper - only if you patch your kernel source and you have compiled it before.
#make menuconfig - or make xconfig (from an X console) - or make oldconfig
make dep && make bzImage && make modules && make modules_install && \
cp -p /boot/vmlinuz /boot/vmlinuz.old && cp arch/i386/boot/bzImage /boot/vmlinuz && \
cp System.map /boot/System.map && cp .config /boot/config &&\
echo Edit your lilo.conf to include the new kernel. Run lilo and reboot.


or for a 2.6 kernel:

#!/bin/bash
#make mrproper - only first time of new kernel source
#make menuconfig - or xconfig (from an X console) - or make oldconfig
make && make modules_install && \
cp -p arch/i386/boot/bzImage /boot/vmlinuz-2.6.14.3-32 && \
cp -p System.map /boot/System.map-2.6.14.3-32&& cp -p .config /boot/config-2.6.14.3-32 && \
echo Edit your lilo.conf to include the new kernel. Run lilo and reboot.


To compile your kernel the first time, you might want to start with the configuration file that you booted with, so...


cd /usr/src/linux
cp /boot/config .config
make oldconfig


You will be prompted for the differences between the kernel versions. Answer as you wish.

If you are in console mode, you can use "make menuconfig" to change your kernel configuration and if runing from X, then use "make xconfig".

Patching a kernel
I always keep a virgin copy of my kernel source in my /usr/src directory. For example:
cp -pr linux-2.4.19/ linux-2.4.19-clean/
Now I can make patches, etc to my kernel and if I have to, go back to clean source.

Everytime I make a kernel, I change the Makefile line 4 to something unique:
EXTRAVERSION = -a (-b, -pre8a, etc...). Then I compile until I keep it. Now I don't have to worry about missing modules everytime I boot into another kernel as the new modules will be saved to /lib/modules with the full version/extraversion name. Once I am happy with it, I rename the source directory to match the /lib/modules directory (or Makefile version).

mv linux-2.4.19/ linux-2.4.19a/
rm linux
ln -s linux-2.4.19a linux


Lets say I want to add the changes from patch-2.4.20-pre8 from The Linux Kernel Archives to my linux-2.4.19 source.

I download the patch file to /home/download
cd /usr/src
rm linux
cp -pr linux-2.4.19-clean/ linux-2.4.19/
gzip -dv /home/download/patch-2.4.20-pre8.gz
cp /home/download/patch-2.4.20-pre8 .
patch -p0 < patch-2.4.20-pre8
mv linux-2.4.19/ linux-2.4.20-pre8/
ln -s linux-2.4.20-pre8 linux
cd linux
cp /boot/config .config
make oldconfig
(then maybe "make menuconfig" if I want to see everything in context)
./makeK


LILO and boot_message.txt

Dont forget to run "lilo" after building a new kernel!

# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
restricted
#linear
append="hdd=ide-scsi"
boot = /dev/hda2
message = /boot/boot_message.txt
prompt
timeout = 50
# compact # faster, but doesn't work on all systems.
# delay = 5
# VESA framebuffer console @ 1024x768x256
vga = 773
# Normal VGA console
# vga = normal
# VESA framebuffer console @ 1024x768x64k
# vga=791
# VESA framebuffer console @ 1024x768x32k
# vga=790
# VESA framebuffer console @ 1024x768x256
# vga=773
# VESA framebuffer console @ 800x600x64k
# vga=788
# VESA framebuffer console @ 800x600x32k
# vga=787
# VESA framebuffer console @ 800x600x256
# vga=771
# VESA framebuffer console @ 640x480x64k
# vga=785
# VESA framebuffer console @ 640x480x32k
# vga=784
# VESA framebuffer console @ 640x480x256
# vga=769
# ramdisk = 0 # paranoia setting
# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/hda2
label = NewLinux
password=password1
read-only
# append="hdd-ide-scsi video=sstfb"
image = /boot/vmlinuz-ide-2.4.19
root = /dev/hda2
label = OrgLinux
password=password2
read-only
image = /boot/vmlinuz.old
root = /dev/hda2
label = OldLinux
password=password3
read-only
image = /boot/vmlinuz-2.4.18
root = /dev/hda2
label = BckLinux
password=password4
read-only
# Linux bootable partition config ends
# Start Memtest86 bootstrap
image = /memtest/memtest
label = MemTest
password=memtest
# End Memtest86

#----- End /etc/lilo.conf

/boot/boot_message.txt
Welcome to the LILO Boot Loader!

Please enter the name of the Linux Kernel you would like to boot
at the prompt below. The choices are:

NewLinux - New Custom Kernel (default)
OrgLinux - Originial Slackware 9 Kernel
OldLinux - Last Custom Kernel Kernel
BckLinux - Backup Custom 2.4.18 Kernel
MemTest - Run memory diagnostics

Creating a new bootdisk
There is a script in /sbin called makebootdisk for you. It gives you the choice of 3 different kinds of bootdisks.
A syslinux (DOS formated disk), lilo (linux formated disk), and simple (obsolete). You can choose which kernel you want like /boot/vmlinuz.

--------------------------------------------

Long Live the Slack King!
 
Old 03-18-2006, 02:56 AM   #4
ahmed gamal
Member
 
Registered: Aug 2005
Location: Egypt
Distribution: slackware + XP
Posts: 591

Rep: Reputation: 30
new hard

will the new kernal make better work than old one

Last edited by ahmed gamal; 03-18-2006 at 02:59 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Kernel Audit Support Unavaible error when booting after kernel upgrade abefroman Red Hat 2 03-21-2013 09:32 AM
Kernel 2.4 in Zipslack (Waring: unable to open an initial console | Kernel Panic...) kurtamos Linux - General 2 05-10-2006 01:58 PM
kernel includes at /usr/src/linux/include do not match current kernel. blanny Red Hat 1 03-09-2006 08:53 AM
Kernel-Patch Debian Logo 2.6.2 not correctly working for custom kernel 2.6.11 smp deepclutch Debian 3 06-27-2005 04:59 AM
kernel panic: try passing init= option to kernel...installation with Red Hat 9 kergen Linux - Hardware 1 09-30-2004 04:28 AM

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

All times are GMT -5. The time now is 01:18 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