~ubuntu-branches/ubuntu/maverick/grub2/maverick-proposed

« back to all changes in this revision

Viewing changes to util/grub.d/00_header.in

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2010-07-12 15:02:28 UTC
  • mfrom: (1.17.1 upstream) (17.3.24 sid)
  • Revision ID: james.westby@ubuntu.com-20100712150228-pcklwlp83nbgony1
Tags: 1.98+20100710-1ubuntu1
* Resynchronise with Debian.  Remaining changes:
  - Adjust for default Ubuntu boot options ("quiet splash").
  - Default to hiding the menu; holding down Shift at boot will show it.
  - Set a monochromatic theme for Ubuntu.
  - Apply Ubuntu GRUB Legacy changes to legacy update-grub script: title,
    recovery mode, quiet option, tweak how memtest86+ is displayed, and
    use UUIDs where appropriate.
  - Fix backslash-escaping in merge_debconf_into_conf.
  - Remove "GNU/Linux" from default distributor string.
  - Add crashkernel= options if kdump and makedumpfile are available.
  - If other operating systems are installed, then automatically unhide
    the menu.  Otherwise, if GRUB_HIDDEN_TIMEOUT is 0, then use keystatus
    if available to check whether Shift is pressed.  If it is, show the
    menu, otherwise boot immediately.  If keystatus is not available, then
    fall back to a short delay interruptible with Escape.
  - Allow Shift to interrupt 'sleep --interruptible'.
  - Don't display introductory message about line editing unless we're
    actually offering a shell prompt.  Don't clear the screen just before
    booting if we never drew the menu in the first place.
  - Remove some verbose messages printed before reading the configuration
    file.
  - Suppress progress messages as the kernel and initrd load for
    non-recovery kernel menu entries.
  - Keep the loopback file open so that subsequent changes to the "root"
    environment variable don't affect it.
  - Change prepare_grub_to_access_device to handle filesystems
    loop-mounted on file images.
  - Ignore devices loop-mounted from files in 10_linux.
  - Show the boot menu if the previous boot failed, that is if it failed
    to get to the end of one of the normal runlevels.
  - Handle RAID devices containing virtio components.
  - Don't generate /boot/grub/device.map during grub-install or
    grub-mkconfig by default.
  - Adjust upgrade version checks for Ubuntu.
  - Change priority to optional to match the priority of grub.
  - Don't display "GRUB loading" unless Shift is held down.
  - Adjust versions of grub-doc and grub-legacy-doc conflicts to tolerate
    our backport of the grub-doc split.
  - Fix LVM/RAID probing in the absence of /boot/grub/device.map.
  - Look for .mo files in /usr/share/locale-langpack as well, in
    preference.
  - Make sure GRUB_TIMEOUT isn't quoted unnecessarily.
  - Probe all devices in 'grub-probe --target=drive' if
    /boot/grub/device.map is missing.
  - Adjust hostdisk id for hard disks, allowing grub-setup to use its
    standard workaround for broken BIOSes.
  - grub-common Breaks: lupin-support (<< 0.30) due to a grub-mkimage
    syntax change.
  - Build-depend on qemu-kvm rather than qemu-system for grub-pc tests.
  - Use qemu rather than qemu-system-i386.
  - Extend the EFI version of grub-install to be able to install into an
    EFI System Partition mounted on /boot/efi in a location that complies
    with the EFI specification.
  - Upgrade the installed core image when upgrading grub-efi-ia32 or
    grub-efi-amd64, although only if /boot/efi/EFI/ubuntu already exists.
  - Make grub-efi-ia32 and grub-efi-amd64 depend on efibootmgr so that
    grub-install works properly.
* Canonicalise device paths when building a device map on the fly.
* Program vesafb on BIOS systems rather than efifb, and return to enabling
  gfxpayload=keep by default if the kernel has the necessary support
  built-in.

Show diffs side-by-side

added added

removed removed

Lines of Context:
127
127
  set gfxmode=${GRUB_GFXMODE}
128
128
  load_video
129
129
  insmod gfxterm
130
 
EOF
 
130
fi
 
131
EOF
 
132
fi
 
133
 
 
134
case x${GRUB_TERMINAL_INPUT} in
 
135
  x)
 
136
    # Just use the native terminal
 
137
  ;;
 
138
  x*)
 
139
    cat << EOF
 
140
if terminal_input ${GRUB_TERMINAL_INPUT} ; then true ; else
 
141
  # For backward compatibility with versions of terminal.mod that don't
 
142
  # understand terminal_input
 
143
  terminal ${GRUB_TERMINAL_INPUT}
 
144
fi
 
145
EOF
 
146
  ;;
 
147
esac
 
148
 
 
149
case x${GRUB_TERMINAL_OUTPUT} in
 
150
  x)
 
151
    # Just use the native terminal
 
152
  ;;
 
