upgrade kernel - Mandrake

This is a discussion on upgrade kernel - Mandrake ; hi i m new to the game of kernel. i know nothing about compiling its modules.i installed mandrake 10.0 on my AMD64 machine and now i want to try building kernel from scratch. i would like to ask >how do ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: upgrade kernel

  1. upgrade kernel

    hi

    i m new to the game of kernel. i know nothing about compiling its
    modules.i installed mandrake 10.0 on my AMD64 machine and now i want to
    try building kernel from scratch. i would like to ask

    >how do i find details of my existing kernel?


    >how to i upgrade it? where do i find the source? i ve tried kernel.org once but couldnt find an appropriate "how to" tutorial that would suit me.


    pls help!


  2. Re: upgrade kernel

    On Sunday 22 October 2006 21:37, shank stood up and addressed the masses
    in /alt.os.linux.mandrake/ as follows...:

    > hi


    Welcome to the group. Before I go on, a small pedant point...: please set
    your newsreader's linewrap to occur around 72 to 76 characters. Long lines
    are very hard to read and some people simply ignore such posts.

    > i m new to the game of kernel. i know nothing about compiling its
    > modules.i installed mandrake 10.0 on my AMD64 machine and now i want to
    > try building kernel from scratch. i would like to ask


    Mandrake 10.0 is old, but I'll humor you... ;-)

    > how do i find details of my existing kernel?


    (Quoting fixed)

    uname -a

    .... should tell you what kernel you're running. There should be a kernel
    configuration file in */boot* for your kernel, and if not, try */usr/src* -
    in which case it will be a hidden file named /.config./

    > how to i upgrade it?


    Upgrading as in "replacing the kernel with a binary kernel from Mandriva" is
    no longer possible, since your distribution has already reached the
    end-of-life years ago.

    Your only option is to get /vanilla/ sources from /kernel.org/ and configure
    and compile your own kernel.

    > where do i find the source? i ve tried kernel.org once but couldnt find an
    > appropriate "how to" tutorial that would suit me.
    >
    > pls help!


    /kernel.org/ is the place to be, but you won't find a /HowTo/ there. I'll
    just give you the concise lowdown on how to proceed - under the assumption
    that you're going for a 2.6 kernel - but if you want more elaborate help,
    you're going to have to scout...

    http://www.tldp.org

    .... for a /HowTo./

    Okay, so first you open up a browser and surf to...

    http://www.kernel.org

    You'll see that the current stable kernel is 2.6.18.1. Right-click the
    "F" (for "full sources") and choose "Copy to" from the pop-up menu. Pick a
    place in your home directory - I use *~/Downloads/Sources* for that but
    your mileage may vary.

    Next - after the download has completed - you open up a terminal window
    and /cd/ to the directory where you saved the tarball. Then issue...

    tar xjvf linux-2.6.18.1.tar.bz2

    The tarball will be decompressed and unpacked to a directory with the name
    of the kernel, e.g. */home/shank/linux-2.6.18.1.*

    Now /cd/ into that directory, and the first thing you ought to do (for good
    measure) is edit the /Makefile./ I use /mcedit/ as my favorite editor for
    commandline stuff, but if you're in a GUI - which is most likely - you may
    want to use /kwrite/ or another editor.

    So we edit the file...

    mcedit Makefile

    Find the line that says EXTRAVERSION and add something to your liking there
    - e.g. the name of your computer, or your own name. Save the file -
    in /mcedit,/ that's /F2/ - and exit the editor - you can also press /F10/
    in /mcedit/ and exit right away. The editor will then ask you whether you
    want to save the changes.

    Next, you need to configure the kernel. There are five possible ways of
    doing that, and you only need _one_ of them. I will describe each of them
    below...

    (1) Old school...

    make config

    This is the oldest method. It's an interactive process. The configurator
    will ask you a number of questions - and subsequent questions depending on
    the answers given to the previous questions - to which you must answer with
    either:
    - "Y" (yes, build this into the kernel itself);
    - "M" (build this as a module);
    - "N" (no, I don't want support for this); or
    - a value or string, depending on what the question is.


    (2) The usual way...

    make menuconfig

    Same options as above, but instead of an interactive questionnaire, you will
    now work through an /ncurses/ menu interface. It's a more userfriendly
    way.


    (3) and (4) The really userfriendly ways...

    make xconfig

    .... or...

    make gconfig

    Both of the above are similar to /menuconfig/ but they will bring up the
    configuration tool in a GUI environment. The first one calls up a /Qt/
    (KDE) environment, the second one a /GTK/ (Gnome/ environment. Neither is
    of course usable if you're not working from within a terminal emulator in
    X11. I personally prefer /xconfig./


    (5) The easy way out...

    make oldconfig

    This is similar to /config/ but will not ask you all questions. Instead, it
    will take on the defaults of your existing kernel - if that is a 2.6
    kernel, it should be able to find those defaults either in */boot,* in
    */usr/src* or in the kernel itself (if compiled in), but for a 2.4 kernel
    you will need to copy the previous kernel's /.config/ file to the directory
    with the unpacked sources for the new kernel first - and will only ask you
    questions regarding configuration options that did not yet exist in your
    old kernel.

    Now, assuming you choose one of the (2), (3) and (4) options, one of the
    first things you should do is check "prompt for experimental/new drivers".
    Next, make sure you select the proper hardware architecture. You can also
    uncheck the "generic x86 code", because that's only relevant to
    distribution kernels intended for multiple types of CPU's. It is also not
    advisable to build a 64-bit kernel if the rest of your distro is 32-bit, so
    don't play with that either. ;-)

    If your machine has more than 890 MB of physical memory and you're building
    a 32-bit kernel, select one of the HIGHMEM options - i.e. support for up to
    4 GB or support for up to 64 GB. The latter is slightly slower - not that
    you will notice - but it allows the kernel to implement an /NX/ bit on
    memory pages as an extra security precaution against malware hidden in
    apparent datafiles.

    If your machine has more than one CPU, enable "synchronous
    multiprocessing" (SMP). If it has one or multiple hyperthreaded
    processors, do the same and enable "synchronous multithreading (SMT). If
    your machine has one or multiple dual-core processors, enable SMP and
    "multi-core support".

    Make sure you build support for ELF and "miscellaneous binaries" into the
    kernel itself, as well as support for /procfs/ and /sysfs,/ and also make
    sure that you also build in support for the filesystem your root partition
    is on. Don't build this as a module.

    In fact - and as I have explained elsewhere in this newsgroup already - I
    recommend building everything you need into the kernel itself, with the
    exception of video drivers and wireless LAN drivers - as those are usually
    proprietary and will come as modules.

    Read the information in the lower right box if you're doing an /xconfig/
    or /gconfig,/ and if you're unsure, stick with the defaults. Go over the
    options one at the time - and _take_ your time for it! - and in the end,
    save the file and exit the utility.

    And so now we've configured the kernel. Now it is time to build and install
    it...

    make bzImage modules

    .... and watch the show... It could take some time for the
    compiling/building to finish, but if your machine is an SMP machine, or a
    multi-core or hyperthreaded machine, you can speed up the process by
    supplying an extra parameter before the build, like so...:

    make -jN bzImage modules

    .... where "N" is the number of _logical_ CPU's in your system - e.g. a
    hyperthreaded processor with hyperthreading enabled will show to the
    operating system as two CPU's - plus 1. So on my machine - a dual Xeon
    with hyperthreading, i.e. 4 logical CPU's - I do...

    make -j5 bzImage modules

    This will spread out the compiling and building across the logical CPU's and
    strongly affects compilation time. On my system - 2.2 GHz - I can build a
    kernel in just over 9 minutes. If I don't supply the /-j5/ parameter, it
    takes over 30 minutes.

    When the compiling is through, you'll need to install the kernel and modules
    into place. For this, you'll need to be root...

    su
    # (Enter the root password)

    make modules_install install
    # (In _this_ order!)

    Last thing you should do is check whether your bootloader configuration
    looks satisfactory. I recommend that you build your kernel
    without /initrd/ support and that you don't use an /initrd/ in your
    bootloader configuration for your home-built kernel.

    I also recommend that you don't reference the new kernel in your
    bootloader's kernel stanza by means of symbolic links. Too confusing and
    prone to error, so use the actual filenames instead. Clean up your
    bootloader configuration (with an editor such as /mcedit/) and if you're
    using LILO, run...

    lilo -v

    .... again after having made the changes.

    That's it! You're now ready to reboot. Cross your fingers... ;-)

    --
    With kind regards,

    *Aragorn*
    (registered GNU/Linux user #223157)

  3. Re: upgrade kernel

    Aragorn wrote:

    > On Sunday 22 October 2006 21:37, shank stood up and addressed the masses
    > in /alt.os.linux.mandrake/ as follows...:
    >
    >> hi

    >
    > Welcome to the group.



    Now how about that!
    You should definitely be writing some HowTos!




  4. Re: upgrade kernel

    Iordani enlightened us alt.os.linux.mandrake-(ab)users with:

    > Aragorn wrote:
    >
    >> On Sunday 22 October 2006 21:37, shank stood up and addressed the
    >> masses in /alt.os.linux.mandrake/ as follows...:
    >>
    >>> hi

    >>
    >> Welcome to the group.

    >
    >
    > Now how about that!
    > You should definitely be writing some HowTos!


    *g* and my leafnode missed that one because of the line number limit (to
    prohibit binary postings ) ...
    --
    vista policy violation: Microsoft optical mouse found penguin patterns
    on mousepad. Partition scan in progress to remove offending
    incompatible products. Reactivate MS software.
    Linux 2.6.17-mm1,Xorg7.1/nvidia [LinuxCounter#295241,ICQ#4918962]

+ Reply to Thread