Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi all! We have been experiencing an issue on site where threads have been missing the latest postings. The platform host Vanilla are working on this issue. A workaround that has been used by some is to navigate back from 1 to 10+ pages to re-sync the thread and this will then show the latest posts. Thanks, Mike.
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Preemptive Kernel in Redhat?

  • 26-05-2008 10:43am
    #1
    Registered Users, Registered Users 2 Posts: 7,205 ✭✭✭


    I need to build a preemptive kernel for testing some things out, could any one please direct me where i could find out how to do this please?

    Thanks!


Comments

  • Registered Users, Registered Users 2 Posts: 37,485 ✭✭✭✭Khannie


    There are loads of guides on building new kernels. Once you've done it once it's actually not that difficult. The main jist of it is that you'll need to install the source (if it's redhat, then with an RPM or yum or whatever). as root: cd /usr/src/linux; make menuconfig

    The pre-emptive bits are in the first few options iirc.

    Good luck.


  • Registered Users, Registered Users 2 Posts: 7,205 ✭✭✭witnessmenow


    After doing a bit of reading about, is it a patch i need to make the kernel preemptive? I cannot find this patch! Sorry for the nooby questions!


  • Closed Accounts Posts: 413 ✭✭sobriquet


    If you've never built a kernel before, start simple: find a guide to building a kernel from source on Redhat, there's more than likely an official one. Get a vanilla kernel building first, then think about changing config options or patching it.

    Be clearer though: are you using RHEL or Fedora Core?

    Do you know if you need to build a vanilla source (ie from kernel.org) or an RH supplied one? (They might mix in their own patches by default.) If you don't know, the RH one is probably more suitable, like Khannie says it'll be in the RH repositories and installable via yum or whatever. (Not an RH user myself.)


  • Registered Users, Registered Users 2 Posts: 7,205 ✭✭✭witnessmenow


    Ok i did this a few days ago but i thought I'd just let you know what i did(I was using redhat 2.6 kernel). It might prove useful to fellow noobs:

    Download your kernel source

    move it to
    cd /usr/src/

    Note: If you have a redhat kernel already and its information is stored at /usr/src/redhat you need to move it(renaming the redhat folder should be fine), when you extract your kernel source it will extract to /usr/src/redhat

    extract the kernel source -
    gzip -cd kernel source file | tar xvof -

    then move to
    cd /usr/src/redhat/SOURCES

    then type the following (will be diffrent for diffrent kernel versions i guess)
    rpmbuild -bb kernel-2.6.spec

    then go here (again will be diffrent for diffrent kernels i guess)
    /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.i386

    Then type
    make menuconfig

    This will load up a bit of a GUI:

    Go to:
    Processor type and features --->

    then:
    Preemption Model (Preemptible Kernel (Low-Latency Desktop)) --->

    and select
    Preemptible Kernel (Low-Latency Desktop)

    now we're ready to make!

    type these in the following order
    make clean

    make

    make install

    go to your grub file to make sure its there
    vi /boot/grub/grub.conf

    Congrats if it is!

    Pretty awful guide but you never know, migh help somone!


  • Closed Accounts Posts: 4,564 ✭✭✭Naikon


    This is my solution under Slackware 12.1:
    cd  /usr/src/
    
    You should have your kernel sources installed here, and the kernel
    modules package should be installed too.

    For example, if you don't have the latest source,
    go to http://www.kernel.org/pub/linux/kernel/v2.6/ and download
    the sources.

    Move the sources to /usr/src/ and perform a gzip and tar decompress.
    If the end is .bzip , you will need to use bzip2 with the -d flag prior to the
    next step.
    tar -xvjf   linux-2.6.25.4.tar.gz
    
    Now, you should have a skeletal directory with all the header files and sources.
    Run:
    make mrproper
    
    Which will clean up the directory, and prepare for a kernel compile.

    Now, run
    make menuconfig
    
    Which will give you a ncurses based menu to navigate.
    Make sure essential drivers for IDE drives etc, are not loaded
    as modules, but compiled into the kernel.

    Save your config to a file and exit.
    Now run in this order:
    make -j(n+1) V=1    // n is the number of cpu's in your setup.
                                                A multi-core system is thus J=3.
                                                V is level of verbose output. 
    
               make modules  //compile kernel modules
    
    
               make modules_install  //install compiled modules 
    
    Now move the System.map to /boot/System.map.
    Next, move the finished image in the /arch/x86/boot/
    directory(usually called bzImage) to your /boot directory.

    Now edit /etc/lilo.conf for the new image.
    Add a new entry alongside existing kernel entry.
    image = /boot/yourimage
    root = /dev/your root partition(sda1 for example)
    Label = name presented during boot
    read-only /*root partition should be read only*/
    
    
    Now run /sbin/lilo to append changes.
    There should be two entries, your new image,
    and the old image incase the new kernel won't boot.

    Now take a deep breath and reboot the machine:)
    That's all there is to it! (be very careful during the options menu though)


  • Advertisement
Advertisement