(Fwd) Re: grub2-mkconfig with 3.2.10 kernels?
This an addition to the earlier solution that I had mentioned about the grub-mkconfig issue with sorting issue, but here seems to be the solution in the process. Did remove a lot of the header lines from the list. --- Forwarded message follows --- From: Jordan Uggla Date: Mon, 19 Mar 2012 13:30:10 -0700 Subject: Re: grub2-mkconfig with 3.2.10 kernels? On Sun, Mar 18, 2012 at 2:50 PM, Michael D. Setzer II wrote: > Just did an update and it included a new kernel, but then on > reboot after running grub2-mkconfig noticed that the newest one was > not first. Seems to be sorting the 9 before the 10? > > Is this a bug? It was a bug (a simple typo), and has been fixed in bzr trunk. The patch which fixes it is below. -- Jordan Uggla (Jordan_U on irc.freenode.net) === modified file 'util/grub-mkconfig_lib.in' --- util/grub-mkconfig_lib.in 2012-03-04 22:13:16 + +++ util/grub-mkconfig_lib.in 2012-03-19 15:27:59 + @@ -193,7 +193,7 @@ no) LC_ALL=C sort -n;; *) - if sort -v /dev/null 2>&1; then + if sort -V /dev/null 2>&1; then version_sort_sort_has_v=yes LC_ALL=C sort -V else ___ Help-grub mailing list help-g...@gnu.org https://lists.gnu.org/mailman/listinfo/help-grub --- End of forwarded message --- +--+ Michael D. Setzer II - Computer Science Instructor Guam Community College Computer Center mailto:mi...@kuentos.guam.net mailto:msetze...@gmail.com http://www.guam.net/home/mikes Guam - Where America's Day Begins G4L Disk Imaging Project maintainer http://sourceforge.net/projects/g4l/ +--+ http://setiathome.berkeley.edu (Original) Number of Seti Units Returned: 19,471 Processing time: 32 years, 290 days, 12 hours, 58 minutes (Total Hours: 287,489) BOINC@HOME CREDITS SETI11952853.535440 | EINSTEIN 7526408.719852 ROSETTA 4328655.752081 | ABC 11789983.901504 WPM$9GJ4.PM$ Description: Mail message body -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: grub2-mkconfig with 3.2.10 kernels?
On 19 March 2012 19:53, Michael D. Setzer II wrote: > I have had some messages on the grub list, and they confirmed > the bug, and a fix seems to be to modify the > /usr/lib/grub/grub_mkconfig_lib by changing one line from sort -n > to sort -V. Note: That is an unofficial patch in this case does seem > to fix the problem. Right, I am running grub2 version 1.99 (built from upstream sources), just tried the fix you mentioned and it fixed the issue. Thanks. -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: grub2-mkconfig with 3.2.10 kernels?
On 19 Mar 2012 at 17:39, Piscium wrote: Date sent: Mon, 19 Mar 2012 17:39:43 + Subject:Re: grub2-mkconfig with 3.2.10 kernels? From: Piscium To: Community support for Fedora users Send reply to: Community support for Fedora users <mailto:users-requ...@lists.fedoraproject.org?subject=unsubscrib e> <mailto:users-requ...@lists.fedoraproject.org?subject=subscribe > > On 18 March 2012 15:00, Michael D. Setzer II > wrote: > Just did an update and it included a new kernel, but then on > > reboot after running grub2-mkconfig noticed that the newest one > > was not first. Seems to be sorting the 9 before the 10? > > Is this a > bug? > > I have been using Grub2 built from upstream sources since before I > started using Fedora (F12). This is an issue I am very familiar with, > and the way I address it is by setting GRUB_DEFAULT when needed. > > This issue is with respect to the way the Fedora kernel versions are > sorted (but it works well with Ubuntu and Debian versioning). The bug > might be in os-prober (rather than grub2). -- users mailing list > users@lists.fedoraproject.org To unsubscribe or change subscription > options: https://admin.fedoraproject.org/mailman/listinfo/users > Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have > a question? Ask away: http://ask.fedoraproject.org I have had some messages on the grub list, and they confirmed the bug, and a fix seems to be to modify the /usr/lib/grub/grub_mkconfig_lib by changing one line from sort -n to sort -V. Note: That is an unofficial patch in this case does seem to fix the problem. +--+ Michael D. Setzer II - Computer Science Instructor Guam Community College Computer Center mailto:mi...@kuentos.guam.net mailto:msetze...@gmail.com http://www.guam.net/home/mikes Guam - Where America's Day Begins G4L Disk Imaging Project maintainer http://sourceforge.net/projects/g4l/ +--+ http://setiathome.berkeley.edu (Original) Number of Seti Units Returned: 19,471 Processing time: 32 years, 290 days, 12 hours, 58 minutes (Total Hours: 287,489) BOINC@HOME CREDITS SETI11952853.535440 | EINSTEIN 7526408.719852 ROSETTA 4328655.752081 | ABC 11789983.901504 -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: grub2-mkconfig with 3.2.10 kernels?
On 18 March 2012 15:00, Michael D. Setzer II wrote: > Just did an update and it included a new kernel, but then on > reboot after running grub2-mkconfig noticed that the newest one > was not first. Seems to be sorting the 9 before the 10? > > Is this a bug? I have been using Grub2 built from upstream sources since before I started using Fedora (F12). This is an issue I am very familiar with, and the way I address it is by setting GRUB_DEFAULT when needed. This issue is with respect to the way the Fedora kernel versions are sorted (but it works well with Ubuntu and Debian versioning). The bug might be in os-prober (rather than grub2). -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: grub2-mkconfig with 3.2.10 kernels?
On Sun, Mar 18, 2012 at 5:00 PM, Michael D. Setzer II wrote: > Just did an update and it included a new kernel, but then on > reboot after running grub2-mkconfig noticed that the newest one > was not first. Seems to be sorting the 9 before the 10? > > Is this a bug? > I use the default="0", so this makes it not use the latest? Looks like a bug in mkconfig's sorting code. [1] Simply replace sort -n (numerical) with sort -V (version) in grub-mkconfig_lib (patch attach, run from "/", use at your own risk, may eat your children, etc) I've reported it in bugzilla [2]. - Gilboa [1] http://lists.gnu.org/archive/html/grub-devel/2012-03/msg00159.html [2] https://bugzilla.redhat.com/show_bug.cgi?id=804558 --- usr/lib/grub/grub-mkconfig_lib.old 2012-03-19 10:57:20.568836288 +0200 +++ usr/lib/grub/grub-mkconfig_lib 2012-03-19 10:57:25.951592474 +0200 @@ -163,7 +163,7 @@ a="$b" b="$c" fi - if (echo "$a" ; echo "$b") | sort -n | head -n 1 | grep -qx "$b" ; then + if (echo "$a" ; echo "$b") | sort -V | head -n 1 | grep -qx "$b" ; then return 0 else return 1 -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: grub2-mkconfig with 3.2.10 kernels?
On 03/19/2012 09:22 AM, Michael D. Setzer II wrote: > > Did you run grub2-mkconfig -o /boot/grub2/grub.cfg? > > From what I have seen, when a new kernel is installed, it runs > grubby, which doesn't make the recover option, so I generally run > the grub2-mkconfig to get it have the listing, but it may be that it > has the sort option. > > I actually did an strace with the -f option to try and see what it is > doing, but in some places it is reading the order by name, but then > later reverses it, but it is sorting by just the first digit. > > Did find one message that talked about the sort not working with > the german language, but tried the solution of putting a LANG=C > in front of the grub2-mkconfig and it made no difference? > > > Ahhh ooop... When testing on virtual machines it is important that one checks the system on which they've run the command. :-( I blame it on Monday and not enough coffee. Yes, I'm seeing what you are seeing. Sounds like a trip to bugzilla is in your future. :-) Sorry about the confusion. -- Do not condemn the judgment of another because it differs from your own. You may both be wrong. -- Dandemis -- Do not condemn the judgment of another because it differs from your own. You may both be wrong. -- Dandemis -- Do not condemn the judgment of another because it differs from your own. You may both be wrong. -- Dandemis -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: grub2-mkconfig with 3.2.10 kernels?
On 19 Mar 2012 at 8:39, Ed Greshko wrote: Date sent: Mon, 19 Mar 2012 08:39:00 +0800 From: Ed Greshko To: Community support for Fedora users Subject:Re: grub2-mkconfig with 3.2.10 kernels? > > On 03/19/2012 08:09 AM, Michael D. Setzer II wrote: > > The issue is that the order is coming up wrong. > > On my sytem, it adds the new kernel, but it is the in this order > > from the grub.cfg file. > > > > menuentry 'Fedora Linux, with Linux 3.2.9-2.fc16.x86_64' > > menuentry 'Fedora Linux, with Linux 3.2.9-2.fc16.x86_64 > > (recovery mode)' > > menuentry 'Fedora Linux, with Linux 3.2.9-1.fc16.x86_64' > > menuentry 'Fedora Linux, with Linux 3.2.9-1.fc16.x86_64 > > (recovery mode)' > > menuentry 'Fedora Linux, with Linux 3.2.10-3.fc16.x86_64' > > menuentry 'Fedora Linux, with Linux 3.2.10-3.fc16.x86_64 > > (recovery mode)' > > > > Thus 0 is the 3.2.9-2 kernel, and the new 3.2.10-3 would be > > number 4? > > > > Is yours listing 3.2.10-3 as being 0? > > [root@meimei grub2]# grep menuen grub.cfg > menuentry 'Fedora (3.2.10-3.fc16.i686.PAE)' --class fedora --class > gnu-linux --class gnu --class os { menuentry 'Fedora > (3.2.9-2.fc16.i686.PAE)' --class fedora --class gnu-linux --class gnu > --class os { menuentry 'Fedora (3.2.9-1.fc16.i686.PAE)' --class fedora > --class gnu-linux --class gnu --class os { > > > But, now I am asking myself: "Why don't I have recovery mode > entries?". :-( Did you run grub2-mkconfig -o /boot/grub2/grub.cfg? From what I have seen, when a new kernel is installed, it runs grubby, which doesn't make the recover option, so I generally run the grub2-mkconfig to get it have the listing, but it may be that it has the sort option. I actually did an strace with the -f option to try and see what it is doing, but in some places it is reading the order by name, but then later reverses it, but it is sorting by just the first digit. Did find one message that talked about the sort not working with the german language, but tried the solution of putting a LANG=C in front of the grub2-mkconfig and it made no difference? > > -- > Do not condemn the judgment of another because it differs from your > own. You may both be wrong. -- Dandemis -- users mailing list > users@lists.fedoraproject.org To unsubscribe or change subscription > options: https://admin.fedoraproject.org/mailman/listinfo/users > Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have > a question? Ask away: http://ask.fedoraproject.org +--+ Michael D. Setzer II - Computer Science Instructor Guam Community College Computer Center mailto:mi...@kuentos.guam.net mailto:msetze...@gmail.com http://www.guam.net/home/mikes Guam - Where America's Day Begins G4L Disk Imaging Project maintainer http://sourceforge.net/projects/g4l/ +--+ http://setiathome.berkeley.edu (Original) Number of Seti Units Returned: 19,471 Processing time: 32 years, 290 days, 12 hours, 58 minutes (Total Hours: 287,489) BOINC@HOME CREDITS SETI11947905.992357 | EINSTEIN 7521162.269852 ROSETTA 4324455.907112 | ABC 11767855.622584 -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: grub2-mkconfig with 3.2.10 kernels?
On 03/19/2012 08:49 AM, Reindl Harald wrote: > because "/etc/default/grub" in Fedora contains GRUB_DISABLE_RECOVERY="true"? No, it isn't even listed there But it is listed in grub.rpmnew. Learning about grub2 is on my list of things to learn more about. May have to bump the priority a bit. -- Do not condemn the judgment of another because it differs from your own. You may both be wrong. -- Dandemis -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: grub2-mkconfig with 3.2.10 kernels?
Am 19.03.2012 01:39, schrieb Ed Greshko: > On 03/19/2012 08:09 AM, Michael D. Setzer II wrote: >> The issue is that the order is coming up wrong. >> On my sytem, it adds the new kernel, but it is the in this order >> from the grub.cfg file. >> >> menuentry 'Fedora Linux, with Linux 3.2.9-2.fc16.x86_64' >> menuentry 'Fedora Linux, with Linux 3.2.9-2.fc16.x86_64 >> (recovery mode)' >> menuentry 'Fedora Linux, with Linux 3.2.9-1.fc16.x86_64' >> menuentry 'Fedora Linux, with Linux 3.2.9-1.fc16.x86_64 >> (recovery mode)' >> menuentry 'Fedora Linux, with Linux 3.2.10-3.fc16.x86_64' >> menuentry 'Fedora Linux, with Linux 3.2.10-3.fc16.x86_64 >> (recovery mode)' >> >> Thus 0 is the 3.2.9-2 kernel, and the new 3.2.10-3 would be >> number 4? >> >> Is yours listing 3.2.10-3 as being 0? > > [root@meimei grub2]# grep menuen grub.cfg > menuentry 'Fedora (3.2.10-3.fc16.i686.PAE)' --class fedora --class gnu-linux > --class > gnu --class os { > menuentry 'Fedora (3.2.9-2.fc16.i686.PAE)' --class fedora --class gnu-linux > --class > gnu --class os { > menuentry 'Fedora (3.2.9-1.fc16.i686.PAE)' --class fedora --class gnu-linux > --class > gnu --class os { > > > But, now I am asking myself: "Why don't I have recovery mode entries?". :-( because "/etc/default/grub" in Fedora contains GRUB_DISABLE_RECOVERY="true"? signature.asc Description: OpenPGP digital signature -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: grub2-mkconfig with 3.2.10 kernels?
On 03/19/2012 08:09 AM, Michael D. Setzer II wrote: > The issue is that the order is coming up wrong. > On my sytem, it adds the new kernel, but it is the in this order > from the grub.cfg file. > > menuentry 'Fedora Linux, with Linux 3.2.9-2.fc16.x86_64' > menuentry 'Fedora Linux, with Linux 3.2.9-2.fc16.x86_64 > (recovery mode)' > menuentry 'Fedora Linux, with Linux 3.2.9-1.fc16.x86_64' > menuentry 'Fedora Linux, with Linux 3.2.9-1.fc16.x86_64 > (recovery mode)' > menuentry 'Fedora Linux, with Linux 3.2.10-3.fc16.x86_64' > menuentry 'Fedora Linux, with Linux 3.2.10-3.fc16.x86_64 > (recovery mode)' > > Thus 0 is the 3.2.9-2 kernel, and the new 3.2.10-3 would be > number 4? > > Is yours listing 3.2.10-3 as being 0? [root@meimei grub2]# grep menuen grub.cfg menuentry 'Fedora (3.2.10-3.fc16.i686.PAE)' --class fedora --class gnu-linux --class gnu --class os { menuentry 'Fedora (3.2.9-2.fc16.i686.PAE)' --class fedora --class gnu-linux --class gnu --class os { menuentry 'Fedora (3.2.9-1.fc16.i686.PAE)' --class fedora --class gnu-linux --class gnu --class os { But, now I am asking myself: "Why don't I have recovery mode entries?". :-( -- Do not condemn the judgment of another because it differs from your own. You may both be wrong. -- Dandemis -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: Re: grub2-mkconfig with 3.2.10 kernels?
On Monday 19 Mar 2012 10:09:50 Michael D. Setzer II wrote: > On 19 Mar 2012 at 7:47, Ed Greshko wrote: > > > On 03/18/2012 11:00 PM, Michael D. Setzer II wrote: > > > Just did an update and it included a new kernel, but then on > > > reboot after running grub2-mkconfig noticed that the newest one was > > > not first. Seems to be sorting the 9 before the 10? > > > > > > Is this a bug? > > > I use the default="0", so this makes it not use the latest? > > > > FWIW, yesterday came a kernel update to 3.2.10-3 and everything seems > > fine here. I've not modified anything and my grub.conf contains set > > default="0". > > The issue is that the order is coming up wrong. > On my sytem, it adds the new kernel, but it is the in this order > from the grub.cfg file. > > menuentry 'Fedora Linux, with Linux 3.2.9-2.fc16.x86_64' > menuentry 'Fedora Linux, with Linux 3.2.9-2.fc16.x86_64 > (recovery mode)' > menuentry 'Fedora Linux, with Linux 3.2.9-1.fc16.x86_64' > menuentry 'Fedora Linux, with Linux 3.2.9-1.fc16.x86_64 > (recovery mode)' > menuentry 'Fedora Linux, with Linux 3.2.10-3.fc16.x86_64' > menuentry 'Fedora Linux, with Linux 3.2.10-3.fc16.x86_64 > (recovery mode)' > > Thus 0 is the 3.2.9-2 kernel, and the new 3.2.10-3 would be > number 4? > > Is yours listing 3.2.10-3 as being 0? Michael, I am seeing the same as you after the kernel update with 3.2.10 being at the bottom of the list so not the default of 0. I keep only two kernels so have temporarily changed the default to 2 so 3.2.10 will be the kernel that is booted. Colin -- Fedora release 16 (Verne) Registered Linux user number #342953 -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: grub2-mkconfig with 3.2.10 kernels?
On 19 Mar 2012 at 7:47, Ed Greshko wrote: Date sent: Mon, 19 Mar 2012 07:47:47 +0800 From: Ed Greshko To: Community support for Fedora users Subject:Re: grub2-mkconfig with 3.2.10 kernels? Send reply to: Community support for Fedora users > On 03/18/2012 11:00 PM, Michael D. Setzer II wrote: > > Just did an update and it included a new kernel, but then on > > reboot after running grub2-mkconfig noticed that the newest one was > > not first. Seems to be sorting the 9 before the 10? > > > > Is this a bug? > > I use the default="0", so this makes it not use the latest? > > FWIW, yesterday came a kernel update to 3.2.10-3 and everything seems > fine here. I've not modified anything and my grub.conf contains set > default="0". > The issue is that the order is coming up wrong. On my sytem, it adds the new kernel, but it is the in this order from the grub.cfg file. menuentry 'Fedora Linux, with Linux 3.2.9-2.fc16.x86_64' menuentry 'Fedora Linux, with Linux 3.2.9-2.fc16.x86_64 (recovery mode)' menuentry 'Fedora Linux, with Linux 3.2.9-1.fc16.x86_64' menuentry 'Fedora Linux, with Linux 3.2.9-1.fc16.x86_64 (recovery mode)' menuentry 'Fedora Linux, with Linux 3.2.10-3.fc16.x86_64' menuentry 'Fedora Linux, with Linux 3.2.10-3.fc16.x86_64 (recovery mode)' Thus 0 is the 3.2.9-2 kernel, and the new 3.2.10-3 would be number 4? Is yours listing 3.2.10-3 as being 0? > -- > Do not condemn the judgment of another because it differs from your > own. You may both be wrong. -- Dandemis -- users mailing list > users@lists.fedoraproject.org To unsubscribe or change subscription > options: https://admin.fedoraproject.org/mailman/listinfo/users > Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have > a question? Ask away: http://ask.fedoraproject.org +--+ Michael D. Setzer II - Computer Science Instructor Guam Community College Computer Center mailto:mi...@kuentos.guam.net mailto:msetze...@gmail.com http://www.guam.net/home/mikes Guam - Where America's Day Begins G4L Disk Imaging Project maintainer http://sourceforge.net/projects/g4l/ +--+ http://setiathome.berkeley.edu (Original) Number of Seti Units Returned: 19,471 Processing time: 32 years, 290 days, 12 hours, 58 minutes (Total Hours: 287,489) BOINC@HOME CREDITS SETI11947905.992357 | EINSTEIN 7521162.269852 ROSETTA 4324455.907112 | ABC 11767855.622584 -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
Re: grub2-mkconfig with 3.2.10 kernels?
On 03/18/2012 11:00 PM, Michael D. Setzer II wrote: > Just did an update and it included a new kernel, but then on > reboot after running grub2-mkconfig noticed that the newest one > was not first. Seems to be sorting the 9 before the 10? > > Is this a bug? > I use the default="0", so this makes it not use the latest? FWIW, yesterday came a kernel update to 3.2.10-3 and everything seems fine here. I've not modified anything and my grub.conf contains set default="0". -- Do not condemn the judgment of another because it differs from your own. You may both be wrong. -- Dandemis -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org