Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 409341 - sys-boot/grub-2.00_beta2-r1 - malfunctioning editor and kernel misdetected
Summary: sys-boot/grub-2.00_beta2-r1 - malfunctioning editor and kernel misdetected
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Mike Gilbert
URL: https://savannah.gnu.org/bugs/index.p...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-22 16:32 UTC by Paweł Rumian
Modified: 2012-03-26 05:51 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paweł Rumian 2012-03-22 16:32:30 UTC
I always have two kernel files on the /boot partition: vmlinuz and vmlinuz-old

grub2-mkconfig have not detected the first one at all, and instead set vmlinuz-old as default. I was also unable to edit the 'linux' argument directly in grub - I had to boot using vmlinuz-old and change it by hand in config file.

While not critical, it may be annoying for less experienced users coming from grub-legacy.
Comment 1 Richard Grenville 2012-03-23 03:07:55 UTC
The version comparison function in GRUB2, version_test_gt() (in /usr/share/grub/grub-mkconfig_lib) don't recognize your vmlinux-old-* format for representing old kernels, so GRUB2 incorrectly determined that your vmlinux-old-* images has the latest kernel version, thus making it default. When 'make install' in a kernel source tree discovers you already have a kernel image with the same name, the older kernel image will be renamed to 'vmlinux-X.X.X.old', instead of 'vmlinux-old-X.X.X', and it's the only way to represent "this is an old kernel" that GRUB2 recognizes. Please name your old kernels as 'vmlinux-X.X.X.old', and GRUB2 will handle it correctly.

"Unable to edit the 'linux' argument directly in grub"? Please describe what exactly happened. Seems there's indeed something with the line editing in grub-2.0_beta2.

Also, I guess the question should be asked on the forum, not Bugzilla. There are so many "INVALID" bugs popping all around...
Comment 2 Paweł Rumian 2012-03-23 10:17:27 UTC
Yes, I know the general naming scheme, but thought that the vmlinuz and vmlinuz-old scheme is a bit popular and worth attention. 
I think I can add this information to the wiki - seems fair enough?

As for editing the 'linux' argument directly in grub:
- I set the cursor on the desired line
- I press 'e' to enter edit mode
- I move down to the relevant line - in my case it is 'linux vmlinuz-old root=/dev/sda5 ro'
- I set the cursor on the '-' between 'vmlinuz' and 'old'
- I press DEL
- 7 (!) chars are deleted
- I recreate the missing part of the line, which now looks like: 'linux vmlinuz root=/dev/sda5 ro'
- I press F10 (or Ctrl-X, result is the same) to boot
- booted kernel is still vmlinuz-old (!)

As to reporting bug - I would normally tried searching for help on IRC, but I noticed this post which encourages users to put every noticed GRUB2 bug on bugzilla:
http://floppym.blogspot.com/2012/03/call-out-for-grub2-testing.html
Probably I would not even install GRUB2 without this, because grub-legacy works fine for me ;)
Comment 3 Richard Grenville 2012-03-23 13:13:58 UTC
(In reply to comment #2)
> Yes, I know the general naming scheme, but thought that the vmlinuz and
> vmlinuz-old scheme is a bit popular and worth attention. 
> I think I can add this information to the wiki - seems fair enough?

You may add it to the wiki. Unfortunately I don't know anybody using the vmlinux-old naming scheme, though.

> As for editing the 'linux' argument directly in grub:
> - I set the cursor on the desired line
> - I press 'e' to enter edit mode
> - I move down to the relevant line - in my case it is 'linux vmlinuz-old
> root=/dev/sda5 ro'
> - I set the cursor on the '-' between 'vmlinuz' and 'old'
> - I press DEL
> - 7 (!) chars are deleted
> - I recreate the missing part of the line, which now looks like: 'linux
> vmlinuz root=/dev/sda5 ro'
> - I press F10 (or Ctrl-X, result is the same) to boot
> - booted kernel is still vmlinuz-old (!)

Exactly what I met. Additionally the border of the edit menu screen on the right side looks broken for me. I did not notice any similar bug reports upstream, and I chose to bear it because I thought the developers would notice it before me... Well, anyway, I will test grub-9999 now, if it fails there I may try reporting upstream.

> As to reporting bug - I would normally tried searching for help on IRC, but
> I noticed this post which encourages users to put every noticed GRUB2 bug on
> bugzilla:
> http://floppym.blogspot.com/2012/03/call-out-for-grub2-testing.html
> Probably I would not even install GRUB2 without this, because grub-legacy
> works fine for me ;)

I suppose the first problem related to the naming scheme should go either on the forums or upstream. Would Gentoo add a patch to add such a minor feature before upstream accept the patch? Quite unlikely.

The second line editing issue, I guess it for upstream, too... I don't see grub-2.00_beta2-r1.ebuild applying any distro-specific patches.
Comment 4 Richard Grenville 2012-03-24 00:01:30 UTC
The line editing issue exists on grub-9999, too, on my system. GRUB_PLATFORMS='pc', ~amd64, gcc-4.6.2, CFLAGS="-march=native -O2 -fomit-frame-pointer -pipe -floop-interchange -floop-strip-mine -floop-block".
Comment 5 Mike Gilbert gentoo-dev 2012-03-24 04:07:41 UTC
The kernel naming requirements could be documented; the wiki is a good place for that.

Please report the line editing problem upstream.

http://www.gnu.org/software/grub/grub-bugs.html

Thank you for testing!
Comment 6 Mike Gilbert gentoo-dev 2012-03-24 04:08:28 UTC
Probably better to leave this open until upstream acknowledges it.
Comment 7 Paweł Rumian 2012-03-24 13:43:18 UTC
Reported upstream:
https://savannah.gnu.org/bugs/index.php?35986