[Bug 857464] New: grub2 and memmap cause kernel hang
https://bugzilla.novell.com/show_bug.cgi?id=857464 https://bugzilla.novell.com/show_bug.cgi?id=857464#c0 Summary: grub2 and memmap cause kernel hang Classification: openSUSE Product: openSUSE 13.1 Version: Final Platform: x86-64 OS/Version: openSUSE 13.1 Status: NEW Severity: Critical Priority: P5 - None Component: Bootloader AssignedTo: jsrain@suse.com ReportedBy: piny@gmx.com QAContact: jsrain@suse.com Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:26.0) Gecko/20100101 Firefox/26.0 Issue: Using the kernel parameter memmap with grub2 boot loader causes kernel hang during boot. The systems freezes directly after issuing [CODE] Loading initial ramdisk ... [/CODE] Cause: The root cause is that the "$" character needs to be escaped even in /boot/grub2/grub.cfg. Multiple escaping is necessary when using the "official" configuration files due to several bash sourcing and $-sign "interpretations". This is documented e.g. in * http://forums.fedoraforum.org/showthread.php?t=285588 * https://groups.google.com/forum/#!msg/jailhouse-dev/sttVUtTYLlk/ax2CrrAUMtwJ Note: This error is very hard to detect and I spend "a lot of time" chasing a non existent graphics issue (KVM, nomodeset, etc). Eventually, trying to install a fresh OS12.3 (this bug applies here too!) and fiddling with a very specific "vga=0x0361" setting, the screen switched mode and displayed [CODE] PANIC: early exception 08 rip 246:10 error 8158c98c cr2 0 [/CODE] This error message does not appear "usually"! Chasing this error message (e.g. [SOLVED] PANIC: early exception 08 rip 246:10 after upgrading from 2 to 4GB RAM) I finally tracked it down to the "$-escaping" issue. To do: Escape the $-sign in all grub2 configurati files acc. * http://forums.fedoraforum.org/showthread.php?t=285588 * https://groups.google.com/forum/#!msg/jailhouse-dev/sttVUtTYLlk/ax2CrrAUMtwJ Reproducible: Always Steps to Reproduce: 1. Insert kernel boot parameter memmap=64K$0K into /boot/grub2/grub.cfg 2. Boot Actual Results: Boot process hangs with last message "Loading initial ramdisk ..." Expected Results: System booting successfully This error is hard to detect! All info available directs towards graphics issues! This is reproduced with a fresh, minimum install (text mode) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=857464 https://bugzilla.novell.com/show_bug.cgi?id=857464#c1 --- Comment #1 from Pi Ny <piny@gmx.com> 2014-01-06 01:54:17 UTC --- I know this is an grub2 issue - but seems to be a feature! So ALL openSUSE docu is affected! -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=857464 https://bugzilla.novell.com/show_bug.cgi?id=857464#c2 --- Comment #2 from Pi Ny <piny@gmx.com> 2014-01-06 02:13:21 UTC --- This issue also affects the installation of openSUSE with YAST! Entering the additional boot option "memmap=64K$0K" leads to an "$0"-expansion resulting in an entry (reproduced from my mind) like "memmap=64K/usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg" This probably should be a separate bug concerning the YAST installer! -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=857464 https://bugzilla.novell.com/show_bug.cgi?id=857464#c3 Andrey Borzenkov <arvidjaar@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |arvidjaar@gmail.com --- Comment #3 from Andrey Borzenkov <arvidjaar@gmail.com> 2014-01-06 06:08:17 UTC --- (In reply to comment #1)
I know this is an grub2 issue - but seems to be a feature!
I do not see where it is grub2 problem. It is perfectly legal to add parameters that would be expanded at boot time to kernel command line in grub.cfg. This feature is very useful. I agree that it is worth to mention it in documentation. Care to provide a patch? May be YaST could special case memmap and additionally escape it. Do you have list of other kernel parameters that are using $ as part of value? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=857464 https://bugzilla.novell.com/show_bug.cgi?id=857464#c Jiri Srain <jsrain@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|jsrain@suse.com |mchang@suse.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=857464 https://bugzilla.novell.com/show_bug.cgi?id=857464#c4 --- Comment #4 from Pi Ny <piny@gmx.com> 2014-01-06 14:31:55 UTC --- (In reply to comment #3)
I do not see where it is grub2 problem. It is perfectly legal to add parameters that would be expanded at boot time to kernel command line in grub.cfg. This feature is very useful.
I agree that it is worth to mention it in documentation. Care to provide a patch?
May be YaST could special case memmap and additionally escape it. Do you have list of other kernel parameters that are using $ as part of value?
I checked https://www.kernel.org/doc/Documentation/kernel-parameters.txt There is seems that memmap is the only "true" kernel parameter using the "$"-character. I propose at least 3 documents that should be updated: 1) In https://www.kernel.org/doc/Documentation/kernel-parameters.txt: A note should be added to the memmap entry. -> see attached kernel-parameters.txt.2014-01-08_grub2-dollar.diff (based on kernel-parameters.txt as of 2013-12-30) 2) In the config files of grub: I apologize for surrendering in the face of the data structure of grub-2.00.tar.gz as available from ftp://ftp.gnu.org/gnu/grub/. I could not really identify the places to propose following changes: 2a) /etc/default/grub A note should be added before the entries GRUB_CMDLINE_LINUX_DEFAULT, GRUB_CMDLINE_LINUX_RECOVERY, and GRUB_CMDLINE_LINUX -> see attached _etc_default_grub_2014-01-08_dollar-escape.diff (based on current installation) 2b) /boot/grub2/grub.cfg A note should be added in the file header -> see attached _boot_grub2_grub.cfg_2014-01-08_dollar-escape.diff (based on a current installation) Yes, there is a warning not to edit this file directly but in emergency cases people go there... I strongly agree that YAST should escape it (three-fold!), because YAST is meant for users (like me) who don't know too much about internals. Should I file a bug concerning YAST related to this one? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=857464 https://bugzilla.novell.com/show_bug.cgi?id=857464#c5 --- Comment #5 from Pi Ny <piny@gmx.com> 2014-01-06 14:34:20 UTC --- Created an attachment (id=573370) --> (http://bugzilla.novell.com/attachment.cgi?id=573370) insert '$'-esacping hint to 'memmap' description cf. https://bugzilla.novell.com/show_bug.cgi?id=857464#c4 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=857464 https://bugzilla.novell.com/show_bug.cgi?id=857464#c6 --- Comment #6 from Pi Ny <piny@gmx.com> 2014-01-06 14:35:47 UTC --- Created an attachment (id=573372) --> (http://bugzilla.novell.com/attachment.cgi?id=573372) insert '$'-esacping hint into /etc/default/grub https://bugzilla.novell.com/show_bug.cgi?id=857464#c4 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=857464 https://bugzilla.novell.com/show_bug.cgi?id=857464#c7 --- Comment #7 from Pi Ny <piny@gmx.com> 2014-01-06 14:36:56 UTC --- Created an attachment (id=573373) --> (http://bugzilla.novell.com/attachment.cgi?id=573373) insert '$'-esacping hint into /boot/grub2/grub.cfg cf. https://bugzilla.novell.com/show_bug.cgi?id=857464#c4 -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=857464 https://bugzilla.novell.com/show_bug.cgi?id=857464#c8 --- Comment #8 from Pi Ny <piny@gmx.com> 2014-01-06 16:08:42 UTC --- (In reply to comment #4)
I strongly agree that YAST should escape it (three-fold!), because YAST is meant for users (like me) who don't know too much about internals. Should I file a bug concerning YAST related to this one?
Meanwhile I decided to file a separate bug https://bugzilla.novell.com/show_bug.cgi?id=857556 concerning YAST. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=857464 https://bugzilla.novell.com/show_bug.cgi?id=857464#c9 --- Comment #9 from Michael Chang <mchang@suse.com> 2014-01-07 03:12:44 UTC --- (In reply to comment #8)
Meanwhile I decided to file a separate bug https://bugzilla.novell.com/show_bug.cgi?id=857556 concerning YAST.
Thanks for report. I will look after it. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com