RE: rh8 custom kernel on kickstart cd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 1. How can I check what the kernel on the installation media is using

If you have the time and option, switch over to VT2 during an install and
run uname -r.  You'll find that its running the BOOT kernel.  If you want
more time and don't mind temporarily modifying your ks.cfg, add some dummy
waits in the %pre and %post sections to delay the installation via VT3, and
poke around on VT2.

e.g.
%pre
echo "Okay, now go nose around on VT2" > /dev/tty03
echo "Then press return here on VT3 to get going again" > /dev/tty03
read dummy < /dev/tty03

Put the same thing at the start of the %post if you want to see what's
changed between %pre and %post.

> 2. How can I update the kernel to be a newer one with the megaraid
> driver I want!
So many possibilities, so little time.  You may have to insert the new
megaraid.o into RedHat/base/stage2.img.  I had to early in RH 7.1 because
the existing megaraid driver couldn't handle my NetRaid cards.  I also had
to put it in the boot.img/initrd.img for my bootable CD.  The drivers are
embedded in modules.cgz.

Long term, I created a megaraid patch that I added into the RedHat source
rpm.  Here's a brief outline of that process (note, this is from RH 7.1, but
the basics still apply).

===========================================================================
Adding a new driver into or modifying driver options in the distribution
kernel

These are instructions to add to or modify an existing kernel (update
megaraid driver or modify scsi tape characteristics to SYSV), NOT to upgrade
the kernel (move from kernel 2.4.9-34 to 2.4.18-3).  The examples are based
on the initial RedHat 7.1 distribution, updated to kernel 2.4.9-34.

First, create the new kernels (this includes creating a source rpm and an
smp rpm in case needed)
1.	Download the driver rpm (if applicable)
2.	Get the kernel source rpm that you are using (from the SRPMS disk of
the distribution, normally)
3.	Install the kernel source rpm (rpm -ivh kernel-2.4.9-34.src.rpm).
4.	Do a kernel pre-build to extract the source and make sure the final
build is patched to date.
cd /usr/src/redhat/SPECS
rpm -bp kernel-2.4.9-34.spec
5.	Make a copy of the resulting directory tree
cd /usr/src/redhat/BUILD/kernel-2.4.9-34
cp -ax linux linux.orig
6.	Put the driver header and source in the proper location under linux
e.g., for the megaraid driver:
cd linux/drivers/scsi
cp <driver-download-path>/megaraid* .
OR for changing scsi tape options
edit st_options.h and change ST_SYSV from 0 to 1
7.	Develop a differences patch (Note: do NOT reuse patch names.  To
check for existing patches, look at the /usr/src/redhat/SOURCES directory.
The following is an example only)
cd /usr/src/redhat/BUILD/kernel-2.4.9-34
diff -urN linux.orig linux > example.patch
8.	To confirm which files are included, do a "grep diff example.patch"
9.	Put the patch in the SOURCES directory
mv example.patch /usr/src/redhat/SOURCES
10.	Modify the spec file
cd /usr/src/redhat/SPECS
vi kernel-2.4.9-34.spec
Go to the end of the patch list (Just before the BuildRoot: definition)
Identify the patch in the following form (where NNN is the next logical
unique patch number):
PatchNNN: example.patch  (e.g., Patch500: example.patch).  Add comments!
Find the patch installation section, where you see a series of %patchNNN -pX
Add the patch command after the last %patch entry.  Add comments!
example:  %patch500 -p1  (if the build fails, you might need to change this
to -p2.  this happens if instead of duplicating and differencing linux in
step 5, you were up one level in the source tree and duplicated and
differenced kernel-2.4.9-34 to create the example.patch)
11.	Then, build the source and binary rpms:
Be in the /usr/src/redhat/SPECS directory
cd /usr/src/redhat/SPECS
rpm -ba --target=i386,i686 kernel-2.4.9-34.spec
Note: now that we are at 2.4.9 and are using LKCD, the building of a debug
kernel fails.  Therefore, you must use "rpm -ba -without debug -target
i386,i686 kernel-2.4.9-34.spec"  Also, that's not a typo, you no longer use
the = sign in the target argument.
============================================================================
Donald E. Bodle, Jr.
Sr. Systems Integration Engineer
Platform Development
The Reynolds and Reynolds Co.
(937) 485-1954
 

-----Original Message-----
From: Andrew Thomson [mailto:ajthomson@xxxxxxxxxxxxxxxx] 
Sent: Wednesday, March 05, 2003 8:09 PM
To: kickstart-list@xxxxxxxxxx
Subject: Re: rh8 custom kernel on kickstart cd

I just tried copying the new vmlinuz and initrd from an installed system
into the isolinux directory on the cd..

However restarting with this new cd didn't work properly.. kernel starts
booting but has issues...

ajt.

> ----- Forwarded message from Andrew Thomson <ajthomson@xxxxxxxxxxxxxxxx>
-----
> 
> Date: Tue, 4 Mar 2003 20:01:27 +1100
> From: Andrew Thomson <ajthomson@xxxxxxxxxxxxxxxx>
> To: anaconda-devel-list@xxxxxxxxxx
> Subject: rh8 custom kernel on kickstart cd
> 
> I spotted a few conversations about such a senario however it appeared
> things were talking about rh7.x.. I'm assuming a few things have changed
> since then given the comps.xml etc etc.. and from what I can gather rh8
> seems to use stuff in isolinux..
> 
> Anyway, I've managed to create my own custom cd, however I need to
> add/update a kernel module..
> 
> Once the system is installed, it has the correct version.. however I'm
> guessing the kernel that the installer runs with is slightly different..
> 
> I need to support the following:
> 
> megaraid: v1.18c (Release Date: Thu May 16 10:27:55 EDT 2002)
> 
> Once the system is installed, it actually has that version in the
> kernel.. I gleaned that from the src.rpm for the kernel package given it
> contained the following file -- linux-2.4.18-megaraid.patch
> 
> So this brings the stock kernel up to 1.18c.
> 
> However I have actually installed the latest kernels as per redhat and
> it's actually up to 1.18d -- good times..!
> 
> megaraid: v1.18d (Release Date: Wed Aug  7 18:51:51 EDT 2002)
> 
> kernel-bigmem-2.4.18-24.8.0
> 
> So my questions are...:
> 
> 1. How can I check what the kernel on the installation media is using
> 2. How can I update the kernel to be a newer one with the megaraid
> driver I want!
> 
> Regards,
> 
> ajt.
> 
> ----- End forwarded message -----
> 
> 
> 
> _______________________________________________
> Kickstart-list mailing list
> Kickstart-list@xxxxxxxxxx
> https://listman.redhat.com/mailman/listinfo/kickstart-list
> 



_______________________________________________
Kickstart-list mailing list
Kickstart-list@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/kickstart-list





[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux