You are not logged in.

#1 2015-04-08 17:30:19

herbie643
Member
Registered: 2015-03-03
Posts: 28

Multiple kernels

Today there I Upgraded linux (3.19.3-1 -> 3.19.3-3).

I usually just boot the new kernel without giving it a 2nd thought but today I thought, "What the heck. Let me boot the older kernel."  (I'm just weird that way.)

On Debian I would have a choice of which kernel to  boot. I used Debian Sid for quite a while.
On Arch,it appears that option is not available.

  Now if something had been amiss with the new kernel, for whatever reason and there isn't, you don't have the option of choosing the prior kernel.
Is there a way to have more than one kernel available at boot-time?
Is there a way to NOT REPLACE the older kernel with the upgraded one?
If this is a dumb question, please feel free to hammer my butt.

Offline

#2 2015-04-08 17:31:13

Alad
Wiki Admin/IRC Op
From: Bagelstan
Registered: 2014-05-04
Posts: 2,420
Website

Re: Multiple kernels

If this is a dumb question, please feel free to hammer my butt.

Not a dumb question, but you could have researched if it was asked before.

https://bugs.archlinux.org/task/16702?project=1


Mods are just community members who have the occasionally necessary option to move threads around and edit posts. -- Trilby

Offline

#3 2015-04-08 17:35:34

herbie643
Member
Registered: 2015-03-03
Posts: 28

Re: Multiple kernels

Thanks for the quick reply, REALLY QUICK.
I will check out the link you provided. 
Thanks again Alad.


I did a lookup in the forum under Multiple kernels and only 1 came up and that was in regards to initramfs as I recall.
Google was of no help either.

(Edit)
This kernel update is working well.  In a quandry now as to whether or not to update the next kernel version.

Last edited by herbie643 (2015-04-08 17:40:30)

Offline

#4 2015-04-08 17:42:56

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,659

Re: Multiple kernels

Yes, you can have multiple kernels.  Upgrading a kernel using pacman does remove the modules for the old kernel, and the name of the kernel in the boot partition does not change -- the old kernel is overwritten.  The standard way to back a 'bad' kernel out is to boot the install media and chroot into the system.

That said, there are probably several ways to accomplish what you need.  You build your kernel yourself and install it as a different name.
You could also (hack alert -- not generally recommended) Archive the module directory, the initrd image  and the kernel, update the kernel, put the module directory back, and copy the old kernel and initrd image to the boot partition under different names.  You have to adjust the configuration of your boot loader to add new entries for the old kernel and initrd.

A better solution might be to install the linux-lts (long term support) kernel.  It can exist along side the mainline kernel.  Add it to your boot configuration so you can select lts or mainline at boot.  That way, if your system goes "Tango Uniform"[1]  after a kernel update, you can boot from the lts kernel.

[1] Teats Up


Edit: Dang Alad is fast.   I had never seen the article they linked.

Last edited by ewaller (2015-04-08 17:45:04)


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
The shortest way to ruin a country is to give power to demagogues.— Dionysius of Halicarnassus
---
How to Ask Questions the Smart Way

Offline

#5 2015-04-08 18:46:08

herbie643
Member
Registered: 2015-03-03
Posts: 28

Re: Multiple kernels

I just installed the linux-lts  3.14.37-1 kernel.  I checked the boot directory and now have the option at boot-time.
Thanks ewaller.  Appreciate the quick responses to my question.
Seems strange that the issue was first mentioned about 6yrs ago as a bug.
In this instance, and pretty much this instance only, Arch is not for the 'noob' if something like I mentioned happens.
I suspect that they might freak-out... lol

Offline

#6 2015-04-09 00:13:32

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Multiple kernels

herbie643 wrote:

Seems strange that the issue was first mentioned about 6yrs ago as a bug.

It's not a bug, it has been filed as a feature request.

Offline

#7 2015-04-30 03:24:50

HarlemSquirrel
Member
From: US-East
Registered: 2014-01-22
Posts: 130
Website

Re: Multiple kernels

Is there a way to reorder or prioritize kernels in EFI Grub? I have to go to more options, and then I can choose linux-git, linux or linux-lts since I have three installed.


"Melody reigns supreme!"
    -J. J. Johnson

Offline

#8 2015-04-30 17:49:50

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Multiple kernels

I'm using neither grub not efi, but isn't there a way of setting a default?
Do you need to switch them often?

Offline

#9 2015-04-30 22:32:45

HarlemSquirrel
Member
From: US-East
Registered: 2014-01-22
Posts: 130
Website

Re: Multiple kernels

The default after installing linux-lts is linux-lts. I want this to be the backup, not the default.


"Melody reigns supreme!"
    -J. J. Johnson

Offline

#10 2015-04-30 22:41:26

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: Multiple kernels

HarlemSquirrel wrote:

The default after installing linux-lts is linux-lts. I want this to be the backup, not the default.

Have you read the GRUB article in the wiki? Searched the web for "how to change GRUB default"? What have you tried?

Last edited by 2ManyDogs (2015-04-30 22:42:00)

Offline

#11 2015-04-30 23:01:43

HarlemSquirrel
Member
From: US-East
Registered: 2014-01-22
Posts: 130
Website

Re: Multiple kernels

I know that I can set GRUB_DEFAULT=1 or a different value, but the option to select a different kernel is deeper in the menu. I have to go down to advanced options and press enter and then I am presented with the options of linux or linux-lts.


"Melody reigns supreme!"
    -J. J. Johnson

Offline

#12 2015-04-30 23:07:30

HarlemSquirrel
Member
From: US-East
Registered: 2014-01-22
Posts: 130
Website

Re: Multiple kernels

I found all that I needed here!
https://wiki.archlinux.org/index.php/GR … le_entries

EDIT:
Just an FYI I found out that setting

GRUB_DEFAULT=saved

did not work in my case, perhaps because the setting I needed resides in a sub-menu, so I tried setting

GRUB_DEFAULT='Arch Linux, with Linux linux'

and got this message when updating grub...

$ sudo grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found background: /boot/grub/dark_linux_custom_arch_linux_d_2560x1440_miscellaneoushi.com.jpg
Found linux image: /boot/vmlinuz-linux-lts
Found initrd image: /boot/initramfs-linux-lts.img
Found fallback initramfs image: /boot/initramfs-linux-lts-fallback.img
Found linux image: /boot/vmlinuz-linux
Found initrd image: /boot/initramfs-linux.img
Warning: Please don't use old title `Arch Linux, with Linux linux' for GRUB_DEFAULT, use `Advanced options for Arch Linux>Arch Linux, with Linux linux' (for versions before 2.00) or `gnulinux-advanced-6694029a-1c65-4a5d-ab68-0c4157209a2e>gnulinux-linux-advanced-6694029a-1c65-4a5d-ab68-0c4157209a2e' (for 2.00 or later)
Found fallback initramfs image: /boot/initramfs-linux-fallback.img
done

Last edited by HarlemSquirrel (2015-04-30 23:24:13)


"Melody reigns supreme!"
    -J. J. Johnson

Offline

Board footer

Powered by FluxBB