153
  x*)
 
154
    cat << EOF
 
155
if terminal_output ${GRUB_TERMINAL_OUTPUT} ; then true ; else
 
156
  # For backward compatibility with versions of terminal.mod that don't
 
157
  # understand terminal_output
 
158
  terminal ${GRUB_TERMINAL_OUTPUT}
 
159
fi
 
160
EOF
 
161
  ;;
 
162
esac
 
163
 
 
164
if [ "x$gfxterm" = x1 ]; then
131
165
    if [ "x$GRUB_THEME" != x ] && [ -f "$GRUB_THEME" ] \
132
166
        && is_path_readable_by_grub "$GRUB_THEME"; then
133
167
        echo "Found theme: $GRUB_THEME" >&2
134
 
        prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_THEME"` | sed -e "s/^/  /"
 
168
        prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_THEME"`
135
169
        cat << EOF
136
 
  insmod gfxmenu
 
170
insmod gfxmenu
137
171
EOF
138
172
        themedir="`dirname "$GRUB_THEME"`"
139
173
        for x in "$themedir"/*.pf2 "$themedir"/f/*.pf2; do
140
174
            if [ -f "$x" ]; then
141
175
                cat << EOF
142
 
  loadfont (\$root)`make_system_path_relative_to_its_root $x`
 
176
loadfont (\$root)`make_system_path_relative_to_its_root $x`
143
177
EOF
144
178
            fi
145
179
        done
146
180
        if [ x"`echo "$themedir"/*.jpg`" != x"$themedir/*.jpg" ] || [ x"`echo "$themedir"/*.jpeg`" != x"$themedir/*.jpeg" ]; then
147
181
            cat << EOF
148
 
  insmod jpeg
 
182
insmod jpeg
149
183
EOF
150
184
        fi
151
185
        if [ x"`echo "$themedir"/*.png`" != x"$themedir/*.png" ]; then
152
186
            cat << EOF
153
 
  insmod png
 
187
insmod png
154
188
EOF
155
189
        fi
156
190
        if [ x"`echo "$themedir"/*.tga`" != x"$themedir/*.tga" ]; then
157
191
            cat << EOF
158
 
  insmod tga
 
192
insmod tga
159
193
EOF
160
194
        fi
161
195
            
162
196
        cat << EOF
163
 
  set theme=(\$root)`make_system_path_relative_to_its_root $GRUB_THEME`
 
197
set theme=(\$root)`make_system_path_relative_to_its_root $GRUB_THEME`
164
198
EOF
165
199
    elif [ "x$GRUB_BACKGROUND" != x ] && [ -f "$GRUB_BACKGROUND" ] \
166
200
            && is_path_readable_by_grub "$GRUB_BACKGROUND"; then
171
205
            *.jpg|*.jpeg)  reader=jpeg ;;
172
206
            *)             echo "Unsupported image format" >&2; exit 1 ;;
173
207
        esac
174
 
        prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_BACKGROUND"` | sed -e "s/^/  /"
 
208
        prepare_grub_to_access_device `${grub_probe} --target=device "$GRUB_BACKGROUND"`
175
209
        cat << EOF
176
 
  insmod $reader
177
 
  background_image -m stretch `make_system_path_relative_to_its_root "$GRUB_BACKGROUND"`
 
210
insmod $reader
 
211
background_image -m stretch `make_system_path_relative_to_its_root "$GRUB_BACKGROUND"`
178
212
EOF
179
213
    fi
180
 
    cat << EOF
181
 
fi
182
 
EOF
183
 
fi
184
 
 
185
 
case x${GRUB_TERMINAL_INPUT} in
186
 
  x)
187
 
    # Just use the native terminal
188
 
  ;;
189
 
  x*)
190
 
    cat << EOF
191
 
if terminal_input ${GRUB_TERMINAL_INPUT} ; then true ; else
192
 
  # For backward compatibility with versions of terminal.mod that don't
193
 
  # understand terminal_input
194
 
  terminal ${GRUB_TERMINAL_INPUT}
195
 
fi
196
 
EOF
197
 
  ;;
198
 
esac
199
 
 
200
 
case x${GRUB_TERMINAL_OUTPUT} in
201
 
  x)
202
 
    # Just use the native terminal
203
 
  ;;
204
 
  x*)
205
 
    cat << EOF
206
 
if terminal_output ${GRUB_TERMINAL_OUTPUT} ; then true ; else
207
 
  # For backward compatibility with versions of terminal.mod that don't
208
 
  # understand terminal_output
209
 
  terminal ${GRUB_TERMINAL_OUTPUT}
210
 
fi
211
 
EOF
212
 
  ;;
213
 
esac
 
214
fi
214
215
 
215
216
# Gettext variables and module
216
217
if [ "x${LANG}" != "xC" ] && [ -d "${locale_dir}" ] ; then