问题原文
原帖链接 · expert · CC BY-SA 4.0
Not sure where I make mistake but I can't escape $ correctly in /etc/default/grub. I'm on Ubuntu MATE 18.04. This is what I do:
In console I edit confid by calling
sudo mcedit /etc/default/grub
I add memmap parameter so that string look like this
GRUB_CMDLINE_LINUX_DEFAULT="quiet memmap=3M\$11992M"
And follow this by invoking sudo update-grub. When I restart my system it hangs on boot. Going into grub settings editor from boot menu shows me linux param string that looks like
quiet memmap=3M$11992M
Note lack of backslash. If I press F10 to boot it hangs again. So I restart again and edit in boot editor this string to
quiet memmap=3M\$11992M
and then after pressing F10 it boots. So it almost feels like settings file gets unescaped twice.
What am I missing ?
已采纳解答
原帖链接 · expert · CC BY-SA 4.0
@freddy Correctly pointed out I could use single-quote. But before I read this reply I managed to fix the problem by typing
quiet memmap=3M\\\$11992M
Looks like grub unescapes the string twice.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
