Linux 3.0 under Ubuntu ‘natty’ 11.04

Now, when Linus Torvalds released Linux 3.0-rc many people are trying to update to this version. I did it recently on one of my machines and decided to share instructions with others.

For Ubuntu ‘natty’ 11.04 users the easiest way is to use packages from ‘oneiric’ 11.10 release. There are few ways of doing that.

Grab packages way

Not best option but easy do to and does not require lot of work — just need to grab three packages:

  • Linux 3.0 kernel image — select newest version and required flavour (generic/server/virtual)
  • module-init-tools — version 3.13 is required to get modules working, 3.16 is now available in oneiric
  • procps — to make ‘ps’ not complain due to lack of 3rd digit in kernel version

Then install resulting debs and reboot computer.

APT pinning way

This method requires editing system configuration but is nicer. You need to create file (’30-pinning’ for example) in /etc/apt/preferences.d/ directory with this contents:

Package: *
Pin: release n=natty
Pin-Priority: 900

Package: *
Pin: release n=oneiric
Pin-Priority: 800

This will tell APT that packages from ‘natty’ 11.04 release are what we want but ‘oneiric’ 11.10 ones can also be installed.

Then next step is adding ‘oneiric’ repositories. I did it by going to /etc/apt/sources.list.d/ directory and making copy of ‘natty.list’ as ‘oneiric.list’ + search/replace ‘natty’ -> ‘oneiric’. Then use your preferred package manager frontend and install packages from first method — with “apt-get” it would be:

apt-get install -t oneiric linux-image-3.0-1-generic module-init-tools
apt-get install -t oneiric procps

funny note

My machine has two 50mm fans which were very loud with 2.6.39 kernel (something ~4700rpm). Under 3.0-rc3 they are unnoticeable at 1700-2700rpm only.

21 thoughts on “Linux 3.0 under Ubuntu ‘natty’ 11.04

  1. moher

    It would be not funny if the fans would stop spinning. I think that previous behaviour (~4700rpm) was better, fans shouldn’t be managed by software unless you explicitly configure software to do so. It’s dangerous because it’s not clear if the behaviour is intended by kernel developers.

  2. miguel

    Hello, thanks for info, and a question I have no file natty.list in /etc/apt/sources.list.d/ directory Any suggestion?

    1. Marcin Juszkiewicz Post author

      Then edit /etc/apt/sources.list file and duplicate entries. You can also move this file to /etc/apt/sources.list.d/natty.list and then follow my instructions. For APT it does not matter.

  3. Patricio

    Pin-Priority: 800 =! Pin-Priority:800 ;) does not work with the blank, I guess is wordpress

    1. Marcin Juszkiewicz Post author

      I have blanks and it works fine for me:

      hrw@krzys:~$ apt-cache policy procps
      procps:
        Installed: 1:3.2.8-10ubuntu4
        Candidate: 1:3.2.8-10ubuntu4
        Version table:
       *** 1:3.2.8-10ubuntu4 0
              800 http://pl.archive.ubuntu.com/ubuntu/ oneiric/main amd64 Packages
              100 /var/lib/dpkg/status
           1:3.2.8-10ubuntu3 0
              900 http://pl.archive.ubuntu.com/ubuntu/ natty/main amd64 Packages
  4. Phil21

    Great howto! Done on multiple systems with no problem, much better than manual .deb installs. Thanks :)

  5. Axel

    To get automatic kernel upgrades (= get the latest natty kernel), you can configure apt to preference the according packages linux-image-xxx, module-init-tools, procps and – in case of a nvidia card – nvidia-current. <br/> Please correct me, if i am wrong. <br/>

    Package: linux-image-generic
    Pin: release n=oneiric
    Pin-Priority: 900
    
    Package: module-init-tools
    Pin: release n=oneiric
    Pin-Priority: 900
    
    Package: procps
    Pin: release n=oneiric
    Pin-Priority: 900
    
    Package: nvidia-current
    Pin: release n=oneiric
    Pin-Priority: 900
    

    Greets Axel

  6. Tom Vaughan

    With the latest Alpha 3 release of Oneiric, this appears to be correct:

    $ cat /etc/apt/preferences.d/30-oneiric Package: * Pin: release n=natty Pin-Priority: 900

    Package: * Pin: release n=oneiric Pin-Priority: 800

    Package: linux-image-generic Pin: release n=oneiric Pin-Priority: 900

    Package: linux-headers-generic Pin: release n=oneiric Pin-Priority: 900

    Package: module-init-tools Pin: release n=oneiric Pin-Priority: 900

    Package: procps Pin: release n=oneiric Pin-Priority: 900

    Package: nvidia-common Pin: release n=oneiric Pin-Priority: 900

  7. Tom Vaughan

    $ cat /etc/apt/preferences.d/30-oneiric

    Package: *
    Pin: release n=natty
    Pin-Priority: 900
    
    Package: *
    Pin: release n=oneiric
    Pin-Priority: 800
    
    Package: linux-image-generic
    Pin: release n=oneiric
    Pin-Priority: 900
    
    Package: linux-headers-generic
    Pin: release n=oneiric
    Pin-Priority: 900
    
    Package: module-init-tools
    Pin: release n=oneiric
    Pin-Priority: 900
    
    Package: procps
    Pin: release n=oneiric
    Pin-Priority: 900
    
    Package: nvidia-common
    Pin: release n=oneiric
    Pin-Priority: 900
    
  8. Gurmeet

    Fans are typically controlled by BIOS bot directly by OS, although you can do that also.

    There was something really bad happening in the previous releases causing CPU voltages and the number of interrupts to step up kicking in the fans at high RPM. Something was corrected later on in the OS, reducing the CPU load and hence the cooling requirement from the fans.

  9. Adrian

    I had to install the package nvidia-common, althou my lap doesn’t have an nvidia card (intel sandybridge)

    Otherwise apt-get dies trying to configure the new kernel.

  10. ikke

    No, apt-get does not die on nvidia-common alone, it dies on lack of appropriate headers. Meaning: this is the so many-th blog that provides invalid/incorrect/incomplete instructions.

  11. ikke

    Well, on seconds thoughts: Never mind the previous post. Those missing headers might be an omission, but the procedure described here works smooth. Nice invention anyway that trick with two different version repositories. I did not know this was possible.

  12. Wojtek Kaniewski

    In case of a PowerPC machine, an upgrade of “yaboot” package is also necessary due to a late transition from hdX to sdX. So remember to change the partition names in /etc/yaboot.conf and to run “ybin” afterwards to update the bootloader.

Comments are closed.

No Trackbacks.