[opensuse] grub2 does not reflect installation of new kernel - how to add entry?
All, As part of troublshooting the acpi backlight bug in 13.1, https://bugzilla.novell.com/show_bug.cgi?id=887629 there was a request I install and test the 3.15 kernel from kernel:/stable/standard. The install went fine after adding the repository and was done via 'zypper up -t package'. The zypp.conf multiverison preserved the 3.11 kernel: kernel-default-devel-3.11.10-17.2.x86_64 kernel-default-devel-3.15.6-2.1.gedc5ddf.x86_64 kernel-desktop-3.11.10-17.2.x86_64 kernel-desktop-3.15.6-2.1.gedc5ddf.x86_64 kernel-desktop-devel-3.11.10-17.2.x86_64 kernel-desktop-devel-3.15.6-2.1.gedc5ddf.x86_64 kernel-devel-3.11.10-17.2.noarch kernel-devel-3.15.6-2.1.gedc5ddf.noarch kernel-firmware-20140624git-35.1.noarch kernel-source-3.11.10-17.2.noarch kernel-source-3.15.6-2.1.gedc5ddf.noarch kernel-syms-3.11.10-17.1.x86_64 kernel-syms-3.15.6-2.1.gedc5ddf.x86_64 kernel-xen-devel-3.11.10-17.2.x86_64 kernel-xen-devel-3.15.6-2.1.gedc5ddf.x86_64 The problem is that grub2 only reflects a single menu entry for 'openSuSE 13.1' and no second entry to boot the 3.11 kernel. Now with good-old grub, I'd simply edit /boot/grub/menu.lst and add a new menu entry for 3.11. But what do you do for grub2? Also, why doesn't the kernel install create menu entries like it did in 11.4? From 11.4 updates, I had a page full of kernels to choose from. Now, just 1? What says the brain-trust? -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 07/23/2014 10:30 PM, David C. Rankin wrote:
The problem is that grub2 only reflects a single menu entry for 'openSuSE 13.1' and no second entry to boot the 3.11 kernel. Now with good-old grub, I'd simply edit /boot/grub/menu.lst and add a new menu entry for 3.11. But what do you do for grub2?
Also, why doesn't the kernel install create menu entries like it did in 11.4? From 11.4 updates, I had a page full of kernels to choose from. Now, just 1?
What says the brain-trust?
Unless the appropriate 'mkinitrd' and 'grub2-install' (with suitable parameters) were run, then you have what I'd expect. Grub2 is NOT dynamic. It doesn't scan at at run time in the way that its predecessors did. That why you need grub2-install. The 'zypper' _should_ have caused those two to be triggered. You should check that time/date on your kernels in /boot (and that the maps etc are all there for .15) and the time/date on the grub2/grub.cfg. Oh, and your log :-) Of course you could also re-run mkinitrd and grub2-install manually :-) I'd probably have more detailed questions about your /etc/config/* but its been a long day and I'm tired. -- "Education must precede motivation." Jim Rohn -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 07/23/2014 09:45 PM, Anton Aylward wrote:
On 07/23/2014 10:30 PM, David C. Rankin wrote:
The problem is that grub2 only reflects a single menu entry for 'openSuSE 13.1' and no second entry to boot the 3.11 kernel. Now with good-old grub, I'd simply edit /boot/grub/menu.lst and add a new menu entry for 3.11. But what do you do for grub2?
Also, why doesn't the kernel install create menu entries like it did in 11.4? From 11.4 updates, I had a page full of kernels to choose from. Now, just 1?
What says the brain-trust?
Unless the appropriate 'mkinitrd' and 'grub2-install' (with suitable parameters) were run, then you have what I'd expect.
Grub2 is NOT dynamic. It doesn't scan at at run time in the way that its predecessors did. That why you need grub2-install.
The 'zypper' _should_ have caused those two to be triggered. You should check that time/date on your kernels in /boot (and that the maps etc are all there for .15) and the time/date on the grub2/grub.cfg. Oh, and your log :-)
Of course you could also re-run mkinitrd and grub2-install manually :-)
I'd probably have more detailed questions about your /etc/config/* but its been a long day and I'm tired.
Fair enough, When you get a minute tomorrow (if not solved by then), here is the time info on the files: [21:55 alchemy:/etc/grub.d] # l /boot | sed -e 's/root\ root\ //' total 83604 drwxr-xr-x 4 4096 Jul 23 21:07 . drwxr-xr-x 23 4096 Jul 23 21:08 .. drwxr-xr-x 2 4096 Jul 12 20:06 grub drwxr-xr-x 7 4096 Jul 23 20:56 grub2 -rw-r--r-- 1 512 Jul 12 20:50 backup_mbr lrwxrwxrwx 1 1 Jul 12 20:06 boot -> . -rw-r--r-- 1 1484 Oct 18 2013 boot.readme -rw-r--r-- 1 141138 Jun 17 09:22 config-3.11.10-17-desktop -rw-r--r-- 1 147549 Jul 22 01:09 config-3.15.6-2.gedc5ddf-desktop lrwxrwxrwx 1 32 Jul 23 20:56 initrd -> initrd-3.15.6-2.gedc5ddf-desktop -rw------- 1 24856875 Jul 23 20:55 initrd-3.11.10-17-desktop -rw------- 1 25264735 Jul 23 20:56 initrd-3.15.6-2.gedc5ddf-desktop -rw-r--r-- 1 620544 Jul 12 19:59 message -rw-r--r-- 1 746557 Jun 17 12:24 symtypes-3.11.10-17-default.gz -rw-r--r-- 1 747792 Jun 17 12:26 symtypes-3.11.10-17-desktop.gz -rw-r--r-- 1 723273 Jun 17 09:18 symtypes-3.11.10-17-xen.gz -rw-r--r-- 1 870251 Jul 22 02:10 symtypes-3.15.6-2.gedc5ddf-default.gz -rw-r--r-- 1 871393 Jul 22 02:41 symtypes-3.15.6-2.gedc5ddf-desktop.gz -rw-r--r-- 1 844093 Jul 22 04:15 symtypes-3.15.6-2.gedc5ddf-xen.gz -rw-r--r-- 1 262916 Jun 17 11:47 symvers-3.11.10-17-desktop.gz -rw-r--r-- 1 304913 Jul 22 02:25 symvers-3.15.6-2.gedc5ddf-desktop.gz -rw-r--r-- 1 516 Jun 17 11:46 sysctl.conf-3.11.10-17-desktop -rw-r--r-- 1 516 Jul 22 02:25 sysctl.conf-3.15.6-2.gedc5ddf-desktop -rw-r--r-- 1 2682045 Jun 17 11:21 System.map-3.11.10-17-desktop -rw-r--r-- 1 2966246 Jul 22 02:07 System.map-3.15.6-2.gedc5ddf-desktop -rw-r--r-- 1 6044693 Jun 17 11:46 vmlinux-3.11.10-17-desktop.gz -rw-r--r-- 1 6613222 Jul 22 02:25 vmlinux-3.15.6-2.gedc5ddf-desktop.gz lrwxrwxrwx 1 33 Jul 23 20:55 vmlinuz -> vmlinuz-3.15.6-2.gedc5ddf-desktop -rw-r--r-- 1 5184168 Jun 17 15:15 vmlinuz-3.11.10-17-desktop -rw-r--r-- 1 5640864 Jul 22 04:19 vmlinuz-3.15.6-2.gedc5ddf-desktop [21:55 alchemy:/etc/grub.d] # l /boot/grub2 | sed -e 's/root\ root\ //' total 60 drwxr-xr-x 7 4096 Jul 23 20:56 . drwxr-xr-x 4 4096 Jul 23 21:07 .. drwxr-xr-x 2 4096 Nov 5 2013 backgrounds drwxr-xr-x 2 4096 Jul 12 20:44 fonts drwxr-xr-x 2 12288 Jul 12 20:50 i386-pc drwxr-xr-x 2 4096 Jul 12 20:50 locale drwxr-xr-x 3 4096 Jul 12 20:45 themes -rw-r--r-- 1 65 Jul 12 19:23 device.map -rw------- 1 65 Jul 12 20:49 device.map.new -rw------- 1 8577 Jul 23 20:56 grub.cfg -rw-r--r-- 1 1024 Jul 12 20:50 grubenv The images are all there and the initrd and vmlinuz links are to the new kernel as they should be. The grub entries from /etc/default are: [21:56 alchemy:/etc/grub.d] # l /etc/default | sed -e 's/root\ root\ //' total 64 drwxr-xr-x 2 4096 Jul 23 21:51 . drwxr-xr-x 152 12288 Jul 23 21:07 .. -rw-r--r-- 1 295 Jul 21 16:43 dkms -rw------- 1 2032 Jul 12 20:49 grub -rw------- 1 86 Jul 12 20:49 grub_installdevice -rw-r--r-- 1 86 Jul 12 19:23 grub_installdevice.old -rw-r--r-- 1 1924 Jul 12 19:23 grub.old -rw-r--r-- 1 1268 Jan 7 2014 grub.rpmnew and from /etc/grub.d: l /etc/grub.d | sed -e 's/root\ root\ //' total 84 drwxr-xr-x 2 4096 Jul 23 21:53 . drwxr-xr-x 152 12288 Jul 23 21:07 .. -rwxr-xr-x 1 7889 Jan 7 2014 00_header -rwxr-xr-x 1 10530 Jan 7 2014 10_linux -rwxr-xr-x 1 11229 Jan 7 2014 20_linux_xen -rwxr-xr-x 1 1802 Jan 7 2014 20_memtest86+ -rwxr-xr-x 1 2596 Jan 7 2014 20_ppc_terminfo -rwxr-xr-x 1 10467 Jan 7 2014 30_os-prober -rwxr-xr-x 1 214 Jan 7 2014 40_custom -rwxr-xr-x 1 216 Jan 7 2014 41_custom -rwxr-xr-x 1 1259 Jan 7 2014 90_persistent -rw-r--r-- 1 483 Jan 7 2014 README I have found a couple of tutorials I'm reading, but if you have a favorite, let me know. Thanks. -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
В Wed, 23 Jul 2014 21:30:28 -0500
"David C. Rankin"
All,
As part of troublshooting the acpi backlight bug in 13.1, https://bugzilla.novell.com/show_bug.cgi?id=887629 there was a request I install and test the 3.15 kernel from kernel:/stable/standard. The install went fine after adding the repository and was done via 'zypper up -t package'. The zypp.conf multiverison preserved the 3.11 kernel:
kernel-default-devel-3.11.10-17.2.x86_64 kernel-default-devel-3.15.6-2.1.gedc5ddf.x86_64 kernel-desktop-3.11.10-17.2.x86_64 kernel-desktop-3.15.6-2.1.gedc5ddf.x86_64 kernel-desktop-devel-3.11.10-17.2.x86_64 kernel-desktop-devel-3.15.6-2.1.gedc5ddf.x86_64 kernel-devel-3.11.10-17.2.noarch kernel-devel-3.15.6-2.1.gedc5ddf.noarch kernel-firmware-20140624git-35.1.noarch kernel-source-3.11.10-17.2.noarch kernel-source-3.15.6-2.1.gedc5ddf.noarch kernel-syms-3.11.10-17.1.x86_64 kernel-syms-3.15.6-2.1.gedc5ddf.x86_64 kernel-xen-devel-3.11.10-17.2.x86_64 kernel-xen-devel-3.15.6-2.1.gedc5ddf.x86_64
The problem is that grub2 only reflects a single menu entry for 'openSuSE 13.1' and no second entry to boot the 3.11 kernel.
And no submenu "Advanced options"? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 07/23/2014 09:50 PM, Andrey Borzenkov wrote:
And no submenu "Advanced options"?
The advanced options is there, but I didn't see that as a kernel entry. I'll keep reading. As in response to Anton's post, if you have a favorite grub2 link, I'd appreciate it. I'll keep reading. Thanks. -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 07/23/2014 11:03 PM, David C. Rankin wrote:
On 07/23/2014 09:50 PM, Andrey Borzenkov wrote:
And no submenu "Advanced options"?
The advanced options is there, but I didn't see that as a kernel entry. I'll keep reading. As in response to Anton's post, if you have a favorite grub2 link, I'd appreciate it. I'll keep reading. Thanks.
I'm not sure what the algorithm by which grub-install determines which kernel is the one at the first selection and not in the 'Advanced options'. I could probably drill down into the code but not right now. David, why you don't you read /boot/grub2.grub.cfg Scroll down to the "Advanced options" and read on from there to see if there is a ".15". Or use vi and search. Or grep. Whatever. -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 07/23/2014 11:24 PM, Anton Aylward wrote:
I'm not sure what the algorithm by which grub-install determines which kernel is the one at the first selection and not in the 'Advanced options'. I could probably drill down into the code but not right now.
David, why you don't you read /boot/grub2.grub.cfg Scroll down to the "Advanced options" and read on from there to see if there is a ".15". Or use vi and search. Or grep. Whatever.
Anton, Thanks, that's what I did. I guess the issue I'm trying to get at is "I want to see the kernels as menu entries instead of 'submenus'". That was what was confusing as heck to begin with. Being used to grub and being used to grub2 on Archlinux, the kernels are always presented at menu entries themselves instead of submenus of 'Advanced Options'. I have no complaint about the workings of grub2, boots fine, but I am not nearly as familiar with the menu setup as I was with grub. At first blush, the grub.cfg file is quite a bit more involved that grub itself. It's easy to see how it sources /etc/grub.d/##_entries, but it is not at all apparent what the requirements are for all the "module soup" entries. E.g.: function load_video { blah... } if loadfont $font ; then set gfxmode=auto load_video insmod gfxterm set locale_dir=$prefix/locale set lang=en_US insmod gettext fi terminal_output gfxterm insmod part_msdos insmod ext2 blah... insmod gfxmenu loadfont ($root)/boot/grub2/themes/openSUSE/DejaVuSans-Bold14.pf2 loadfont ($root)/boot/grub2/themes/openSUSE/DejaVuSans10.pf2 loadfont ($root)/boot/grub2/themes/openSUSE/DejaVuSans12.pf2 loadfont ($root)/boot/grub2/themes/openSUSE/ascii.pf2 insmod png blah... The menu entries: menuentry 'openSUSE 13.1' --class 'opensuse-13-1' blah... then submenu 'Advanced options for openSUSE 13.1' $menuentry_id_option blah... menuentry 'openSUSE 13.1, with Linux 3.15.6-2.gedc5ddf-desktop' ... menuentry 'openSUSE 13.1, with " (recovery mode)' ... menuentry 'openSUSE 13.1, with Linux 3.11.10-17-desktop' Where in the config can I tell it to pull the menu entries out of the "submenu 'Advanced options...'" and make them top-level menu entries itself? -- David C. Rankin, J.D.,P.E. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 07/24/2014 12:52 AM, David C. Rankin wrote:
Where in the config can I tell it to pull the menu entries out of the "submenu 'Advanced options...'" and make them top-level menu entries itself?
The man pages eventually lead to the fact that the generation of the grub2 config file is entirely programmatic and the code is in /etc/grub.d There is also a graphical tool for customising. grub-customizer (1) - a graphical grub2/burg editor With that, you can 'edit' the entries out of the sub menu to the top level, as well as alter colour, theme, screen size and more. -- Objects in calendar are closer than they appear. -- Jim Duncan -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 07/24/2014 07:36 AM, Anton Aylward wrote:
There is also a graphical tool for customising. grub-customizer (1) - a graphical grub2/burg editor
With that, you can 'edit' the entries out of the sub menu to the top level, as well as alter colour, theme, screen size and more.
Just used that to make the grub2 menu appear as * all desktop entries are at top level * all 'recovery' entries are in the second level menu under 'Advanced settings". See! -- Any sufficiently advanced technology is undistinguishable from magic. - Arthur Clarke -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 2014-07-24 00:24 (GMT-0400) Anton Aylward composed:
I'm not sure what the algorithm by which grub-install determines which kernel is the one at the first selection and not in the 'Advanced options'.
I don't know about the algorithm either, but I have to think the root cause of any menu.cfg that doesn't show the latest installed kernel as the default kernel is the same as with Grub Legacy. Unless I miss my guess, it's perl-Bootloader that makes the determination, one in which I think a kernel installed from an optional repo for a release version of openSUSE might never be considered top priority/first choice. The other possibility is it's not about the repo version, but about the new kernel being a different flavor than that originally (or possibly last) installed (e.g. kernel-desktop originally, kernel-default most recent). If so, or if I'm close to right that either is the way it is, it's IMO a good reason for not having Grub2's initial screen offer only a choice between the default kernel and opening a submenu. I very much prefer a boot menu that may offer a need to scroll over one containing any submenu. If Grub2 offers a configuration option to not have any submenu, and if I was actually using Grub2, I'd be using that option. ;-) -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/ -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Thu, Jul 24, 2014 at 8:24 AM, Anton Aylward
On 07/23/2014 11:03 PM, David C. Rankin wrote:
On 07/23/2014 09:50 PM, Andrey Borzenkov wrote:
And no submenu "Advanced options"?
The advanced options is there, but I didn't see that as a kernel entry. I'll keep reading. As in response to Anton's post, if you have a favorite grub2 link, I'd appreciate it. I'll keep reading. Thanks.
I'm not sure what the algorithm by which grub-install determines which kernel is the one at the first selection
grub-install does not create grub.cfg, it is done by grub-mkconfig. It sorts all found kernel names in descendant order and takes the first. All others are put in Advanced menu. Now algorithm used to sort may not be optimal, 13.2 has patch that changes sort to be more in line with RPM version sort. grub in 13.2 also supports disabling submenus so all entries a put in flat list. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (4)
-
Andrey Borzenkov
-
Anton Aylward
-
David C. Rankin
-
Felix Miata