Update gentoo kernel: Difference between revisions

From Bitpost wiki
No edit summary
No edit summary
Line 24: Line 24:
* cp arch/x86_64/boot/bzImage /boot/kernel-genkernel-x86)64-#kernelversion#-gentoo-#gentooreleaseversion#_mdm-menuconfig
* cp arch/x86_64/boot/bzImage /boot/kernel-genkernel-x86)64-#kernelversion#-gentoo-#gentooreleaseversion#_mdm-menuconfig
* emacs /boot/grub/grub.conf (and add your shiny new kernel to the default top of the list)
* emacs /boot/grub/grub.conf (and add your shiny new kernel to the default top of the list)
* reboot


== Post-kernel-installation Steps ==
== Post-kernel-installation Steps ==
Since this involves video drivers, you probably have to do this outside X, so reboot and select a "softlevel=single" boot option.


* install nvidia binary driver
* install nvidia binary driver
* install a new ivtv that matches the new kernel version
* install a new ivtv that matches the new kernel version


You should be able to use the following to automatically reinstall kernel-dependent modules:
In theory you can use the following to automatically reinstall kernel-dependent modules:


  module-rebuild rebuild
  module-rebuild rebuild


A more manual approach:
But I used a more manual approach, as module-rebuild didn't work:


  emerge nvidia-drivers
  emerge nvidia-drivers
  lsmod | grep nvidia && rmmod nvidia  # removes the previous module
  eselect opengl set nvidia
  modprobe nvidia                      # loads the new module
  reboot
  emacs /etc/portage/package.mask      # adjust ivtv version if you don't want the most recent - it has to match your kernel version
  emacs /etc/portage/package.mask      # adjust ivtv version if you don't want the most recent - it has to match your kernel version
  emerge ivtv
  emerge ivtv
reboot


If you've done an emerge of media-video/nvidia-settings, you can run it to adjust the resolution, etc., dynamically in X.
If you've done an emerge of media-video/nvidia-settings, you can run it to adjust the resolution, etc., dynamically in X.

Revision as of 07:55, 16 January 2007

In gentoo, everything gets updated via portage using "emerge". For the kernel, emerge only updates the source. You have to manually configure, compile, and install the kernel source into a kernel binary. This is to allow you to keep your kernel tuned for your machine.

Gentoo installs the source here:

/usr/src/linux-#kernelversion#-gentoo-#gentooreleaseversion#

Because I have defined the "symlink" USE flag for gentoo-sources in /etc/portage/package.use, it will also symlink the latest downloaded source (whether you want it to or not) to:

/usr/src/linux

So once you emerge a new kernel source, you ought to install it or change the symlink if you don't have the time to do the kernel install.

Steps To Install Kernel

  • su -
  • emerge sys-kernel/gentoo-sources
  • cd /usr/src/linux
  • make menuconfig (and configure - see Configure MythTV kernel)
  • make && make modules_install
  • ls /boot
  • cp arch/x86_64/boot/bzImage /boot/kernel-genkernel-x86)64-#kernelversion#-gentoo-#gentooreleaseversion#_mdm-menuconfig
  • emacs /boot/grub/grub.conf (and add your shiny new kernel to the default top of the list)

Post-kernel-installation Steps

  • install nvidia binary driver
  • install a new ivtv that matches the new kernel version

In theory you can use the following to automatically reinstall kernel-dependent modules:

module-rebuild rebuild

But I used a more manual approach, as module-rebuild didn't work:

emerge nvidia-drivers
eselect opengl set nvidia
reboot
emacs /etc/portage/package.mask       # adjust ivtv version if you don't want the most recent - it has to match your kernel version
emerge ivtv
reboot

If you've done an emerge of media-video/nvidia-settings, you can run it to adjust the resolution, etc., dynamically in X.