Errors Launching Program and Saving Settings When Using Double Quotes in kernel parameters
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Grub Customizer |
New
|
Undecided
|
Unassigned |
Bug Description
If there are double quotes in the kernel parameters field under General Settings, Grub Customizer encounters an error when saving settings or launching the program.
This appears to be a result of double quotes being interpreted as the start or end of a string literal rather than part of the string literal assigned to GRUB_CMDLINE_
If a user does not remedy this before closing Grub Customizer, they will be unable to launch the program - and, by extension, use it to correct the error - essentially locking them out. The error may be resolved, however, by editing /etc/default/grub and prepending the double quotes with a backslash, replacing them with single quotes, or otherwise removing them.
Admittedly, I'm not sure if this qualifies as a bug so much as user error, but it may be worth adding a measure to prevent this from happening, such as some sort of input validation or automatically prepending double quotes with a backslash.
Going into specifics, I encountered this issue after adding the following to the kernel parameters field:
>acpi_os_
For the record, the full contents of the field were as follows:
>loglevel=3 rw rootfstype=ext4 rootflags=
On clicking save, Grub Customizer displayed the following error:
>Failed saving grub configuration!
>Please take a look at the command line output below. If you think this is a bug of Grub Customizer, please create one at https:/
>
>failed running 'grub-mkconfig -o "/boot/
>/etc/default/grub: line 6: 2001 pci=nomsi,noaer: command not found
It was late, so I decided to worry about it later and just closed the program. The next day, I tried launching Grub Customizer but was met with a somewhat similar error message:
>grub-mkconfig couldn't be executed successfully. error message:
>/etc/default/grub: line 6: 2001 pci=nomsi,noaer: command not found
Although I was unable to fix the issue via Grub Customizer, I was able to do so by directly editing /etc/default/grub and replacing the double quotes with single quotes.