Facebook Twitter Instagram
    WiredRevolution.com
    • Home
    • About
    • Contact Us
    • Essential Linux Commands
    • Sitemap
    Facebook Twitter Instagram
    WiredRevolution.com
    gentoo

    Upgrade Gentoo Linux Kernel

    RyanBy RyanNovember 10, 2008Updated:November 10, 20082 Mins Read
    Facebook Twitter Pinterest LinkedIn Reddit WhatsApp Email

    Updating your kernel is important if you want to take advantage of new hardware support or bleeding edge features.  Aside from these obvious benefits it also allows you to keep up with security patches, system optimization, and overall stability issues.

    The first thing you have to do is emerge the latest gentoo-sources package.

    # emerge -u gentoo-sources
    

    The source will now be installed in /usr/src/linux-2.6.27-gentoo-r2. Your specific version will differ from this one of course.

    You now need to update the symlink to point to the new sources.

    # cd /usr/src
    # ln -s linux-2.6.27-gentoo-r2 linux
    

    If your kernel is configured to store a copy of its current configuration in /proc/config.gz you can use those choices to start building your new kernel by copying and uncompressing this stored copy.

    # zcat /proc/config.gz > /usr/src/linux/.config
    

    If your current kernel doesn’t support this you can copy the configuration file from the old sources.

    # cp /usr/src/linux-2.6.27-gentoo-r2/.config /usr/src/linux/.config
    

    Move to the /usr/src/linux directory.

    # cd /usr/src/linux
    

    If you upgrade you kernel on a regular basis you can safely run make oldconfig to configure your new kernel options. This will take your old kernel options and walk you through the configuration changes.

    # make oldconfig
    

    If its been awhile use make menuconfig instead. This will give you more context when making configuration choices.

    # make menuconfig
    

    Once the new kernel is configured it is time to build it as well as any modules you have specified.

    # make && make modules_install
    

    If this completes successfully you new kernel image will be placed here: /usr/src/linux-2.6.27-gentoo-r2/arch/x86_64/boot/bzImage.

    Copy this image to the /boot directory. You should rename it to differentiate it from past kernels.

    # cp /usr/src/linux-2.6.27-gentoo-r2/arch/x86_64/boot/bzImage /boot/kernel-2.6.27-gentoo-r2
    

    Finally in order to use this image you will have to update your bootloader, such as grub, and add a new entry for the kernel image you have just placed in the /boot directory.

    Update grub.conf located here: /boot/grub/grub.conf. Keep your old kernel entry until you have verified your new kernel works correctly.

    # New Gentoo Kernel
    title Gentoo Linux 2.6.27-r2
    root(hd0,0)
    kernel /boot/kernel-2.6.27-gentoo-r2 root=/dev/sda0
    
    # old Gentoo Kernel
    title Gentoo Linux 2.6.27-r1
    root(hd0,0)
    kernel /boot/kernel-2.6.27-gentoo-r1 root=/dev/sda0
    

    To use the new kernel reboot and select this new entry at the bootloader screen.

    Share. Facebook Twitter Pinterest LinkedIn WhatsApp Reddit Email
    Previous ArticleCommand substitution in BASH
    Next Article Add Ubuntu medibuntu repository

    Related Posts

    Fix SketchUp refresh bug on Linux with WINE

    Install Virtualbox on Ubuntu 12.10: the missing kernel module fix

    The Linux Kernel Reaches Milestone Version 3.0

    Most Commented
    March 12, 2009

    Fix blue tinted video in Ubuntu

    September 10, 2010

    Setup SSH access between VirtualBox Host and Guest VMs

    March 8, 2011

    Install GNOME Shell in Ubuntu 10.10 Maverick

    April 4, 2009

    Setup the PS3 Bluetooth Controller on Ubuntu

    October 22, 2008

    How to correctly use LD_LIBRARY_PATH

    Recent Comments
    • Execute command on linux virtual machine (or server) from windows commandline on Setup SSH access between VirtualBox Host and Guest VMs
    • Solved: How to SSH to a VirtualBox guest externally through a host? - Daily Developer Blog on Setup SSH access between VirtualBox Host and Guest VMs
    • How to SSH to a VirtualBox guest externally through a host? [closed] – Code D3 on Setup SSH access between VirtualBox Host and Guest VMs
    • How to copy and paste from VirtualBox? [duplicate] on Setup SSH access between VirtualBox Host and Guest VMs
    • Jackie Laguna on Fix OpenGL: ChoosePixelFormat SketchUp error in WINE
    © 2025 ThemeSphere. Designed by ThemeSphere.

    Type above and press Enter to search. Press Esc to cancel.