How do I (upgrade|downgrade) the installed linux kernel?

Forum Forums New users New Users and General Questions How do I (upgrade|downgrade) the installed linux kernel?

  • This topic has 50 replies, 11 voices, and was last updated Feb 23-3:18 pm by ile.
Viewing 15 posts - 1 through 15 (of 51 total)
  • Author
    Posts
  • #3913
    Member
    andfree

      split from topic “Make old system more lightweight”

      Also. SamK gives some good tips on this forum for older gear.

      One of the tips is this:

      Try an older antiX kernel, they can be better suited to older kit. The 3.7.10-antix kernel works well on older systems

      The kernel I have installed is 4.4.10-antix.1-486-smp i686. How can I change it? I have to do a fresh install of OS?

      #3917
      Anonymous
        Helpful
        Up
        0
        ::

        ( great FAQ candidate question …and the new forum did not yet have a matching topic )

        tutorial video: Install a different kernel
        tutorial video: Rebuild your dkms modules after a kernel update (broadcom, nvidia, etc…)

        note:
        the method described in these videos is applicable to an installed (not a liveboot) system.

        #3928
        Member
        andfree
          Helpful
          Up
          0
          ::

          Thanks for the videos but, after having installed 3.7.10-antiX.8-486-smp from Synaptic Package Manager, run “sudo update-grub” & rebooted, the kernel I see when I run “inxi -S” is still 4.4.10-antix.1-486-smp i686.

          EDIT: I had just to enter to the advanced options of the grub after rebooting and choose there the 3.7.10 kernel option.

          • This reply was modified 5 years, 4 months ago by andfree.
          #3948
          Member
          andfree
            Helpful
            Up
            0
            ::

            So, how can I set the recently installed kernel as default?

            My grub version:

            GNU GRUB version 2.02~beta2-22+deb8u1

            • This reply was modified 5 years, 4 months ago by andfree.
            #3955
            Member
            andfree
              Helpful
              Up
              0
              ::

              In the other laptop (toshiba s2450-s203), although I have installed the 3.7.10 kernel thing, in the grub advanced menu there is not such an option at all.

              $ sudo update-grub
              Generating grub configuration file ...
              Found background: /usr/share/wallpaper/back.jpg
              Found background image: /usr/share/wallpaper/back.jpg
              Found linux image: /boot/vmlinuz-4.0.5-antix.3-486-smp
              Found initrd image: /boot/initrd.img-4.0.5-antix.3-486-smp
              Found memtest86+ image: /boot/memtest86+.bin
              Found memtest86+ multiboot image: /boot/memtest86+_multiboot.bin
              done
              #3964
              Moderator
              caprea
                Helpful
                Up
                0
                ::

                In the other laptop (toshiba s2450-s203), although I have installed the 3.7.10 kernel thing, in the grub advanced menu there is not such an option at all.

                If you are dual-booting on this laptop, you maybe have to udate-grub also on the other partition.

                #3970
                Member
                andfree
                  Helpful
                  Up
                  0
                  ::

                  If you are dual-booting on this laptop, you maybe have to update-grub also on the other partition.

                  It’s not dual boot. I have installed the 3.7.10 kernel, but only the 4.0.5 one appears at the grub. The only advanced options at grub are 4.0.5 and 4.0.5 sysvinit. I ran update-grub to both of them, but nothing seems to have happened.

                  • This reply was modified 5 years, 4 months ago by Brian Masinick. Reason: udate-grub should be update-grub
                  #3977
                  Anonymous
                    Helpful
                    Up
                    0
                    ::

                    As a primarily liveboot user, I’m unfamiliar with the intricacies of wrestling with grub. I seem to recall that at least 2 approaches are possible:
                    1) use a fully-nerfed solution to fix (Rescatux, Livezilla, or similar liveboot O/S designed to fix0r such problems)
                    2) read manpages (Tip: several separate manpages exist; use the command “apropos grub”) and edit config files, ignoring the inline “do not manually edit” comments…

                    #4023
                    Member
                    fatmac
                      Helpful
                      Up
                      0
                      ::

                      I think, if you upgrade your kernel, & update grub it will only show the newest.

                      When you upgrade other programs it replaces them with the newer version, & I’m thinking this is what would happen if you also upgrade your kernel,
                      (I have never bothered upgrading my kernel, until the next version of AntiX.)

                      Linux (& BSD) since 1999

                      #4108
                      Anonymous
                        Helpful
                        Up
                        0
                        ::

                        I know three different ways to boot an older kernel as standard

                        But I don’t know if the first two will survive a package update of the Grub
                        These are the measures described here in the link in /etc/default/grub
                        e. g.GRUB_DEFAULT="Previous Linux versions>antiX, with Linux 3.7.10-antiX.8-486-smp"
                        or
                        the “figure out” with the submenus 0>2 etc.

                        The third option is my favorite.

                        1. copy /etc/grub.d/40_custom
                        2. insert the kernel entry 3.7.10-antiX from /boot/grub/grub.cfg into this file copied 40_custom

                        kind of here e.g.:
                        [code]#!/bin/sh
                        exec tail -n +3 $0
                        # This file provides an easy way to add custom menu entries.
                        # Simply type the menu entries you want to add after this comment.
                        # Be careful not to change the ‘exec tail’ line above.
                        menuentry ‘antiX 17 (17) (auf /dev/sdb1)’ –class gnu-linux –class gnu –class os $menuentry_id_option ‘osprober-gnulinux-simple-f79f077c-40de-4a56-9885-d8d898704be9′ {
                        insmod part_msdos
                        insmod ext2
                        set root=’hd1,msdos1′
                        if [ x$feature_platform_search_hint = xy ]; then
                        search –no-floppy –fs-uuid –set=root –hint-bios=hd1,msdos1 –hint-efi=hd1,msdos1 –hint-baremetal=ahci1,msdos1 –hint=’hd1,msdos1’ f79f077c-40de-4a56-9885-d8d898704be9
                        else
                        search –no-floppy –fs-uuid –set=root f79f077c-40de-4a56-9885-d8d898704be9
                        fi
                        linux /boot/vmlinuz-4.10.5-antix.3-amd64-smp root=/dev/sdb1
                        initrd /boot/initrd.img-4.10.5-antix.3-amd64-smp
                        }[/code]

                        3. save the file and rename it at 09_my e. g.
                        4. copy 09_my back to the path /etc/grub.d/
                        Make sure it is executable!

                        5. update-grub

                        reboot

                        If you need to undo this procedure, then revoke the execution permission for the file.

                        chmod -x /etc/grub.d/09_my

                        Good luck!

                        Using this forum is really painless!

                        #4121
                        Anonymous
                          Helpful
                          Up
                          0
                          ::

                          male, thanks for posting to provide instructions

                          ironically, your post mentions “this forum is painless to use”…
                          …yet the “spam filter” grabbed that post. I’m wrestling with workarounding whatever triggered the spam filter, so that the post will be displayed.

                          PSA:

                          the presence of
                          c h m o d
                          within a post
                          triggers the “spam filter”

                          c h < strong >< /strong > m o d
                          ^——- able to workaround spam filter by inserting an empty tagset to break up the triggering substring

                          #4185
                          Member
                          andfree
                            Helpful
                            Up
                            0
                            ::

                            The third option is my favorite.

                            I followed this one at the celeron (compaq) laptop and it worked. The steps:

                            yyy@antix1:~
                            $ cp /etc/grub.d/40_custom /home/yyy
                            yyy@antix1:~
                            $ sudo geany /home/yyy/40_custom
                            [sudo] password for yyy: 
                            yyy@antix1:~
                            $ leafpad /boot/grub/grub.cfg

                            I copied the menuentry for the 3.7.10 kernel from /boot/grub/grub.cfg, I pasted it at the end of the /home/yyy/40_custom file, I saved the changed file, I rename it as 09_my and then:

                            yyy@antix1:~
                            $ sudo cp /home/yyy/09_my /etc/grub.d/
                            yyy@antix1:~
                            $ sudo update-grub
                            Generating grub configuration file ...
                            Found background: /usr/share/wallpaper/back.jpg
                            Found background image: /usr/share/wallpaper/back.jpg
                            Found linux image: /boot/vmlinuz-4.4.10-antix.1-486-smp
                            Found initrd image: /boot/initrd.img-4.4.10-antix.1-486-smp
                            Found linux image: /boot/vmlinuz-3.7.10-antix.8-486-smp
                            Found initrd image: /boot/initrd.img-3.7.10-antix.8-486-smp
                            Found memtest86+ image: /boot/memtest86+.bin
                            Found memtest86+ multiboot image: /boot/memtest86+_multiboot.bin
                            done
                            yyy@antix1:~
                            $ 

                            I rebooted and the 3.7.10 kernel is now the standard one.

                            Many thanks for the help.

                            PS: At the P4 (toshiba) laptop, there was no entry for 3.7.10-antix kernel at all, because I had not installed it, but I had installed the 3.7.10 headers thing. But after installing and booting the 3.7.10 kernel, moving strips were displayed, like a broken tv. So, I suppose that the 3.7.10 kernel is incompatible with this one system.

                            #4260
                            Moderator
                            Brian Masinick
                              Helpful
                              Up
                              0
                              ::

                              Let’s say that you have the 4.4.10 kernel and you want the 3.7.10 kernel installed and have it show up as your primary – and possibly your ONLY kernel.

                              If that’s what you want, here’s an easy way (in my opinion anyway) to achieve this;

                              1. Install the 3.7.10 kernel.
                              2. The new kernel should trigger Grub to be updated if a valid kernel for your system has been installed. Update-grub should also cause a new kernel to be visible. If not, make sure the kernel installed matches your hardware.
                              2. Boot into the new kernel to make sure it works. If so, you can remove newer kernels so that 3.7.10 is loaded automatically. If you prefer to keep other kernels, then you have to use Grub options to control the boot order.

                              Manually editing the Grub custom configuration file and putting the entry you always want included in either the custom Grub configuration file or in a saved, copied and hand modified version of the system Grub configuration are methods best left to those who understand each customization entry.

                              --
                              Brian Masinick

                              #4273
                              Member
                              andfree
                                Helpful
                                Up
                                0
                                ::

                                you can remove newer kernels so that 3.7.10 is loaded automatically.

                                Thanks for this. It seems to be a good way to follow after I’ ll have decided which kernel I prefer to use.

                                If you prefer to keep other kernels, then you have to use Grub options to control the boot order.

                                Manually editing the Grub custom configuration file and putting the entry you always want included in either the custom Grub configuration file or in a saved, copied and hand modified version of the system Grub configuration are methods best left to those who understand each customization entry.

                                Actually, I find it more safe and easy to use Grub options than edit the Grub configuration file but, after male had spent his time to provide instructions in reply to my question, I felt like I owed to test them.

                                After that, I have some more questions:

                                1) When I install a kernel, I have also to install the corresponding headers?

                                2) Now I’m testing the 3.7.10 kernel on this desktop computer:

                                System:   Host: zzz Kernel: 3.7.10-antix.8-486-smp i686 (32 bit gcc: 4.9.3)
                                           Desktop: IceWM 1.3.8
                                           Distro: antiX-15-V_386-full Killah P 30 June 2015
                                Machine:   Device: desktop Mobo: Gigabyte model: 8I915PL-G v: x.x
                                           BIOS: Award v: F2 date: 03/30/2006
                                CPU:       Single core Intel Pentium 4 (-HT-) cache: 2048 KB
                                           flags: (lm nx pae sse sse2 sse3) bmips: 6430
                                           clock speeds: max: 3200 MHz 1: 2800 MHz 2: 3200 MHz
                                Graphics:  Card: NVIDIA GT218 [GeForce 210] bus-ID: 01:00.0
                                           Display Server: X.Org 1.16.4 drivers: nouveau (unloaded: modesetting,fbdev,vesa)
                                           Resolution: 1024x768@60.00hz
                                           GLX Renderer: Gallium 0.4 on NVA8
                                           GLX Version: 3.3 Mesa 10.3.2 Direct Rendering: Yes
                                Audio:     Card-1 Intel 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller
                                           driver: snd_intel8x0 ports: c000 c400 bus-ID: 00:1e.2
                                           Card-2 NVIDIA High Definition Audio Controller
                                           driver: snd_hda_intel bus-ID: 01:00.1
                                           Sound: ALSA v: k3.7.10-antix.8-486-smp
                                Network:   Card-1: Marvell 88E8001 Gigabit Ethernet Controller
                                           driver: skge v: 1.14 port: 9400 bus-ID: 02:05.0
                                           IF: eth0 state: down mac: <filter>
                                           Card-2: Atheros TP-Link TL-WN821N v2 802.11n [Atheros AR9170]
                                           driver: carl9170 v: 1:1.9.6 usb-ID: 001-003
                                           IF: wlan0 state: N/A mac: N/A
                                Drives:    HDD Total Size: 82.4GB (47.2% used)
                                           ID-1: /dev/sda model: Excelstor_Techno size: 82.3GB
                                           ID-2: USB /dev/sdf model: Memory_Stick size: 0.1GB
                                Partition: ID-1: / size: 74G used: 35G (50%) fs: ext4 dev: /dev/sda1
                                           ID-2: swap-1 size: 2.17GB used: 0.00GB (0%) fs: swap dev: /dev/sda2
                                           ID-3: swap-2 size: 0.07GB used: 0.01GB (8%) fs: swap dev: /dev/zram1
                                Sensors:   System Temperatures: cpu: No active sensors found. Have you configured your sensors yet? mobo: N/A gpu: 57.0
                                Info:      Processes: 102 Uptime: 54 min Memory: 236.5/500.8MB
                                           Init: SysVinit runlevel: 5 Gcc sys: 4.9.2
                                           Client: Shell (bash 4.3.301) inxi: 2.3.21

                                On booting, there are some error messages like this:

                                end_request: I/O error, dev fd0 sector 0

                                After some searching, I tried adding “blacklist floppy” to /etc/modprobe.d/blacklist and also adding /etc/modprobe.d/blacklist-floppy.conf to /etc/mkinitcpio.conf, but without success. For the moment, I haven’t noticed any problems in performance of the system. Should I ignore the boot error messages?

                                3) Are there any other old antix kernels which are well suited to older kits?

                                • This reply was modified 5 years, 4 months ago by andfree.
                                #4389
                                Moderator
                                Brian Masinick
                                  Helpful
                                  Up
                                  0
                                  ::

                                  Editing the GRUB configuration file IS possible – if you know what you are doing, but it is likely to be modified any time a change is made that involves the GRUB packages, so you are advised to keep your own copy in case it’s removed following one of your changes by a system or package change.

                                  Moreover, it’s pretty easy to make a mistake when you are hand editing the file, and that’s why there are frequent suggestions and recommendations to either use tools or only update the CUSTOM grub configuration, not the main grub.cfg file.

                                  Again, if you know what you are doing, a lot of things are “possible”, but when you really know what you are doing, you also know how to overcome the obstacles and you know how to rebuild it all if it fails. So it’s up to the person performing the task to decide if they have the experience and if it’s worth the risks.

                                  --
                                  Brian Masinick

                                Viewing 15 posts - 1 through 15 (of 51 total)
                                • You must be logged in to reply to this topic.