how /etc/grub.d/41_custom is supposed to work? The 2019 Stack Overflow Developer Survey Results Are InDebian/Grub2: Moving root partition to new drive?How to fix mistake in grub.cfg from LiveCD?How can I automatically load my config file in Grub2?GRUB2 not detecting Windows; rootnoverify: command not foundHow to generate grub.cfg for different disk?Problems in using GRUB2 - ManjaroProblem with grub-mkconfig in Arch Linux installation: grub-mkconfig fails to connect to lvmetadCan't get grub2 menu to displayGrub2 boots into prompt instead of menu after grub2-installKVM boot ERROR: device 'UUID=xxxx-51fb' not found. mount: /new_root: can't find UUID=xxxx-51fb
How do you say "canon" as in "official for a story universe"?
Limit to 0 ambiguity
Flying Bloodthirsty Lampshades
How long do I have to send my income tax payment to the IRS?
How to create dashed lines/arrows in Illustrator
What is the best strategy for white in this position?
How to make payment on the internet without leaving a money trail?
Why is Grand Jury testimony secret?
Where to refill my bottle in India?
In microwave frequencies, do you use a circulator when you need a (near) perfect diode?
Why is the maximum length of OpenWrt’s root password 8 characters?
Why do some words that are not inflected have an umlaut?
Is domain driven design an anti-SQL pattern?
Spanish for "widget"
Could a US political party gain complete control over the government by removing checks & balances?
Are USB sockets on wall outlets live all the time, even when the switch is off?
If the Wish spell is used to duplicate the effect of Simulacrum, are existing duplicates destroyed?
Where does the "burst of radiance" from Holy Weapon originate?
Why don't Unix/Linux systems traverse through directories until they find the required version of a linked library?
Falsification in Math vs Science
Access elements in std::string where positon of string is greater than its size
Landlord wants to switch my lease to a "Land contract" to "get back at the city"
I see my dog run
Monty Hall variation
how /etc/grub.d/41_custom is supposed to work?
The 2019 Stack Overflow Developer Survey Results Are InDebian/Grub2: Moving root partition to new drive?How to fix mistake in grub.cfg from LiveCD?How can I automatically load my config file in Grub2?GRUB2 not detecting Windows; rootnoverify: command not foundHow to generate grub.cfg for different disk?Problems in using GRUB2 - ManjaroProblem with grub-mkconfig in Arch Linux installation: grub-mkconfig fails to connect to lvmetadCan't get grub2 menu to displayGrub2 boots into prompt instead of menu after grub2-installKVM boot ERROR: device 'UUID=xxxx-51fb' not found. mount: /new_root: can't find UUID=xxxx-51fb
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am asking, because fragment of file /boot/grub/grub.cfg looks like
### BEGIN /etc/grub.d/41_custom ###
if [ -f $config_directory/custom.cfg ]; then
source $config_directory/custom.cfg
elif [ -z "$config_directory" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
I don't understood, how this should work, because there is no "source" command in grub2 - see
http://www.gnu.org/software/grub/manual/grub.html
source if the command of /bin/sh shell.
I think, that this fragment should include $config_directory/custom.cfg
during the building of /boot/grub/grub.cfg (with grub-mkconfig):
[user@localhost ~]$ cat /etc/grub.d/41_custom
#!/bin/sh
cat <<EOF
if [ -f $config_directory/custom.cfg ]; then
source $config_directory/custom.cfg
elif [ -z "$config_directory" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
EOF
but it doesn't!
it just inserts the text with the "source" command...
grub2 bugs
add a comment |
I am asking, because fragment of file /boot/grub/grub.cfg looks like
### BEGIN /etc/grub.d/41_custom ###
if [ -f $config_directory/custom.cfg ]; then
source $config_directory/custom.cfg
elif [ -z "$config_directory" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
I don't understood, how this should work, because there is no "source" command in grub2 - see
http://www.gnu.org/software/grub/manual/grub.html
source if the command of /bin/sh shell.
I think, that this fragment should include $config_directory/custom.cfg
during the building of /boot/grub/grub.cfg (with grub-mkconfig):
[user@localhost ~]$ cat /etc/grub.d/41_custom
#!/bin/sh
cat <<EOF
if [ -f $config_directory/custom.cfg ]; then
source $config_directory/custom.cfg
elif [ -z "$config_directory" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
EOF
but it doesn't!
it just inserts the text with the "source" command...
grub2 bugs
add a comment |
I am asking, because fragment of file /boot/grub/grub.cfg looks like
### BEGIN /etc/grub.d/41_custom ###
if [ -f $config_directory/custom.cfg ]; then
source $config_directory/custom.cfg
elif [ -z "$config_directory" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
I don't understood, how this should work, because there is no "source" command in grub2 - see
http://www.gnu.org/software/grub/manual/grub.html
source if the command of /bin/sh shell.
I think, that this fragment should include $config_directory/custom.cfg
during the building of /boot/grub/grub.cfg (with grub-mkconfig):
[user@localhost ~]$ cat /etc/grub.d/41_custom
#!/bin/sh
cat <<EOF
if [ -f $config_directory/custom.cfg ]; then
source $config_directory/custom.cfg
elif [ -z "$config_directory" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
EOF
but it doesn't!
it just inserts the text with the "source" command...
grub2 bugs
I am asking, because fragment of file /boot/grub/grub.cfg looks like
### BEGIN /etc/grub.d/41_custom ###
if [ -f $config_directory/custom.cfg ]; then
source $config_directory/custom.cfg
elif [ -z "$config_directory" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
I don't understood, how this should work, because there is no "source" command in grub2 - see
http://www.gnu.org/software/grub/manual/grub.html
source if the command of /bin/sh shell.
I think, that this fragment should include $config_directory/custom.cfg
during the building of /boot/grub/grub.cfg (with grub-mkconfig):
[user@localhost ~]$ cat /etc/grub.d/41_custom
#!/bin/sh
cat <<EOF
if [ -f $config_directory/custom.cfg ]; then
source $config_directory/custom.cfg
elif [ -z "$config_directory" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
EOF
but it doesn't!
it just inserts the text with the "source" command...
grub2 bugs
grub2 bugs
asked Jan 22 '15 at 13:07
user1709408user1709408
2861414
2861414
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
here is the description of mapping from command to modulename.mod
http://blog.fpmurphy.com/2010/06/grub2-modules.html?output=pdf
grep -E "^source" /boot/grub/i386-pc/command.lst
source: configfile
grep -E "^.:" /boot/grub/i386-pc/command.lst
.: configfile
here is the code of function:
http://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/commands/configfile.c#n61
So, "source" is just an undocumented command of grub2
add a comment |
The manual for Grub 2.02 on the gnu.org website gives documentation for the "source" command at 16.3.71 in the "Command-line and Menu entry commands" section. So by 25th April 2017 - the date of the current version of the Grub Manual - the source command was documented and I now find it being used in the file /etc/grub.d/41_custom in the current Linux MINT 19 distribution.
New contributor
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f180470%2fhow-etc-grub-d-41-custom-is-supposed-to-work%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
here is the description of mapping from command to modulename.mod
http://blog.fpmurphy.com/2010/06/grub2-modules.html?output=pdf
grep -E "^source" /boot/grub/i386-pc/command.lst
source: configfile
grep -E "^.:" /boot/grub/i386-pc/command.lst
.: configfile
here is the code of function:
http://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/commands/configfile.c#n61
So, "source" is just an undocumented command of grub2
add a comment |
here is the description of mapping from command to modulename.mod
http://blog.fpmurphy.com/2010/06/grub2-modules.html?output=pdf
grep -E "^source" /boot/grub/i386-pc/command.lst
source: configfile
grep -E "^.:" /boot/grub/i386-pc/command.lst
.: configfile
here is the code of function:
http://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/commands/configfile.c#n61
So, "source" is just an undocumented command of grub2
add a comment |
here is the description of mapping from command to modulename.mod
http://blog.fpmurphy.com/2010/06/grub2-modules.html?output=pdf
grep -E "^source" /boot/grub/i386-pc/command.lst
source: configfile
grep -E "^.:" /boot/grub/i386-pc/command.lst
.: configfile
here is the code of function:
http://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/commands/configfile.c#n61
So, "source" is just an undocumented command of grub2
here is the description of mapping from command to modulename.mod
http://blog.fpmurphy.com/2010/06/grub2-modules.html?output=pdf
grep -E "^source" /boot/grub/i386-pc/command.lst
source: configfile
grep -E "^.:" /boot/grub/i386-pc/command.lst
.: configfile
here is the code of function:
http://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/commands/configfile.c#n61
So, "source" is just an undocumented command of grub2
edited Apr 6 at 14:59
sourcejedi
25.8k445113
25.8k445113
answered Jan 22 '15 at 13:52
user1709408user1709408
2861414
2861414
add a comment |
add a comment |
The manual for Grub 2.02 on the gnu.org website gives documentation for the "source" command at 16.3.71 in the "Command-line and Menu entry commands" section. So by 25th April 2017 - the date of the current version of the Grub Manual - the source command was documented and I now find it being used in the file /etc/grub.d/41_custom in the current Linux MINT 19 distribution.
New contributor
add a comment |
The manual for Grub 2.02 on the gnu.org website gives documentation for the "source" command at 16.3.71 in the "Command-line and Menu entry commands" section. So by 25th April 2017 - the date of the current version of the Grub Manual - the source command was documented and I now find it being used in the file /etc/grub.d/41_custom in the current Linux MINT 19 distribution.
New contributor
add a comment |
The manual for Grub 2.02 on the gnu.org website gives documentation for the "source" command at 16.3.71 in the "Command-line and Menu entry commands" section. So by 25th April 2017 - the date of the current version of the Grub Manual - the source command was documented and I now find it being used in the file /etc/grub.d/41_custom in the current Linux MINT 19 distribution.
New contributor
The manual for Grub 2.02 on the gnu.org website gives documentation for the "source" command at 16.3.71 in the "Command-line and Menu entry commands" section. So by 25th April 2017 - the date of the current version of the Grub Manual - the source command was documented and I now find it being used in the file /etc/grub.d/41_custom in the current Linux MINT 19 distribution.
New contributor
edited Apr 6 at 14:34
New contributor
answered Apr 6 at 14:26
David CassonDavid Casson
112
112
New contributor
New contributor
add a comment |
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f180470%2fhow-etc-grub-d-41-custom-is-supposed-to-work%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown