[Techtalk] Grub2 entry for booting into shell
James Sutherland
j at sutherland.pw
Sun Feb 14 10:31:20 UTC 2016
On 14/02/2016 05:04, Gwen Morse wrote:
> On Fri, Feb 12, 2016 at 5:21 AM, A. Mani <a.mani.cms at gmail.com> wrote:
>
>> On Wed, Feb 10, 2016 at 5:19 PM, Gwen Morse <gwen.morse at gmail.com> wrote:
>>> I'd like to create a GRUB2 menu option to allow me to boot into the shell
>>> from the GRUB menu.
>>
>>
>> You need to edit files in /etc/grub.d and generate the required
>> configuration.
>>
>> RTFM
>
> This is the linuxchix techtalk list, isn't it? Did the list change, has it
> stopped being a cooperative environment for women to ask Linux questions
> without being brushed off with a "RTFM" response?
>
> Should I ask on the newchix list instead?
>
> PS - I have edited my files in /etc/grub.d and I am trying to generate the
> required configuration but I'm failing. That's why I'm asking for
> assistance.
RTFM is indeed an unhelpful answer there! Presumably, if it were
actually explained in the FM, there'd be no need to ask here...
The root problem is that the script you have at the moment just copies
itself minus the first few lines - leaving any variables as-is. I
*think* the answer is to replace that logic with a "heredoc", which will
interpret the variables as you want:
cat <<EOF
(text from the previous script goes here, including any $var bits)
EOF
You should be able to run the grub.d script itself on the command line,
by the way, and see exactly what it prints out. That might save a bit of
time re-building the config to get it the way you need.
James.
More information about the Techtalk
mailing list