* [PATCH 1/5] search for fonts in /usr/share/fonts/uni
@ 2012-07-09 20:02 Jiri Slaby
2012-07-09 20:02 ` [PATCH 2/5] grub-install: add --skip-fs-probe Jiri Slaby
` (4 more replies)
0 siblings, 5 replies; 13+ messages in thread
From: Jiri Slaby @ 2012-07-09 20:02 UTC (permalink / raw)
To: grub-devel; +Cc: Jiri Slaby
From: Jiri Slaby <jirislaby@gmail.com>
Location of the fonts in Suse is /usr/share/fonts/uni. We have to use
this patch when packaging grub2. Instead, it would be great to have
this upstream so others may leverage that.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 3a95b04..5ea7ffe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -242,7 +242,7 @@ fi
FONT_SOURCE=
for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do
- for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/unifont; do
+ for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/unifont /usr/share/fonts/uni; do
if test -f "$dir/unifont.$ext"; then
FONT_SOURCE="$dir/unifont.$ext"
break 2
--
1.7.10.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 2/5] grub-install: add --skip-fs-probe
2012-07-09 20:02 [PATCH 1/5] search for fonts in /usr/share/fonts/uni Jiri Slaby
@ 2012-07-09 20:02 ` Jiri Slaby
2012-09-09 19:51 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-07-09 20:02 ` [PATCH 3/5] msdos-part: allow embedding in extended partition Jiri Slaby
` (3 subsequent siblings)
4 siblings, 1 reply; 13+ messages in thread
From: Jiri Slaby @ 2012-07-09 20:02 UTC (permalink / raw)
To: grub-devel; +Cc: Michael Chang, Jiri Slaby
From: Michael Chang <mchang@suse.com>
To be able to install grub on an extended partition, user, if they are
convinced it is a good idea, has to use --skip-fs-probe for grub-setup.
For convenience, let us support --skip-fs-probe directly in
grub-install and pass it to grub-setup internally.
Otherwise with such a setup:
Device Boot Start End Blocks Id System
/dev/sda1 2048 4208639 2103296 82 Linux swap / Solaris
/dev/sda2 * 4208640 213921791 104856576 f W95 Ext'd (LBA)
/dev/sda5 4210688 46153727 20971520 83 Linux
This fails:
$ grub2-install --force /dev/sda2
/usr/sbin/grub2-probe: error: cannot find a GRUB drive for /dev/sda2. Check your device.map.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
References: https://bugzilla.novell.com/show_bug.cgi?id=750897
---
util/grub-install.in | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/util/grub-install.in b/util/grub-install.in
index e19f1cd..3a7d332 100644
--- a/util/grub-install.in
+++ b/util/grub-install.in
@@ -253,6 +253,9 @@ do
-f | --force)
setup_force="--force" ;;
+ -s | --skip-fs-probe)
+ setup_skip_fs_probe="--skip-fs-probe" ;;
+
-*)
gettext_printf "Unrecognized option \`%s'\n" "$option" 1>&2
usage
@@ -738,7 +741,7 @@ fi
# Perform the grub_modinfo_platform-dependent install
if [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = "i386-pc" ] || [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = "sparc64-ieee1275" ] ; then
# Now perform the installation.
- "$grub_setup" ${allow_floppy} ${setup_verbose} ${setup_force} --directory="${grubdir}/${grub_modinfo_target_cpu}-$grub_modinfo_platform" \
+ "$grub_setup" ${allow_floppy} ${setup_verbose} ${setup_force} ${setup_skip_fs_probe} --directory="${grubdir}/${grub_modinfo_target_cpu}-$grub_modinfo_platform" \
--device-map="${device_map}" "${install_device}" || exit 1
elif [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = "i386-ieee1275" ] || [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = "powerpc-ieee1275" ]; then
--
1.7.10.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 3/5] msdos-part: allow embedding in extended partition
2012-07-09 20:02 [PATCH 1/5] search for fonts in /usr/share/fonts/uni Jiri Slaby
2012-07-09 20:02 ` [PATCH 2/5] grub-install: add --skip-fs-probe Jiri Slaby
@ 2012-07-09 20:02 ` Jiri Slaby
2012-09-05 13:28 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-07-09 20:02 ` [PATCH 4/5] Migrate PPC from Yaboot to Grub2 Jiri Slaby
` (2 subsequent siblings)
4 siblings, 1 reply; 13+ messages in thread
From: Jiri Slaby @ 2012-07-09 20:02 UTC (permalink / raw)
To: grub-devel; +Cc: Michael Chang, Jiri Slaby
From: Michael Chang <mchang@suse.com>
The same as in the previous patch, add a support for installing grub
into an extended partition.
Here, we do not ignore extended partitions anymore. Instead we call a
hook that makes sure we have the partition when installing.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
References: https://bugzilla.novell.com/show_bug.cgi?id=750897
---
grub-core/partmap/msdos.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/grub-core/partmap/msdos.c b/grub-core/partmap/msdos.c
index 6e54a74..17f712e 100644
--- a/grub-core/partmap/msdos.c
+++ b/grub-core/partmap/msdos.c
@@ -181,11 +181,15 @@ grub_partition_msdos_iterate (grub_disk_t disk,
(unsigned long long) p.len);
/* If this partition is a normal one, call the hook. */
- if (! grub_msdos_partition_is_empty (e->type)
- && ! grub_msdos_partition_is_extended (e->type))
+ if (! grub_msdos_partition_is_empty (e->type))
{
p.number++;
+ /* prevent someone doing mkfs or mkswap on an
+ extended partition, but leave room for LILO */
+ if (grub_msdos_partition_is_extended (e->type))
+ p.len = 2;
+
if (hook (disk, &p))
return grub_errno;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 4/5] Migrate PPC from Yaboot to Grub2
2012-07-09 20:02 [PATCH 1/5] search for fonts in /usr/share/fonts/uni Jiri Slaby
2012-07-09 20:02 ` [PATCH 2/5] grub-install: add --skip-fs-probe Jiri Slaby
2012-07-09 20:02 ` [PATCH 3/5] msdos-part: allow embedding in extended partition Jiri Slaby
@ 2012-07-09 20:02 ` Jiri Slaby
2012-07-14 9:14 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-07-09 20:02 ` [PATCH 5/5] add GRUB_CMDLINE_LINUX_RECOVERY for recovery mode Jiri Slaby
2012-09-05 14:08 ` [PATCH 1/5] search for fonts in /usr/share/fonts/uni Vladimir 'φ-coder/phcoder' Serbinenko
4 siblings, 1 reply; 13+ messages in thread
From: Jiri Slaby @ 2012-07-09 20:02 UTC (permalink / raw)
To: grub-devel; +Cc: Mark Hamzy, Jiri Slaby
From: Mark Hamzy <hamzy@us.ibm.com>
Add configuration support for serial terminal consoles. This will set the
maximum screen size so that text is not overwritten.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
Makefile.util.def | 7 +++
util/grub.d/20_ppc_terminfo.in | 114 ++++++++++++++++++++++++++++++++++++++++
2 files changed, 121 insertions(+)
create mode 100644 util/grub.d/20_ppc_terminfo.in
diff --git a/Makefile.util.def b/Makefile.util.def
index b80187c..4a4f754 100644
--- a/Makefile.util.def
+++ b/Makefile.util.def
@@ -434,6 +434,13 @@ script = {
};
script = {
+ name = '20_ppc_terminfo';
+ common = util/grub.d/20_ppc_terminfo.in;
+ installdir = grubconf;
+ condition = COND_HOST_LINUX;
+};
+
+script = {
name = '30_os-prober';
common = util/grub.d/30_os-prober.in;
installdir = grubconf;
diff --git a/util/grub.d/20_ppc_terminfo.in b/util/grub.d/20_ppc_terminfo.in
new file mode 100644
index 0000000..10d6658
--- /dev/null
+++ b/util/grub.d/20_ppc_terminfo.in
@@ -0,0 +1,114 @@
+#! /bin/sh
+set -e
+
+# grub-mkconfig helper script.
+# Copyright (C) 2006,2007,2008,2009,2010 Free Software Foundation, Inc.
+#
+# GRUB is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# GRUB is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GRUB. If not, see <http://www.gnu.org/licenses/>.
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+bindir=@bindir@
+libdir=@libdir@
+. "@datadir@/@PACKAGE@/grub-mkconfig_lib"
+
+export TEXTDOMAIN=@PACKAGE@
+export TEXTDOMAINDIR=@localedir@
+
+X=80
+Y=24
+TERMINAL=ofconsole
+
+argument () {
+ opt=$1
+ shift
+
+ if test $# -eq 0; then
+ echo "$0: option requires an argument -- '$opt'" 1>&2
+ exit 1
+ fi
+ echo $1
+}
+
+check_terminfo () {
+
+ while test $# -gt 0
+ do
+ option=$1
+ shift
+
+ case "$option" in
+ terminfo | TERMINFO)
+ ;;
+
+ -g)
+ NEWXY=`argument $option "$@"`
+ NEWX=`echo $NEWXY | cut -d x -f 1`
+ NEWY=`echo $NEWXY | cut -d x -f 2`
+
+ if [ ${NEWX} -ge 80 ] ; then
+ X=${NEWX}
+ else
+ echo "Warning: ${NEWX} is less than the minimum size of 80"
+ fi
+
+ if [ ${NEWY} -ge 24 ] ; then
+ Y=${NEWY}
+ else
+ echo "Warning: ${NEWY} is less than the minimum size of 24"
+ fi
+
+ shift
+ ;;
+
+ *)
+# # accept console or ofconsole
+# if [ "$option" != "console" -a "$option" != "ofconsole" ] ; then
+# echo "Error: GRUB_TERMINFO unknown console: $option"
+# exit 1
+# fi
+# # perfer console
+# TERMINAL=console
+ # accept ofconsole
+ if [ "$option" != "ofconsole" ] ; then
+ echo "Error: GRUB_TERMINFO unknown console: $option"
+ exit 1
+ fi
+ # perfer console
+ TERMINAL=ofconsole
+ ;;
+ esac
+
+ done
+
+}
+
+if ! uname -m | grep -q ppc ; then
+ exit 0
+fi
+
+if [ "x${GRUB_TERMINFO}" != "x" ] ; then
+ F1=`echo ${GRUB_TERMINFO} | cut -d " " -f 1`
+
+ if [ "${F1}" != "terminfo" ] ; then
+ echo "Error: GRUB_TERMINFO is set to \"${GRUB_TERMINFO}\" The first word should be terminfo."
+ exit 1
+ fi
+
+ check_terminfo ${GRUB_TERMINFO}
+fi
+
+cat << EOF
+ terminfo -g ${X}x${Y} ${TERMINAL}
+EOF
--
1.7.10.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH 5/5] add GRUB_CMDLINE_LINUX_RECOVERY for recovery mode
2012-07-09 20:02 [PATCH 1/5] search for fonts in /usr/share/fonts/uni Jiri Slaby
` (2 preceding siblings ...)
2012-07-09 20:02 ` [PATCH 4/5] Migrate PPC from Yaboot to Grub2 Jiri Slaby
@ 2012-07-09 20:02 ` Jiri Slaby
2012-09-05 14:08 ` [PATCH 1/5] search for fonts in /usr/share/fonts/uni Vladimir 'φ-coder/phcoder' Serbinenko
4 siblings, 0 replies; 13+ messages in thread
From: Jiri Slaby @ 2012-07-09 20:02 UTC (permalink / raw)
To: grub-devel; +Cc: Michael Chang, Jiri Slaby
From: Michael Chang <mchang@suse.com>
We, in suse, do not use single user mode but with specific kernel
command line options decided in YaST. These command line could be
applied to grub2's recovery mode via the new setting
GRUB_CMDLINE_LINUX_RECOVERY.
The same holds for debian and the script is actually adapted from
there.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
---
util/grub-mkconfig.in | 6 +++++-
util/grub.d/10_linux.in | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
index 516be86..82917d7 100644
--- a/util/grub-mkconfig.in
+++ b/util/grub-mkconfig.in
@@ -140,6 +140,9 @@ GRUB_DEVICE_BOOT_UUID="`${grub_probe} --device ${GRUB_DEVICE_BOOT} --target=fs_u
# choosing Hurd filesystem module.
GRUB_FS="`${grub_probe} --device ${GRUB_DEVICE} --target=fs 2> /dev/null || echo unknown`"
+# Not everyone uses single as recovery, let them override.
+GRUB_CMDLINE_LINUX_RECOVERY="single"
+
if test -f ${sysconfdir}/default/grub ; then
. ${sysconfdir}/default/grub
fi
@@ -216,7 +219,8 @@ export GRUB_DEFAULT \
GRUB_INIT_TUNE \
GRUB_SAVEDEFAULT \
GRUB_ENABLE_CRYPTODISK \
- GRUB_BADRAM
+ GRUB_BADRAM \
+ GRUB_CMDLINE_LINUX_RECOVERY
if test "x${grub_cfg}" != "x"; then
rm -f "${grub_cfg}.new"
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index 14402e8..6066d32 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -243,7 +243,7 @@ while [ "x$list" != "x" ] ; do
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
if [ "x${GRUB_DISABLE_RECOVERY}" != "xtrue" ]; then
linux_entry "${OS}" "${version}" recovery \
- "single ${GRUB_CMDLINE_LINUX}"
+ "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_RECOVERY}"
fi
list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '`
--
1.7.10.4
^ permalink raw reply related [flat|nested] 13+ messages in thread
* Re: [PATCH 4/5] Migrate PPC from Yaboot to Grub2
2012-07-09 20:02 ` [PATCH 4/5] Migrate PPC from Yaboot to Grub2 Jiri Slaby
@ 2012-07-14 9:14 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 0 replies; 13+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2012-07-14 9:14 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 391 bytes --]
On 09.07.2012 22:02, Jiri Slaby wrote:
> From: Mark Hamzy <hamzy@us.ibm.com>
>
> Add configuration support for serial terminal consoles. This will set the
> maximum screen size so that text is not overwritten.
>
This isn't needed with GRUB 2.00 since it automatically detects serial
console and uses 80x24 in this case.
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 3/5] msdos-part: allow embedding in extended partition
2012-07-09 20:02 ` [PATCH 3/5] msdos-part: allow embedding in extended partition Jiri Slaby
@ 2012-09-05 13:28 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-09-12 7:25 ` Michael Chang
0 siblings, 1 reply; 13+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2012-09-05 13:28 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 520 bytes --]
On 09.07.2012 22:02, Jiri Slaby wrote:
> From: Michael Chang <mchang@suse.com>
>
> The same as in the previous patch, add a support for installing grub
> into an extended partition.
>
> Here, we do not ignore extended partitions anymore. Instead we call a
> hook that makes sure we have the partition when installing.
This is a kludge and extended partition is just a technical artifact. It
needs a very good reason to allow installing on those.
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 1/5] search for fonts in /usr/share/fonts/uni
2012-07-09 20:02 [PATCH 1/5] search for fonts in /usr/share/fonts/uni Jiri Slaby
` (3 preceding siblings ...)
2012-07-09 20:02 ` [PATCH 5/5] add GRUB_CMDLINE_LINUX_RECOVERY for recovery mode Jiri Slaby
@ 2012-09-05 14:08 ` Vladimir 'φ-coder/phcoder' Serbinenko
4 siblings, 0 replies; 13+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2012-09-05 14:08 UTC (permalink / raw)
To: grub-devel, Jiri Slaby
[-- Attachment #1: Type: text/plain, Size: 724 bytes --]
Committed, thanks. Next time please attach ChangeLog entry. It will
speed up the handling of your patch.
On 09.07.2012 22:02, Jiri Slaby wrote:
> diff --git a/configure.ac b/configure.ac
> index 3a95b04..5ea7ffe 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -242,7 +242,7 @@ fi
> FONT_SOURCE=
>
> for ext in pcf pcf.gz bdf bdf.gz ttf ttf.gz; do
> - for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/unifont; do
> + for dir in . /usr/src /usr/share/fonts/X11/misc /usr/share/fonts/unifont /usr/share/fonts/uni; do
> if test -f "$dir/unifont.$ext"; then
> FONT_SOURCE="$dir/unifont.$ext"
> break 2
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 2/5] grub-install: add --skip-fs-probe
2012-07-09 20:02 ` [PATCH 2/5] grub-install: add --skip-fs-probe Jiri Slaby
@ 2012-09-09 19:51 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 0 replies; 13+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2012-09-09 19:51 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 2432 bytes --]
On 09.07.2012 22:02, Jiri Slaby wrote:
> From: Michael Chang <mchang@suse.com>
>
> To be able to install grub on an extended partition, user, if they are
> convinced it is a good idea, has to use --skip-fs-probe for grub-setup.
>
It needs to be documented in grub-install --help.
> For convenience, let us support --skip-fs-probe directly in
> grub-install and pass it to grub-setup internally.
>
> Otherwise with such a setup:
> Device Boot Start End Blocks Id System
> /dev/sda1 2048 4208639 2103296 82 Linux swap / Solaris
> /dev/sda2 * 4208640 213921791 104856576 f W95 Ext'd (LBA)
> /dev/sda5 4210688 46153727 20971520 83 Linux
>
> This fails:
> $ grub2-install --force /dev/sda2
> /usr/sbin/grub2-probe: error: cannot find a GRUB drive for /dev/sda2. Check your device.map.
>
> Signed-off-by: Jiri Slaby <jslaby@suse.cz>
> References: https://bugzilla.novell.com/show_bug.cgi?id=750897
> ---
> util/grub-install.in | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/util/grub-install.in b/util/grub-install.in
> index e19f1cd..3a7d332 100644
> --- a/util/grub-install.in
> +++ b/util/grub-install.in
> @@ -253,6 +253,9 @@ do
> -f | --force)
> setup_force="--force" ;;
>
> + -s | --skip-fs-probe)
> + setup_skip_fs_probe="--skip-fs-probe" ;;
> +
> -*)
> gettext_printf "Unrecognized option \`%s'\n" "$option" 1>&2
> usage
> @@ -738,7 +741,7 @@ fi
> # Perform the grub_modinfo_platform-dependent install
> if [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = "i386-pc" ] || [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = "sparc64-ieee1275" ] ; then
> # Now perform the installation.
> - "$grub_setup" ${allow_floppy} ${setup_verbose} ${setup_force} --directory="${grubdir}/${grub_modinfo_target_cpu}-$grub_modinfo_platform" \
> + "$grub_setup" ${allow_floppy} ${setup_verbose} ${setup_force} ${setup_skip_fs_probe} --directory="${grubdir}/${grub_modinfo_target_cpu}-$grub_modinfo_platform" \
> --device-map="${device_map}" "${install_device}" || exit 1
> elif [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = "i386-ieee1275" ] || [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = "powerpc-ieee1275" ]; then
>
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 3/5] msdos-part: allow embedding in extended partition
2012-09-05 13:28 ` Vladimir 'φ-coder/phcoder' Serbinenko
@ 2012-09-12 7:25 ` Michael Chang
2012-09-12 16:57 ` Lennart Sorensen
0 siblings, 1 reply; 13+ messages in thread
From: Michael Chang @ 2012-09-12 7:25 UTC (permalink / raw)
To: The development of GNU GRUB
2012/9/5 Vladimir 'φ-coder/phcoder' Serbinenko <phcoder@gmail.com>:
> On 09.07.2012 22:02, Jiri Slaby wrote:
>
>> From: Michael Chang <mchang@suse.com>
>>
>> The same as in the previous patch, add a support for installing grub
>> into an extended partition.
>>
>> Here, we do not ignore extended partitions anymore. Instead we call a
>> hook that makes sure we have the partition when installing.
>
>
> This is a kludge and extended partition is just a technical artifact. It
> needs a very good reason to allow installing on those.
Installing on extended partition is one of scenarios for SUSE and
openSUSE installation. If the /boot resides in a logical partition,
the installer would propose installing bootloader to extended
partition. For historic reasons, we prefer partition bootsector than
mbr, and use a generic mbr boot code to control the booting to active
partition. This is good or bad depends on what's the your view point,
but the point here is that for users who upgrade to grub2, we don't
want to break his current setup and still offer him the same options
he used to install grub. This is the major reason why we have to
install grub2 to extended partition.
I could understand the patch is not good to be accepted , although it
works to solve our problem for now. However we'd like to feedback our
situation here and hope that grub2 could consider to support
installing to extended partition (I believe there must be more people
needs it) or point us a direction how to fix this problem cleanly.
Thanks,
Michael
> --
> Regards
> Vladimir 'φ-coder/phcoder' Serbinenko
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 3/5] msdos-part: allow embedding in extended partition
2012-09-12 7:25 ` Michael Chang
@ 2012-09-12 16:57 ` Lennart Sorensen
2012-09-13 5:26 ` Michael Chang
0 siblings, 1 reply; 13+ messages in thread
From: Lennart Sorensen @ 2012-09-12 16:57 UTC (permalink / raw)
To: The development of GNU GRUB
On Wed, Sep 12, 2012 at 03:25:43PM +0800, Michael Chang wrote:
> Installing on extended partition is one of scenarios for SUSE and
> openSUSE installation. If the /boot resides in a logical partition,
> the installer would propose installing bootloader to extended
> partition. For historic reasons, we prefer partition bootsector than
> mbr, and use a generic mbr boot code to control the booting to active
> partition. This is good or bad depends on what's the your view point,
> but the point here is that for users who upgrade to grub2, we don't
> want to break his current setup and still offer him the same options
> he used to install grub. This is the major reason why we have to
> install grub2 to extended partition.
>
> I could understand the patch is not good to be accepted , although it
> works to solve our problem for now. However we'd like to feedback our
> situation here and hope that grub2 could consider to support
> installing to extended partition (I believe there must be more people
> needs it) or point us a direction how to fix this problem cleanly.
How much room is there in the filesystem for embedding the boot loader?
It must depend on the filesystem in use too.
What do you do when the disk is over 2TB in SUSE? You must be using
GPT instead for that. Do you still try to embed the bootloader into
the filesystem rather than use a GPT boot partition?
After all getting rid of the block mapping in grub2 has made it a lot
less fragile, although you can still do it if you force it.
--
Len Sorensen
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 3/5] msdos-part: allow embedding in extended partition
2012-09-12 16:57 ` Lennart Sorensen
@ 2012-09-13 5:26 ` Michael Chang
2012-09-13 15:52 ` Lennart Sorensen
0 siblings, 1 reply; 13+ messages in thread
From: Michael Chang @ 2012-09-13 5:26 UTC (permalink / raw)
To: The development of GNU GRUB
2012/9/13 Lennart Sorensen <lsorense@csclub.uwaterloo.ca>:
> On Wed, Sep 12, 2012 at 03:25:43PM +0800, Michael Chang wrote:
>> Installing on extended partition is one of scenarios for SUSE and
>> openSUSE installation. If the /boot resides in a logical partition,
>> the installer would propose installing bootloader to extended
>> partition. For historic reasons, we prefer partition bootsector than
>> mbr, and use a generic mbr boot code to control the booting to active
>> partition. This is good or bad depends on what's the your view point,
>> but the point here is that for users who upgrade to grub2, we don't
>> want to break his current setup and still offer him the same options
>> he used to install grub. This is the major reason why we have to
>> install grub2 to extended partition.
>>
>> I could understand the patch is not good to be accepted , although it
>> works to solve our problem for now. However we'd like to feedback our
>> situation here and hope that grub2 could consider to support
>> installing to extended partition (I believe there must be more people
>> needs it) or point us a direction how to fix this problem cleanly.
>
> How much room is there in the filesystem for embedding the boot loader?
> It must depend on the filesystem in use too.
Yes. And thanks to the great grub2 would do the check for us. :)
For openSUSE supported filesystem, they're all allowing embedding and
grub|grub2 works pretty well.
I understand the drawbacks and pitfalls that having bootloaders
installed on a partition in use, it's fragile, file system dependent
and not work on lvm partiton. The question here is that these maybe
not enough to convince people to use mbr as default proposed location,
especially to deal with multiboot setup. I illustrate some of the
problems below:
1. Booting after bios is thus fully controlled by a distro loader and
you couldn't boot into other distro once that *main* disto failed. The
active partition no longer worked.
2. You can't use chainload if you're not installed to a partition.
Grub2 has been done well to probe the foreign os config and knows how
to load the kernel and initrd directly, thus the chainload seems not
required. It's true but only if the foreign OS never changes his
config. There's a problem reported that foregin os not booting after
receiving kernel update. If using chainload then it would not have
problem because it's no depend to config change.
So we are keeping the "boot from partition .." scenario although we
know grub2 not encourage to do this. The question here is that we hope
installing to extended partition could be supported, as unfortunately
that's one of the scenario.
>
> What do you do when the disk is over 2TB in SUSE? You must be using
> GPT instead for that. Do you still try to embed the bootloader into
> the filesystem rather than use a GPT boot partition?
I agree with you that for gpt on legacy bios scheme, we should embed
bootloader to the boot partition. Given that generic(or standard) mbr
boot code is no longer to work on gpt (it always shows error, no
active partition ;), there's no good reason to embed bootloader on
partitions in use, assuming that the gpt introduces concept of boot
partition, and the old-day booting from msdos active partition no
longer worked or favored.
However syslinux which prefers living in a partition has provided
gptmbr, it maybe used to boot off a gpt partition. But IMHO for grub,
we should go for the bios boot partition (as it's name says GRAND
UNIFIED ..) and gptmbr might be optional for those still insist in
legacy way.
>
> After all getting rid of the block mapping in grub2 has made it a lot
> less fragile, although you can still do it if you force it.
Yes. Using block-list install is much more improved on 2.00. Thanks
for working on that. :)
Regards,
Michael
>
> --
> Len Sorensen
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [PATCH 3/5] msdos-part: allow embedding in extended partition
2012-09-13 5:26 ` Michael Chang
@ 2012-09-13 15:52 ` Lennart Sorensen
0 siblings, 0 replies; 13+ messages in thread
From: Lennart Sorensen @ 2012-09-13 15:52 UTC (permalink / raw)
To: The development of GNU GRUB
On Thu, Sep 13, 2012 at 01:26:27PM +0800, Michael Chang wrote:
> Yes. And thanks to the great grub2 would do the check for us. :)
>
> For openSUSE supported filesystem, they're all allowing embedding and
> grub|grub2 works pretty well.
>
> I understand the drawbacks and pitfalls that having bootloaders
> installed on a partition in use, it's fragile, file system dependent
> and not work on lvm partiton. The question here is that these maybe
> not enough to convince people to use mbr as default proposed location,
> especially to deal with multiboot setup. I illustrate some of the
> problems below:
>
> 1. Booting after bios is thus fully controlled by a distro loader and
> you couldn't boot into other distro once that *main* disto failed. The
> active partition no longer worked.
Makes sense.
> 2. You can't use chainload if you're not installed to a partition.
> Grub2 has been done well to probe the foreign os config and knows how
> to load the kernel and initrd directly, thus the chainload seems not
> required. It's true but only if the foreign OS never changes his
> config. There's a problem reported that foregin os not booting after
> receiving kernel update. If using chainload then it would not have
> problem because it's no depend to config change.
I personally have never understood the desire for multiple linux installs
on a machine, and hence have never had a reason to have more than one
grub on the system. Any other OS for me has always been one windows
install (and I don't have those very often either).
I used to install grub to the partition because whenever you reinstalled
windows it would overwrite the MBR and being able to change the active
partition to get back to linux was handy. But since windows 95/98 aren't
common anymore, the need to reinstall windows every 3 to 6 months to keep
it working seems to have gone away, so now I just have grub in the MBR.
But that's just how I do things.
> So we are keeping the "boot from partition .." scenario although we
> know grub2 not encourage to do this. The question here is that we hope
> installing to extended partition could be supported, as unfortunately
> that's one of the scenario.
As far as I am aware, you can tell grub to force using the blockmap,
but it does require passing the appropriate force argument to do it.
> I agree with you that for gpt on legacy bios scheme, we should embed
> bootloader to the boot partition. Given that generic(or standard) mbr
> boot code is no longer to work on gpt (it always shows error, no
> active partition ;), there's no good reason to embed bootloader on
> partitions in use, assuming that the gpt introduces concept of boot
> partition, and the old-day booting from msdos active partition no
> longer worked or favored.
gpt does have a specific partition type to use for bootloaders, and grub
will use it automatically. It works great.
Of course that again gives you back the problem of chainloading,
since there can be only one such partition on a given system I suspect.
I could be wrong, perhaps you could have multiple, but keeping track of
which is which sounds complicated.
> However syslinux which prefers living in a partition has provided
> gptmbr, it maybe used to boot off a gpt partition. But IMHO for grub,
> we should go for the bios boot partition (as it's name says GRAND
> UNIFIED ..) and gptmbr might be optional for those still insist in
> legacy way.
I believe gptmbr is to allow a legacy bios system to load the mbr and
execute code that will go do the right thing for a gpt disk (which a
legacy bios doesn't understand of course).
> >
> > After all getting rid of the block mapping in grub2 has made it a lot
> > less fragile, although you can still do it if you force it.
>
> Yes. Using block-list install is much more improved on 2.00. Thanks
> for working on that. :)
Well someone did. I mainly use grub, and report bugs when I find them
(mostly on IBM powerpc since x86 generally just works). After much
discovery of endianess bugs and other fun stuff grub2 actually works
quite well on ibm powerpc machines now. The serial console display is a
bit messed up for the menu still, although I haven't looked into why yet.
Perhaps I should. I think they use ANSI rather than vt100 or something.
--
Len Sorensen
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2012-09-13 15:52 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-09 20:02 [PATCH 1/5] search for fonts in /usr/share/fonts/uni Jiri Slaby
2012-07-09 20:02 ` [PATCH 2/5] grub-install: add --skip-fs-probe Jiri Slaby
2012-09-09 19:51 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-07-09 20:02 ` [PATCH 3/5] msdos-part: allow embedding in extended partition Jiri Slaby
2012-09-05 13:28 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-09-12 7:25 ` Michael Chang
2012-09-12 16:57 ` Lennart Sorensen
2012-09-13 5:26 ` Michael Chang
2012-09-13 15:52 ` Lennart Sorensen
2012-07-09 20:02 ` [PATCH 4/5] Migrate PPC from Yaboot to Grub2 Jiri Slaby
2012-07-14 9:14 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-07-09 20:02 ` [PATCH 5/5] add GRUB_CMDLINE_LINUX_RECOVERY for recovery mode Jiri Slaby
2012-09-05 14:08 ` [PATCH 1/5] search for fonts in /usr/share/fonts/uni Vladimir 'φ-coder/phcoder' Serbinenko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.