Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Frequently Asked Questions
  • Search

KC10: Reusing config when upgrading

Some of the most commonly heard questions in the Gentoo Community, along with answers.
Post Reply
Advanced search
1 post • Page 1 of 1
Author
Message
IWBCMAN
Guru
Guru
User avatar
Posts: 474
Joined: Tue Jun 25, 2002 10:59 am

KC10: Reusing config when upgrading

  • Quote

Post by IWBCMAN » Mon Dec 23, 2002 12:59 pm

KC10. I'm upgrading my kernel sources. Can I use my old configuration? If so, how?

If you wish to maintain as much of your old kernel configuration as possible when installing your new kernel, copy /usr/src/linux/.config to your new kernel tree (1), then switch to the base source directory (2) then delete the symlink pointing to linux (3) and re-link linux to your new kernel tree (4), now enter your new linux directory (5) and run make oldconfig (6) - this attempts to preserve existing kernel configurations - you will be prompted to make choices regarding new kernel options (and if you don't know whether or not to enable some option, simply pressing <return> usually selects "No". Once you have completed this step, then you should run make menuconfig (or make xconfig) (7) and then carefully look over the sections involved in selecting file systems, printer setup, usb setup and possible scsi emulation-the time spent here can save much time and many needed re-compiles later. After you have finished configuring the kernel, you must compile and install your new kernel. (8-17) (in step format:)
  • [1] cp /usr/src/linux/.config /usr/src/linux-2.x.xx-yyyyyy/.config
    [2] cd /usr/src
    [3] rm linux
    [4] ln -s linux-2.x.xx-yyyyyy linux
    [5] cd /usr/src/linux
    [6] make oldconfig
    [7] make menuconfig or make xconfig
    [8] 2.4.x:make dep clean bzImage modules modules_install
    2.6.y:make && make modules_install
    [9] mount /boot (where /boot is an entry in your /etc/fstab, which should [normally not be mounted during normal use)
    [10] mv /boot/bzImage /boot/bzImage.old
    [11] cp /usr/src/linux/arch/i386/boot/bzImage /boot/bzImage
    [12] edit /boot/grub/menu.lst and add an entry for your new kernel and replace the reference to bzImage in your previous kernel entry to point to the deprecated kernel file (bzImage.old)
    [13] if you are using nvidia- emerge nivdia-kernel
    [14] 2.4.x only: if you are using alsa - emerge alsa-driver
    [15] edit /etc/modules.autoload.d/kernel-2.{4,6} to reflect any changes in modules to be auto loaded
    [16] unmount /boot (ie. umount /boot)
    [17] shutdown -hr now
    and voila you new kernel entry should appear in the grub menu waiting to be tried....
I know it's a bit long-but sometimes being pedantic is helpful !!!

EDIT (rac) some cleanup. Thanks to rbacon2 and Sesshomaru for contributions to this entry.
2004-10-26: 2.6 changes --kallamej
Top
Post Reply
1 post • Page 1 of 1

Return to “Frequently Asked Questions”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic