Red Hat custom Kernel compilation mini-How-To for Red Hat 8-9
Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
In the front page should be a faily easy to understand explanation, but in general terms you simply de-compress the patch into a directory (it may even be /usr/src), you cd into your kernel's source directory (in this case /usr/src/linux-2.6.3) and patch with:
Code:
$ su
password:
# patch -p1 -i ../patch-2.6.4-rc2
This example is if you unpacked the patch to /usr/src, otherwise you will have to state the whole path to the patch after the -i flag (-i /path/to/patch/patch.file)
1) can I tell the new kernel what modules to load at startup?
for instance I wouldn't like the kernel to load SCSI modules that I don't use at the moment, but I may need them sometime
2) has anybody used a custom image in the GRUB boot loader?
What type of image should go in this field?
For question number 1, use the files modules.conf (kernel 2.4) and modprobe.conf (kernel 2.6) for controlling the modules loaded at boot time. Not always works the way you expect them to, so you better man modprobe.conf, man modprobe, man modules.conf, man depmod.
Fot the second you need to create an image with a custom palette set to 15 colors. You may use the GIMP for that: Open up the image you want, right click on it, image-->mode-->indexing (or alt+i) and select a 15 color palette, save the image as .xpm, compress it with gzip (gzip <file>.xpm) copy that to /boot/grub/ and just change the name under splashimage=/boot/grub/<file>.xpm.gz in /etc/grub.conf
For kernels 2.6.x you will need to include support for your root partition (/) file system into the kernel and not as a separate module. If you are using the ext3 file system you will need at the very least ext2fs support compiled directly into the kernel, otherwise you'll prolly get an error regarding VFS not being able to mount the root partition. Also, if you use other FS than ext2/3, then you will have to replace the grub entry root=LABEL=/ (or something similar) to your actual disk partition (e.g. root=/dev/hda2) in order for the kernel to appropriately boot.
Help,how do I do this,thanks david
Ok, you include the support for your FS when you configure the kernel, you simply choose [y] instead of [m] to compile that into the kernel. To change the actual device and the kernel looks for mounting when booting you should do so in the file located at /boot/grub/grub.conf, or trhough it's symlink in /etc (/etc/grub.conf) using your favourite text editor as root.
Thanks,I looked in the /boot/grub/grub.conf and I have 2 other kernels 2.4.xxx and they are the same as the 2.6.4,I'm pretty new so mayby that I need to look some where else.In this forum under general for building how to they talk about how you have to do something to get kernel to see the file system but as you can tell then I get lost.thanks david
Originally posted by comprookie2000 Thanks,I looked in the /boot/grub/grub.conf and I have 2 other kernels 2.4.xxx and they are the same as the 2.6.4,I'm pretty new so mayby that I need to look some where else.In this forum under general for building how to they talk about how you have to do something to get kernel to see the file system but as you can tell then I get lost.thanks david
It's really not that complicated, here's an excerpt of my grub.conf file:
Note the commented out kernel (the Fedora official kernel). It uses the default RH/Fedora grub format (except for the added vga= option). You should make the root= argument point to the HDD partition your root directory (/) is. In my case is /dev/hda2, but in yours may be different.
Originally posted by comprookie2000 kernel-2.6.4-1.270.i686.rpm Is this the package I need for the kernel to see the ext 3 file system?
In order for any 2.6.x kernel to see the root partition file system, it must be compiled with support for it built in. Otherwise the kernel will complaint. Also you have to have an initrd (or Initial RAM Disk) for RH/Fedora. If that RPM package is from RH/Fedora, it most probably already includes support for ext3. Good luck!
Thanks,I tried like you said and now says error 19 mounting Ext3
no init found try passing init=options to kernel?I'll try that rpm but I think I needed to do this befor and there might be no saving this kernel,thanks again david
For the splashimage, I found out that you can save it directly in GIMP in the xpm.gz format. So you don't need to gzip it later. However I have a question about images:
Can anybody write a small script which randomly (or in a secuence) replaces the splashimage file (let's say /boot/grub/images/default.xpm.gz) every time the system closes?
Then in every boot I'll be able to change my initial image. Something like displaying multiple images in KDE desktop
if you are reciving this error:
kernel panic: no init found. Try passing init= option to kernel
It's because the 'make install' command wasn't successfull. When it is successfull, it should automatically update your Lilo/Grub config files and add a link to your vmlinuz and initrd file
I edited the /etc/inittab file, and commented a line that said the system to use a script to load/unload services in the rcx.d subdirectories.
How can I edit the file again, so that the system can boot-up properly?
I tried starting the Rescue system from the SuSE CD1, I mounted my local system (dev/hda3) and made the proper changes. However those changes seem to stay in the PC memory, therefore when I boot up I receive messages similar to these:
user: xxxx
FileSystem is read only
In other words, the whole system gets mounted as read-only, that's being happening since I commented that line
Originally posted by xbaez I have a SUSE Professional 8.2 installation
I edited the /etc/inittab file, and commented a line that said the system to use a script to load/unload services in the rcx.d subdirectories.
How can I edit the file again, so that the system can boot-up properly?
I tried starting the Rescue system from the SuSE CD1, I mounted my local system (dev/hda3) and made the proper changes. However those changes seem to stay in the PC memory, therefore when I boot up I receive messages similar to these:
user: xxxx
FileSystem is read only
In other words, the whole system gets mounted as read-only, that's being happening since I commented that line
Anotherway could be if you boot in rescue mode (with the CD) but when prompted don't ask the installer to search for your install. That way, you may simply make a mount point (something like /mnt/rescue_edit) or something, mount your root partition, locate the file, edit it, and save it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.