Recompiling kernal and iptables help
Results 1 to 7 of 7

Thread: Recompiling kernal and iptables help

  1. #1
    Junior Member
    Join Date
    Jan 2003
    Posts
    11

    Question Recompiling kernal

    I have Redhat Linux 8.0 and all my RAM is used up. I have a older computer (300Mhz P2 with about 128Mb RAM). I was told by someone in a chat room that I should recompile my kernal to get rid of any services that are not needed or some thing like that. I'm really new to Linux and am lost when it comes to anything that is documented and not easy to follow. I say this because I've tried to understand some things I've found on the web and they just explain it like you already know what you are doing.
    Only stupid choices remind you of what the smart choices are.

  2. #2
    Senior Member problemchild's Avatar
    Join Date
    Jul 2002
    Posts
    551
    Yes, it's true that compiling a custom kernel can speed up your system and reduce memory usage. But if you are using RH's default Bluecurve GUI, you will get far better results by looking into some lighter weight window managers like Fluxbox or WindowMaker. They have a much smaller footprint than either Gnome or KDE, and while they don't provide as many bells and whistles, they can be a godsend on a low-end system.

    But by all means, have a crack at compiling a kernel. Our own ThePreacher has written a tutorial that will get you started here. You should also read the Kernel HOWTO.

    The best advice I can give you is to just dive in and try to wade through it, and if you screw it up, start over and get it right next time.
    Do what you want with the girl, but leave me alone!

  3. #3
    Junior Member
    Join Date
    Jan 2003
    Posts
    11
    Thanks for the great help!

    I just have some other questions that I probibly should have asked earlier.

    1) Can I put the recompiled kernal on a floppy to make sure it works first?

    2) How do I accomplish this (I didn't find it in any documentation that was mentioned)?

    3) If it works, how do I copy the new kernal to hard drive from floppy and where do i put it?

    Again, thanks for all the help!
    Only stupid choices remind you of what the smart choices are.

  4. #4
    Member
    Join Date
    Jan 2003
    Posts
    37
    Hi there...
    if you want to make a bootable flopy with the kernel you`ve just compiled, in the same directory were you wrote make menuconfig, make bzimage (and all those) you should write the following command, which will let U creat a bootablew floppy out of your reciently compiled kernel "make zdisk" . if the box tells you that the kernel is too large for the boot you shold write "make bzdisk" (this as well as the other makes your kernel suitable for floppy booting).
    The second step to follow, is to have a formatted flopy on your /dev/fd0 (or were you've got your floppy) to have the floppy formated first write "setfdprm -p /dev/fd0 1440/1440" (assuming you put a 1.44 Mb floppy on dev/fd0... take a look at /etc/fdprm for diferent types of floppy)
    and finally fdformat /dev/fd0 (to format your Floppy).
    the last thing to do now is to copy your zdisk or bzdisk to the floppy by the command cp :
    cp /usr/src/linux/arch/i686/boot/zImage /dev/fd0 (assuming your zImage is in /usr/src/linux/arch/i686/boot/zImage and your floppy in /dev/fd0)...

    Perhaps you shall better consider another option which is to have your LILO with different images; and so you can choose which one to boot if ocationaly one would go wrong.
    to do so..
    in the directory where you compiled your kernel write "make zlilo" or "make bzlilo" if you made a bzImage.
    if that doesnt work look for the lilo.conf file in /dev/lilo.conf ; and copy the lines that go form
    image=/vmlinuz to root
    just below the root line and change tje lable option with the name you would like your new kernel to have when booting, and in the image value put the path of your new kernel's image.
    Well i hope this is helpful. greets.
    ampm2003

    P.D: you can find a lot of useful documentation in www.linuxdoc.org
    \"Aclaró que un Aleph es uno de los puntos del espacio que contiene todos los puntos\"... (An Aleph is a point in space that contains every point)
    Jorge Luis Borges \"El Aleph\"...

  5. #5
    Antionline Herpetologist
    Join Date
    Aug 2001
    Posts
    1,165
    You don't have to copy the kernel to a floppy. A recompiled kernel doesn't replacee your existing kernel. It just makes another one. All you have to do is add a line to /etc/grub.conf mentioning the new kernel. Then at the boot menu you'll get an option to boot both your original as well as your new kernel. So try booting the new kernel, if it doesn't work, just reboot and use the old one.

    EDIT: Removed the instructions to write the kernel to floppy as ampm2003's instructions were so much better
    Buy the Snakes of India book, support research and education (sorry the website has been discontinued)
    My blog: http://biology000.blogspot.com

  6. #6
    Senior Member problemchild's Avatar
    Join Date
    Jul 2002
    Posts
    551
    Indeed. You can have as many kernels installed alongside each other as you like without touching your original one. That way, if you screw up your new kernel by.... oh, say..... forgetting to compile in IDE support ..... you can always still boot the original one.

    I will refer you to the Kernel HOWTO: http://www.tldp.org/HOWTO/Kernel-HOWTO-12.html#ss12.3

    You need to spend some time reading up on the links we have given you, then just give it a whack and see what happens. A Google search will also turn up 1,001 good links that will tell you more than we ever could.

    add a line to /etc/grub.conf
    Errrr.... when did grub start using that config file?

    If grub is your bootloader, the config file is /boot/grub/menu.lst. If you are using lilo, it's /etc/lilo.conf.
    Do what you want with the girl, but leave me alone!

  7. #7
    Junior Member
    Join Date
    Jan 2003
    Posts
    11

    Thumbs up

    You all have been very helpful. Thanks a bunch!!
    Only stupid choices remind you of what the smart choices are.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •