2010-10-12 Robert Millan <rmh@gnu.org>
* util/grub-mkconfig.in: Merge `GRUB_DISABLE_LINUX_RECOVERY' and `GRUB_DISABLE_NETBSD_RECOVERY' into a single `GRUB_DISABLE_RECOVERY' variable. All references updated. * util/grub.d/10_kfreebsd.in: Support recovery boot entries.
This commit is contained in:
parent
20c6bb7e9e
commit
219b35646a
7 changed files with 27 additions and 17 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
2010-10-12 Robert Millan <rmh@gnu.org>
|
||||||
|
|
||||||
|
* util/grub-mkconfig.in: Merge `GRUB_DISABLE_LINUX_RECOVERY' and
|
||||||
|
`GRUB_DISABLE_NETBSD_RECOVERY' into a single `GRUB_DISABLE_RECOVERY'
|
||||||
|
variable. All references updated.
|
||||||
|
|
||||||
|
* util/grub.d/10_kfreebsd.in: Support recovery boot entries.
|
||||||
|
|
||||||
2010-10-08 Vladimir Serbinenko <phcoder@gmail.com>
|
2010-10-08 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
Correctly distinguish mdraid flavours.
|
Correctly distinguish mdraid flavours.
|
||||||
|
|
|
@ -1073,7 +1073,7 @@ A command to configure the serial port when using the serial console.
|
||||||
Command-line arguments to add to menu entries for the Linux kernel.
|
Command-line arguments to add to menu entries for the Linux kernel.
|
||||||
|
|
||||||
@item GRUB_CMDLINE_LINUX_DEFAULT
|
@item GRUB_CMDLINE_LINUX_DEFAULT
|
||||||
Unless @samp{GRUB_DISABLE_LINUX_RECOVERY} is set to @samp{true}, two menu
|
Unless @samp{GRUB_DISABLE_RECOVERY} is set to @samp{true}, two menu
|
||||||
entries will be generated for each Linux kernel: one default entry and one
|
entries will be generated for each Linux kernel: one default entry and one
|
||||||
entry for recovery mode. This option lists command-line arguments to add
|
entry for recovery mode. This option lists command-line arguments to add
|
||||||
only to the default menu entry, after those listed in
|
only to the default menu entry, after those listed in
|
||||||
|
@ -1096,13 +1096,9 @@ the Linux kernel, using a @samp{root=UUID=...} kernel parameter. This is
|
||||||
usually more reliable, but in some cases it may not be appropriate. To
|
usually more reliable, but in some cases it may not be appropriate. To
|
||||||
disable the use of UUIDs, set this option to @samp{true}.
|
disable the use of UUIDs, set this option to @samp{true}.
|
||||||
|
|
||||||
@item GRUB_DISABLE_LINUX_RECOVERY
|
@item GRUB_DISABLE_RECOVERY
|
||||||
If this option is set to @samp{true}, disable the generation of recovery
|
If this option is set to @samp{true}, disable the generation of recovery
|
||||||
mode menu entries for Linux.
|
mode menu entries.
|
||||||
|
|
||||||
@item GRUB_DISABLE_NETBSD_RECOVERY
|
|
||||||
If this option is set to @samp{true}, disable the generation of recovery
|
|
||||||
mode menu entries for NetBSD.
|
|
||||||
|
|
||||||
@item GRUB_VIDEO_BACKEND
|
@item GRUB_VIDEO_BACKEND
|
||||||
If graphical video support is required, either because the @samp{gfxterm}
|
If graphical video support is required, either because the @samp{gfxterm}
|
||||||
|
|
|
@ -257,8 +257,7 @@ export GRUB_DEFAULT \
|
||||||
GRUB_TERMINAL_OUTPUT \
|
GRUB_TERMINAL_OUTPUT \
|
||||||
GRUB_SERIAL_COMMAND \
|
GRUB_SERIAL_COMMAND \
|
||||||
GRUB_DISABLE_LINUX_UUID \
|
GRUB_DISABLE_LINUX_UUID \
|
||||||
GRUB_DISABLE_LINUX_RECOVERY \
|
GRUB_DISABLE_RECOVERY \
|
||||||
GRUB_DISABLE_NETBSD_RECOVERY \
|
|
||||||
GRUB_VIDEO_BACKEND \
|
GRUB_VIDEO_BACKEND \
|
||||||
GRUB_GFXMODE \
|
GRUB_GFXMODE \
|
||||||
GRUB_BACKGROUND \
|
GRUB_BACKGROUND \
|
||||||
|
|
|
@ -68,9 +68,13 @@ kfreebsd_entry ()
|
||||||
{
|
{
|
||||||
os="$1"
|
os="$1"
|
||||||
version="$2"
|
version="$2"
|
||||||
recovery="$3" # not used yet
|
recovery="$3"
|
||||||
args="$4" # not used yet
|
args="$4"
|
||||||
title="$(gettext_quoted "%s, with kFreeBSD %s")"
|
if ${recovery} ; then
|
||||||
|
title="$(gettext_quoted "%s, with kFreeBSD %s (recovery mode)")"
|
||||||
|
else
|
||||||
|
title="$(gettext_quoted "%s, with kFreeBSD %s")"
|
||||||
|
fi
|
||||||
printf "menuentry '${title}' ${CLASS} {\n" "${os}" "${version}"
|
printf "menuentry '${title}' ${CLASS} {\n" "${os}" "${version}"
|
||||||
save_default_entry | sed -e "s/^/\t/"
|
save_default_entry | sed -e "s/^/\t/"
|
||||||
if [ -z "${prepare_boot_cache}" ]; then
|
if [ -z "${prepare_boot_cache}" ]; then
|
||||||
|
@ -80,7 +84,7 @@ kfreebsd_entry ()
|
||||||
printf '%s\n' "${prepare_boot_cache}"
|
printf '%s\n' "${prepare_boot_cache}"
|
||||||
cat << EOF
|
cat << EOF
|
||||||
echo '$(printf "$(gettext_quoted "Loading kernel of FreeBSD %s ...")" ${version})'
|
echo '$(printf "$(gettext_quoted "Loading kernel of FreeBSD %s ...")" ${version})'
|
||||||
kfreebsd ${rel_dirname}/${basename}
|
kfreebsd ${rel_dirname}/${basename} ${args}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if test -n "${devices}" ; then
|
if test -n "${devices}" ; then
|
||||||
|
@ -172,7 +176,10 @@ while [ "x$list" != "x" ] ; do
|
||||||
module_dir_rel=$(make_system_path_relative_to_its_root $module_dir)
|
module_dir_rel=$(make_system_path_relative_to_its_root $module_dir)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
kfreebsd_entry "${OS}" "${version}"
|
kfreebsd_entry "${OS}" "${version}" false
|
||||||
|
if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
|
||||||
|
kfreebsd_entry "${OS}" "${version}" true "-s"
|
||||||
|
fi
|
||||||
|
|
||||||
list=`echo $list | tr ' ' '\n' | grep -vx $kfreebsd | tr '\n' ' '`
|
list=`echo $list | tr ' ' '\n' | grep -vx $kfreebsd | tr '\n' ' '`
|
||||||
done
|
done
|
||||||
|
|
|
@ -136,7 +136,7 @@ while [ "x$list" != "x" ] ; do
|
||||||
|
|
||||||
linux_entry "${OS}" "${version}" false \
|
linux_entry "${OS}" "${version}" false \
|
||||||
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
|
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
|
||||||
if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
|
if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
|
||||||
linux_entry "${OS}" "${version}" true \
|
linux_entry "${OS}" "${version}" true \
|
||||||
"single ${GRUB_CMDLINE_LINUX}"
|
"single ${GRUB_CMDLINE_LINUX}"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -80,7 +80,7 @@ for k in $(ls -t /netbsd*) ; do
|
||||||
echo "Found NetBSD kernel: $k" >&2
|
echo "Found NetBSD kernel: $k" >&2
|
||||||
netbsd_entry "knetbsd" "$k" false "${GRUB_CMDLINE_NETBSD_DEFAULT}"
|
netbsd_entry "knetbsd" "$k" false "${GRUB_CMDLINE_NETBSD_DEFAULT}"
|
||||||
netbsd_entry "multiboot" "$k" false "${GRUB_CMDLINE_NETBSD_DEFAULT}"
|
netbsd_entry "multiboot" "$k" false "${GRUB_CMDLINE_NETBSD_DEFAULT}"
|
||||||
if [ "x${GRUB_DISABLE_NETBSD_RECOVERY}" != "xtrue" ]; then
|
if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
|
||||||
netbsd_entry "knetbsd" "$k" true "-s"
|
netbsd_entry "knetbsd" "$k" true "-s"
|
||||||
netbsd_entry "multiboot" "$k" true "-s"
|
netbsd_entry "multiboot" "$k" true "-s"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -133,7 +133,7 @@ while [ "x${xen_list}" != "x" ] ; do
|
||||||
|
|
||||||
linux_entry "${OS}" "${version}" "${xen_version}" false \
|
linux_entry "${OS}" "${version}" "${xen_version}" false \
|
||||||
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}"
|
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" "${GRUB_CMDLINE_XEN} ${GRUB_CMDLINE_XEN_DEFAULT}"
|
||||||
if [ "x${GRUB_DISABLE_LINUX_RECOVERY}" != "xtrue" ]; then
|
if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
|
||||||
linux_entry "${OS}" "${version}" "${xen_version}" true \
|
linux_entry "${OS}" "${version}" "${xen_version}" true \
|
||||||
"single ${GRUB_CMDLINE_LINUX}" "${GRUB_CMDLINE_XEN}"
|
"single ${GRUB_CMDLINE_LINUX}" "${GRUB_CMDLINE_XEN}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue