--- grub-0.97.orig/configure.ac +++ grub-0.97/configure.ac @@ -84,8 +84,8 @@ if test "x$with_binutils" != x; then CFLAGS="-B$with_binutils/ $CFLAGS" fi - STAGE1_CFLAGS="-O2" - GRUB_CFLAGS="-O2" + STAGE1_CFLAGS="-O2 -fno-strict-aliasing" + GRUB_CFLAGS="-O2 -fno-strict-aliasing" AC_CACHE_CHECK([whether optimization for size works], size_flag, [ saved_CFLAGS=$CFLAGS CFLAGS="-Os -g" @@ -93,9 +93,9 @@ CFLAGS=$saved_CFLAGS ]) if test "x$size_flag" = xyes; then - STAGE2_CFLAGS="-Os" + STAGE2_CFLAGS="-Os -fno-strict-aliasing" else - STAGE2_CFLAGS="-O2 -fno-strength-reduce -fno-unroll-loops" + STAGE2_CFLAGS="-O2 -fno-strength-reduce -fno-unroll-loops -fno-strict-aliasing" fi # OpenBSD has a GCC extension for protecting applications from # stack smashing attacks, but GRUB doesn't want this feature. --- grub-0.97.orig/docs/grub.8 +++ grub-0.97/docs/grub.8 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23. -.TH GRUB "8" "May 2005" "grub (GNU GRUB 0.97)" FSF +.TH GRUB "8" "January 2008" "grub (GNU GRUB 0.97)" FSF .SH NAME grub \- the grub shell .SH SYNOPSIS @@ -58,9 +58,14 @@ .SH "REPORTING BUGS" Report bugs to . .SH "SEE ALSO" +.BR update-grub (8), +.BR grub-install (8). +.PP The full documentation for .B grub -is maintained as a Texinfo manual. If the +is maintained as a Texinfo manual in the +.B grub-doc +package. If the .B info and .B grub --- grub-0.97.orig/docs/mbchk.1 +++ grub-0.97/docs/mbchk.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23. -.TH MBCHK "1" "May 2005" "mbchk (GNU GRUB 0.97)" FSF +.TH MBCHK "1" "January 2008" "mbchk (GNU GRUB 0.97)" FSF .SH NAME mbchk \- check the format of a Multiboot kernel .SH SYNOPSIS @@ -16,7 +16,9 @@ .SH "SEE ALSO" The full documentation for .B mbchk -is maintained as a Texinfo manual. If the +is maintained as a Texinfo manual in the +.B grub-doc +package. If the .B info and .B mbchk --- grub-0.97.orig/docs/grub-install.8 +++ grub-0.97/docs/grub-install.8 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23. -.TH GRUB-INSTALL "8" "May 2005" "grub-install (GNU GRUB 0.97)" FSF +.TH GRUB-INSTALL "8" "January 2008" "grub-install (GNU GRUB 0.97)" FSF .SH NAME grub-install \- install GRUB on your drive .SH SYNOPSIS @@ -39,9 +39,14 @@ .SH "REPORTING BUGS" Report bugs to . .SH "SEE ALSO" +.BR grub (8), +.BR update-grub (8). +.PP The full documentation for .B grub-install -is maintained as a Texinfo manual. If the +is maintained as a Texinfo manual in the +.B grub-doc +package. If the .B info and .B grub-install --- grub-0.97.orig/docs/grub-md5-crypt.8 +++ grub-0.97/docs/grub-md5-crypt.8 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23. -.TH GRUB-MD5-CRYPT "8" "May 2005" "grub-md5-crypt (GNU GRUB )" FSF +.TH GRUB-MD5-CRYPT "8" "January 2008" "grub-md5-crypt (GNU GRUB )" FSF .SH NAME grub-md5-crypt \- Encrypt a password in MD5 format .SH SYNOPSIS @@ -21,7 +21,9 @@ .SH "SEE ALSO" The full documentation for .B grub-md5-crypt -is maintained as a Texinfo manual. If the +is maintained as a Texinfo manual in the +.B grub-doc +package. If the .B info and .B grub-md5-crypt --- grub-0.97.orig/debian/po/it.po +++ grub-0.97/debian/po/it.po @@ -0,0 +1,81 @@ +# translation of ucf_1.18_templates.po to italian +# Copyright Luca Bruno , 2005. +msgid "" +msgstr "" +"Project-Id-Version: ucf_1.18_templates\n" +"Report-Msgid-Bugs-To: Source: grub@packages.debian.org\n" +"POT-Creation-Date: 2008-01-28 08:38-0800\n" +"PO-Revision-Date: 2007-09-19 01:10-0500\n" +"Last-Translator: Luca Bruno \n" +"Language-Team: Italian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "install the package maintainer's version" +msgstr "installare la versione del manutentore del pacchetto" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "keep the local version currently installed" +msgstr "mantenere la propria versione attualmente installata" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show the differences between the versions" +msgstr "mostrare le differenze tra le versioni" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a side-by-side difference between the versions" +msgstr "mostrare le differenze tra le versioni" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a 3-way difference between available versions" +msgstr "Mostrare le differenze tra 3 versioni del file disponibili" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "do a 3-way merge between available versions (experimental)" +msgstr "" +"Integrare le differenze tra 3 versioni del file disponibili [Molto " +"sperimentale]" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "start a new shell to examine the situation" +msgstr "eseguire una nuova shell per esaminare la situazione" + +#. Type: select +#. Description +#: ../grub.templates:1002 +msgid "What would you like to do about ${BASENAME}?" +msgstr "Cosa si vuol fare di ${BASENAME}?" + +#. Type: select +#. Description +#: ../grub.templates:1002 +#, fuzzy +msgid "" +"A new version of /boot/grub/menu.lst is available, but the version installed " +"currently has been locally modified." +msgstr "" +"Una nuova versione del file /boot/grub/menu.lst è disponibile, ma la propria " +"versione è stata modificata localmente." --- grub-0.97.orig/debian/po/gl.po +++ grub-0.97/debian/po/gl.po @@ -0,0 +1,80 @@ +# Galician translation of ucf's debconf templates. +# This file is distributed under the same license as the ucf package. +# Jacobo Tarrio , 2006, 2007. +# +msgid "" +msgstr "" +"Project-Id-Version: ucf\n" +"Report-Msgid-Bugs-To: Source: grub@packages.debian.org\n" +"POT-Creation-Date: 2008-01-28 08:38-0800\n" +"PO-Revision-Date: 2007-06-20 15:50+0200\n" +"Last-Translator: Jacobo Tarrio \n" +"Language-Team: Galician \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "install the package maintainer's version" +msgstr "instalar a versión do mantedor de paquetes" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "keep the local version currently installed" +msgstr "conservar a versión local instalada actualmente" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show the differences between the versions" +msgstr "amosar as diferencias entre as versións" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a side-by-side difference between the versions" +msgstr "amosar unha comparación entre as versións" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a 3-way difference between available versions" +msgstr "amosar unha diferencia a tres entre as versións dispoñibles" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "do a 3-way merge between available versions (experimental)" +msgstr "mesturar as versións dispoñibles (experimental)" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "start a new shell to examine the situation" +msgstr "iniciar un intérprete de ordes para examinar a situación" + +#. Type: select +#. Description +#: ../grub.templates:1002 +msgid "What would you like to do about ${BASENAME}?" +msgstr "¿Que quere facer con ${BASENAME}?" + +#. Type: select +#. Description +#: ../grub.templates:1002 +msgid "" +"A new version of /boot/grub/menu.lst is available, but the version installed " +"currently has been locally modified." +msgstr "" +"Hai dispoñible unha nova versión do ficheiro /boot/grub/menu.lst, pero a " +"versión actualmente instalada ten modificacións locais." --- grub-0.97.orig/debian/po/POTFILES.in +++ grub-0.97/debian/po/POTFILES.in @@ -0,0 +1 @@ +[type: gettext/rfc822deb] grub.templates --- grub-0.97.orig/debian/po/nl.po +++ grub-0.97/debian/po/nl.po @@ -0,0 +1,95 @@ +# translation of ucf_2.007_templates.po to dutch +# This file is distributed under the same license as the ucf package. +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: ucf_2.007_nl\n" +"Report-Msgid-Bugs-To: Source: grub@packages.debian.org\n" +"POT-Creation-Date: 2008-01-28 08:38-0800\n" +"PO-Revision-Date: 2007-09-19 01:09-0500\n" +"Last-Translator: Kurt De Bree \n" +"Language-Team: Nederlands \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.10.2\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "install the package maintainer's version" +msgstr "installeer de versie van de pakketbeheerder" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "keep the local version currently installed" +msgstr "behoud de reeds geïnstalleerde versie" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show the differences between the versions" +msgstr "toon de verschillen tussen de versies" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a side-by-side difference between the versions" +msgstr "toon de verschillende versies zij-aan-zij" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a 3-way difference between available versions" +msgstr "" +"toon een drievoudig verschil tussen de beschikbare versies van het bestand" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "do a 3-way merge between available versions (experimental)" +msgstr "" +"doe een drievoudige samenvoeging tussen de beschikbare versies van het " +"bestand (Zeer Experimenteel)" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "start a new shell to examine the situation" +msgstr "start een nieuwe shell om de situatie te onderzoeken" + +#. Type: select +#. Description +#: ../grub.templates:1002 +msgid "What would you like to do about ${BASENAME}?" +msgstr "Wat wilt u met ${BASENAME} doen?" + +#. Type: select +#. Description +#: ../grub.templates:1002 +#, fuzzy +msgid "" +"A new version of /boot/grub/menu.lst is available, but the version installed " +"currently has been locally modified." +msgstr "" +"Een nieuwe versie van het bestand /boot/grub/menu.lst is beschikbaar, maar " +"uw versie werd handmatig gewijzigd." --- grub-0.97.orig/debian/po/pl.po +++ grub-0.97/debian/po/pl.po @@ -0,0 +1,100 @@ +# translation of ucf3002.po to Polish +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +# Wojciech Zarba , 2007. +msgid "" +msgstr "" +"Project-Id-Version: ucf3002\n" +"Report-Msgid-Bugs-To: Source: grub@packages.debian.org\n" +"POT-Creation-Date: 2008-01-28 08:38-0800\n" +"PO-Revision-Date: 2007-06-27 17:15+0200\n" +"Last-Translator: Wojciech Zarba \n" +"Language-Team: Polish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-2\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "install the package maintainer's version" +msgstr "zainstalowanie wersji przygotowanej przez opiekuna pakietu" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "keep the local version currently installed" +msgstr "zachowanie lokalnie zainstalowanej wersji" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show the differences between the versions" +msgstr "pokazanie rnic pomidzy wersjami" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a side-by-side difference between the versions" +msgstr "pokazanie rnic - obok siebie - pomidzy wersjami" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a 3-way difference between available versions" +msgstr "pokazanie rnic pomidzy trzema dostpnymi wersjami" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "do a 3-way merge between available versions (experimental)" +msgstr "scalenie zmian pomidzy 3 dostpnymi wersjami (eksperymentalne)" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "start a new shell to examine the situation" +msgstr "uruchomienie powoki w celu zbadania sytuacji" + +#. Type: select +#. Description +#: ../grub.templates:1002 +msgid "What would you like to do about ${BASENAME}?" +msgstr "Prosz wybra akcj do wykonania na pliku ${BASENAME}:" + +#. Type: select +#. Description +#: ../grub.templates:1002 +#, fuzzy +msgid "" +"A new version of /boot/grub/menu.lst is available, but the version installed " +"currently has been locally modified." +msgstr "" +"Dostpna jest nowa wersja pliku /boot/grub/menu.lst, ale obecna wersja " +"zostaa lokalnie zmodyfikowana." + +#~ msgid "Modified configuration file" +#~ msgstr "Zmodyfikowany plik konfiguracyjny" + +#~ msgid "Line by line differences between versions" +#~ msgstr "Rnice linia po linii pomidzy wersjami" --- grub-0.97.orig/debian/po/ca.po +++ grub-0.97/debian/po/ca.po @@ -0,0 +1,80 @@ +# ucf (debconf) translation to Catalan. +# Copyright (C) 2004 Free Software Foundation, Inc. +# Aleix Badia i Bosch , 2004 +# +msgid "" +msgstr "" +"Project-Id-Version: ucf_0.30_templates\n" +"Report-Msgid-Bugs-To: Source: grub@packages.debian.org\n" +"POT-Creation-Date: 2008-01-28 08:38-0800\n" +"PO-Revision-Date: 2007-09-19 01:08-0500\n" +"Last-Translator: Aleix Badia i Bosch \n" +"Language-Team: Catalan \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "install the package maintainer's version" +msgstr "installa la versi del mantenidor del paquet" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "keep the local version currently installed" +msgstr "mantn la versi installada actualment" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show the differences between the versions" +msgstr "mostra les diferncies entre les versions" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a side-by-side difference between the versions" +msgstr "mostra les diferncies entre les versions" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a 3-way difference between available versions" +msgstr "mostra les diferncies entre les versions" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "do a 3-way merge between available versions (experimental)" +msgstr "" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "start a new shell to examine the situation" +msgstr "inicia una nova lnia de comandes per examinar la situaci" + +#. Type: select +#. Description +#: ../grub.templates:1002 +msgid "What would you like to do about ${BASENAME}?" +msgstr "Qu voleu fer respecte el ${BASNAME}?" + +#. Type: select +#. Description +#: ../grub.templates:1002 +msgid "" +"A new version of /boot/grub/menu.lst is available, but the version installed " +"currently has been locally modified." +msgstr "" +"Hi ha una nova versi del fitxer /boot/grub/menu.lst, per la vostra versi " +"s'ha modificat localment." --- grub-0.97.orig/debian/po/templates.pot +++ grub-0.97/debian/po/templates.pot @@ -0,0 +1,80 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: Source: grub@packages.debian.org\n" +"POT-Creation-Date: 2008-01-28 08:38-0800\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "install the package maintainer's version" +msgstr "" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "keep the local version currently installed" +msgstr "" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show the differences between the versions" +msgstr "" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a side-by-side difference between the versions" +msgstr "" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a 3-way difference between available versions" +msgstr "" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "do a 3-way merge between available versions (experimental)" +msgstr "" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "start a new shell to examine the situation" +msgstr "" + +#. Type: select +#. Description +#: ../grub.templates:1002 +msgid "What would you like to do about ${BASENAME}?" +msgstr "" + +#. Type: select +#. Description +#: ../grub.templates:1002 +msgid "" +"A new version of /boot/grub/menu.lst is available, but the version installed " +"currently has been locally modified." +msgstr "" --- grub-0.97.orig/debian/po/eu.po +++ grub-0.97/debian/po/eu.po @@ -0,0 +1,83 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Piarres Beobide , 2007. +# +msgid "" +msgstr "" +"Project-Id-Version: ucf-debconf\n" +"Report-Msgid-Bugs-To: Source: grub@packages.debian.org\n" +"POT-Creation-Date: 2008-01-28 08:38-0800\n" +"PO-Revision-Date: 2007-06-20 13:40+0200\n" +"Last-Translator: Piarres Beobide \n" +"Language-Team: Euskara \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: Pootle 0.11\n" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "install the package maintainer's version" +msgstr "Pakete arduradunaren bertsioa instalatu" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "keep the local version currently installed" +msgstr "mantendu lokalean instalaturiko bertsioa" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show the differences between the versions" +msgstr "bertsioen arteko ezberdintasunak ikusi" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a side-by-side difference between the versions" +msgstr "bertsioen arteko ezberdintasunak aldez-alde ikusi" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a 3-way difference between available versions" +msgstr "bertsioen arteko ezberdintasunak 3 eratara ikusi" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "do a 3-way merge between available versions (experimental)" +msgstr "bertsioen arteko ezberdintasunak 3 eratara batu (esperimentala)" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "start a new shell to examine the situation" +msgstr "shell berri bat hasi egoera aztertzeko" + +#. Type: select +#. Description +#: ../grub.templates:1002 +msgid "What would you like to do about ${BASENAME}?" +msgstr "Zer egitea gustatuko litzaizuke ${BASENAME}-ri buruz?" + +#. Type: select +#. Description +#: ../grub.templates:1002 +#, fuzzy +msgid "" +"A new version of /boot/grub/menu.lst is available, but the version installed " +"currently has been locally modified." +msgstr "" +"/boot/grub/menu.lst fitxategiaren bertsio berri bat dago eskuragarri, baina " +"instalaturik dagoenak lokalean eraldatua izan da." --- grub-0.97.orig/debian/po/pt_BR.po +++ grub-0.97/debian/po/pt_BR.po @@ -0,0 +1,89 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: ucf\n" +"Report-Msgid-Bugs-To: Source: grub@packages.debian.org\n" +"POT-Creation-Date: 2008-01-28 08:38-0800\n" +"PO-Revision-Date: 2007-09-19 01:11-0500\n" +"Last-Translator: André Luís Lopes \n" +"Language-Team: Debian-BR Project \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "install the package maintainer's version" +msgstr "instalar a versão do mantenedor do pacote" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "keep the local version currently installed" +msgstr "manter a versão instalada atualmente" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show the differences between the versions" +msgstr "exibir as diferenças entre as versões" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a side-by-side difference between the versions" +msgstr "exibir as diferenças lado-a-lado entre as versões" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a 3-way difference between available versions" +msgstr "exibir as diferenças entre as três versões disponíveis do arquivo" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "do a 3-way merge between available versions (experimental)" +msgstr "juntar as 3 versões disponíveis do arquivo [Bem Experimental]" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "start a new shell to examine the situation" +msgstr "iniciar um novo shell e examinar a situação" + +#. Type: select +#. Description +#: ../grub.templates:1002 +msgid "What would you like to do about ${BASENAME}?" +msgstr "O que você gostaria de fazer em relação a ${BASENAME}?" + +#. Type: select +#. Description +#: ../grub.templates:1002 +msgid "" +"A new version of /boot/grub/menu.lst is available, but the version installed " +"currently has been locally modified." +msgstr "" +"Uma nova versão do arquivo /boot/grub/menu.lst está disponível, mas sua " +"versão local foi modificada." --- grub-0.97.orig/debian/po/da.po +++ grub-0.97/debian/po/da.po @@ -0,0 +1,86 @@ +# SOME DESCRIPTIVE TITLE. +# This file is distributed under the same license as the PACKAGE package. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER. +# +# Claus Hindsgaul , 2005. +# Claus Hindsgaul , 2007. +msgid "" +msgstr "" +"Project-Id-Version: ucf debconf template\n" +"Report-Msgid-Bugs-To: Source: grub@packages.debian.org\n" +"POT-Creation-Date: 2008-01-28 08:38-0800\n" +"PO-Revision-Date: 2007-09-19 01:09-0500\n" +"Last-Translator: Claus Hindsgaul \n" +"Language-Team: Danish\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-1\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "install the package maintainer's version" +msgstr "installr pakkevedligeholderens udgave" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "keep the local version currently installed" +msgstr "bevar din aktuelt-installerede udgave" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show the differences between the versions" +msgstr "vis forskellene mellem udgaverne" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a side-by-side difference between the versions" +msgstr "vis forskellene mellem versionerne overfor hinanden" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a 3-way difference between available versions" +msgstr "vis 3-vejs forskelle mellem de tilgngelige udgaver af filen" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "do a 3-way merge between available versions (experimental)" +msgstr "" +"udfr en 3-vejs fletning mellem de tilgngelige udgaver af filen [Meget " +"eksperimentelt]" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "start a new shell to examine the situation" +msgstr "start en ny skal for at undersge situationen" + +#. Type: select +#. Description +#: ../grub.templates:1002 +msgid "What would you like to do about ${BASENAME}?" +msgstr "Hvad vil du gre med ${BASENAME}?" + +#. Type: select +#. Description +#: ../grub.templates:1002 +#, fuzzy +msgid "" +"A new version of /boot/grub/menu.lst is available, but the version installed " +"currently has been locally modified." +msgstr "" +"Der er kommet en ny version af filen /boot/grub/menu.lst, men din version er " +"blevet ndret lokalt." --- grub-0.97.orig/debian/po/fr.po +++ grub-0.97/debian/po/fr.po @@ -0,0 +1,78 @@ +# +msgid "" +msgstr "" +"Project-Id-Version: fr\n" +"Report-Msgid-Bugs-To: Source: grub@packages.debian.org\n" +"POT-Creation-Date: 2008-01-28 08:38-0800\n" +"PO-Revision-Date: 2007-06-19 09:36+0200\n" +"Last-Translator: Eric Madesclair \n" +"Language-Team: French \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "install the package maintainer's version" +msgstr "Installer la version du responsable du paquet" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "keep the local version currently installed" +msgstr "Garder la version actuellement installée" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show the differences between the versions" +msgstr "Montrer les différences entre les versions" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a side-by-side difference between the versions" +msgstr "Montrer côte à côte les différences entre les versions" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a 3-way difference between available versions" +msgstr "Montrer les différences entre les trois versions du fichier" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "do a 3-way merge between available versions (experimental)" +msgstr "Fusionner les trois versions disponibles du fichier (expérimental)" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "start a new shell to examine the situation" +msgstr "Lancer un shell pour examiner la situation" + +#. Type: select +#. Description +#: ../grub.templates:1002 +msgid "What would you like to do about ${BASENAME}?" +msgstr "Action souhaitée pour ${BASENAME} :" + +#. Type: select +#. Description +#: ../grub.templates:1002 +msgid "" +"A new version of /boot/grub/menu.lst is available, but the version installed " +"currently has been locally modified." +msgstr "" +"Une nouvelle version du fichier /boot/grub/menu.lst est disponible mais la " +"version actuellement utilisée a été modifiée localement." --- grub-0.97.orig/debian/po/de.po +++ grub-0.97/debian/po/de.po @@ -0,0 +1,92 @@ +# translation of ucf_3.002_de.po to German +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans# +# Developers do not need to manually edit POT or PO files. +# +# Erik Schanze , 2004-2007. +msgid "" +msgstr "" +"Project-Id-Version: ucf_3.002_de\n" +"Report-Msgid-Bugs-To: Source: grub@packages.debian.org\n" +"POT-Creation-Date: 2008-01-28 08:38-0800\n" +"PO-Revision-Date: 2007-07-01 22:08+0200\n" +"Last-Translator: Erik Schanze \n" +"Language-Team: German \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "install the package maintainer's version" +msgstr "Version des Paket-Betreuers installieren" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "keep the local version currently installed" +msgstr "aktuell installierte Version behalten" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show the differences between the versions" +msgstr "Unterschiede zwischen den Versionen anzeigen" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a side-by-side difference between the versions" +msgstr "Unterschiede zwischen den Versionen nebeneinander anzeigen" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a 3-way difference between available versions" +msgstr "3-Wege-Differenz der verfügbaren Versionen der Datei anzeigen" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "do a 3-way merge between available versions (experimental)" +msgstr "3-Wege-Vereinigung verfügbarer Versionen [experimentell]" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "start a new shell to examine the situation" +msgstr "die Angelegenheit in einer neu gestarteten Shell untersuchen" + +#. Type: select +#. Description +#: ../grub.templates:1002 +msgid "What would you like to do about ${BASENAME}?" +msgstr "Wie wollen Sie mit ${BASENAME} verfahren?" + +#. Type: select +#. Description +#: ../grub.templates:1002 +#, fuzzy +msgid "" +"A new version of /boot/grub/menu.lst is available, but the version installed " +"currently has been locally modified." +msgstr "" +"Eine neue Version der Datei /boot/grub/menu.lst ist verfügbar, aber die " +"installierte Version wurde verändert." --- grub-0.97.orig/debian/po/es.po +++ grub-0.97/debian/po/es.po @@ -0,0 +1,105 @@ +# ucf translation to spanish +# Copyright (C) 2004-2007 Software in the Public Interest +# This file is distributed under the same license as the ucf package. +# +# Changes: +# - Initial translation +# Lucas Wall , 2004 +# - Updated +# Javier Fernandez-Sanguino , 2007 +# +# +# Traductores, si no conoce el formato PO, merece la pena leer la +# documentacin de gettext, especialmente las secciones dedicadas a este +# formato, por ejemplo ejecutando: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Equipo de traduccin al espaol, por favor lean antes de traducir +# los siguientes documentos: +# +# - El proyecto de traduccin de Debian al espaol +# http://www.debian.org/intl/spanish/coordinacion +# especialmente las notas de traduccin en +# http://www.debian.org/intl/spanish/notas +# +# - La gua de traduccin de po's de debconf: +# /usr/share/doc/po-debconf/README-trans +# o http://www.debian.org/intl/l10n/po-debconf/README-trans +# +msgid "" +msgstr "" +"Project-Id-Version: ucf 1.06\n" +"Report-Msgid-Bugs-To: Source: grub@packages.debian.org\n" +"POT-Creation-Date: 2008-01-28 08:38-0800\n" +"PO-Revision-Date: 2007-06-21 13:41+0200\n" +"Last-Translator: Javier Fernandez-Sanguino \n" +"Language-Team: Debian Spanish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ISO-8859-15\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "install the package maintainer's version" +msgstr "instalar la versin del responsable del paquete" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "keep the local version currently installed" +msgstr "conservar la versin local actualmente instalada" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show the differences between the versions" +msgstr "mostrar las diferencias entre las versiones" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a side-by-side difference between the versions" +msgstr "mostrar las diferencias entre las versiones lado a lado" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a 3-way difference between available versions" +msgstr "mostrar las diferencias entre las tres versiones" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "do a 3-way merge between available versions (experimental)" +msgstr "fusionar las tres versiones disponibles (experimental)" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "start a new shell to examine the situation" +msgstr "ejecutar un nuevo intrprete para examinar la situacin" + +#. Type: select +#. Description +#: ../grub.templates:1002 +msgid "What would you like to do about ${BASENAME}?" +msgstr "Qu desea hacer con ${BASENAME}?" + +#. Type: select +#. Description +#: ../grub.templates:1002 +msgid "" +"A new version of /boot/grub/menu.lst is available, but the version installed " +"currently has been locally modified." +msgstr "" +"Hay una nueva versin del fichero /boot/grub/menu.lst, pero la versin que " +"est instalada ha sido modificada localmente." --- grub-0.97.orig/debian/po/fi.po +++ grub-0.97/debian/po/fi.po @@ -0,0 +1,79 @@ +msgid "" +msgstr "" +"Project-Id-Version: ucf_3.003\n" +"Report-Msgid-Bugs-To: Source: grub@packages.debian.org\n" +"POT-Creation-Date: 2008-01-28 08:38-0800\n" +"PO-Revision-Date: 2007-10-30 18:42+0200\n" +"Last-Translator: Esko Arajärvi \n" +"Language-Team: Finnish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-Language: Finnish\n" +"X-Poedit-Country: FINLAND\n" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "install the package maintainer's version" +msgstr "asenna paketin ylläpitäjän versio" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "keep the local version currently installed" +msgstr "säilytä tällä hetkellä asennettu paikallinen versio" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show the differences between the versions" +msgstr "näytä versioiden väliset erot" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a side-by-side difference between the versions" +msgstr "näytä versioiden väliset erot rinnakkain" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a 3-way difference between available versions" +msgstr "näytä versioiden välinen kolmisuuntainen erotus" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "do a 3-way merge between available versions (experimental)" +msgstr "tee kolmisuuntainen versioiden yhdistys (kokeellinen)" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "start a new shell to examine the situation" +msgstr "käynnistä uusi kuori tilanteen tutkimiseksi" + +#. Type: select +#. Description +#: ../grub.templates:1002 +msgid "What would you like to do about ${BASENAME}?" +msgstr "Miten käsitellään ${BASENAME}?" + +#. Type: select +#. Description +#: ../grub.templates:1002 +#, fuzzy +msgid "" +"A new version of /boot/grub/menu.lst is available, but the version installed " +"currently has been locally modified." +msgstr "" +"Asetustiedostosta /boot/grub/menu.lst on tarjolla uusi versio, mutta " +"nykyistä versiota on muokattu paikallisesti." --- grub-0.97.orig/debian/po/cs.po +++ grub-0.97/debian/po/cs.po @@ -0,0 +1,89 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: ucf\n" +"Report-Msgid-Bugs-To: Source: grub@packages.debian.org\n" +"POT-Creation-Date: 2008-01-28 08:38-0800\n" +"PO-Revision-Date: 2007-06-23 14:31+0200\n" +"Last-Translator: Miroslav kure \n" +"Language-Team: Czech \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "install the package maintainer's version" +msgstr "instalovat verzi od správce balíku" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "keep the local version currently installed" +msgstr "ponechat aktuálně instalovanou lokální verzi" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show the differences between the versions" +msgstr "zobrazit rozdíly mezi verzemi" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a side-by-side difference between the versions" +msgstr "zobrazit rozdíly mezi verzemi vedle sebe" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a 3-way difference between available versions" +msgstr "zobrazit třícestný rozdíl mezi dostupnými verzemi" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "do a 3-way merge between available versions (experimental)" +msgstr "provést třícestné sloučení dostupných verzí (experimentální)" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "start a new shell to examine the situation" +msgstr "spustit nový shell a prozkoumat situaci" + +#. Type: select +#. Description +#: ../grub.templates:1002 +msgid "What would you like to do about ${BASENAME}?" +msgstr "Co chcete udělat s ${BASENAME}?" + +#. Type: select +#. Description +#: ../grub.templates:1002 +msgid "" +"A new version of /boot/grub/menu.lst is available, but the version installed " +"currently has been locally modified." +msgstr "" +"K dispozici je novější verze souboru /boot/grub/menu.lst, avšak " +"nainstalovaná verze obsahuje lokální úpravy." --- grub-0.97.orig/debian/po/pt.po +++ grub-0.97/debian/po/pt.po @@ -0,0 +1,82 @@ +# Portuguese translation of ucf's debconf messages. +# 2007, Pedro Ribeiro +# Bruno Queiros , 2007. +# +msgid "" +msgstr "" +"Project-Id-Version: ucf 2.0020\n" +"Report-Msgid-Bugs-To: Source: grub@packages.debian.org\n" +"POT-Creation-Date: 2008-01-28 08:38-0800\n" +"PO-Revision-Date: 2007-09-19 01:09-0500\n" +"Last-Translator: Bruno Queiros \n" +"Language-Team: Portuguese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "install the package maintainer's version" +msgstr "instalar a versão do criador do pacote" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "keep the local version currently installed" +msgstr "manter a versão actualmente instalada" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show the differences between the versions" +msgstr "mostrar a diferença entre as versões" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a side-by-side difference between the versions" +msgstr "mostrar uma diferença lado-a-lado entre as versões" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a 3-way difference between available versions" +msgstr "mostrar uma diferença em 3 vias entre versões disponíveis do ficheiro" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "do a 3-way merge between available versions (experimental)" +msgstr "" +"fazer uma junção em 3 vias entre versões disponíveis do ficheiro [Muito " +"Experimental]" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "start a new shell to examine the situation" +msgstr "iniciar uma nova consola para examinar a situação" + +#. Type: select +#. Description +#: ../grub.templates:1002 +msgid "What would you like to do about ${BASENAME}?" +msgstr "O que quer fazer acerca de ${BASENAME}?" + +#. Type: select +#. Description +#: ../grub.templates:1002 +msgid "" +"A new version of /boot/grub/menu.lst is available, but the version installed " +"currently has been locally modified." +msgstr "" +"Uma nova versão do ficheiro /boot/grub/menu.lst está disponível, mas a sua " +"versão foi modificada localmente." --- grub-0.97.orig/debian/po/sv.po +++ grub-0.97/debian/po/sv.po @@ -0,0 +1,82 @@ +# Swedish translation for ucf. +# Copyright (C) 2007 Free Software Foundation, Inc. +# This file is distributed under the same license as the ucf package. +# Daniel Nylander , 2007. +# +msgid "" +msgstr "" +"Project-Id-Version: ucf 2.002\n" +"Report-Msgid-Bugs-To: Source: grub@packages.debian.org\n" +"POT-Creation-Date: 2008-01-28 08:38-0800\n" +"PO-Revision-Date: 2007-06-25 10:07+0100\n" +"Last-Translator: Daniel Nylander \n" +"Language-Team: Swedish \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "install the package maintainer's version" +msgstr "installera paketansvariges version" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "keep the local version currently installed" +msgstr "behåll den lokalt installerade version" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show the differences between the versions" +msgstr "visa skillnaderna mellan versionerna" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a side-by-side difference between the versions" +msgstr "visa skillnaderna sida vid sida mellan versionerna" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a 3-way difference between available versions" +msgstr "visa en 3-vägs skillnad mellan tillgängliga versioner" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "do a 3-way merge between available versions (experimental)" +msgstr "gör en 3-vägs sammanslagning mellan versionerna (experimentell)" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "start a new shell to examine the situation" +msgstr "starta ett nytt skal för att undersöka situationen" + +#. Type: select +#. Description +#: ../grub.templates:1002 +msgid "What would you like to do about ${BASENAME}?" +msgstr "Vad vill du göra med ${BASENAME}?" + +#. Type: select +#. Description +#: ../grub.templates:1002 +#, fuzzy +msgid "" +"A new version of /boot/grub/menu.lst is available, but the version installed " +"currently has been locally modified." +msgstr "" +"En ny version av filen /boot/grub/menu.lst finns tillgänglig, men versionen " +"som är installerad har ändrats lokalt." --- grub-0.97.orig/debian/po/ja.po +++ grub-0.97/debian/po/ja.po @@ -0,0 +1,90 @@ +# +# Translators, if you are not familiar with the PO format, gettext +# documentation is worth reading, especially sections dedicated to +# this format, e.g. by running: +# info -n '(gettext)PO Files' +# info -n '(gettext)Header Entry' +# +# Some information specific to po-debconf are available at +# /usr/share/doc/po-debconf/README-trans +# or http://www.debian.org/intl/l10n/po-debconf/README-trans +# +# Developers do not need to manually edit POT or PO files. +# +msgid "" +msgstr "" +"Project-Id-Version: ucf\n" +"Report-Msgid-Bugs-To: Source: grub@packages.debian.org\n" +"POT-Creation-Date: 2008-01-28 08:38-0800\n" +"PO-Revision-Date: 2007-06-21 14:11+0900\n" +"Last-Translator: Kenshi Muto \n" +"Language-Team: Japanese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "install the package maintainer's version" +msgstr "パッケージメンテナのバージョンをインストール" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "keep the local version currently installed" +msgstr "現在インストールされているローカルバージョンを保持" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show the differences between the versions" +msgstr "バージョン間の差異を表示" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a side-by-side difference between the versions" +msgstr "バージョン間の差異を並行表示" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a 3-way difference between available versions" +msgstr "利用可能なバージョン間の3種類の差異を表示" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "do a 3-way merge between available versions (experimental)" +msgstr "利用可能なバージョン間での3種類マージを行う (実験的)" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "start a new shell to examine the situation" +msgstr "状況を検討するための新しいシェルを起動" + +#. Type: select +#. Description +#: ../grub.templates:1002 +msgid "What would you like to do about ${BASENAME}?" +msgstr "${BASENAME} について何を行いたいですか?" + +#. Type: select +#. Description +#: ../grub.templates:1002 +#, fuzzy +msgid "" +"A new version of /boot/grub/menu.lst is available, but the version installed " +"currently has been locally modified." +msgstr "" +"設定ファイル /boot/grub/menu.lst の新しいバージョンが利用可能ですが、現在イン" +"ストールされているバージョンは、ローカルで変更されています。" --- grub-0.97.orig/debian/po/vi.po +++ grub-0.97/debian/po/vi.po @@ -0,0 +1,91 @@ +# Vietnamese translation for UCF. +# Copyright © 2007 Free Software Foundation, Inc. +# Clytie Siddall , 2005-2007. +# +msgid "" +msgstr "" +"Project-Id-Version: ucf 3.002\n" +"Report-Msgid-Bugs-To: Source: grub@packages.debian.org\n" +"POT-Creation-Date: 2008-01-28 08:38-0800\n" +"PO-Revision-Date: 2007-06-21 17:52+0930\n" +"Last-Translator: Clytie Siddall \n" +"Language-Team: Vietnamese \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=utf-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: LocFactoryEditor 1.6.4a1\n" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "install the package maintainer's version" +msgstr "cài đặt phiên bản của nhà duy trì gói" + +# msgid "keep your currently-installed version" +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "keep the local version currently installed" +msgstr "giữ phiên bản cục bộ đã cài đặt hiện thời" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show the differences between the versions" +msgstr "hiển thị khác biệt giữa những phiên bản" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a side-by-side difference between the versions" +msgstr "hiển thị khác biệt cạnh nhau giữa những phiên bản" + +# msgid "show a 3 way difference between available versions of the file" +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a 3-way difference between available versions" +msgstr "hiển thị khác biệt ba hướng giữa những phiên bản sẵn sàng" + +# msgid "" +# do a 3 way merge between available versions of the file [Very +# Experimental] +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "do a 3-way merge between available versions (experimental)" +msgstr "trộn ba hướng những phiên bản sẵn sàng (thực nghiệm)" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "start a new shell to examine the situation" +msgstr "khởi chạy trình bao mới để khám xét trường hợp" + +#. Type: select +#. Description +#: ../grub.templates:1002 +msgid "What would you like to do about ${BASENAME}?" +msgstr "Đối với ${BASENAME}? muốn làm gì vậy?" + +# msgid "" +# A new version of configuration file ${FILE} is available, but your +# version has been locally modified. +#. Type: select +#. Description +#: ../grub.templates:1002 +#, fuzzy +msgid "" +"A new version of /boot/grub/menu.lst is available, but the version installed " +"currently has been locally modified." +msgstr "" +"Có sẵn một phiên bản mới của tập tin cấu hình /boot/grub/menu.lst, nhưng " +"phiên bản được cài đặt hiện thời đã bị sửa đổi cục bộ." --- grub-0.97.orig/debian/po/ru.po +++ grub-0.97/debian/po/ru.po @@ -0,0 +1,85 @@ +# translation of ru.po to Russian +# This file is distributed under the same license as the PACKAGE package. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER. +# +# Yuri Kozlov , 2006, 2007. +msgid "" +msgstr "" +"Project-Id-Version: 3.001\n" +"Report-Msgid-Bugs-To: Source: grub@packages.debian.org\n" +"POT-Creation-Date: 2008-01-28 08:38-0800\n" +"PO-Revision-Date: 2007-07-01 13:45+0400\n" +"Last-Translator: Yuri Kozlov \n" +"Language-Team: Russian \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Generator: KBabel 1.11.4\n" +"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%" +"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "install the package maintainer's version" +msgstr "установить версию из пакета" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "keep the local version currently installed" +msgstr "сохранить установленную локальную версию" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show the differences between the versions" +msgstr "показать различия между версиями" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a side-by-side difference between the versions" +msgstr "показать различия между версиями параллельно" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "show a 3-way difference between available versions" +msgstr "показать различия сразу между 3-мя доступными версиями" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "do a 3-way merge between available versions (experimental)" +msgstr "выполнить слияние 3-х доступных версий [экспериментальный режим]" + +#. Type: select +#. Choices +#. Translators, please keep translations *short* (less than 65 columns) +#: ../grub.templates:1001 +msgid "start a new shell to examine the situation" +msgstr "запустить новую оболочку командной строки для прояснения ситуации" + +#. Type: select +#. Description +#: ../grub.templates:1002 +msgid "What would you like to do about ${BASENAME}?" +msgstr "Что нужно сделать с ${BASENAME}?" + +#. Type: select +#. Description +#: ../grub.templates:1002 +#, fuzzy +msgid "" +"A new version of /boot/grub/menu.lst is available, but the version installed " +"currently has been locally modified." +msgstr "" +"Доступна новая версия файла /boot/grub/menu.lst, но версия файла, " +"находящегося в системе, была изменёна локально." --- grub-0.97.orig/debian/patches/print_func.diff +++ grub-0.97/debian/patches/print_func.diff @@ -0,0 +1,80 @@ +2006-01-05 Otavio Salvador + + * Rediff. + +2005-16-10 Samuel Thibault + + * docs/grub.texi: Added print command description. + * stage2/builtins.c(print_func): New function. + (builtin_print): New variable. + (builtin_table): Added builtin_print in table. + +Debian Status Following: + Added by: Otavio Salvador + Date: 2006-01-05 + +diff -Nur grub-0.97-bkp/docs/grub.texi grub-0.97/docs/grub.texi +--- grub-0.97-bkp/docs/grub.texi 2006-01-05 10:59:05.564347912 -0200 ++++ grub-0.97/docs/grub.texi 2006-01-05 11:18:59.033912960 -0200 +@@ -2685,6 +2685,7 @@ + * module:: Load a module + * modulenounzip:: Load a module without decompression + * pause:: Wait for a key press ++* print:: Print a message + * quit:: Exit from the grub shell + * reboot:: Reboot your computer + * read:: Read data from memory +@@ -3091,6 +3092,16 @@ + @end deffn + + ++@node print ++@subsection print ++ ++@deffn Command print message @dots{} ++Print the @var{message}. Note that placing @key{^G} (ASCII code 7) in the ++message will cause the speaker to emit the standard beep sound, which is ++useful for visually impaired people. ++@end deffn ++ ++ + @node quit + @subsection quit + +diff -Nur grub-0.97-bkp/stage2/builtins.c grub-0.97/stage2/builtins.c +--- grub-0.97-bkp/stage2/builtins.c 2006-01-05 10:59:05.550350040 -0200 ++++ grub-0.97/stage2/builtins.c 2006-01-05 11:19:28.422445224 -0200 +@@ -2323,6 +2323,25 @@ + "Probe I/O ports used for the drive DRIVE." + }; + ++/* print */ ++static int ++print_func (char *arg, int flags) ++{ ++ printf("%s\n", arg); ++ ++ return 0; ++} ++ ++static struct builtin builtin_print = ++{ ++ "print", ++ print_func, ++ BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_NO_ECHO, ++ "print [MESSAGE ...]", ++ "Print MESSAGE." ++}; ++ ++ + + /* kernel */ + static int +@@ -4848,6 +4867,7 @@ + &builtin_parttype, + &builtin_password, + &builtin_pause, ++ &builtin_print, + #ifdef GRUB_UTIL + &builtin_quit, + #endif /* GRUB_UTIL */ --- grub-0.97.orig/debian/patches/2gb_limit.diff +++ grub-0.97/debian/patches/2gb_limit.diff @@ -0,0 +1,47 @@ + + Author: Goswin Brederlow + Status: pending + Updated by: Otavio Salvador - resync with 0.97 code + +diff -r 190816689333 stage2/char_io.c +--- a/stage2/char_io.c Sat Nov 5 15:00:55 2005 ++++ b/stage2/char_io.c Sat Nov 5 13:09:55 2005 +@@ -1175,13 +1175,13 @@ + #endif /* ! STAGE1_5 */ + + int +-memcheck (int addr, int len) ++memcheck (unsigned long int addr, unsigned long int len) + { + #ifdef GRUB_UTIL +- auto int start_addr (void); +- auto int end_addr (void); ++ auto unsigned long int start_addr (void); ++ auto int unsigned long end_addr (void); + +- auto int start_addr (void) ++ auto unsigned long int start_addr (void) + { + int ret; + # if defined(HAVE_START_SYMBOL) +@@ -1192,7 +1192,7 @@ + return ret; + } + +- auto int end_addr (void) ++ auto unsigned long int end_addr (void) + { + int ret; + # if defined(HAVE_END_SYMBOL) +diff -r 190816689333 stage2/shared.h +--- a/stage2/shared.h Sat Nov 5 15:00:55 2005 ++++ b/stage2/shared.h Sat Nov 5 13:09:55 2005 +@@ -911,7 +911,7 @@ + int nul_terminate (char *str); + int get_based_digit (int c, int base); + int safe_parse_maxint (char **str_ptr, int *myint_ptr); +-int memcheck (int start, int len); ++int memcheck (unsigned long int start, unsigned long int len); + void grub_putstr (const char *str); + + #ifndef NO_DECOMPRESSION --- grub-0.97.orig/debian/patches/mprotect.diff +++ grub-0.97/debian/patches/mprotect.diff @@ -0,0 +1,38 @@ +--- grub-0.95+cvs20040624.orig/grub/asmstub.c ++++ grub-0.95+cvs20040624/grub/asmstub.c +@@ -42,6 +42,12 @@ + #include + #include + #include ++#include ++ ++#include ++#ifndef PAGESIZE ++#define PAGESIZE 4096 ++#endif + + #ifdef __linux__ + # include /* ioctl */ +@@ -142,6 +148,22 @@ + assert (grub_scratch_mem == 0); + scratch = malloc (0x100000 + EXTENDED_MEMSIZE + 15); + assert (scratch); ++ ++ { ++ char *p; ++ int ret; ++ ++ /* Align to a multiple of PAGESIZE, assumed to be a power of two. */ ++ p = (char *) (((long) scratch) & ~(PAGESIZE - 1)); ++ ++ /* The simulated stack needs to be executable, since GCC uses stack ++ * trampolines to implement nested functions. ++ */ ++ ret = mprotect (p, 0x100000 + EXTENDED_MEMSIZE + 15, ++ PROT_READ | PROT_WRITE | PROT_EXEC); ++ assert (ret == 0); ++ } ++ + grub_scratch_mem = (char *) ((((int) scratch) >> 4) << 4); + + /* FIXME: simulate the memory holes using mprot, if available. */ --- grub-0.97.orig/debian/patches/varargs.diff +++ grub-0.97/debian/patches/varargs.diff @@ -0,0 +1,310 @@ +diff -Nur grub-0.97/netboot/misc.c grub-0.97.new/netboot/misc.c +--- grub-0.97/netboot/misc.c 2003-07-09 12:45:37.000000000 +0100 ++++ grub-0.97.new/netboot/misc.c 2008-01-24 15:07:01.000000000 +0000 +@@ -71,7 +71,7 @@ + Note: width specification not supported + **************************************************************************/ + static int +-etherboot_vsprintf (char *buf, const char *fmt, const int *dp) ++etherboot_vsprintf (char *buf, const char *fmt, va_list dp) + { + char *p, *s; + +@@ -86,7 +86,7 @@ + + if (*++fmt == 's') + { +- for (p = (char *) *dp++; *p != '\0'; p++) ++ for (p = va_arg (dp, char *); *p != '\0'; p++) + buf ? *s++ = *p : grub_putchar (*p); + } + else +@@ -121,11 +121,9 @@ + if ((*fmt | 0x20) == 'x') + { + /* With x86 gcc, sizeof(long) == sizeof(int) */ +- const long *lp = (const long *) dp; +- long h = *lp++; ++ long h = va_arg (dp, long); + int ncase = (*fmt & 0x20); + +- dp = (const int *) lp; + if (alt) + { + *q++ = '0'; +@@ -136,7 +134,7 @@ + } + else if (*fmt == 'd') + { +- int i = *dp++; ++ int i = va_arg (dp, int); + char *r; + + if (i < 0) +@@ -171,10 +169,7 @@ + unsigned char c[4]; + } + u; +- const long *lp = (const long *) dp; +- +- u.l = *lp++; +- dp = (const int *) lp; ++ u.l = va_arg (dp, long); + + for (r = &u.c[0]; r < &u.c[4]; ++r) + q += etherboot_sprintf (q, "%d.", *r); +@@ -184,7 +179,7 @@ + else if (*fmt == '!') + { + char *r; +- p = (char *) *dp++; ++ p = va_arg (dp, char*); + + for (r = p + ETH_ALEN; p < r; ++p) + q += etherboot_sprintf (q, "%hhX:", *p); +@@ -192,7 +187,7 @@ + --q; + } + else if (*fmt == 'c') +- *q++ = *dp++; ++ *q++ = va_arg (dp, int); + else + *q++ = *fmt; + +@@ -211,13 +206,19 @@ + int + etherboot_sprintf (char *buf, const char *fmt, ...) + { +- return etherboot_vsprintf (buf, fmt, ((const int *) &fmt) + 1); ++ va_list dataptr; ++ va_start (dataptr, fmt); ++ return etherboot_vsprintf (buf, fmt, dataptr); ++ va_end(dataptr); + } + + void + etherboot_printf (const char *fmt, ...) + { +- (void) etherboot_vsprintf (0, fmt, ((const int *) &fmt) + 1); ++ va_list dataptr; ++ va_start (dataptr, fmt); ++ (void) etherboot_vsprintf (0, fmt, dataptr); ++ va_end(dataptr); + } + + int +diff -Nur grub-0.97/stage1/Makefile.am grub-0.97.new/stage1/Makefile.am +--- grub-0.97/stage1/Makefile.am 2004-07-16 12:44:56.000000000 +0100 ++++ grub-0.97.new/stage1/Makefile.am 2008-01-24 15:07:01.000000000 +0000 +@@ -4,7 +4,7 @@ + CLEANFILES = $(nodist_pkglib_DATA) + + # We can't use builtins or standard includes. +-AM_CCASFLAGS = $(STAGE1_CFLAGS) -fno-builtin -nostdinc ++AM_CCASFLAGS = $(STAGE1_CFLAGS) -fno-builtin + LDFLAGS = -nostdlib -Wl,-N,-Ttext,7C00 + + noinst_PROGRAMS = stage1.exec +diff -Nur grub-0.97/stage2/char_io.c grub-0.97.new/stage2/char_io.c +--- grub-0.97/stage2/char_io.c 2008-01-24 15:06:10.000000000 +0000 ++++ grub-0.97.new/stage2/char_io.c 2008-01-24 15:07:01.000000000 +0000 +@@ -20,6 +20,7 @@ + + #include + #include ++#include + + #ifdef SUPPORT_HERCULES + # include +@@ -131,9 +132,9 @@ + } + + char * +-convert_to_ascii (char *buf, int c,...) ++convert_to_ascii (char *buf, int c, unsigned long num) + { +- unsigned long num = *((&c) + 1), mult = 10; ++ unsigned long mult = 10; + char *ptr = buf; + + #ifndef STAGE1_5 +@@ -182,10 +183,10 @@ + void + grub_printf (const char *format,...) + { +- int *dataptr = (int *) &format; ++ va_list dataptr; + char c, str[16]; +- +- dataptr++; ++ ++ va_start(dataptr, format); + + while ((c = *(format++)) != 0) + { +@@ -200,21 +201,22 @@ + case 'X': + #endif + case 'u': +- *convert_to_ascii (str, c, *((unsigned long *) dataptr++)) = 0; ++ *convert_to_ascii (str, c, va_arg(dataptr, unsigned long *)) = 0; + grub_putstr (str); + break; + + #ifndef STAGE1_5 + case 'c': +- grub_putchar ((*(dataptr++)) & 0xff); ++ grub_putchar (va_arg(dataptr, int) & 0xff); + break; + + case 's': +- grub_putstr ((char *) *(dataptr++)); ++ grub_putstr (va_arg(dataptr, char *)); + break; + #endif + } + } ++ va_end(dataptr); + } + + #ifndef STAGE1_5 +@@ -223,11 +225,11 @@ + { + /* XXX hohmuth + ugly hack -- should unify with printf() */ +- int *dataptr = (int *) &format; ++ va_list dataptr; + char c, *ptr, str[16]; + char *bp = buffer; + +- dataptr++; ++ va_start(dataptr, format); + + while ((c = *format++) != 0) + { +@@ -237,7 +239,7 @@ + switch (c = *(format++)) + { + case 'd': case 'u': case 'x': +- *convert_to_ascii (str, c, *((unsigned long *) dataptr++)) = 0; ++ *convert_to_ascii (str, c, va_arg(dataptr, unsigned long *)) = 0; + + ptr = str; + +@@ -245,12 +247,12 @@ + *bp++ = *(ptr++); /* putchar(*(ptr++)); */ + break; + +- case 'c': *bp++ = (*(dataptr++))&0xff; ++ case 'c': *bp++ = (va_arg(dataptr, int) & 0xff); + /* putchar((*(dataptr++))&0xff); */ + break; + + case 's': +- ptr = (char *) (*(dataptr++)); ++ ptr = va_arg(dataptr, char *); + + while ((c = *ptr++) != 0) + *bp++ = c; /* putchar(c); */ +@@ -258,6 +260,7 @@ + } + } + ++ va_end(dataptr); + *bp = 0; + return bp - buffer; + } +diff -Nur grub-0.97/stage2/Makefile.am grub-0.97.new/stage2/Makefile.am +--- grub-0.97/stage2/Makefile.am 2008-01-24 15:06:10.000000000 +0000 ++++ grub-0.97.new/stage2/Makefile.am 2008-01-24 15:07:15.000000000 +0000 +@@ -85,7 +85,7 @@ + GRAPHICS_FLAGS = + endif + +-STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ ++STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-builtin \ + $(NETBOOT_FLAGS) $(SERIAL_FLAGS) $(HERCULES_FLAGS) $(GRAPHICS_FLAGS) + + STAGE1_5_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,2000 +diff -Nur grub-0.97/stage2/shared.h grub-0.97.new/stage2/shared.h +--- grub-0.97/stage2/shared.h 2008-01-24 15:06:10.000000000 +0000 ++++ grub-0.97.new/stage2/shared.h 2008-01-24 15:07:01.000000000 +0000 +@@ -915,7 +915,7 @@ + /* misc */ + void init_page (void); + void print_error (void); +-char *convert_to_ascii (char *buf, int c, ...); ++char *convert_to_ascii (char *buf, int c, unsigned long num); + int get_cmdline (char *prompt, char *cmdline, int maxlen, + int echo_char, int history); + int substring (const char *s1, const char *s2); +diff -Nur grub-0.97/stage2/tparm.c grub-0.97.new/stage2/tparm.c +--- grub-0.97/stage2/tparm.c 2003-07-09 12:45:53.000000000 +0100 ++++ grub-0.97.new/stage2/tparm.c 2008-01-24 15:07:01.000000000 +0000 +@@ -49,6 +49,8 @@ + + #include "tparm.h" + ++#include ++ + /* + * Common/troublesome character definitions + */ +@@ -319,8 +321,8 @@ + #define isUPPER(c) ((c) >= 'A' && (c) <= 'Z') + #define isLOWER(c) ((c) >= 'a' && (c) <= 'z') + +-static inline char * +-tparam_internal(const char *string, int *dataptr) ++char * ++grub_tparm(const char *string,...) + { + #define NUM_VARS 26 + char *p_is_s[9]; +@@ -339,6 +341,7 @@ + static char format[MAX_FORMAT_LEN]; + static int dynamic_var[NUM_VARS]; + static int static_vars[NUM_VARS]; ++ va_list dataptr; + + out_used = 0; + if (string == NULL) +@@ -454,6 +457,7 @@ + + if (number > 9) + number = 9; ++ va_start(dataptr, string); + for (i = 0; i < max(popcount, number); i++) { + /* + * A few caps (such as plab_norm) have string-valued parms. +@@ -461,11 +465,12 @@ + * a char* and an int may not be the same size on the stack. + */ + if (p_is_s[i] != 0) { +- p_is_s[i] = (char *)(*(dataptr++)); ++ p_is_s[i] = va_arg(dataptr, char *); + } else { +- param[i] = (int)(*(dataptr++)); ++ param[i] = va_arg(dataptr, int); + } + } ++ va_end(dataptr); + + /* + * This is a termcap compatibility hack. If there are no explicit pop +@@ -712,15 +717,3 @@ + return (out_buff); + } + +-char * +-grub_tparm(const char *string,...) +-{ +- char *result; +- int *dataptr = (int *) &string; +- +- dataptr++; +- +- result = tparam_internal(string, dataptr); +- +- return result; +-} --- grub-0.97.orig/debian/patches/kfreebsd.diff +++ grub-0.97/debian/patches/kfreebsd.diff @@ -0,0 +1,362 @@ + + Enable kFreeBSD support in GRUB, by Guillem Jover + + Warning: This feature is undocumented because it's highly experimental. + If you don't know how to use it, you better don't! + +diff -ur grub-0.95+cvs20040624.old/stage2/boot.c grub-0.95+cvs20040624/stage2/boot.c +--- grub-0.95+cvs20040624.old/stage2/boot.c 2004-03-29 16:54:30.000000000 +0200 ++++ grub-0.95+cvs20040624/stage2/boot.c 2004-06-26 03:46:45.000000000 +0200 +@@ -29,6 +29,8 @@ + entry_func entry_addr; + static struct mod_list mll[99]; + static int linux_mem_size; ++static int elf_kernel_addr; ++static int elf_kernel_size; + + /* + * The next two functions, 'load_image' and 'load_module', are the building +@@ -594,6 +596,7 @@ + + /* reset this to zero for now */ + cur_addr = 0; ++ elf_kernel_addr = ~0; + + /* scan for program segments */ + for (i = 0; i < pu.elf->e_phnum; i++) +@@ -630,6 +633,8 @@ + /* mark memory as used */ + if (cur_addr < memaddr + memsiz) + cur_addr = memaddr + memsiz; ++ if (elf_kernel_addr > cur_addr) ++ elf_kernel_addr = cur_addr; + printf (", <0x%x:0x%x:0x%x>", memaddr, filesiz, + memsiz - filesiz); + /* increment number of segments */ +@@ -647,6 +652,8 @@ + } + } + ++ elf_kernel_size = cur_addr - elf_kernel_addr; ++ + if (! errnum) + { + if (! loaded) +@@ -864,6 +871,129 @@ + } + #endif + ++#define mem_align4k(p) ((p) + 0xFFF) & 0xFFFFF000 ++ ++static void ++kfreebsd_setenv (char *env, const char *var, const char *value) ++{ ++ while (1) ++ { ++ if (env[0] == '\0' && env[1] == '\0') ++ { ++ env++; ++ break; ++ } ++ else ++ env++; ++ } ++ ++ grub_sprintf (env, "%s=%s", var, value); ++ env[grub_strlen (env) + 1] = '\0'; ++} ++ ++static char * ++kfreebsd_read_hints (char *buf) ++{ ++ char *buf_end = buf; ++ ++ if (grub_open ("/boot/device.hints")) ++ { ++ char *line_start; ++ int line_len = 0; ++ char *envp; ++ int env_len; ++ ++ env_len = grub_read (buf, -1); ++ if (env_len) ++ { ++ buf_end += env_len; ++ *(buf_end++) = '\0'; ++ } ++ else ++ return buf_end; ++ ++ grub_close (); ++ ++ envp = line_start = buf; ++ while (*envp) ++ { ++ char *envp_current = envp; ++ ++ switch (*envp) ++ { ++ case ' ': ++ while (*envp == ' ') ++ { ++ envp++; ++ env_len--; ++ } ++ grub_memmove (envp_current, envp, env_len + 1); ++ envp = envp_current; ++ break; ++ case '#': ++ while (*envp != '\n') ++ { ++ envp++; ++ env_len--; ++ } ++ if (!line_len) ++ envp++; ++ grub_memmove (envp_current, envp, env_len + 1); ++ envp = envp_current; ++ break; ++ case '\n': ++ if (!line_len) ++ { ++ env_len--; ++ grub_memmove (line_start, envp, env_len + 1); ++ } ++ *(envp++) = '\0'; ++ line_len = 0; ++ line_start = envp; ++ default: ++ envp++; ++ line_len++; ++ break; ++ } ++ } ++ ++ buf_end = buf + env_len; ++ *(buf_end++) = '\0'; ++ } ++ ++ return buf_end; ++} ++ ++static u32_t * ++kfreebsd_set_module_string (u32_t type, u32_t *dst, char *src) ++{ ++ int size; ++ ++ *(dst++) = type; ++ *(dst++) = size = grub_strlen (src) + 1; ++ grub_strcpy ((void *) dst, src); ++ ++ return dst + (size + sizeof(u32_t) - 1) / sizeof(u32_t); ++} ++ ++static u32_t * ++kfreebsd_set_module_var (u32_t type, u32_t *dst, u32_t src) ++{ ++ *(dst++) = type; ++ *(dst++) = sizeof(u32_t); ++ *(dst++) = src; ++ ++ return dst; ++} ++ ++static u32_t * ++kfreebsd_set_modules (u32_t *modulep) ++{ ++ /* XXX: Need to copy the whole module structure. */ ++ /* XXX: How to pass the module name ? */ ++ ++ return modulep; ++} + + /* + * All "*_boot" commands depend on the images being loaded into memory +@@ -877,7 +1007,10 @@ + bsd_boot (kernel_t type, int bootdev, char *arg) + { + char *str; +- int clval = 0, i; ++ char *kernelname; ++ char *bsd_root; ++ int clval = 0; ++ int i; + struct bootinfo bi; + + #ifdef GRUB_UTIL +@@ -886,8 +1019,21 @@ + stop_floppy (); + #endif + ++ while (*arg != '/') ++ arg++; ++ kernelname = arg; ++ + while (*(++arg) && *arg != ' '); ++ *(arg++) = 0; + str = arg; ++ ++ bsd_root = grub_strstr (str, "root="); ++ if (bsd_root) ++ { ++ bsd_root += 5; ++ /* XXX: should copy the str or terminate it. */ ++ } ++ + while (*str) + { + if (*str == '-') +@@ -910,6 +1056,8 @@ + clval |= RB_GDB; + if (*str == 'h') + clval |= RB_SERIAL; ++ if (*str == 'p') ++ clval |= RB_PAUSE; + if (*str == 'm') + clval |= RB_MUTE; + if (*str == 'r') +@@ -927,14 +1075,17 @@ + + if (type == KERNEL_TYPE_FREEBSD) + { ++ char *envp; ++ u32_t *modp; ++ + clval |= RB_BOOTINFO; + + bi.bi_version = BOOTINFO_VERSION; + +- *arg = 0; +- while ((--arg) > (char *) MB_CMDLINE_BUF && *arg != '/'); +- if (*arg == '/') +- bi.bi_kernelname = arg + 1; ++ bi.bi_pad[0] = bi.bi_pad[1] = 0; ++ ++ if (*kernelname == '/') ++ bi.bi_kernelname = kernelname; + else + bi.bi_kernelname = 0; + +@@ -961,6 +1112,30 @@ + bi.bi_basemem = mbi.mem_lower; + bi.bi_extmem = extended_memory; + ++ /* Setup the environment. */ ++ bi.bi_envp = cur_addr = mem_align4k (cur_addr); ++ grub_memset ((void *) cur_addr, 0, 2); ++ cur_addr = (int) kfreebsd_read_hints ((void *) cur_addr); ++ ++ envp = (char *) bi.bi_envp; ++ kfreebsd_setenv (envp, "kernelname", kernelname); ++ kfreebsd_setenv (envp, "vfs.root.mountfrom", bsd_root); ++ ++ /* Setup the modules list. */ ++ bi.bi_modulep = cur_addr = mem_align4k (cur_addr); ++ modp = (u32_t *) bi.bi_modulep; ++ /* The first module is the kernel. */ ++ modp = kfreebsd_set_module_string (MODINFO_NAME, modp, kernelname); ++ modp = kfreebsd_set_module_string (MODINFO_TYPE, modp, "elf kernel"); ++ modp = kfreebsd_set_module_string (MODINFO_ARGS, modp, arg); ++ modp = kfreebsd_set_module_var (MODINFO_ADDR, modp, elf_kernel_addr); ++ modp = kfreebsd_set_module_var (MODINFO_SIZE, modp, elf_kernel_size); ++ /* Now the real modules. */ ++ modp = kfreebsd_set_modules(modp); ++ ++ /* Set the kernel end. */ ++ bi.bi_kernend = cur_addr = mem_align4k (((int) modp) + 1); ++ + if (mbi.flags & MB_INFO_AOUT_SYMS) + { + bi.bi_symtab = mbi.syms.a.addr; +@@ -970,8 +1145,9 @@ + #if 0 + else if (mbi.flags & MB_INFO_ELF_SHDR) + { +- /* FIXME: Should check if a symbol table exists and, if exists, +- pass the table to BI. */ ++ bi.bi_symtab = mbi.syms.e.addr; ++ bi.bi_esymtab = mbi.syms.e.addr ++ + mbi.syms.e.size * mbi.syms.e.num * mbi.syms.e.shndx; + } + #endif + else +diff -ur grub-0.95+cvs20040624.old/stage2/freebsd.h grub-0.95+cvs20040624/stage2/freebsd.h +--- grub-0.95+cvs20040624.old/stage2/freebsd.h 2002-11-30 18:33:06.000000000 +0100 ++++ grub-0.95+cvs20040624/stage2/freebsd.h 2004-06-26 03:46:45.000000000 +0200 +@@ -1,7 +1,7 @@ + + /* + * GRUB -- GRand Unified Bootloader +- * Copyright (C) 2001 Free Software Foundation, Inc. ++ * Copyright (C) 2001, 2004 Free Software Foundation, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +@@ -35,6 +35,10 @@ + #define RB_CDROM 0x2000 /* use cdrom as root */ + #define RB_GDB 0x8000 /* use GDB remote debugger instead of DDB */ + #define RB_MUTE 0x10000 /* Come up with the console muted */ ++#define RB_SELFTEST 0x20000 /* don't complete the boot; do selftest */ ++#define RB_RESERVED1 0x40000 /* reserved for internal use of boot blocks */ ++#define RB_RESERVED2 0x80000 /* reserved for internal use of boot blocks */ ++#define RB_PAUSE 0x100000 /* pause after each output line during probe */ + #define RB_MULTIPLE 0x20000000 /* Use multiple consoles */ + + #define RB_BOOTINFO 0x80000000 /* have `struct bootinfo *' arg */ +@@ -70,6 +74,9 @@ + + #define N_BIOS_GEOM 8 + ++typedef unsigned char u8_t; ++typedef unsigned int u32_t; ++ + /* + * A zero bootinfo field often means that there is no info available. + * Flags are used to indicate the validity of fields where zero is a +@@ -77,19 +84,33 @@ + */ + struct bootinfo + { +- unsigned int bi_version; +- unsigned char *bi_kernelname; +- struct nfs_diskless *bi_nfs_diskless; ++ u32_t bi_version; ++ u8_t *bi_kernelname; ++ u32_t bi_nfs_diskless; + /* End of fields that are always present. */ + #define bi_endcommon bi_n_bios_used +- unsigned int bi_n_bios_used; +- unsigned long bi_bios_geom[N_BIOS_GEOM]; +- unsigned int bi_size; +- unsigned char bi_memsizes_valid; +- unsigned char bi_bios_dev; +- unsigned char bi_pad[2]; +- unsigned long bi_basemem; +- unsigned long bi_extmem; +- unsigned long bi_symtab; +- unsigned long bi_esymtab; ++ u32_t bi_n_bios_used; ++ u32_t bi_bios_geom[N_BIOS_GEOM]; ++ u32_t bi_size; ++ u8_t bi_memsizes_valid; ++ u8_t bi_bios_dev; ++ u8_t bi_pad[2]; ++ u32_t bi_basemem; ++ u32_t bi_extmem; ++ u32_t bi_symtab; ++ u32_t bi_esymtab; ++ /* Items below only from advanced bootloader */ ++ u32_t bi_kernend; ++ u32_t bi_envp; ++ u32_t bi_modulep; + }; ++ ++#define MODINFO_END 0x0000 /* End of list */ ++#define MODINFO_NAME 0x0001 /* Name of module (string) */ ++#define MODINFO_TYPE 0x0002 /* Type of module (string) */ ++#define MODINFO_ADDR 0x0003 /* Loaded address */ ++#define MODINFO_SIZE 0x0004 /* Size of module */ ++#define MODINFO_EMPTY 0x0005 /* Has been deleted */ ++#define MODINFO_ARGS 0x0006 /* Parameters string */ ++#define MODINFO_METADATA 0x8000 /* Module-specfic */ ++ --- grub-0.97.orig/debian/patches/gpt.diff +++ grub-0.97/debian/patches/gpt.diff @@ -0,0 +1,379 @@ +Hi, + +Here is some patch I wrote because of my work for XenSource as part of +Summer of Code. I understand that it will not be included in GRUB +Legacy CVS, but I hope this will be useful for at least some people or +distributions. + +This patch adds support for GPT partitions. When a protective MBR is +detected, it reads the GPT partitions instead of the MBR partitions. +This can be used to use GRUB Legacy using the Legacy Firmware of the +Intel Mac to boot into GNU/Linux without changing the protective MBR. + +If someone is interested in this patch I will be happy to talk about +improvements. For example, one thing I have in mind is the abuse of +the protective MBR to install windows. My patch disables this ability +of abuse but also the possibility to chainload windows (I assume). + +Please do not interpret this email as a personal interest to work on +GRUB Legacy, I will remain working on GRUB 2 like I used to. + +-- +Marco + + + +2006-07-25 Marco Gerards + + * stage2/disk_io.c: Include . + (next_partition): Added the `gpt_offset', `gpt_count' and + `gpt_size' arguments. If the MBR is a Protective MBR, use the GPT + partition table. Added the local function `int next_gpt_slice'. + Updated all callers. + + * stage2/shared.h (next_partition): Added the `gpt_offset', + `gpt_count' and `gpt_size' arguments. + + * stage2/pc_slice.h (PC_SLICE_TYPE_GPT): New macro. + + * stage2/gpt.h: New file. + + + +Index: stage2/builtins.c +=================================================================== +RCS file: /sources/grub/grub/stage2/builtins.c,v +retrieving revision 1.152 +diff -u -p -u -p -r1.152 builtins.c +--- grub-0.97/stage2/builtins.c 21 Mar 2006 20:51:58 -0000 1.152 ++++ grub-0.97/stage2/builtins.c 25 Jul 2006 12:32:34 -0000 +@@ -1233,14 +1233,15 @@ find_func (char *arg, int flags) + for (drive = 0x80; drive < 0x88; drive++) + { + unsigned long part = 0xFFFFFF; +- unsigned long start, len, offset, ext_offset; +- int type, entry; ++ unsigned long start, len, offset, ext_offset, gpt_offset; ++ int type, entry, gpt_count, gpt_size; + char buf[SECTOR_SIZE]; + + current_drive = drive; + while (next_partition (drive, 0xFFFFFF, &part, &type, + &start, &len, &offset, &entry, +- &ext_offset, buf)) ++ &ext_offset, &gpt_offset, ++ &gpt_count, &gpt_size, buf)) + { + if (type != PC_SLICE_TYPE_NONE + && ! IS_PC_SLICE_TYPE_BSD (type) +@@ -2815,8 +2816,8 @@ parttype_func (char *arg, int flags) + { + int new_type; + unsigned long part = 0xFFFFFF; +- unsigned long start, len, offset, ext_offset; +- int entry, type; ++ unsigned long start, len, offset, ext_offset, gpt_offset; ++ int entry, type, gpt_count, gpt_size; + char mbr[512]; + + /* Get the drive and the partition. */ +@@ -2853,8 +2854,15 @@ parttype_func (char *arg, int flags) + /* Look for the partition. */ + while (next_partition (current_drive, 0xFFFFFF, &part, &type, + &start, &len, &offset, &entry, +- &ext_offset, mbr)) ++ &ext_offset, &gpt_offset, &gpt_count, &gpt_size, mbr)) + { ++ /* The partition may not be a GPT partition. */ ++ if (gpt_offset != 0) ++ { ++ errnum = ERR_BAD_ARGUMENT; ++ return 1; ++ } ++ + if (part == current_partition) + { + /* Found. */ +Index: stage2/disk_io.c +=================================================================== +RCS file: /sources/grub/grub/stage2/disk_io.c,v +retrieving revision 1.58 +diff -u -p -u -p -r1.58 disk_io.c +--- grub-0.97/stage2/disk_io.c 23 May 2004 16:45:45 -0000 1.58 ++++ grub-0.97/stage2/disk_io.c 25 Jul 2006 12:32:35 -0000 +@@ -21,6 +21,7 @@ + + #include + #include ++#include + + #ifdef SUPPORT_NETBOOT + # define GRUB 1 +@@ -502,8 +503,8 @@ int + set_partition_hidden_flag (int hidden) + { + unsigned long part = 0xFFFFFF; +- unsigned long start, len, offset, ext_offset; +- int entry, type; ++ unsigned long start, len, offset, ext_offset, gpt_offset; ++ int entry, type, gpt_count, gpt_size; + char mbr[512]; + + /* The drive must be a hard disk. */ +@@ -524,8 +525,16 @@ set_partition_hidden_flag (int hidden) + /* Look for the partition. */ + while (next_partition (current_drive, 0xFFFFFF, &part, &type, + &start, &len, &offset, &entry, +- &ext_offset, mbr)) ++ &ext_offset, &gpt_offset, &gpt_count, &gpt_size, mbr)) + { ++ /* The partition may not be a GPT partition. */ ++ if (gpt_offset != 0) ++ { ++ errnum = ERR_BAD_ARGUMENT; ++ return 1; ++ } ++ ++ + if (part == current_partition) + { + /* Found. */ +@@ -577,11 +586,14 @@ next_partition (unsigned long drive, uns + unsigned long *partition, int *type, + unsigned long *start, unsigned long *len, + unsigned long *offset, int *entry, +- unsigned long *ext_offset, char *buf) ++ unsigned long *ext_offset, ++ unsigned long *gpt_offset, int *gpt_count, ++ int *gpt_size, char *buf) + { + /* Forward declarations. */ + auto int next_bsd_partition (void); + auto int next_pc_slice (void); ++ auto int next_gpt_slice (void); + + /* Get next BSD partition in current PC slice. */ + int next_bsd_partition (void) +@@ -666,6 +678,40 @@ next_partition (unsigned long drive, uns + return 0; + } + ++ /* If this is a GPT partition table, read it as such. */ ++ if (*entry == -1 && *offset == 0 && PC_SLICE_TYPE (buf, 0) == PC_SLICE_TYPE_GPT) ++ { ++ struct grub_gpt_header *hdr = (struct grub_gpt_header *) buf; ++ ++ /* Read in the GPT Partition table header. */ ++ if (! rawread (drive, 1, 0, SECTOR_SIZE, buf)) ++ return 0; ++ ++ if (hdr->magic == GPT_HEADER_MAGIC && hdr->version == 0x10000) ++ { ++ /* Let gpt_offset point to the first entry in the GPT ++ partition table. This can also be used by callers of ++ next_partition to determine if a entry comes from a ++ GPT partition table or not. */ ++ *gpt_offset = hdr->partitions; ++ *gpt_count = hdr->maxpart; ++ *gpt_size = hdr->partentry_size; ++ ++ return next_gpt_slice(); ++ } ++ else ++ { ++ /* This is not a valid header for a GPT partition table. ++ Re-read the MBR or the boot sector of the extended ++ partition. */ ++ if (! rawread (drive, *offset, 0, SECTOR_SIZE, buf)) ++ return 0; ++ } ++ } ++ ++ /* Not a GPT partition. */ ++ *gpt_offset = 0; ++ + /* Increase the entry number. */ + (*entry)++; + +@@ -710,6 +756,43 @@ next_partition (unsigned long drive, uns + return 1; + } + ++ /* Get the next GPT slice. */ ++ int next_gpt_slice (void) ++ { ++ struct grub_gpt_partentry *gptentry = (struct grub_gpt_partentry *) buf; ++ /* Make GPT partitions show up as PC slices. */ ++ int pc_slice_no = (*partition & 0xFF0000) >> 16; ++ ++ /* If this is the first time... */ ++ if (pc_slice_no == 0xFF) ++ { ++ pc_slice_no = -1; ++ *entry = -1; ++ } ++ ++ do { ++ (*entry)++; ++ ++ if (*entry >= *gpt_count) ++ { ++ errnum = ERR_NO_PART; ++ return 0; ++ } ++ /* Read in the GPT Partition table entry. */ ++ if (! rawread (drive, (*gpt_offset) + GPT_ENTRY_SECTOR (*gpt_size, *entry), GPT_ENTRY_INDEX (*gpt_size, *entry), *gpt_size, buf)) ++ return 0; ++ } while (! (gptentry->type1 && gptentry->type2)); ++ ++ pc_slice_no++; ++ *start = gptentry->start; ++ *len = gptentry->end - gptentry->start + 1; ++ *type = PC_SLICE_TYPE_EXT2FS; ++ *entry = pc_slice_no; ++ *partition = (*entry << 16) | 0xFFFF; ++ ++ return 1; ++ } ++ + /* Start the body of this function. */ + + #ifndef STAGE1_5 +@@ -717,6 +800,9 @@ next_partition (unsigned long drive, uns + return 0; + #endif + ++ if (*partition != 0xFFFFFF && *gpt_offset != 0) ++ return next_gpt_slice (); ++ + /* If previous partition is a BSD partition or a PC slice which + contains BSD partitions... */ + if ((*partition != 0xFFFFFF && IS_PC_SLICE_TYPE_BSD (*type & 0xff)) +@@ -755,6 +841,9 @@ real_open_partition (int flags) + unsigned long dest_partition = current_partition; + unsigned long part_offset; + unsigned long ext_offset; ++ unsigned long gpt_offset; ++ int gpt_count; ++ int gpt_size; + int entry; + char buf[SECTOR_SIZE]; + int bsd_part, pc_slice; +@@ -766,7 +855,8 @@ real_open_partition (int flags) + int ret = next_partition (current_drive, dest_partition, + ¤t_partition, ¤t_slice, + &part_start, &part_length, +- &part_offset, &entry, &ext_offset, buf); ++ &part_offset, &entry, &ext_offset, ++ &gpt_offset, &gpt_count, &gpt_size, buf); + bsd_part = (current_partition >> 8) & 0xFF; + pc_slice = current_partition >> 16; + return ret; +Index: stage2/gpt.h +=================================================================== +RCS file: stage2/gpt.h +diff -N stage2/gpt.h +--- /dev/null 1 Jan 1970 00:00:00 -0000 ++++ grub-0.97/stage2/gpt.h 25 Jul 2006 12:32:36 -0000 +@@ -0,0 +1,68 @@ ++/* ++ * GRUB -- GRand Unified Bootloader ++ * Copyright (C) 2002,2005,2006 Free Software Foundation, Inc. ++ * ++ * This program 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 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program 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 this program; if not, write to the Free Software ++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ */ ++ ++#ifndef _GPT_H ++#define _GPT_H ++ ++typedef signed char grub_int8_t; ++typedef signed short grub_int16_t; ++typedef signed int grub_int32_t; ++typedef signed long long int grub_int64_t; ++typedef unsigned char grub_uint8_t; ++typedef unsigned short grub_uint16_t; ++typedef unsigned int grub_uint32_t; ++typedef unsigned long long int grub_uint64_t; ++ ++struct grub_gpt_header ++{ ++ grub_uint64_t magic; ++ grub_uint32_t version; ++ grub_uint32_t headersize; ++ grub_uint32_t crc32; ++ grub_uint32_t unused1; ++ grub_uint64_t primary; ++ grub_uint64_t backup; ++ grub_uint64_t start; ++ grub_uint64_t end; ++ grub_uint8_t guid[16]; ++ grub_uint64_t partitions; ++ grub_uint32_t maxpart; ++ grub_uint32_t partentry_size; ++ grub_uint32_t partentry_crc32; ++} __attribute__ ((packed)); ++ ++struct grub_gpt_partentry ++{ ++ grub_uint64_t type1; ++ grub_uint64_t type2; ++ grub_uint8_t guid[16]; ++ grub_uint64_t start; ++ grub_uint64_t end; ++ grub_uint8_t attrib; ++ char name[72]; ++} __attribute__ ((packed)); ++ ++#define GPT_HEADER_MAGIC 0x5452415020494645UL ++ ++#define GPT_ENTRY_SECTOR(size,entry) \ ++ ((((entry) * (size) + 1) & ~(SECTOR_SIZE - 1)) >> SECTOR_BITS) ++#define GPT_ENTRY_INDEX(size,entry) \ ++ ((((entry) * (size) + 1) & (SECTOR_SIZE - 1)) - 1) ++ ++#endif /* _GPT_H */ +Index: stage2/pc_slice.h +=================================================================== +RCS file: /sources/grub/grub/stage2/pc_slice.h,v +retrieving revision 1.16 +diff -u -p -u -p -r1.16 pc_slice.h +--- grub-0.97/stage2/pc_slice.h 24 Jan 2003 16:28:41 -0000 1.16 ++++ grub-0.97/stage2/pc_slice.h 25 Jul 2006 12:32:36 -0000 +@@ -115,6 +115,7 @@ + #define PC_SLICE_TYPE_LINUX_EXTENDED 0x85 + #define PC_SLICE_TYPE_VSTAFS 0x9e + #define PC_SLICE_TYPE_DELL_UTIL 0xde ++#define PC_SLICE_TYPE_GPT 0xee + #define PC_SLICE_TYPE_LINUX_RAID 0xfd + + +Index: stage2/shared.h +=================================================================== +RCS file: /sources/grub/grub/stage2/shared.h,v +retrieving revision 1.100 +diff -u -p -u -p -r1.100 shared.h +--- grub-0.97/stage2/shared.h 2 May 2006 20:46:24 -0000 1.100 ++++ grub-0.97/stage2/shared.h 25 Jul 2006 12:32:36 -0000 +@@ -934,7 +934,9 @@ int next_partition (unsigned long drive, + unsigned long *partition, int *type, + unsigned long *start, unsigned long *len, + unsigned long *offset, int *entry, +- unsigned long *ext_offset, char *buf); ++ unsigned long *ext_offset, ++ unsigned long *gpt_offset, int *gpt_count, ++ int *gpt_size, char *buf); + + /* Sets device to the one represented by the SAVED_* parameters. */ + int make_saved_active (void); --- grub-0.97.orig/debian/patches/initrd_max_address.diff +++ grub-0.97/debian/patches/initrd_max_address.diff @@ -0,0 +1,23 @@ + + Date: 2005-11-11 + Author: Otavio Salvador + Comment: Stolen from SuSE grub package. + It fix the max address of initrd image and include a safe + default in case of it isn't available + +--- grub-0.94/stage2/boot.c.orig 2004-01-11 09:49:05.000000000 +0100 ++++ grub-0.94/stage2/boot.c 2004-03-04 16:11:21.857403508 +0100 +@@ -810,8 +810,11 @@ + moveto = (mbi.mem_upper + 0x400) << 10; + + moveto = (moveto - len) & 0xfffff000; +- max_addr = (lh->header == LINUX_MAGIC_SIGNATURE && lh->version >= 0x0203 +- ? lh->initrd_addr_max : LINUX_INITRD_MAX_ADDRESS); ++ max_addr = LINUX_INITRD_MAX_ADDRESS; ++ if (lh->header == LINUX_MAGIC_SIGNATURE && ++ lh->version >= 0x0203 && ++ lh->initrd_addr_max < max_addr) ++ max_addr = lh->initrd_addr_max; + if (moveto + len >= max_addr) + moveto = (max_addr - len) & 0xfffff000; + --- grub-0.97.orig/debian/patches/geometry-26kernel.diff +++ grub-0.97/debian/patches/geometry-26kernel.diff @@ -0,0 +1,236 @@ + + Date: 2005-11-11 + Author: Otavio Salvador + Comment: Stolen from Fedora grub package. + Put geometry discover inside of grub code since kernel 2.6 + doesn't do that anymore. + +--- grub-0.95/lib/device.c.26geom 2004-11-30 16:33:00.186025728 -0500 ++++ grub-0.95/lib/device.c 2004-11-30 16:45:09.073218032 -0500 +@@ -131,6 +131,152 @@ + #include + #include + ++#if defined(__linux__) ++/* The 2.6 kernel has removed all of the geometry handling for IDE drives ++ * that did fixups for LBA, etc. This means that the geometry we get ++ * with the ioctl has a good chance of being wrong. So, we get to ++ * also know about partition tables and try to read what the geometry ++ * is there. *grumble* Very closely based on code from cfdisk ++ */ ++static void get_kernel_geometry(int fd, long long *cyl, int *heads, int *sectors) { ++ struct hd_geometry hdg; ++ ++ if (ioctl (fd, HDIO_GETGEO, &hdg)) ++ return; ++ ++ *cyl = hdg.cylinders; ++ *heads = hdg.heads; ++ *sectors = hdg.sectors; ++} ++ ++struct partition { ++ unsigned char boot_ind; /* 0x80 - active */ ++ unsigned char head; /* starting head */ ++ unsigned char sector; /* starting sector */ ++ unsigned char cyl; /* starting cylinder */ ++ unsigned char sys_ind; /* What partition type */ ++ unsigned char end_head; /* end head */ ++ unsigned char end_sector; /* end sector */ ++ unsigned char end_cyl; /* end cylinder */ ++ unsigned char start4[4]; /* starting sector counting from 0 */ ++ unsigned char size4[4]; /* nr of sectors in partition */ ++}; ++ ++#define ALIGNMENT 2 ++typedef union { ++ struct { ++ unsigned char align[ALIGNMENT]; ++ unsigned char b[SECTOR_SIZE]; ++ } c; ++ struct { ++ unsigned char align[ALIGNMENT]; ++ unsigned char buffer[0x1BE]; ++ struct partition part[4]; ++ unsigned char magicflag[2]; ++ } p; ++} partition_table; ++ ++#define PART_TABLE_FLAG0 0x55 ++#define PART_TABLE_FLAG1 0xAA ++ ++static void ++get_partition_table_geometry(partition_table *bufp, long long *cyl, int *heads, ++ int *sectors) { ++ struct partition *p; ++ int i,h,s,hh,ss; ++ int first = 1; ++ int bad = 0; ++ ++ if (bufp->p.magicflag[0] != PART_TABLE_FLAG0 || ++ bufp->p.magicflag[1] != PART_TABLE_FLAG1) { ++ /* Matthew Wilcox: slightly friendlier version of ++ fatal(_("Bad signature on partition table"), 3); ++ */ ++ fprintf(stderr, "Unknown partition table signature\n"); ++ return; ++ } ++ ++ hh = ss = 0; ++ for (i=0; i<4; i++) { ++ p = &(bufp->p.part[i]); ++ if (p->sys_ind != 0) { ++ h = p->end_head + 1; ++ s = (p->end_sector & 077); ++ if (first) { ++ hh = h; ++ ss = s; ++ first = 0; ++ } else if (hh != h || ss != s) ++ bad = 1; ++ } ++ } ++ ++ if (!first && !bad) { ++ *heads = hh; ++ *sectors = ss; ++ } ++} ++ ++static long long my_lseek (unsigned int fd, long long offset, ++ unsigned int origin) ++{ ++#if defined(__linux__) && (!defined(__GLIBC__) || \ ++ ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1)))) ++ /* Maybe libc doesn't have large file support. */ ++ loff_t offset, result; ++ static int _llseek (uint filedes, ulong hi, ulong lo, ++ loff_t *res, uint wh); ++ _syscall5 (int, _llseek, uint, filedes, ulong, hi, ulong, lo, ++ loff_t *, res, uint, wh); ++ ++ if (_llseek (fd, offset >> 32, offset & 0xffffffff, &result, SEEK_SET) < 0) ++ return (long long) -1; ++ return result; ++#else ++ return lseek(fd, offset, SEEK_SET); ++#endif ++} ++ ++static void get_linux_geometry (int fd, struct geometry *geom) { ++ long long kern_cyl = 0; int kern_head = 0, kern_sectors = 0; ++ long long pt_cyl = 0; int pt_head = 0, pt_sectors = 0; ++ partition_table bufp; ++ char *buff, *buf_unaligned; ++ ++ buf_unaligned = malloc(sizeof(partition_table) + 4095); ++ buff = (char *) (((unsigned long)buf_unaligned + 4096 - 1) & ++ (~(4096-1))); ++ ++ get_kernel_geometry(fd, &kern_cyl, &kern_head, &kern_sectors); ++ ++ if (my_lseek (fd, 0*SECTOR_SIZE, SEEK_SET) < 0) { ++ fprintf(stderr, "Unable to seek"); ++ } ++ ++ if (read(fd, buff, SECTOR_SIZE) == SECTOR_SIZE) { ++ memcpy(bufp.c.b, buff, SECTOR_SIZE); ++ get_partition_table_geometry(&bufp, &pt_cyl, &pt_head, &pt_sectors); ++ } else { ++ fprintf(stderr, "Unable to read partition table: %s\n", strerror(errno)); ++ } ++ ++ if (pt_head && pt_sectors) { ++ int cyl_size; ++ ++ geom->heads = pt_head; ++ geom->sectors = pt_sectors; ++ cyl_size = pt_head * pt_sectors; ++ geom->cylinders = geom->total_sectors/cyl_size; ++ } else { ++ geom->heads = kern_head; ++ geom->sectors = kern_sectors; ++ geom->cylinders = kern_cyl; ++ } ++ ++ return; ++} ++#endif ++ + /* Get the geometry of a drive DRIVE. */ + void + get_drive_geometry (struct geometry *geom, char **map, int drive) +@@ -151,21 +297,16 @@ + #if defined(__linux__) + /* Linux */ + { +- struct hd_geometry hdg; + unsigned long nr; +- +- if (ioctl (fd, HDIO_GETGEO, &hdg)) +- goto fail; + + if (ioctl (fd, BLKGETSIZE, &nr)) + goto fail; + + /* Got the geometry, so save it. */ +- geom->cylinders = hdg.cylinders; +- geom->heads = hdg.heads; +- geom->sectors = hdg.sectors; + geom->total_sectors = nr; +- ++ get_linux_geometry(fd, geom); ++ if (!geom->heads && !geom->cylinders && !geom->sectors) ++ goto fail; + goto success; + } + +@@ -841,6 +982,7 @@ + { + char dev[PATH_MAX]; /* XXX */ + int fd; ++ off_t offset = (off_t) sector * (off_t) SECTOR_SIZE; + + if ((partition & 0x00FF00) != 0x00FF00) + { +@@ -874,35 +1016,13 @@ + errnum = ERR_NO_PART; + return 0; + } +- +-#if defined(__linux__) && (!defined(__GLIBC__) || \ +- ((__GLIBC__ < 2) || ((__GLIBC__ == 2) && (__GLIBC_MINOR__ < 1)))) +- /* Maybe libc doesn't have large file support. */ +- { +- loff_t offset, result; +- static int _llseek (uint filedes, ulong hi, ulong lo, +- loff_t *res, uint wh); +- _syscall5 (int, _llseek, uint, filedes, ulong, hi, ulong, lo, +- loff_t *, res, uint, wh); + +- offset = (loff_t) sector * (loff_t) SECTOR_SIZE; +- if (_llseek (fd, offset >> 32, offset & 0xffffffff, &result, SEEK_SET)) +- { +- errnum = ERR_DEV_VALUES; +- return 0; +- } +- } +-#else +- { +- off_t offset = (off_t) sector * (off_t) SECTOR_SIZE; + +- if (lseek (fd, offset, SEEK_SET) != offset) +- { +- errnum = ERR_DEV_VALUES; +- return 0; +- } +- } +-#endif ++ if (my_lseek(fd, offset, SEEK_SET) != offset) ++ { ++ errnum = ERR_DEV_VALUES; ++ return 0; ++ } + + if (write (fd, buf, size * SECTOR_SIZE) != (size * SECTOR_SIZE)) + { --- grub-0.97.orig/debian/patches/xfs_freeze.diff +++ grub-0.97/debian/patches/xfs_freeze.diff @@ -0,0 +1,39 @@ + +Copyright: rmh +Upstream: waiting to commit untill known to work + +diff -ur svn.old/util/grub-install.in svn/util/grub-install.in +--- svn.old/util/grub-install.in 2004-07-23 00:48:23.000000000 +0200 ++++ svn/util/grub-install.in 2004-07-26 23:25:59.000000000 +0200 +@@ -450,6 +450,20 @@ + # Create a safe temporary file. + test -n "$mklog" && log_file=`$mklog` + ++# Sync to prevent GRUB from not finding stage files (notably, on XFS) ++sync ++ ++# XFS needs special magic ++xfs_frozen=false ++if which xfs_freeze > /dev/null ; then ++ cat << EOF ++Due to a bug in xfs_freeze, the following command might produce a segmentation ++fault when ${grubdir} is not in an XFS filesystem. This error is harmless and ++can be ignored. ++EOF ++ if xfs_freeze -f ${grubdir} ; then xfs_frozen=true ; fi ++fi ++ + # Now perform the installation. + $grub_shell --batch $no_floppy --device-map=$device_map <$log_file + root $root_drive +@@ -457,6 +471,10 @@ + quit + EOF + ++if ${xfs_frozen} ; then ++ xfs_freeze -u ${grubdir} ++fi ++ + if grep "Error [0-9]*: " $log_file >/dev/null || test $debug = yes; then + cat $log_file 1>&2 + exit 1 --- grub-0.97.orig/debian/patches/cvs-sync.patch +++ grub-0.97/debian/patches/cvs-sync.patch @@ -0,0 +1,376 @@ +diff -Nur grub-0.97/ChangeLog cvs/ChangeLog +--- grub-0.97/ChangeLog 2005-05-08 04:47:02.000000000 +0200 ++++ cvs/ChangeLog 2006-06-24 16:27:33.046480952 +0200 +@@ -1,3 +1,61 @@ ++2006-06-24 Robert Millan ++ ++ * lib/device.c (write_to_partition): /dev/ataraid/ and /dev/rd/ ++ partitions have a "p" prefix. Add it. ++ ++2006-06-24 Robert Millan ++ ++ * lib/device.c (get_i2o_disk_name): New function. ++ (init_device_map) [__linux__]: Add support for I2O devices. ++ ++2006-05-02 Pavel Roskin ++ ++ * stage2/stage2.c (run_menu): Fix "savedefault" to save only top ++ level menu positions. Remember current position when calling a ++ submenu. Don't recalculate it when booting from a submenu. ++ ++ * grub/main.c (main): Make sure the boot drive number doesn't ++ exceed 255. ++ ++2006-05-02 Vesa Jaaskelainen ++ ++ * stage2/shared.h (vbe_mode): Back ported aligment fix from GRUB 2 ++ to GRUB Legacy. Problem reported by Gerardo Richarte. ++ ++2006-04-23 Robert Millan ++ ++ * grub/asmstub.c (get_diskinfo): Optimize sysctl routine. ++ ++2006-04-20 Robert Millan ++ ++ Fixes for kernel of FreeBSD: ++ * grub/asmstub.c (get_diskinfo): Toggle "kern.geom.debugflags" sysctl ++ before opening a device for writing. ++ * util/grub-install.in: Devices don't have this "r" prefix anymore. ++ ++2006-04-16 Yoshinori K. Okuji ++ ++ * docs/multiboot.texi: Correct the offset of address ++ fields. Reported by Jeroen Dekkers. ++ ++2006-03-21 Yoshinori K. Okuji ++ ++ * stage2/builtins.c (setup_func): Specify the size of DEVICE to ++ grub_strncat instead of a strange number 256. Reported by Vitaly ++ Fertman . ++ ++2005-09-29 Yoshinori K. Okuji ++ ++ * docs/multiboot.texi: Fix a bug in the byte order of ++ boot_device. I hope this won't affect any OS image. ++ Increased the version number to 0.6.94. ++ ++2005-09-28 Yoshinori K. Okuji ++ ++ * stage2/boot.c (load_image): Even if an OS image is an ELF ++ object, use the a.out kludge if MULTIBOOT_AOUT_KLUDGE is ++ specified. ++ + 2005-05-08 Yoshinori K. Okuji + + * configure.ac (AC_INIT): Upgraded to 0.97. +diff -Nur grub-0.97/docs/multiboot.texi cvs/docs/multiboot.texi +--- grub-0.97/docs/multiboot.texi 2003-07-09 13:45:36.000000000 +0200 ++++ cvs/docs/multiboot.texi 2006-04-16 19:55:49.000000000 +0200 +@@ -25,7 +25,7 @@ + @ifinfo + Copyright @copyright{} 1995, 96 Bryan Ford + Copyright @copyright{} 1995, 96 Erich Stefan Boleyn +-Copyright @copyright{} 1999, 2000, 2001, 2002 Free Software Foundation, Inc. ++Copyright @copyright{} 1999, 2000, 2001, 2002, 2005, 2006 Free Software Foundation, Inc. + + Permission is granted to make and distribute verbatim copies of + this manual provided the copyright notice and this permission notice +@@ -57,7 +57,7 @@ + @vskip 0pt plus 1filll + Copyright @copyright{} 1995, 96 Bryan Ford + Copyright @copyright{} 1995, 96 Erich Stefan Boleyn +-Copyright @copyright{} 1999, 2000, 2001, 2002 Free Software Foundation, Inc. ++Copyright @copyright{} 1999, 2000, 2001, 2002, 2005, 2006 Free Software Foundation, Inc. + + Permission is granted to make and distribute verbatim copies of + this manual provided the copyright notice and this permission notice +@@ -80,7 +80,7 @@ + @top Multiboot Specification + + This file documents Multiboot Specification, the proposal for the boot +-sequence standard. This edition documents version 0.6.93. ++sequence standard. This edition documents version 0.6.94. + @end ifnottex + + @menu +@@ -426,7 +426,7 @@ + kernel. + + If bit 16 in the @samp{flags} word is set, then the fields at offsets +-8-24 in the Multiboot header are valid, and the boot loader should use ++12-28 in the Multiboot header are valid, and the boot loader should use + them instead of the fields in the actual executable header to calculate + where to load the OS image. This information does not need to be + provided if the kernel image is in @sc{elf} format, but it @emph{must} +@@ -677,7 +677,7 @@ + @example + @group + +-------+-------+-------+-------+ +-| drive | part1 | part2 | part3 | ++| part3 | part2 | part1 | drive | + +-------+-------+-------+-------+ + @end group + @end example +@@ -1199,6 +1199,13 @@ + @email{bug-grub@@gnu.org}, from Bryan Ford and Erich Stefan Boleyn. + @end itemize + ++@item ++The byte order of the @samp{boot_device} in Multiboot information is ++reversed. This was a mistake. ++ ++@item ++The offset of the address fields were wrong. ++ + @item 0.6 + @itemize @bullet + @item +diff -Nur grub-0.97/grub/asmstub.c cvs/grub/asmstub.c +--- grub-0.97/grub/asmstub.c 2005-02-16 21:45:14.000000000 +0100 ++++ cvs/grub/asmstub.c 2006-04-23 12:10:52.000000000 +0200 +@@ -55,6 +55,10 @@ + # endif /* ! BLKFLSBUF */ + #endif /* __linux__ */ + ++#if defined(__FreeBSD_kernel__) || defined(__FreeBSD__) ++# include ++#endif ++ + /* We want to prevent any circularararity in our stubs, as well as + libc name clashes. */ + #define WITHOUT_LIBC_STUBS 1 +@@ -777,7 +781,39 @@ + + /* Open read/write, or read-only if that failed. */ + if (! read_only) +- disks[drive].flags = open (devname, O_RDWR); ++ { ++/* By default, kernel of FreeBSD does not allow overwriting MBR */ ++#if defined(__FreeBSD_kernel__) || defined(__FreeBSD__) ++#define GEOM_SYSCTL "kern.geom.debugflags" ++ int old_flags, flags; ++ size_t sizeof_int = sizeof (int); ++ ++ if (sysctlbyname (GEOM_SYSCTL, &old_flags, &sizeof_int, NULL, 0) != 0) ++ grub_printf ("failed to get " GEOM_SYSCTL "sysctl: %s\n", strerror (errno)); ++ ++ if ((old_flags & 0x10) == 0) ++ { ++ /* "allow foot shooting", see geom(4) */ ++ flags = old_flags | 0x10; ++ ++ if (sysctlbyname (GEOM_SYSCTL, NULL, NULL, &flags, sizeof (int)) != 0) ++ { ++ flags = old_flags; ++ grub_printf ("failed to set " GEOM_SYSCTL "sysctl: %s\n", strerror (errno)); ++ } ++ } ++ else ++ flags = old_flags; ++#endif ++ disks[drive].flags = open (devname, O_RDWR); ++#if defined(__FreeBSD_kernel__) || defined(__FreeBSD__) ++ if (flags != old_flags) ++ { ++ if (sysctlbyname (GEOM_SYSCTL, NULL, NULL, &old_flags, sizeof (int)) != 0) ++ grub_printf ("failed to set " GEOM_SYSCTL "sysctl: %s\n", strerror (errno)); ++ } ++#endif ++ } + + if (disks[drive].flags == -1) + { +diff -Nur grub-0.97/grub/main.c cvs/grub/main.c +--- grub-0.97/grub/main.c 2003-07-09 13:45:36.000000000 +0200 ++++ cvs/grub/main.c 2006-05-05 23:43:46.000000000 +0200 +@@ -32,6 +32,7 @@ + #define WITHOUT_LIBC_STUBS 1 + #include + #include ++#include + + char *program_name = 0; + int use_config_file = 1; +@@ -192,6 +193,12 @@ + perror ("strtoul"); + exit (1); + } ++ if (boot_drive >= NUM_DISKS) ++ { ++ fprintf (stderr, "boot_drive should be from 0 to %d\n", ++ NUM_DISKS - 1); ++ exit (1); ++ } + break; + + case OPT_NO_CONFIG_FILE: +diff -Nur grub-0.97/lib/device.c cvs/lib/device.c +--- grub-0.97/lib/device.c 2005-03-28 01:14:25.000000000 +0200 ++++ cvs/lib/device.c 2006-06-24 16:20:40.972125776 +0200 +@@ -407,6 +407,12 @@ + { + sprintf (name, "/dev/ataraid/d%c", unit + '0'); + } ++ ++static void ++get_i2o_disk_name (char *name, char unit) ++{ ++ sprintf (name, "/dev/i2o/hd%c", unit); ++} + #endif + + /* Check if DEVICE can be read. If an error occurs, return zero, +@@ -801,6 +807,29 @@ + } + } + } ++ ++ /* This is for I2O - we have /dev/i2o/hd */ ++ { ++ int unit; ++ ++ for (unit = 'a'; unit < 'f'; unit++) ++ { ++ char name[24]; ++ ++ get_i2o_disk_name (name, unit); ++ if (check_device (name)) ++ { ++ (*map)[num_hd + 0x80] = strdup (name); ++ assert ((*map)[num_hd + 0x80]); ++ ++ /* If the device map file is opened, write the map. */ ++ if (fp) ++ fprintf (fp, "(hd%d)\t%s\n", num_hd, name); ++ ++ num_hd++; ++ } ++ } ++ } + #endif /* __linux__ */ + + /* OK, close the device map file if opened. */ +@@ -861,6 +890,12 @@ + if (strcmp (dev + strlen(dev) - 5, "/disc") == 0) + strcpy (dev + strlen(dev) - 5, "/part"); + } ++ else ++ { ++ if ((strncmp (dev, "/dev/ataraid/", 13) == 0) || ++ (strncmp (dev, "/dev/rd/", 8) == 0)) ++ strcpy (dev + strlen(dev), "p"); ++ } + sprintf (dev + strlen(dev), "%d", ((partition >> 16) & 0xFF) + 1); + + /* Open the partition. */ +diff -Nur grub-0.97/stage2/boot.c cvs/stage2/boot.c +--- grub-0.97/stage2/boot.c 2004-03-30 13:44:08.000000000 +0200 ++++ cvs/stage2/boot.c 2005-09-28 23:47:55.000000000 +0200 +@@ -1,7 +1,7 @@ + /* boot.c - load and bootstrap a kernel */ + /* + * GRUB -- GRand Unified Bootloader +- * Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc. ++ * Copyright (C) 1999,2000,2001,2002,2003,2004,2005 Free Software Foundation, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by +@@ -96,7 +96,7 @@ + lh = (struct linux_kernel_header *) buffer; + + /* ELF loading supported if multiboot, FreeBSD and NetBSD. */ +- if ((type == KERNEL_TYPE_MULTIBOOT ++ if (((type == KERNEL_TYPE_MULTIBOOT && ! (flags & MULTIBOOT_AOUT_KLUDGE)) + || pu.elf->e_ident[EI_OSABI] == ELFOSABI_FREEBSD + || grub_strcmp (pu.elf->e_ident + EI_BRAND, "FreeBSD") == 0 + || suggested_type == KERNEL_TYPE_NETBSD) +diff -Nur grub-0.97/stage2/builtins.c cvs/stage2/builtins.c +--- grub-0.97/stage2/builtins.c 2005-02-15 22:58:23.000000000 +0100 ++++ cvs/stage2/builtins.c 2006-03-21 21:51:58.000000000 +0100 +@@ -3830,15 +3830,15 @@ + { + char tmp[16]; + grub_sprintf (tmp, ",%d", (partition >> 16) & 0xFF); +- grub_strncat (device, tmp, 256); ++ grub_strncat (device, tmp, sizeof (device)); + } + if ((partition & 0x00FF00) != 0x00FF00) + { + char tmp[16]; + grub_sprintf (tmp, ",%c", 'a' + ((partition >> 8) & 0xFF)); +- grub_strncat (device, tmp, 256); ++ grub_strncat (device, tmp, sizeof (device)); + } +- grub_strncat (device, ")", 256); ++ grub_strncat (device, ")", sizeof (device)); + } + + int embed_stage1_5 (char *stage1_5, int drive, int partition) +diff -Nur grub-0.97/stage2/shared.h cvs/stage2/shared.h +--- grub-0.97/stage2/shared.h 2004-06-19 18:40:09.000000000 +0200 ++++ cvs/stage2/shared.h 2006-05-02 22:46:24.000000000 +0200 +@@ -499,7 +499,11 @@ + unsigned char linear_reserved_field_position; + unsigned long max_pixel_clock; + +- unsigned char reserved3[189]; ++ /* Reserved field to make structure to be 256 bytes long, VESA BIOS ++ Extension 3.0 Specification says to reserve 189 bytes here but ++ that doesn't make structure to be 256 bytes. So additional one is ++ added here. */ ++ unsigned char reserved3[189 + 1]; + } __attribute__ ((packed)); + + +diff -Nur grub-0.97/stage2/stage2.c cvs/stage2/stage2.c +--- grub-0.97/stage2/stage2.c 2005-03-19 18:51:57.000000000 +0100 ++++ cvs/stage2/stage2.c 2006-05-06 00:06:31.000000000 +0200 +@@ -651,7 +651,10 @@ + *(new_heap++) = 0; + + if (config_entries) +- run_menu (heap, NULL, new_num_entries, new_heap, 0); ++ { ++ current_entryno = first_entry + entryno; ++ run_menu (heap, NULL, new_num_entries, new_heap, 0); ++ } + else + { + cls (); +@@ -727,7 +730,8 @@ + cur_entry = get_entry (config_entries, first_entry + entryno, 1); + + /* Set CURRENT_ENTRYNO for the command "savedefault". */ +- current_entryno = first_entry + entryno; ++ if (config_entries) ++ current_entryno = first_entry + entryno; + + if (run_script (cur_entry, heap)) + { +diff -Nur grub-0.97/stamp-h.in cvs/stamp-h.in +--- grub-0.97/stamp-h.in 1970-01-01 01:00:00.000000000 +0100 ++++ cvs/stamp-h.in 1999-09-13 15:32:24.000000000 +0200 +@@ -0,0 +1 @@ ++timestamp +diff -Nur grub-0.97/THANKS cvs/THANKS +--- grub-0.97/THANKS 2005-05-08 04:17:43.000000000 +0200 ++++ cvs/THANKS 2006-03-21 21:51:58.000000000 +0100 +@@ -121,3 +121,4 @@ + Yedidyah Bar-David + Yury V. Umanets + Yuri Zaporogets ++Vitaly Fertman +diff -Nur grub-0.97/util/grub-install.in cvs/util/grub-install.in +--- grub-0.97/util/grub-install.in 2004-07-24 20:57:31.000000000 +0200 ++++ cvs/util/grub-install.in 2006-04-20 15:46:46.000000000 +0200 +@@ -112,8 +112,8 @@ + tmp_disk=`echo "$1" | sed 's%\([sh]d[0-9]*\).*%\1%'` + tmp_part=`echo "$1" | sed "s%$tmp_disk%%"` ;; + freebsd* | kfreebsd*-gnu) +- tmp_disk=`echo "$1" | sed 's%r\{0,1\}\([saw]d[0-9]*\).*$%r\1%' \ +- | sed 's%r\{0,1\}\(da[0-9]*\).*$%r\1%'` ++ tmp_disk=`echo "$1" | sed 's%r\{0,1\}\([saw]d[0-9]*\).*$%\1%' \ ++ | sed 's%r\{0,1\}\(da[0-9]*\).*$%\1%'` + tmp_part=`echo "$1" \ + | sed "s%.*/r\{0,1\}[saw]d[0-9]\(s[0-9]*[a-h]\)%\1%" \ + | sed "s%.*/r\{0,1\}da[0-9]\(s[0-9]*[a-h]\)%\1%"` --- grub-0.97.orig/debian/patches/grub-0.95-mem_lower.patch +++ grub-0.97/debian/patches/grub-0.95-mem_lower.patch @@ -0,0 +1,79 @@ +diff -Naur grub-0.95.orig/stage2/common.c grub-0.95/stage2/common.c +--- grub-0.95.orig/stage2/common.c 2004-03-27 13:25:44.000000000 -0300 ++++ grub-0.95/stage2/common.c 2004-12-08 17:36:36.590781312 -0200 +@@ -108,26 +108,43 @@ + unsigned long long top; + unsigned long addr; + int cont; +- ++ + top = bottom; +- do +- { +- for (cont = 0, addr = mbi.mmap_addr; +- addr < mbi.mmap_addr + mbi.mmap_length; +- addr += *((unsigned long *) addr) + 4) ++ /* If detecting mbi.mem_lower */ ++ if (bottom == 0) { ++ /* Initialize to 640Kb */ ++ top = 0xA0000ULL; ++ for (addr = mbi.mmap_addr; ++ addr < mbi.mmap_addr + mbi.mmap_length; ++ addr += *((unsigned long *) addr) + 4) { ++ struct AddrRangeDesc *desc = (struct AddrRangeDesc *) addr; ++ ++ /* If there is anything reserved below 640Kb */ ++ if (desc->BaseAddr < top && desc->Length && ++ desc->Type != MB_ARD_MEMORY) ++ top = desc->BaseAddr; ++ } ++ } ++ else { ++ do + { +- struct AddrRangeDesc *desc = (struct AddrRangeDesc *) addr; +- +- if (desc->Type == MB_ARD_MEMORY +- && desc->BaseAddr <= top +- && desc->BaseAddr + desc->Length > top) ++ for (cont = 0, addr = mbi.mmap_addr; ++ addr < mbi.mmap_addr + mbi.mmap_length; ++ addr += *((unsigned long *) addr) + 4) + { +- top = desc->BaseAddr + desc->Length; +- cont++; ++ struct AddrRangeDesc *desc = (struct AddrRangeDesc *) addr; ++ ++ if (desc->Type == MB_ARD_MEMORY ++ && desc->BaseAddr <= top ++ && desc->BaseAddr + desc->Length > top) ++ { ++ top = desc->BaseAddr + desc->Length; ++ cont++; ++ } + } + } ++ while (cont); + } +- while (cont); + + /* For now, GRUB assumes 32bits addresses, so... */ + if (top > 0xFFFFFFFF) +@@ -194,6 +211,7 @@ + if (mbi.mmap_length) + { + unsigned long long max_addr; ++ unsigned long mem_lower = mmap_avail_at (0) >> 10; + + /* + * This is to get the lower memory, and upper memory (up to the +@@ -201,7 +219,8 @@ + * elements. This is for OS's that don't care about the memory + * map, but might care about total RAM available. + */ +- mbi.mem_lower = mmap_avail_at (0) >> 10; ++ if (mem_lower < mbi.mem_lower) ++ mbi.mem_lower = mem_lower; + mbi.mem_upper = mmap_avail_at (0x100000) >> 10; + + /* Find the maximum available address. Ignore any memory holes. */ --- grub-0.97.orig/debian/patches/savedefault.diff +++ grub-0.97/debian/patches/savedefault.diff @@ -0,0 +1,181 @@ +diff -uNr grub-0.97.orig/stage2/builtins.c grub-0.97/stage2/builtins.c +--- grub-0.97.orig/stage2/builtins.c 2005-02-15 21:58:23.000000000 +0000 ++++ grub-0.97/stage2/builtins.c 2007-03-06 22:32:02.000000000 +0000 +@@ -82,6 +82,10 @@ + inside other functions. */ + static int configfile_func (char *arg, int flags); + ++static int savedefault_helper (char *arg, int flags); ++ ++static int savedefault_shell (char *arg, int flags); ++ + /* Initialize the data for builtins. */ + void + init_builtins (void) +@@ -3221,7 +3225,109 @@ + static int + savedefault_func (char *arg, int flags) + { +-#if !defined(SUPPORT_DISKLESS) && !defined(GRUB_UTIL) ++#if !defined(SUPPORT_DISKLESS) ++ #if !defined(GRUB_UTIL) ++ return savedefault_helper(arg, flags); ++ #else ++ return savedefault_shell(arg, flags); ++ #endif ++#else /* !SUPPORT_DISKLESS */ ++ errnum = ERR_UNRECOGNIZED; ++ return 1; ++#endif /* !SUPPORT_DISKLESS */ ++} ++ ++#if !defined(SUPPORT_DISKLESS) && defined(GRUB_UTIL) ++/* savedefault_shell */ ++static int ++savedefault_shell(char *arg, int flags) ++ { ++ int once_only = 0; ++ int new_default; ++ int curr_default = -1; ++ int curr_prev_default = -1; ++ int new_prev_default = -1; ++ FILE *fp; ++ size_t bytes = 10; ++ char line[bytes]; ++ char *default_file = (char *) DEFAULT_FILE_BUF; ++ char buf[bytes]; ++ int i; ++ ++ while (1) ++ { ++ if (grub_memcmp ("--default=", arg, sizeof ("--default=") - 1) == 0) ++ { ++ char *p = arg + sizeof ("--default=") - 1; ++ if (! safe_parse_maxint (&p, &new_default)) ++ return 1; ++ arg = skip_to (0, arg); ++ } ++ else if (grub_memcmp ("--once", arg, sizeof ("--once") - 1) == 0) ++ { ++ once_only = 1; ++ arg = skip_to (0, arg); ++ } ++ else ++ break; ++ } ++ ++ *default_file = 0; ++ grub_strncat (default_file, config_file, DEFAULT_FILE_BUFLEN); ++ for (i = grub_strlen(default_file); i >= 0; i--) ++ if (default_file[i] == '/') ++ { ++ i++; ++ break; ++ } ++ default_file[i] = 0; ++ grub_strncat (default_file + i, "default", DEFAULT_FILE_BUFLEN - i); ++ ++ if(!(fp = fopen(default_file,"r"))) ++ { ++ errnum = ERR_READ; ++ goto fail; ++ } ++ ++ fgets(line, bytes, fp); ++ fclose(fp); ++ ++ sscanf(line, "%d:%d", &curr_prev_default, &curr_default); ++ ++ if(curr_default != -1) ++ new_prev_default = curr_default; ++ else ++ { ++ if(curr_prev_default != -1) ++ new_prev_default = curr_prev_default; ++ else ++ new_prev_default = 0; ++ } ++ ++ if(once_only) ++ sprintf(buf, "%d:%d", new_prev_default, new_default); ++ else ++ sprintf(buf, "%d", new_default); ++ ++ if(!(fp = fopen(default_file,"w"))) ++ { ++ errnum = ERR_READ; ++ goto fail; ++ } ++ ++ fprintf(fp, buf); ++ ++fail: ++ fclose(fp); ++ return errnum; ++} ++#endif ++ ++/* savedefault_helper */ ++static int ++savedefault_helper (char *arg, int flags) ++{ ++#if !defined(SUPPORT_DISKLESS) + unsigned long tmp_drive = saved_drive; + unsigned long tmp_partition = saved_partition; + char *default_file = (char *) DEFAULT_FILE_BUF; +@@ -3297,22 +3403,26 @@ + + disk_read_hook = disk_read_savesect_func; + len = grub_read (buf, sizeof (buf)); ++ buf[9]='\0';/* Make sure grub_strstr() below terminates */ + disk_read_hook = 0; + grub_close (); + +- if (len != sizeof (buf)) +- { +- /* This is too small. Do not modify the file manually, please! */ +- errnum = ERR_READ; +- goto fail; +- } +- + if (sector_count > 2) + { + /* Is this possible?! Too fragmented! */ + errnum = ERR_FSYS_CORRUPT; + goto fail; + } ++ ++ char *tmp; ++ if((tmp = grub_strstr(buf, ":")) != NULL) ++ { ++ int f_len = grub_strlen(buf) - grub_strlen(tmp); ++ char *def; ++ buf[f_len] = '\0'; ++ def = buf; ++ safe_parse_maxint (&def, &entryno); ++ } + + /* Set up a string to be written. */ + grub_memset (buf, '\n', sizeof (buf)); +diff -uNr grub-0.97.orig/stage2/stage2.c grub-0.97/stage2/stage2.c +--- grub-0.97.orig/stage2/stage2.c 2005-03-19 17:51:57.000000000 +0000 ++++ grub-0.97/stage2/stage2.c 2007-03-06 22:17:55.000000000 +0000 +@@ -891,8 +891,16 @@ + len = grub_read (buf, sizeof (buf)); + if (len > 0) + { +- buf[sizeof (buf) - 1] = 0; +- safe_parse_maxint (&p, &saved_entryno); ++ char *tmp; ++ char *def; ++ if((tmp = grub_strstr(p, ":")) != NULL) ++ { ++ *tmp++; ++ grub_strcpy(&def, &tmp); ++ }else ++ grub_strcpy(&def, &p); ++ ++ safe_parse_maxint (&def, &saved_entryno); + } + + grub_close (); --- grub-0.97.orig/debian/patches/intelmac.diff +++ grub-0.97/debian/patches/intelmac.diff @@ -0,0 +1,67 @@ +--- grub-0.97.orig/stage2/asm.S 2004-06-19 18:55:22.000000000 +0200 ++++ grub-0.97/stage2/asm.S 2006-04-21 11:10:52.000000000 +0200 +@@ -1651,7 +1651,29 @@ + jnz 3f + ret + +-3: /* use keyboard controller */ ++3: /* ++ * try to switch gateA20 using PORT92, the "Fast A20 and Init" ++ * register ++ */ ++ mov $0x92, %dx ++ inb %dx, %al ++ /* skip the port92 code if it's unimplemented (read returns 0xff) */ ++ cmpb $0xff, %al ++ jz 6f ++ ++ /* set or clear bit1, the ALT_A20_GATE bit */ ++ movb 4(%esp), %ah ++ testb %ah, %ah ++ jz 4f ++ orb $2, %al ++ jmp 5f ++4: and $0xfd, %al ++ ++ /* clear the INIT_NOW bit don't accidently reset the machine */ ++5: and $0xfe, %al ++ outb %al, %dx ++ ++6: /* use keyboard controller */ + pushl %eax + + call gloop1 +@@ -1661,9 +1683,12 @@ + + gloopint1: + inb $K_STATUS ++ cmpb $0xff, %al ++ jz gloopint1_done + andb $K_IBUF_FUL, %al + jnz gloopint1 + ++gloopint1_done: + movb $KB_OUTPUT_MASK, %al + cmpb $0, 0x8(%esp) + jz gdoit +@@ -1684,6 +1709,8 @@ + + gloop1: + inb $K_STATUS ++ cmpb $0xff, %al ++ jz gloop2ret + andb $K_IBUF_FUL, %al + jnz gloop1 + +@@ -1991,6 +2018,11 @@ + ENTRY(console_getkey) + push %ebp + ++wait_for_key: ++ call EXT_C(console_checkkey) ++ incl %eax ++ jz wait_for_key ++ + call EXT_C(prot_to_real) + .code16 + --- grub-0.97.orig/debian/patches/ubuntu_update_grub.diff +++ grub-0.97/debian/patches/ubuntu_update_grub.diff @@ -0,0 +1,28 @@ +=== modified file 'debian/update-grub' +--- a/debian/update-grub ++++ b/debian/update-grub +@@ -765,6 +765,11 @@ + echo -n "Searching for splash image ... " + current_splash=`grep '^splashimage=' ${grub_dir}/menu.lst || true` + splashimage_path="splashimage=${grub_root_device}${grub_dir##${boot_device:+/boot}}/splash.xpm.gz" ++# the distro default splash ++distro_splash="${grub_dir}/default-splash.xpm.gz" ++if [ "$current_splash" = "splashimage=${grub_root_device}$distro_splash" ];then ++ current_splash="" ++fi + if [ -f "${grub_dir}/splash.xpm.gz" ] && [ "$current_splash" = "" ]; then + echo "found: /boot/grub/splash.xpm.gz" + echo "$splashimage_path" >> $buffer +@@ -776,6 +781,11 @@ + elif [ "$current_splash" != "" ] && [ "$current_splash" != "$splashimage_path" ]; then + echo "found but preserving previous setting: $(grep '^splashimage=' /boot/grub/menu.lst)" + echo "$current_splash" >> $buffer ++ echo >> $buffer ++elif [ -f "$distro_splash" ]; then ++ echo "found distro default splash: $distro_splash" ++ echo "splashimage=${grub_root_device}${grub_dir##${boot_device:+/boot}}/default-splash.xpm.gz" >> $buffer ++ echo "background=800000" >> $buffer + echo >> $buffer + else + echo "none found, skipping ..." + --- grub-0.97.orig/debian/patches/00list +++ grub-0.97/debian/patches/00list @@ -0,0 +1,37 @@ +# Used to grab fixes from CVS. Run debian/rules cvs-sync to update it. +cvs-sync.patch + +menu.lst_gnu-hurd.diff +graphics.diff +raid.diff +raid_cciss.diff +xfs_freeze.diff +2gb_limit.diff +kfreebsd.diff +grub-special_device_names.diff +initrd_max_address.diff +splashimage_help.diff +grub-install_addsyncs.diff +grub-install_regexp.diff +grub-install_aoe_support.diff +grub-install_storeversion.diff +geometry-26kernel.diff +print_func.diff +mprotect.diff +savedefault.diff +find-grub-dir.diff +intelmac.diff +crossreference_manpages.diff +varargs.diff + +# We aren't building amd64 binaries, see #244498 +#fix_amd64_compile.diff + +# Ubuntu patches: +quiet.diff +gpt.diff +use_genisoimage_instead_of_mkisofs.dpatch +# Fix from Mandriva (Ubuntu bug #106887): +grub-0.95-mem_lower.patch +# splashimage, postponed: +#ubuntu_update_grub.diff --- grub-0.97.orig/debian/patches/use_genisoimage_instead_of_mkisofs.dpatch +++ grub-0.97/debian/patches/use_genisoimage_instead_of_mkisofs.dpatch @@ -0,0 +1,42 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## use_genisoimage_instead_of_mkisofs.dpatch by +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: No description. + +@DPATCH@ +diff -urNad grub-0.97~/docs/grub.texi grub-0.97/docs/grub.texi +--- grub-0.97~/docs/grub.texi 2005-05-08 04:59:59.000000000 +0200 ++++ grub-0.97/docs/grub.texi 2007-12-03 19:28:04.000000000 +0100 +@@ -717,12 +717,12 @@ + Finally, make a ISO9660 image file like this: + + @example +-$ @kbd{mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot \ ++$ @kbd{genisoimage -R -b boot/grub/stage2_eltorito -no-emul-boot \ + -boot-load-size 4 -boot-info-table -o grub.iso iso} + @end example + + This produces a file named @file{grub.iso}, which then can be burned +-into a CD (or a DVD). @kbd{mkisofs} has already set up the disc to boot ++into a CD (or a DVD). @kbd{genisoimage} has already set up the disc to boot + from the @kbd{boot/grub/stage2_eltorito} file, so there is no need to + setup GRUB on the disc. (Note that the @kbd{-boot-load-size 4} bit is + required for compatibility with the BIOS on many older machines.) +diff -urNad grub-0.97~/util/mkbimage grub-0.97/util/mkbimage +--- grub-0.97~/util/mkbimage 2004-07-24 20:57:31.000000000 +0200 ++++ grub-0.97/util/mkbimage 2007-12-03 19:28:04.000000000 +0100 +@@ -403,11 +403,11 @@ + + For El Torito floppy emulation : + +-mkisofs -b -c boot.catalog -o raw.iso ++genisoimage -b -c boot.catalog -o raw.iso + + And for El Torito Hard Disk emulation: + +-mkisofs -b -hard-disk-boot -c boot.catalog -o raw.iso ++genisoimage -b -hard-disk-boot -c boot.catalog -o raw.iso + + Enjoy! + EOF --- grub-0.97.orig/debian/patches/grub-install_addsyncs.diff +++ grub-0.97/debian/patches/grub-install_addsyncs.diff @@ -0,0 +1,55 @@ + + Date: 2005-11-11 + Author: Otavio Salvador + Comment: Stolen from Fedora grub package. + Add syncs to ensure that filesystem cache are flushed. + + -- Original comment, bellow + +I just found another semi-critical bug, whose fix should really get +into 0.91. + +It turns out that "grub-install" doesn't have any "sync" calls to make +sure any filesystem caches are coherent with the raw devices they are +on top of... so if your filesystem waits to write out any data from the +copy command in the script to put the "stage1" and "stage2" in their +final location, you're hosed. + +I found this because it just bit me on one of my systems running stock +RedHat 7.2 with a large "stage2". + +The only script that is patched here is "grub-install". The others +don't appear to need it as they either unmount things first or don't +refer to devices. + +Hmm. Maybe the right fix is to make the "sync" system call when +starting the GRUB shell with a device map that refers to any real disks +or something like that. + + Erich Stefan Boleyn http://www.uruk.org/ +"Reality is truly stranger than fiction; Probably why fiction is so popular" + +--- grub-0.94/util/grub-install.in.addsync 2004-02-02 17:22:26.672520324 -0500 ++++ grub-0.94/util/grub-install.in 2004-02-02 17:23:16.147712327 -0500 +@@ -351,6 +351,10 @@ + # Create a safe temporary file. + test -n "$mklog" && log_file=`$mklog` + ++ # Before all invocations of the grub shell, call sync to make sure ++ # the raw device is in sync with any bufferring in filesystems. ++ sync ++ + $grub_shell --batch $no_floppy --device-map=$device_map <$log_file + quit + EOF +@@ -457,6 +461,10 @@ + # Create a safe temporary file. + test -n "$mklog" && log_file=`$mklog` + ++# Before all invocations of the grub shell, call sync to make sure ++# the raw device is in sync with any bufferring in filesystems. ++sync ++ + # Now perform the installation. + $grub_shell --batch $no_floppy --device-map=$device_map <$log_file + root $root_drive --- grub-0.97.orig/debian/patches/raid.diff +++ grub-0.97/debian/patches/raid.diff @@ -0,0 +1,71 @@ + +Copyright: Charles Steinkuehler , except he borrowed +some code from other sources. He's cooperative about rewriting and/or doing +the paperwork. +Upstream: pending + +diff -ur svn.old/util/grub-install.in svn/util/grub-install.in +--- svn.old/util/grub-install.in 2004-07-21 00:45:21.000000000 +0200 ++++ svn/util/grub-install.in 2004-07-23 00:47:36.000000000 +0200 +@@ -81,6 +81,50 @@ + EOF + } + ++# Usage: getraid_mdadm mddevice ++# Routine to find a physical device from an md device ++# If found, the first grub BIOS device (from device.map) is returned ++# If no BIOS drives match the RAID devices, the first device returned ++# from mdadm -D is returned ++getraid_mdadm() { ++ device=$1 ++ mdadm=$(mdadm -D "$device") || { ++ echo "$PROG: mdadm -D $device failed" >&2 ++ exit 1 ++ } ++ eval "$( ++ echo "$mdadm" | awk ' ++ $1 == "Number" && $2 == "Major" { start = 1; next } ++ $1 == "UUID" { print "uuid=" $3; start = 0; next } ++ !start { next } ++ $2 == 0 && $3 == 0 { next } ++ { devices = devices "\n" $NF } ++ END { print "devices='\''" devices "'\''" } ++ ' ++ )" ++ ++ # Convert RAID devices list into a list of disks ++ tmp_disks=`echo "$devices" | sed -e 's%\([sh]d[a-z]\)[0-9]*$%\1%' \ ++ -e 's%\(d[0-9]*\)p[0-9]*$%\1%' \ ++ -e 's%\(fd[0-9]*\)$%\1%' \ ++ -e 's%/part[0-9]*$%/disc%' \ ++ -e 's%\(c[0-7]d[0-9]*\).*$%\1%' \ ++ -e '/^$/d' | ++ sed -n '1h;2,$H;${g;s/\n/|/g;p}'` ++ ++ # Find first BIOS disk that's a member of the RAID array ++ # Default to first RAID member if no tmp_disks are BIOS devices ++ set -- `egrep $tmp_disks $device_map | \ ++ sort | \ ++ sed -n 1p ` ++ device=${2:-${tmp_disks%%|*}} ++ ++ # Return first partition on BIOS disk that's part of the RAID ++ echo "$devices" | \ ++ sed -n "\:${device}:p" | \ ++ sed -n 1p ++} ++ + # Usage: convert os_device + # Convert an OS device to the corresponding GRUB drive. + # This part is OS-specific. +@@ -96,6 +140,10 @@ + # Break the device name into the disk part and the partition part. + case "$host_os" in + linux*) ++ # Find an actual physical device if we're passed a RAID device ++ case $1 in ++ /dev/md*) set -- `getraid_mdadm $1` ++ esac + tmp_disk=`echo "$1" | sed -e 's%\([sh]d[a-z]\)[0-9]*$%\1%' \ + -e 's%\(d[0-9]*\)p[0-9]*$%\1%' \ + -e 's%\(fd[0-9]*\)$%\1%' \ --- grub-0.97.orig/debian/patches/find-grub-dir.diff +++ grub-0.97/debian/patches/find-grub-dir.diff @@ -0,0 +1,55 @@ +diff -uNr grub-0.97/util/grub-set-default.in grub-0.97-changed/util/grub-set-default.in +--- grub-0.97/util/grub-set-default.in 2007-03-06 22:17:12.000000000 +0000 ++++ grub-0.97-changed/util/grub-set-default.in 2007-03-07 00:00:08.000000000 +0000 +@@ -74,18 +74,45 @@ + exit 1 + fi + ++find_grub_dir () ++{ ++ echo -n "Searching for GRUB installation directory ... " >&2 ++ ++ for d in $grub_dirs ; do ++ if [ -d "$d" ] ; then ++ grub_dir="$d" ++ break ++ fi ++ done ++ ++ if [ -z "$grub_dir" ] ; then ++ abort "No GRUB directory found.\n###" ++ else ++ echo "found: $grub_dir" >&2 ++ fi ++ ++ echo $grub_dir ++} ++ ++grub_dirs="/boot/grub /boot/boot/grub" ++ + # Determine the GRUB directory. This is different among OSes. +-grubdir=${rootdir}/boot/grub +-if test -d ${grubdir}; then ++# if rootdir has been informed use it or find grubdir otherwise ++if [ -n "${rootdir}" ]; then ++ grubdir=${rootdir}/boot/grub ++ if test -d ${grubdir}; then + : +-else ++ else + grubdir=${rootdir}/grub + if test -d ${grubdir}; then +- : ++ : + else +- echo "No GRUB directory found under ${rootdir}/" 1>&2 +- exit 1 ++ echo "No GRUB directory found under ${rootdir}/" 1>&2 ++ exit 1 + fi ++ fi ++else ++ grubdir=$(find_grub_dir) + fi + + file=${grubdir}/default --- grub-0.97.orig/debian/patches/grub-special_device_names.diff +++ grub-0.97/debian/patches/grub-special_device_names.diff @@ -0,0 +1,11 @@ +--- trunk/lib/device.c.old 2006-06-24 17:36:59.248122032 +0200 ++++ trunk/lib/device.c 2006-06-24 17:38:52.999829144 +0200 +@@ -1115,6 +1115,8 @@ + else + { + if ((strncmp (dev, "/dev/ataraid/", 13) == 0) || ++ (strncmp (dev, "/dev/ida/", 9) == 0) || ++ (strncmp (dev, "/dev/cciss/", 11) == 0) || + (strncmp (dev, "/dev/rd/", 8) == 0)) + strcpy (dev + strlen(dev), "p"); + } --- grub-0.97.orig/debian/patches/quiet.diff +++ grub-0.97/debian/patches/quiet.diff @@ -0,0 +1,258 @@ +diff -Naur grub-0.97.orig/stage2/boot.c grub-0.97/stage2/boot.c +--- grub-0.97.orig/stage2/boot.c 2004-03-30 06:44:08.000000000 -0500 ++++ grub-0.97/stage2/boot.c 2006-07-08 07:37:35.000000000 -0400 +@@ -280,8 +280,9 @@ + errnum = ERR_WONT_FIT; + else + { +- grub_printf (" [Linux-%s, setup=0x%x, size=0x%x]\n", +- (big_linux ? "bzImage" : "zImage"), data_len, text_len); ++ if (!quiet_boot) ++ grub_printf (" [Linux-%s, setup=0x%x, size=0x%x]\n", ++ (big_linux ? "bzImage" : "zImage"), data_len, text_len); + + /* Video mode selection support. What a mess! */ + /* NOTE: Even the word "mess" is not still enough to +@@ -487,7 +488,8 @@ + mbi.syms.a.addr = 0; + mbi.syms.a.pad = 0; + +- printf (" [%s-%s", str2, str); ++ if (!quiet_boot) ++ printf (" [%s-%s", str2, str); + + str = ""; + +@@ -495,8 +497,9 @@ + { + if (flags & MULTIBOOT_AOUT_KLUDGE) + str = "-and-data"; +- +- printf (", loadaddr=0x%x, text%s=0x%x", cur_addr, str, text_len); ++ ++ if (!quiet_boot) ++ printf (", loadaddr=0x%x, text%s=0x%x", cur_addr, str, text_len); + + /* read text, then read data */ + if (grub_read ((char *) RAW_ADDR (cur_addr), text_len) == text_len) +@@ -733,6 +736,7 @@ + + if (! errnum) + { ++ if (!quiet_boot) + grub_printf (", entry=0x%x]\n", (unsigned) entry_addr); + + /* If the entry address is physically different from that of the ELF +@@ -836,7 +840,8 @@ + moveto -= 0x10000; + memmove ((void *) RAW_ADDR (moveto), (void *) cur_addr, len); + +- printf (" [Linux-initrd @ 0x%x, 0x%x bytes]\n", moveto, len); ++ if (!quiet_boot) ++ printf (" [Linux-initrd @ 0x%x, 0x%x bytes]\n", moveto, len); + + /* FIXME: Should check if the kernel supports INITRD. */ + lh->ramdisk_image = RAW_ADDR (moveto); +diff -Naur grub-0.97.orig/stage2/builtins.c grub-0.97/stage2/builtins.c +--- grub-0.97.orig/stage2/builtins.c 2005-02-15 16:58:23.000000000 -0500 ++++ grub-0.97/stage2/builtins.c 2006-07-08 13:53:51.000000000 -0400 +@@ -75,6 +75,8 @@ + int grub_timeout = -1; + /* Whether to show the menu or not. */ + int show_menu = 1; ++/* Whether to quiet boot messages or not. */ ++int quiet_boot = 1; + /* The BIOS drive map. */ + static unsigned short bios_drive_map[DRIVE_MAP_SIZE + 1]; + +@@ -248,6 +250,7 @@ + cleanup_net (); + #endif + ++ grub_printf("Starting up ...\n"); + switch (kernel_type) + { + case KERNEL_TYPE_FREEBSD: +@@ -342,7 +345,8 @@ + } + + /* Notify the configuration. */ +- print_network_configuration (); ++ if (!quiet_boot) ++ print_network_configuration (); + + /* XXX: this can cause an endless loop, but there is no easy way to + detect such a loop unfortunately. */ +@@ -1599,6 +1603,23 @@ + "Hide the menu." + #endif + }; ++ ++/* quietboot */ ++static int ++quietboot_func (char *arg, int flags) ++{ ++ quiet_boot = 1; ++ return 0; ++} ++ ++static struct builtin builtin_quietboot = ++{ ++ "quiet", ++ quietboot_func, ++ BUILTIN_CMDLINE | BUILTIN_HELP_LIST, ++ "quietboot", ++ "Quiet boot messages." ++}; + + + /* hide */ +@@ -1663,8 +1686,8 @@ + errnum = ERR_BAD_ARGUMENT; + return 1; + } +- +- print_network_configuration (); ++ if (!quiet_boot) ++ print_network_configuration (); + return 0; + } + +@@ -3019,7 +3042,8 @@ + } + + /* Notify the configuration. */ +- print_network_configuration (); ++ if (!quiet_boot) ++ print_network_configuration (); + return 0; + } + +@@ -3109,7 +3133,8 @@ + /* Print the filesystem information. */ + current_partition = saved_partition; + current_drive = saved_drive; +- print_fsys_type (); ++ if (!quiet_boot) ++ print_fsys_type (); + } + + static int +@@ -3120,10 +3145,13 @@ + char *next; + + /* If ARG is empty, just print the current root device. */ +- if (! *arg) ++ if (!quiet_boot) + { +- print_root_device (); +- return 0; ++ if (! *arg) ++ { ++ print_root_device (); ++ return 0; ++ } + } + + /* Call set_device to get the drive and the partition in ARG. */ +@@ -3165,7 +3193,8 @@ + return 1; + + /* Print the type of the filesystem. */ +- print_fsys_type (); ++ if (!quiet_boot) ++ print_fsys_type (); + } + + return 0; +@@ -4578,8 +4607,8 @@ + errnum = ERR_BAD_ARGUMENT; + return 1; + } +- +- print_network_configuration (); ++ if (!quiet_boot) ++ print_network_configuration (); + return 0; + } + +@@ -4851,6 +4880,7 @@ + #ifdef GRUB_UTIL + &builtin_quit, + #endif /* GRUB_UTIL */ ++ &builtin_quietboot, + #ifdef SUPPORT_NETBOOT + &builtin_rarp, + #endif /* SUPPORT_NETBOOT */ +diff -Naur grub-0.97.orig/stage2/char_io.c grub-0.97/stage2/char_io.c +--- grub-0.97.orig/stage2/char_io.c 2005-02-01 15:51:23.000000000 -0500 ++++ grub-0.97/stage2/char_io.c 2006-07-08 14:07:53.000000000 -0400 +@@ -237,9 +237,6 @@ + init_page (void) + { + cls (); +- +- grub_printf ("\n GNU GRUB version %s (%dK lower / %dK upper memory)\n\n", +- version_string, mbi.mem_lower, mbi.mem_upper); + } + + /* The number of the history entries. */ +diff -Naur grub-0.97.orig/stage2/cmdline.c grub-0.97/stage2/cmdline.c +--- grub-0.97.orig/stage2/cmdline.c 2004-08-16 19:23:01.000000000 -0400 ++++ grub-0.97/stage2/cmdline.c 2006-07-08 07:37:35.000000000 -0400 +@@ -229,16 +229,22 @@ + } + + /* Find a builtin. */ ++ + builtin = find_command (heap); + if (! builtin) + { ++ if(!quiet_boot) ++ { + grub_printf ("%s\n", old_entry); + continue; ++ } + } + + if (! (builtin->flags & BUILTIN_NO_ECHO)) +- grub_printf ("%s\n", old_entry); +- ++ { ++ if (!quiet_boot) ++ grub_printf ("%s\n", old_entry); ++ } + /* If BUILTIN cannot be run in the command-line, skip it. */ + if (! (builtin->flags & BUILTIN_CMDLINE)) + { +diff -Naur grub-0.97.orig/stage2/shared.h grub-0.97/stage2/shared.h +--- grub-0.97.orig/stage2/shared.h 2004-06-19 12:40:09.000000000 -0400 ++++ grub-0.97/stage2/shared.h 2006-07-08 07:37:35.000000000 -0400 +@@ -854,6 +854,7 @@ + + extern kernel_t kernel_type; + extern int show_menu; ++extern int quiet_boot; + extern int grub_timeout; + + void init_builtins (void); +diff -Naur grub-0.97.orig/stage2/stage2.c grub-0.97/stage2/stage2.c +--- grub-0.97.orig/stage2/stage2.c 2005-03-19 12:51:57.000000000 -0500 ++++ grub-0.97/stage2/stage2.c 2006-07-08 07:37:35.000000000 -0400 +@@ -717,12 +717,15 @@ + + while (1) + { ++ if (!quiet_boot) ++ { + if (config_entries) + printf (" Booting \'%s\'\n\n", + get_entry (menu_entries, first_entry + entryno, 0)); + else + printf (" Booting command-list\n\n"); +- ++ } ++ + if (! cur_entry) + cur_entry = get_entry (config_entries, first_entry + entryno, 1); + --- grub-0.97.orig/debian/patches/crossreference_manpages.diff +++ grub-0.97/debian/patches/crossreference_manpages.diff @@ -0,0 +1,54 @@ +Index: current/docs/help2man +=================================================================== +--- current/docs/help2man (revision 414) ++++ current/docs/help2man (working copy) +@@ -455,7 +455,9 @@ + $include{$sect} .= <dp ++ ++ It currently supports up to 3 controllers, 10 logical volumes ++ and 10 partitions ++ ++ Code gratuitously copied from DAC960 above. ++ Horms 23rd July 2004 ++ */ ++ { ++ int controller, drive; ++ ++ for (controller = 0; controller < 2; controller++) ++ { ++ for (drive = 0; drive < 9; drive++) ++ { ++ char name[24]; ++ ++ get_cciss_disk_name (name, controller, drive); ++ if (check_device (name)) ++ { ++ (*map)[num_hd + 0x80] = strdup (name); ++ assert ((*map)[num_hd + 0x80]); ++ ++ /* If the device map file is opened, write the map. */ ++ if (fp) ++ fprintf (fp, "(hd%d)\t%s\n", num_hd, name); ++ ++ num_hd++; ++ } ++ } ++ } ++ } ++ ++ /* This is for Compaq Smart Array, its like the DAC960 - we have ++ /dev/ida/dp ++ ++ It currently supports up to 3 controllers, 10 logical volumes ++ and 15 partitions ++ ++ Code gratuitously copied from DAC960 above. ++ Piotr Roszatycki ++ */ ++ { ++ int controller, drive; ++ ++ for (controller = 0; controller < 2; controller++) ++ { ++ for (drive = 0; drive < 9; drive++) ++ { ++ char name[24]; ++ ++ get_ida_disk_name (name, controller, drive); ++ if (check_device (name)) ++ { ++ (*map)[num_hd + 0x80] = strdup (name); ++ assert ((*map)[num_hd + 0x80]); ++ ++ /* If the device map file is opened, write the map. */ ++ if (fp) ++ fprintf (fp, "(hd%d)\t%s\n", num_hd, name); ++ ++ num_hd++; ++ } ++ } ++ } ++ } + #endif /* __linux__ */ + + /* OK, close the device map file if opened. */ --- grub-0.97.orig/debian/patches/grub-install_aoe_support.diff +++ grub-0.97/debian/patches/grub-install_aoe_support.diff @@ -0,0 +1,22 @@ +diff -Nur grub-0.97-orig/util/grub-install.in grub-0.97/util/grub-install.in +--- grub-0.97-orig/util/grub-install.in 2006-07-10 17:39:19.000000000 -0300 ++++ grub-0.97/util/grub-install.in 2006-07-10 17:28:51.000000000 -0300 +@@ -148,13 +148,16 @@ + -e 's%\(d[0-9]*\)p[0-9]*$%\1%' \ + -e 's%\(fd[0-9]*\)$%\1%' \ + -e 's%/part[0-9]*$%/disc%' \ +- -e 's%\(c[0-7]d[0-9]*\).*$%\1%'` ++ -e 's%\(c[0-7]d[0-9]*\).*$%\1%' \ ++ -e 's%\(e[0-9]\.[0-9]*\).*$%\1%'` + tmp_part=`echo "$1" | sed -e 's%.*/[sh]d[a-z]\([0-9]*\)$%\1%' \ + -e 's%.*d[0-9]*p%%' \ + -e 's%.*/fd[0-9]*$%%' \ + -e 's%.*/floppy/[0-9]*$%%' \ + -e 's%.*/\(disc\|part\([0-9]*\)\)$%\2%' \ +- -e 's%.*c[0-7]d[0-9]*p%%'` ++ -e 's%.*c[0-7]d[0-9]*p*%%' \ ++ -e 's%.*e[0-9]\.[0-9]*p%%' \ ++ -e 's%.*e[0-9]\.[0-9]*\$%%'` + ;; + gnu*) + tmp_disk=`echo "$1" | sed 's%\([sh]d[0-9]*\).*%\1%'` --- grub-0.97.orig/debian/patches/grub-install_storeversion.diff +++ grub-0.97/debian/patches/grub-install_storeversion.diff @@ -0,0 +1,11 @@ +--- grub-0.97/util/grub-install.in.orig 2006-07-09 15:48:38.069020456 -0700 ++++ grub-0.97/util/grub-install.in 2006-07-09 15:48:53.886764300 -0700 +@@ -462,6 +462,8 @@ + exit 1 + fi + ++dpkg-query -W -f '${Version}\n' grub > ${grubdir}/installed-version ++ + rm -f $log_file + + # Prompt the user to check if the device map is correct. --- grub-0.97.orig/debian/patches/fix_amd64_compile.diff +++ grub-0.97/debian/patches/fix_amd64_compile.diff @@ -0,0 +1,11 @@ +--- grub-0.97-bkp/configure.ac 2005-11-05 16:53:00.419491832 -0200 ++++ grub-0.97/configure.ac 2005-11-05 16:53:13.777461112 -0200 +@@ -47,7 +47,7 @@ + fi + + if test "x$host_cpu" = xx86_64; then +- CFLAGS="-m32 $CFLAGS" ++ CFLAGS="-m64 $CFLAGS" + fi + + # --- grub-0.97.orig/debian/patches/splashimage_help.diff +++ grub-0.97/debian/patches/splashimage_help.diff @@ -0,0 +1,34 @@ + + Date: 2005-11-11 + Author: Otavio Salvador + Comment: Stolen from Fedora grub package. + Add document entry for splashimage option. + +diff -ur grub-0.91/docs/grub.texi grub/docs/grub.texi +--- grub-0.91/docs/grub.texi Mon Jan 21 22:57:46 2002 ++++ grub/docs/grub.texi Mon Jan 21 22:57:51 2002 +@@ -1891,6 +1891,7 @@ + * rarp:: Initialize a network device via RARP + * serial:: Set up a serial device + * setkey:: Configure the key map ++* splashimage:: Use a splash image + * terminal:: Choose a terminal + * tftpserver:: Specify a TFTP server + * unhide:: Unhide a partition +@@ -2260,6 +2261,16 @@ + @end deffn + + ++@node splashimage ++@subsection splashimage ++ ++@deffn Command splashimage file ++Select an image to use as the background image. This should be ++specified using normal GRUB device naming syntax. The format of the ++file is a gzipped xpm which is 640x480 with a 14 color palette. ++@end deffn ++ ++ + @node terminal + @subsection terminal + --- grub-0.97.orig/debian/patches/graphics.diff +++ grub-0.97/debian/patches/graphics.diff @@ -0,0 +1,2299 @@ +diff -Naur grub-0.97.orig/configure.ac grub-0.97/configure.ac +--- grub-0.97.orig/configure.ac 2005-05-07 23:36:03.000000000 -0300 ++++ grub-0.97/configure.ac 2005-06-12 20:56:49.000000000 -0300 +@@ -595,6 +595,11 @@ + [ --enable-diskless enable diskless support]) + AM_CONDITIONAL(DISKLESS_SUPPORT, test "x$enable_diskless" = xyes) + ++dnl Graphical splashscreen support ++AC_ARG_ENABLE(graphics, ++ [ --disable-graphics disable graphics terminal support]) ++AM_CONDITIONAL(GRAPHICS_SUPPORT, test "x$enable_graphics" != xno) ++ + dnl Hercules terminal + AC_ARG_ENABLE(hercules, + [ --disable-hercules disable hercules terminal support]) +diff -Naur grub-0.97.orig/stage2/asm.S grub-0.97/stage2/asm.S +--- grub-0.97.orig/stage2/asm.S 2004-06-19 13:55:22.000000000 -0300 ++++ grub-0.97/stage2/asm.S 2005-06-13 14:05:31.000000000 -0300 +@@ -2216,7 +2216,304 @@ + pop %ebx + pop %ebp + ret +- ++ ++ ++/* graphics mode functions */ ++#ifdef SUPPORT_GRAPHICS ++VARIABLE(cursorX) ++.word 0 ++VARIABLE(cursorY) ++.word 0 ++VARIABLE(cursorCount) ++.word 0 ++VARIABLE(cursorBuf) ++.byte 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ++ ++ ++/* ++ * set_int1c_handler(void) ++ */ ++ENTRY(set_int1c_handler) ++ pushl %edi ++ ++ /* save the original int1c handler */ ++ movl $0x70, %edi ++ movw (%edi), %ax ++ movw %ax, ABS(int1c_offset) ++ movw 2(%edi), %ax ++ movw %ax, ABS(int1c_segment) ++ ++ /* save the new int1c handler */ ++ movw $ABS(int1c_handler), %ax ++ movw %ax, (%edi) ++ xorw %ax, %ax ++ movw %ax, 2(%edi) ++ ++ popl %edi ++ ret ++ ++ ++/* ++ * unset_int1c_handler(void) ++ */ ++ENTRY(unset_int1c_handler) ++ pushl %edi ++ ++ /* check if int1c_handler is set */ ++ movl $0x70, %edi ++ movw $ABS(int1c_handler), %ax ++ cmpw %ax, (%edi) ++ jne int1c_1 ++ xorw %ax, %ax ++ cmpw %ax, 2(%edi) ++ jne int1c_1 ++ ++ /* restore the original */ ++ movw ABS(int1c_offset), %ax ++ movw %ax, (%edi) ++ movw ABS(int1c_segment), %ax ++ movw %ax, 2(%edi) ++ ++int1c_1: ++ popl %edi ++ ret ++ ++ ++/* ++ * blinks graphics cursor ++ */ ++ .code16 ++write_data: ++ movw $0, %ax ++ movw %ax, %ds ++ ++ mov $0xA000, %ax /* video in es:di */ ++ mov %ax, %es ++ mov $80, %ax ++ movw $ABS(cursorY), %si ++ mov %ds:(%si), %bx ++ mul %bx ++ movw $ABS(cursorX), %si ++ mov %ds:(%si), %bx ++ shr $3, %bx /* %bx /= 8 */ ++ add %bx, %ax ++ mov %ax, %di ++ ++ movw $ABS(cursorBuf), %si /* fontBuf in ds:si */ ++ ++ /* prepare for data moving */ ++ mov $16, %dx /* altura da fonte */ ++ mov $80, %bx /* bytes por linha */ ++ ++write_loop: ++ movb %ds:(%si), %al ++ xorb $0xff, %al ++ movb %al, %ds:(%si) /* invert cursorBuf */ ++ movb %al, %es:(%di) /* write to video */ ++ add %bx, %di ++ inc %si ++ dec %dx ++ jg write_loop ++ ret ++ ++int1c_handler: ++ pusha ++ mov $0, %ax ++ mov %ax, %ds ++ mov $ABS(cursorCount), %si ++ mov %ds:(%si), %ax ++ inc %ax ++ mov %ax, %ds:(%si) ++ cmp $9, %ax ++ jne int1c_done ++ ++ mov $0, %ax ++ mov %ax, %ds:(%si) ++ call write_data ++ ++int1c_done: ++ popa ++ iret ++ /* call previous int1c handler */ ++ /* ljmp */ ++ .byte 0xea ++int1c_offset: .word 0 ++int1c_segment: .word 0 ++ .code32 ++ ++ ++/* ++ * unsigned char set_videomode(unsigned char mode) ++ * BIOS call "INT 10H Function 0h" to set video mode ++ * Call with %ah = 0x0 ++ * %al = video mode ++ * Returns old videomode. ++ */ ++ENTRY(set_videomode) ++ pushl %ebp ++ movl %esp,%ebp ++ pushl %ebx ++ pushl %ecx ++ ++ movb 8(%ebp), %cl ++ ++ call EXT_C(prot_to_real) ++ .code16 ++ ++ xorb %al, %al ++ movb $0xf, %ah ++ int $0x10 /* Get Current Video mode */ ++ movb %al, %ch ++ xorb %ah, %ah ++ movb %cl, %al ++ int $0x10 /* Set Video mode */ ++ ++ DATA32 call EXT_C(real_to_prot) ++ .code32 ++ ++ xorl %eax, %eax ++ movb %ch, %al ++ ++ popl %ecx ++ popl %ebx ++ popl %ebp ++ ret ++ ++ ++/* ++ * int get_videomode() ++ * BIOS call "INT 10H Function 0Fh" to get current video mode ++ * Call with %al = 0x0 ++ * %ah = 0xF ++ * Returns current videomode. ++ */ ++ENTRY(get_videomode) ++ pushl %ebp ++ movl %esp,%ebp ++ pushl %ebx ++ pushl %ecx ++ ++ call EXT_C(prot_to_real) ++ .code16 ++ ++ xorb %al, %al ++ movb $0xF, %ah ++ int $0x10 /* Get Current Video mode */ ++ movb %al, %cl /* For now we only want display mode */ ++ ++ DATA32 call EXT_C(real_to_prot) ++ .code32 ++ ++ xorl %eax, %eax ++ movb %cl, %al ++ ++ popl %ecx ++ popl %ebx ++ popl %ebp ++ ret ++ ++ ++/* ++ * unsigned char * graphics_get_font() ++ * BIOS call "INT 10H Function 11h" to set font ++ * Call with %ah = 0x11 ++ */ ++ENTRY(graphics_get_font) ++ push %ebp ++ push %ebx ++ push %ecx ++ push %edx ++ ++ call EXT_C(prot_to_real) ++ .code16 ++ ++ movw $0x1130, %ax ++ movb $6, %bh /* font 8x16 */ ++ int $0x10 ++ movw %bp, %dx ++ movw %es, %cx ++ ++ DATA32 call EXT_C(real_to_prot) ++ .code32 ++ ++ xorl %eax, %eax ++ movw %cx, %ax ++ shll $4, %eax ++ movw %dx, %ax ++ ++ pop %edx ++ pop %ecx ++ pop %ebx ++ pop %ebp ++ ret ++ ++ ++/* ++ * graphics_set_palette(index, red, green, blue) ++ * BIOS call "INT 10H Function 10h" to set individual dac register ++ * Call with %ah = 0x10 ++ * %bx = register number ++ * %ch = new value for green (0-63) ++ * %cl = new value for blue (0-63) ++ * %dh = new value for red (0-63) ++ */ ++ ++ENTRY(graphics_set_palette) ++ push %ebp ++ push %eax ++ push %ebx ++ push %ecx ++ push %edx ++ ++ movw $0x3c8, %bx /* address write mode register */ ++ ++ /* wait vertical retrace */ ++ movw $0x3da, %dx ++l1b: ++ inb %dx, %al /* wait vertical active display */ ++ test $8, %al ++ jnz l1b ++ ++l2b: ++ inb %dx, %al /* wait vertical retrace */ ++ test $8, %al ++ jnz l2b ++ ++ mov %bx, %dx ++ movb 0x18(%esp), %al /* index */ ++ outb %al, %dx ++ inc %dx ++ ++ movb 0x1c(%esp), %al /* red */ ++ outb %al, %dx ++ ++ movb 0x20(%esp), %al /* green */ ++ outb %al, %dx ++ ++ movb 0x24(%esp), %al /* blue */ ++ outb %al, %dx ++ ++ movw 0x18(%esp), %bx ++ ++ call EXT_C(prot_to_real) ++ .code16 ++ ++ movb %bl, %bh ++ movw $0x1000, %ax ++ int $0x10 ++ ++ DATA32 call EXT_C(real_to_prot) ++ .code32 ++ ++ pop %edx ++ pop %ecx ++ pop %ebx ++ pop %eax ++ pop %ebp ++ ret ++#endif /* SUPPORT_GRAPHICS */ ++ ++ + /* + * getrtsecs() + * if a seconds value can be read, read it and return it (BCD), +diff -Naur grub-0.97.orig/stage2/builtins.c grub-0.97/stage2/builtins.c +--- grub-0.97.orig/stage2/builtins.c 2005-02-15 19:58:23.000000000 -0200 ++++ grub-0.97/stage2/builtins.c 2005-06-13 18:44:03.000000000 -0300 +@@ -28,6 +28,10 @@ + #include + #include + ++#ifdef SUPPORT_GRAPHICS ++# include ++#endif ++ + #ifdef SUPPORT_NETBOOT + # define GRUB 1 + # include +@@ -237,12 +241,22 @@ + static int + boot_func (char *arg, int flags) + { ++ struct term_entry *prev_term = current_term; + /* Clear the int15 handler if we can boot the kernel successfully. + This assumes that the boot code never fails only if KERNEL_TYPE is + not KERNEL_TYPE_NONE. Is this assumption is bad? */ + if (kernel_type != KERNEL_TYPE_NONE) + unset_int15_handler (); + ++ /* if our terminal needed initialization, we should shut it down ++ * before booting the kernel, but we want to save what it was so ++ * we can come back if needed */ ++ if (current_term->shutdown) ++ { ++ current_term->shutdown(); ++ current_term = term_table; /* assumption: console is first */ ++ } ++ + #ifdef SUPPORT_NETBOOT + /* Shut down the networking. */ + cleanup_net (); +@@ -306,6 +320,13 @@ + return 1; + } + ++ /* if we get back here, we should go back to what our term was before */ ++ current_term = prev_term; ++ if (current_term->startup) ++ /* if our terminal fails to initialize, fall back to console since ++ * it should always work */ ++ if (current_term->startup() == 0) ++ current_term = term_table; /* we know that console is first */ + return 0; + } + +@@ -852,6 +873,251 @@ + }; + #endif /* SUPPORT_NETBOOT */ + ++#ifdef SUPPORT_GRAPHICS ++ ++static int splashimage_func(char *arg, int flags) { ++ int i; ++ ++ /* filename can only be 256 characters due to our buffer size */ ++ if (grub_strlen(arg) > 256) { ++ grub_printf("Splash image filename too large\n"); ++ grub_printf("Press any key to continue..."); ++ getkey(); ++ return 1; ++ } ++ ++ /* get rid of TERM_NEED_INIT from the graphics terminal. */ ++ for (i = 0; term_table[i].name; i++) { ++ if (grub_strcmp (term_table[i].name, "graphics") == 0) { ++ term_table[i].flags &= ~TERM_NEED_INIT; ++ break; ++ } ++ } ++ ++ graphics_set_splash(arg); ++ ++ if (flags == BUILTIN_CMDLINE && graphics_inited) { ++ graphics_end(); ++ if (graphics_init() == 0) { ++ /* Fallback to default term */ ++ current_term = term_table; ++ max_lines = current_term->max_lines; ++ if (current_term->cls) ++ current_term->cls(); ++ grub_printf("Failed to set splash image and/or graphics mode\n"); ++ return 1; ++ } ++ graphics_cls(); ++ } ++ ++ if (flags == BUILTIN_MENU) ++ current_term = term_table + i; ++ ++ return 0; ++} ++ ++static struct builtin builtin_splashimage = ++{ ++ "splashimage", ++ splashimage_func, ++ BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_HELP_LIST, ++ "splashimage FILE", ++ "Load FILE as the background image when in graphics mode." ++}; ++ ++ ++/* shade */ ++static int ++shade_func(char *arg, int flags) ++{ ++ int new_shade; ++ ++ if (!arg || safe_parse_maxint(&arg, &new_shade) == 0) ++ return (1); ++ ++ if (shade != new_shade) { ++ shade = new_shade; ++ if (flags == BUILTIN_CMDLINE && graphics_inited) { ++ graphics_end(); ++ graphics_init(); ++ graphics_cls(); ++ } ++ } ++ ++ return 0; ++} ++ ++static struct builtin builtin_shade = ++{ ++ "shade", ++ shade_func, ++ BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_HELP_LIST, ++ "shade INTEGER", ++ "If set to 0, disables the use of shaded text, else enables it." ++}; ++ ++ ++/* foreground */ ++static int ++foreground_func(char *arg, int flags) ++{ ++ if (grub_strlen(arg) == 6) { ++ int r = ((hex(arg[0]) << 4) | hex(arg[1])) >> 2; ++ int g = ((hex(arg[2]) << 4) | hex(arg[3])) >> 2; ++ int b = ((hex(arg[4]) << 4) | hex(arg[5])) >> 2; ++ ++ foreground = (r << 16) | (g << 8) | b; ++ if (graphics_inited) ++ graphics_set_palette(15, r, g, b); ++ ++ return 0; ++ } ++ ++ return 1; ++} ++ ++static struct builtin builtin_foreground = ++{ ++ "foreground", ++ foreground_func, ++ BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_HELP_LIST, ++ "foreground RRGGBB", ++ "Sets the foreground color when in graphics mode." ++ "RR is red, GG is green, and BB blue. Numbers must be in hexadecimal." ++}; ++ ++ ++/* background */ ++static int ++background_func(char *arg, int flags) ++{ ++ if (grub_strlen(arg) == 6) { ++ int r = ((hex(arg[0]) << 4) | hex(arg[1])) >> 2; ++ int g = ((hex(arg[2]) << 4) | hex(arg[3])) >> 2; ++ int b = ((hex(arg[4]) << 4) | hex(arg[5])) >> 2; ++ ++ background = (r << 16) | (g << 8) | b; ++ if (graphics_inited) ++ graphics_set_palette(0, r, g, b); ++ return 0; ++ } ++ ++ return 1; ++} ++ ++static struct builtin builtin_background = ++{ ++ "background", ++ background_func, ++ BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_HELP_LIST, ++ "background RRGGBB", ++ "Sets the background color when in graphics mode." ++ "RR is red, GG is green, and BB blue. Numbers must be in hexadecimal." ++}; ++ ++ ++/* border */ ++static int ++border_func(char *arg, int flags) ++{ ++ if (grub_strlen(arg) == 6) { ++ int r = ((hex(arg[0]) << 4) | hex(arg[1])) >> 2; ++ int g = ((hex(arg[2]) << 4) | hex(arg[3])) >> 2; ++ int b = ((hex(arg[4]) << 4) | hex(arg[5])) >> 2; ++ ++ window_border = (r << 16) | (g << 8) | b; ++ if (graphics_inited) ++ graphics_set_palette(0x11, r, g, b); ++ ++ return 0; ++ } ++ ++ return 1; ++} ++ ++static struct builtin builtin_border = ++{ ++ "border", ++ border_func, ++ BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_HELP_LIST, ++ "border RRGGBB", ++ "Sets the border video color when in graphics mode." ++ "RR is red, GG is green, and BB blue. Numbers must be in hexadecimal." ++}; ++ ++ ++/* viewport */ ++static int ++viewport_func (char *arg, int flags) ++{ ++ int i; ++ int x0 = 0, y0 = 0, x1 = 80, y1 = 30; ++ int *pos[4] = { &x0, &y0, &x1, &y1 }; ++ ++ if (!arg) ++ return (1); ++ for (i = 0; i < 4; i++) { ++ if (!*arg) ++ return (1); ++ while (*arg && (*arg == ' ' || *arg == '\t')) ++ ++arg; ++ if (!safe_parse_maxint(&arg, pos[i])) ++ return (1); ++ while (*arg && (*arg != ' ' && *arg != '\t')) ++ ++arg; ++ } ++ ++ /* minimum size is 65 colums and 16 rows */ ++ if (x0 > x1 - 66 || y0 > y1 - 16 || x0 < 0 || y0 < 0 || x1 > 80 || y1 > 30) ++ return 1; ++ ++ view_x0 = x0; ++ view_y0 = y0; ++ view_x1 = x1; ++ view_y1 = y1; ++ ++ if (flags == BUILTIN_CMDLINE && graphics_inited) { ++ graphics_end(); ++ graphics_init(); ++ graphics_cls(); ++ } ++ ++ return 0; ++} ++ ++static struct builtin builtin_viewport = ++{ ++ "viewport", ++ viewport_func, ++ BUILTIN_CMDLINE | BUILTIN_MENU | BUILTIN_HELP_LIST, ++ "viewport x0 y0 x1 y1", ++ "Changes grub internals to output text in the window defined by" ++ " four parameters. The x and y parameters are 0 based. This option" ++ " only works with the graphics interface." ++}; ++ ++#endif /* SUPPORT_GRAPHICS */ ++ ++ ++/* clear */ ++static int ++clear_func() ++{ ++ if (current_term->cls) ++ current_term->cls(); ++ ++ return 0; ++} ++ ++static struct builtin builtin_clear = ++{ ++ "clear", ++ clear_func, ++ BUILTIN_CMDLINE | BUILTIN_HELP_LIST, ++ "clear", ++ "Clear the screen" ++}; ++ + + /* displayapm */ + static int +@@ -1454,14 +1720,20 @@ + + + /* help */ +-#define MAX_SHORT_DOC_LEN 39 +-#define MAX_LONG_DOC_LEN 66 +- + static int + help_func (char *arg, int flags) + { +- int all = 0; +- ++ int all = 0, max_short_doc_len, max_long_doc_len; ++ max_short_doc_len = 39; ++ max_long_doc_len = 66; ++#ifdef SUPPORT_GRAPHICS ++ if (grub_memcmp (current_term->name, "graphics", sizeof ("graphics") - 1) == 0) ++ { ++ max_short_doc_len = (view_x1 - view_x0 + 1) / 2 - 1; ++ max_long_doc_len = (view_x1 - view_x0) - 14; ++ } ++#endif ++ + if (grub_memcmp (arg, "--all", sizeof ("--all") - 1) == 0) + { + all = 1; +@@ -1491,13 +1763,13 @@ + + len = grub_strlen ((*builtin)->short_doc); + /* If the length of SHORT_DOC is too long, truncate it. */ +- if (len > MAX_SHORT_DOC_LEN - 1) +- len = MAX_SHORT_DOC_LEN - 1; ++ if (len > max_short_doc_len - 1) ++ len = max_short_doc_len - 1; + + for (i = 0; i < len; i++) + grub_putchar ((*builtin)->short_doc[i]); + +- for (; i < MAX_SHORT_DOC_LEN; i++) ++ for (; i < max_short_doc_len; i++) + grub_putchar (' '); + + if (! left) +@@ -1546,10 +1818,10 @@ + int i; + + /* If LEN is too long, fold DOC. */ +- if (len > MAX_LONG_DOC_LEN) ++ if (len > max_long_doc_len) + { + /* Fold this line at the position of a space. */ +- for (len = MAX_LONG_DOC_LEN; len > 0; len--) ++ for (len = max_long_doc_len; len > 0; len--) + if (doc[len - 1] == ' ') + break; + } +@@ -4085,7 +4357,7 @@ + }; + + +-#if defined(SUPPORT_SERIAL) || defined(SUPPORT_HERCULES) ++#if defined(SUPPORT_SERIAL) || defined(SUPPORT_HERCULES) || defined(SUPPORT_GRAPHICS) + /* terminal */ + static int + terminal_func (char *arg, int flags) +@@ -4244,17 +4516,29 @@ + end: + current_term = term_table + default_term; + current_term->flags = term_flags; +- ++ + if (lines) + max_lines = lines; + else +- /* 24 would be a good default value. */ +- max_lines = 24; +- ++ max_lines = current_term->max_lines; ++ + /* If the interface is currently the command-line, + restart it to repaint the screen. */ +- if (current_term != prev_term && (flags & BUILTIN_CMDLINE)) ++ if ((current_term != prev_term) && (flags & BUILTIN_CMDLINE)){ ++ if (prev_term->shutdown) ++ prev_term->shutdown(); ++ if (current_term->startup) { ++ /* If startup fails, return to previous term */ ++ if (current_term->startup() == 0) { ++ current_term = prev_term; ++ max_lines = current_term->max_lines; ++ if (current_term->cls) { ++ current_term->cls(); ++ } ++ } ++ } + grub_longjmp (restart_cmdline_env, 0); ++ } + + return 0; + } +@@ -4264,7 +4548,7 @@ + "terminal", + terminal_func, + BUILTIN_MENU | BUILTIN_CMDLINE | BUILTIN_HELP_LIST, +- "terminal [--dumb] [--no-echo] [--no-edit] [--timeout=SECS] [--lines=LINES] [--silent] [console] [serial] [hercules]", ++ "terminal [--dumb] [--no-echo] [--no-edit] [--timeout=SECS] [--lines=LINES] [--silent] [console] [serial] [hercules] [graphics]", + "Select a terminal. When multiple terminals are specified, wait until" + " you push any key to continue. If both console and serial are specified," + " the terminal to which you input a key first will be selected. If no" +@@ -4276,7 +4560,7 @@ + " seconds. The option --lines specifies the maximum number of lines." + " The option --silent is used to suppress messages." + }; +-#endif /* SUPPORT_SERIAL || SUPPORT_HERCULES */ ++#endif /* SUPPORT_SERIAL || SUPPORT_HERCULES || SUPPORT_GRAPHICS */ + + + #ifdef SUPPORT_SERIAL +@@ -4795,13 +5079,20 @@ + /* The table of builtin commands. Sorted in dictionary order. */ + struct builtin *builtin_table[] = + { ++#ifdef SUPPORT_GRAPHICS ++ &builtin_background, ++#endif + &builtin_blocklist, + &builtin_boot, + #ifdef SUPPORT_NETBOOT + &builtin_bootp, + #endif /* SUPPORT_NETBOOT */ ++#ifdef SUPPORT_GRAPHICS ++ &builtin_border, ++#endif + &builtin_cat, + &builtin_chainloader, ++ &builtin_clear, + &builtin_cmp, + &builtin_color, + &builtin_configfile, +@@ -4821,6 +5112,9 @@ + &builtin_embed, + &builtin_fallback, + &builtin_find, ++#ifdef SUPPORT_GRAPHICS ++ &builtin_foreground, ++#endif + &builtin_fstest, + &builtin_geometry, + &builtin_halt, +@@ -4864,9 +5158,13 @@ + #endif /* SUPPORT_SERIAL */ + &builtin_setkey, + &builtin_setup, +-#if defined(SUPPORT_SERIAL) || defined(SUPPORT_HERCULES) ++#ifdef SUPPORT_GRAPHICS ++ &builtin_shade, ++ &builtin_splashimage, ++#endif /* SUPPORT_GRAPHICS */ ++#if defined(SUPPORT_SERIAL) || defined(SUPPORT_HERCULES) || defined(SUPPORT_GRAPHICS) + &builtin_terminal, +-#endif /* SUPPORT_SERIAL || SUPPORT_HERCULES */ ++#endif /* SUPPORT_SERIAL || SUPPORT_HERCULES || SUPPORT_GRAPHICS */ + #ifdef SUPPORT_SERIAL + &builtin_terminfo, + #endif /* SUPPORT_SERIAL */ +@@ -4880,5 +5178,8 @@ + &builtin_unhide, + &builtin_uppermem, + &builtin_vbeprobe, ++#ifdef SUPPORT_GRAPHICS ++ &builtin_viewport, ++#endif + 0 + }; +diff -Naur grub-0.97.orig/stage2/char_io.c grub-0.97/stage2/char_io.c +--- grub-0.97.orig/stage2/char_io.c 2005-02-01 18:51:23.000000000 -0200 ++++ grub-0.97/stage2/char_io.c 2005-06-12 20:56:49.000000000 -0300 +@@ -29,12 +29,17 @@ + # include + #endif + ++#ifdef SUPPORT_GRAPHICS ++# include ++#endif ++ + #ifndef STAGE1_5 + struct term_entry term_table[] = + { + { + "console", + 0, ++ 24, + console_putchar, + console_checkkey, + console_getkey, +@@ -43,13 +48,16 @@ + console_cls, + console_setcolorstate, + console_setcolor, +- console_setcursor ++ console_setcursor, ++ 0, ++ 0 + }, + #ifdef SUPPORT_SERIAL + { + "serial", + /* A serial device must be initialized. */ + TERM_NEED_INIT, ++ 24, + serial_putchar, + serial_checkkey, + serial_getkey, +@@ -58,6 +66,8 @@ + serial_cls, + serial_setcolorstate, + 0, ++ 0, ++ 0, + 0 + }, + #endif /* SUPPORT_SERIAL */ +@@ -65,6 +75,7 @@ + { + "hercules", + 0, ++ 24, + hercules_putchar, + console_checkkey, + console_getkey, +@@ -73,11 +84,30 @@ + hercules_cls, + hercules_setcolorstate, + hercules_setcolor, +- hercules_setcursor ++ hercules_setcursor, ++ 0, ++ 0 + }, + #endif /* SUPPORT_HERCULES */ ++#ifdef SUPPORT_GRAPHICS ++ { "graphics", ++ TERM_NEED_INIT, /* flags */ ++ 30, /* number of lines */ ++ graphics_putchar, /* putchar */ ++ console_checkkey, /* checkkey */ ++ console_getkey, /* getkey */ ++ graphics_getxy, /* getxy */ ++ graphics_gotoxy, /* gotoxy */ ++ graphics_cls, /* cls */ ++ graphics_setcolorstate, /* setcolorstate */ ++ graphics_setcolor, /* setcolor */ ++ graphics_setcursor, /* nocursor */ ++ graphics_init, /* initialize */ ++ graphics_end /* shutdown */ ++ }, ++#endif /* SUPPORT_GRAPHICS */ + /* This must be the last entry. */ +- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } ++ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } + }; + + /* This must be console. */ +@@ -305,9 +335,10 @@ + + /* XXX: These should be defined in shared.h, but I leave these here, + until this code is freezed. */ +-#define CMDLINE_WIDTH 78 + #define CMDLINE_MARGIN 10 +- ++ ++ /* command-line limits */ ++ int cmdline_width = 78, col_start = 0; + int xpos, lpos, c, section; + /* The length of PROMPT. */ + int plen; +@@ -338,7 +369,7 @@ + + /* If the cursor is in the first section, display the first section + instead of the second. */ +- if (section == 1 && plen + lpos < CMDLINE_WIDTH) ++ if (section == 1 && plen + lpos < cmdline_width) + cl_refresh (1, 0); + else if (xpos - count < 1) + cl_refresh (1, 0); +@@ -354,7 +385,7 @@ + grub_putchar ('\b'); + } + else +- gotoxy (xpos, getxy () & 0xFF); ++ gotoxy (xpos + col_start, getxy () & 0xFF); + } + } + +@@ -364,7 +395,7 @@ + lpos += count; + + /* If the cursor goes outside, scroll the screen to the right. */ +- if (xpos + count >= CMDLINE_WIDTH) ++ if (xpos + count >= cmdline_width) + cl_refresh (1, 0); + else + { +@@ -383,7 +414,7 @@ + } + } + else +- gotoxy (xpos, getxy () & 0xFF); ++ gotoxy (xpos + col_start, getxy () & 0xFF); + } + } + +@@ -398,14 +429,14 @@ + if (full) + { + /* Recompute the section number. */ +- if (lpos + plen < CMDLINE_WIDTH) ++ if (lpos + plen < cmdline_width) + section = 0; + else +- section = ((lpos + plen - CMDLINE_WIDTH) +- / (CMDLINE_WIDTH - 1 - CMDLINE_MARGIN) + 1); ++ section = ((lpos + plen - cmdline_width) ++ / (cmdline_width - 1 - CMDLINE_MARGIN) + 1); + + /* From the start to the end. */ +- len = CMDLINE_WIDTH; ++ len = cmdline_width; + pos = 0; + grub_putchar ('\r'); + +@@ -445,8 +476,8 @@ + if (! full) + offset = xpos - 1; + +- start = ((section - 1) * (CMDLINE_WIDTH - 1 - CMDLINE_MARGIN) +- + CMDLINE_WIDTH - plen - CMDLINE_MARGIN); ++ start = ((section - 1) * (cmdline_width - 1 - CMDLINE_MARGIN) ++ + cmdline_width - plen - CMDLINE_MARGIN); + xpos = lpos + 1 - start; + start += offset; + } +@@ -471,7 +502,7 @@ + + /* If the cursor is at the last position, put `>' or a space, + depending on if there are more characters in BUF. */ +- if (pos == CMDLINE_WIDTH) ++ if (pos == cmdline_width) + { + if (start + len < llen) + grub_putchar ('>'); +@@ -488,7 +519,7 @@ + grub_putchar ('\b'); + } + else +- gotoxy (xpos, getxy () & 0xFF); ++ gotoxy (xpos + col_start, getxy () & 0xFF); + } + + /* Initialize the command-line. */ +@@ -518,10 +549,10 @@ + + llen += l; + lpos += l; +- if (xpos + l >= CMDLINE_WIDTH) ++ if (xpos + l >= cmdline_width) + cl_refresh (1, 0); +- else if (xpos + l + llen - lpos > CMDLINE_WIDTH) +- cl_refresh (0, CMDLINE_WIDTH - xpos); ++ else if (xpos + l + llen - lpos > cmdline_width) ++ cl_refresh (0, cmdline_width - xpos); + else + cl_refresh (0, l + llen - lpos); + } +@@ -533,12 +564,22 @@ + grub_memmove (buf + lpos, buf + lpos + count, llen - count + 1); + llen -= count; + +- if (xpos + llen + count - lpos > CMDLINE_WIDTH) +- cl_refresh (0, CMDLINE_WIDTH - xpos); ++ if (xpos + llen + count - lpos > cmdline_width) ++ cl_refresh (0, cmdline_width - xpos); + else + cl_refresh (0, llen + count - lpos); + } + ++ max_lines = current_term->max_lines; ++#ifdef SUPPORT_GRAPHICS ++ if (grub_memcmp (current_term->name, "graphics", sizeof ("graphics") - 1) == 0) ++ { ++ cmdline_width = (view_x1 - view_x0) - 2; ++ col_start = view_x0; ++ max_lines = view_y1 - view_y0; ++ } ++#endif ++ + plen = grub_strlen (prompt); + llen = grub_strlen (cmdline); + +@@ -1006,6 +1047,48 @@ + } + #endif /* ! STAGE1_5 */ + ++#ifndef STAGE1_5 ++/* Internal pager. */ ++int ++do_more (void) ++{ ++ if (count_lines >= 0) ++ { ++ count_lines++; ++ if (count_lines >= max_lines - 2) ++ { ++ int tmp; ++ ++ /* It's important to disable the feature temporarily, because ++ the following grub_printf call will print newlines. */ ++ count_lines = -1; ++ ++ grub_printf("\n"); ++ if (current_term->setcolorstate) ++ current_term->setcolorstate (COLOR_STATE_HIGHLIGHT); ++ ++ grub_printf ("[Hit return to continue]"); ++ ++ if (current_term->setcolorstate) ++ current_term->setcolorstate (COLOR_STATE_NORMAL); ++ ++ ++ do ++ { ++ tmp = ASCII_CHAR (getkey ()); ++ } ++ while (tmp != '\n' && tmp != '\r'); ++ grub_printf ("\r \r"); ++ ++ /* Restart to count lines. */ ++ count_lines = 0; ++ return 1; ++ } ++ } ++ return 0; ++} ++#endif ++ + /* Display an ASCII character. */ + void + grub_putchar (int c) +@@ -1034,38 +1117,11 @@ + + if (c == '\n') + { ++ int flag; + /* Internal `more'-like feature. */ +- if (count_lines >= 0) +- { +- count_lines++; +- if (count_lines >= max_lines - 2) +- { +- int tmp; +- +- /* It's important to disable the feature temporarily, because +- the following grub_printf call will print newlines. */ +- count_lines = -1; +- +- if (current_term->setcolorstate) +- current_term->setcolorstate (COLOR_STATE_HIGHLIGHT); +- +- grub_printf ("\n[Hit return to continue]"); +- +- if (current_term->setcolorstate) +- current_term->setcolorstate (COLOR_STATE_NORMAL); +- +- do +- { +- tmp = ASCII_CHAR (getkey ()); +- } +- while (tmp != '\n' && tmp != '\r'); +- grub_printf ("\r \r"); +- +- /* Restart to count lines. */ +- count_lines = 0; +- return; +- } +- } ++ flag = do_more (); ++ if (flag) ++ return; + } + + current_term->putchar (c); +@@ -1090,7 +1146,7 @@ + cls (void) + { + /* If the terminal is dumb, there is no way to clean the terminal. */ +- if (current_term->flags & TERM_DUMB) ++ if (current_term->flags & TERM_DUMB) + grub_putchar ('\n'); + else + current_term->cls (); +@@ -1217,6 +1273,16 @@ + return ! errnum; + } + ++void ++grub_memcpy(void *dest, const void *src, int len) ++{ ++ int i; ++ register char *d = (char*)dest, *s = (char*)src; ++ ++ for (i = 0; i < len; i++) ++ d[i] = s[i]; ++} ++ + void * + grub_memmove (void *to, const void *from, int len) + { +diff -Naur grub-0.97.orig/stage2/cmdline.c grub-0.97/stage2/cmdline.c +--- grub-0.97.orig/stage2/cmdline.c 2004-08-16 20:23:01.000000000 -0300 ++++ grub-0.97/stage2/cmdline.c 2005-06-12 20:56:49.000000000 -0300 +@@ -50,10 +50,11 @@ + void + print_cmdline_message (int forever) + { +- printf (" [ Minimal BASH-like line editing is supported. For the first word, TAB\n" +- " lists possible command completions. Anywhere else TAB lists the possible\n" +- " completions of a device/filename.%s ]\n", +- (forever ? "" : " ESC at any time exits.")); ++ grub_printf(" [ Minimal BASH-like line editing is supported. For\n" ++ " the first word, TAB lists possible command\n" ++ " completions. Anywhere else TAB lists the possible\n" ++ " completions of a device/filename.%s ]\n", ++ (forever ? "" : " ESC at any time\n exits.")); + } + + /* Find the builtin whose command name is COMMAND and return the +diff -Naur grub-0.97.orig/stage2/graphics.c grub-0.97/stage2/graphics.c +--- grub-0.97.orig/stage2/graphics.c 1969-12-31 21:00:00.000000000 -0300 ++++ grub-0.97/stage2/graphics.c 2005-06-13 19:13:31.000000000 -0300 +@@ -0,0 +1,585 @@ ++/* ++ * graphics.c - graphics mode support for GRUB ++ * Implemented as a terminal type by Jeremy Katz based ++ * on a patch by Paulo Csar Pereira de Andrade ++ * Options and enhancements made by Herton Ronaldo Krzesinski ++ * ++ * ++ * GRUB -- GRand Unified Bootloader ++ * Copyright (C) 2001,2002 Red Hat, Inc. ++ * Portions copyright (C) 2000 Conectiva, Inc. ++ * ++ * This program 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 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program 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 this program; if not, write to the Free Software ++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ */ ++ ++#ifdef SUPPORT_GRAPHICS ++ ++#include ++#include ++#include ++ ++int saved_videomode; ++unsigned char *font8x16; ++ ++int graphics_inited = 0; ++static char splashimage[256]; ++ ++int shade = 1, no_cursor = 0; ++ ++#define VSHADOW VSHADOW1 ++unsigned char VSHADOW1[38400]; ++unsigned char VSHADOW2[38400]; ++unsigned char VSHADOW4[38400]; ++unsigned char VSHADOW8[38400]; ++ ++/* define the default viewable area */ ++int view_x0 = 0; ++int view_y0 = 0; ++int view_x1 = 80; ++int view_y1 = 30; ++ ++/* text buffer has to be kept around so that we can write things as we ++ * scroll and the like */ ++unsigned short text[80 * 30]; ++ ++/* graphics options */ ++int foreground = (63 << 16) | (63 << 8) | (63), background = 0, window_border = 0; ++ ++/* current position */ ++static int fontx = 0; ++static int fonty = 0; ++ ++/* global state so that we don't try to recursively scroll or cursor */ ++static int no_scroll = 0; ++ ++/* color state */ ++static int graphics_standard_color = A_NORMAL; ++static int graphics_normal_color = A_NORMAL; ++static int graphics_highlight_color = A_REVERSE; ++static int graphics_current_color = A_NORMAL; ++static color_state graphics_color_state = COLOR_STATE_STANDARD; ++ ++static inline void outb(unsigned short port, unsigned char val) ++{ ++ __asm __volatile ("outb %0,%1"::"a" (val), "d" (port)); ++} ++ ++static void MapMask(int value) { ++ outb(0x3c4, 2); ++ outb(0x3c5, value); ++} ++ ++/* bit mask register */ ++static void BitMask(int value) { ++ outb(0x3ce, 8); ++ outb(0x3cf, value); ++} ++ ++/* move the graphics cursor location to col, row */ ++static void graphics_setxy(int col, int row) { ++ if (col >= view_x0 && col < view_x1) { ++ fontx = col; ++ cursorX = col << 3; ++ } ++ if (row >= view_y0 && row < view_y1) { ++ fonty = row; ++ cursorY = row << 4; ++ } ++} ++ ++/* scroll the screen */ ++static void graphics_scroll() { ++ int i, j, k; ++ ++ /* we don't want to scroll recursively... that would be bad */ ++ if (no_scroll) ++ return; ++ no_scroll = 1; ++ ++ /* disable pager temporarily */ ++ k = count_lines; ++ count_lines = -1; ++ ++ /* move everything up a line */ ++ for (j = view_y0 + 1; j < view_y1; j++) { ++ graphics_gotoxy(view_x0, j - 1); ++ for (i = view_x0; i < view_x1; i++) { ++ graphics_putchar(text[j * 80 + i]); ++ } ++ } ++ ++ /* last line should be blank */ ++ graphics_gotoxy(view_x0, view_y1 - 1); ++ for (i = view_x0; i < view_x1; i++) ++ graphics_putchar(' '); ++ graphics_setxy(view_x0, view_y1 - 1); ++ ++ count_lines = k; ++ ++ no_scroll = 0; ++} ++ ++/* Set the splash image */ ++void graphics_set_splash(char *splashfile) { ++ grub_strcpy(splashimage, splashfile); ++} ++ ++/* Get the current splash image */ ++char *graphics_get_splash(void) { ++ return splashimage; ++} ++ ++/* ++ * Initialize a vga16 graphics display with the palette based off of ++ * the image in splashimage. If the image doesn't exist, leave graphics ++ * mode. The mode initiated is 12h. From "Ralf Brown's Interrupt List": ++ * text/ text pixel pixel colors disply scrn system ++ * grph resol box resolution pages addr ++ * 12h G 80x30 8x16 640x480 16/256K . A000 VGA,ATI VIP ++ * G 80x30 8x16 640x480 16/64 . A000 ATI EGA Wonder ++ * G . . 640x480 16 . . UltraVision+256K EGA ++ */ ++int graphics_init() ++{ ++ if (!graphics_inited) { ++ saved_videomode = set_videomode(0x12); ++ if (get_videomode() != 0x12) { ++ set_videomode(saved_videomode); ++ return 0; ++ } ++ graphics_inited = 1; ++ } ++ else ++ return 1; ++ ++ font8x16 = (unsigned char*)graphics_get_font(); ++ ++ /* make sure that the highlight color is set correctly */ ++ graphics_highlight_color = ((graphics_normal_color >> 4) | ++ ((graphics_normal_color & 0xf) << 4)); ++ ++ graphics_cls(); ++ ++ if (!read_image(splashimage)) { ++ grub_printf("Failed to read splash image (%s)\n", splashimage); ++ grub_printf("Press any key to continue..."); ++ getkey(); ++ set_videomode(saved_videomode); ++ graphics_inited = 0; ++ return 0; ++ } ++ ++ set_int1c_handler(); ++ ++ return 1; ++} ++ ++/* Leave graphics mode */ ++void graphics_end(void) ++{ ++ if (graphics_inited) { ++ unset_int1c_handler(); ++ set_videomode(saved_videomode); ++ graphics_inited = 0; ++ no_cursor = 0; ++ } ++} ++ ++/* Print ch on the screen. Handle any needed scrolling or the like */ ++void graphics_putchar(int ch) { ++ ch &= 0xff; ++ ++ graphics_cursor(0); ++ ++ if (ch == '\n') { ++ if (fonty + 1 < view_y1) ++ graphics_setxy(fontx, fonty + 1); ++ else ++ graphics_scroll(); ++ graphics_cursor(1); ++ return; ++ } else if (ch == '\r') { ++ graphics_setxy(view_x0, fonty); ++ graphics_cursor(1); ++ return; ++ } ++ ++ graphics_cursor(0); ++ ++ text[fonty * 80 + fontx] = ch; ++ text[fonty * 80 + fontx] &= 0x00ff; ++ if (graphics_current_color & 0xf0) ++ text[fonty * 80 + fontx] |= 0x100; ++ ++ graphics_cursor(0); ++ ++ if ((fontx + 1) >= view_x1) { ++ graphics_setxy(view_x0, fonty); ++ if (fonty + 1 < view_y1) ++ graphics_setxy(view_x0, fonty + 1); ++ else ++ graphics_scroll(); ++ graphics_cursor(1); ++ do_more (); ++ graphics_cursor(0); ++ } else { ++ graphics_setxy(fontx + 1, fonty); ++ } ++ ++ graphics_cursor(1); ++} ++ ++/* get the current location of the cursor */ ++int graphics_getxy(void) { ++ return (fontx << 8) | fonty; ++} ++ ++void graphics_gotoxy(int x, int y) { ++ graphics_cursor(0); ++ ++ graphics_setxy(x, y); ++ ++ graphics_cursor(1); ++} ++ ++void graphics_cls(void) { ++ int i; ++ unsigned char *mem, *s1, *s2, *s4, *s8; ++ ++ graphics_cursor(0); ++ graphics_gotoxy(view_x0, view_y0); ++ ++ mem = (unsigned char*)VIDEOMEM; ++ s1 = (unsigned char*)VSHADOW1; ++ s2 = (unsigned char*)VSHADOW2; ++ s4 = (unsigned char*)VSHADOW4; ++ s8 = (unsigned char*)VSHADOW8; ++ ++ for (i = 0; i < 80 * 30; i++) ++ text[i] = ' '; ++ graphics_cursor(1); ++ ++ BitMask(0xff); ++ ++ /* plane 1 */ ++ MapMask(1); ++ grub_memcpy(mem, s1, 38400); ++ ++ /* plane 2 */ ++ MapMask(2); ++ grub_memcpy(mem, s2, 38400); ++ ++ /* plane 3 */ ++ MapMask(4); ++ grub_memcpy(mem, s4, 38400); ++ ++ /* plane 4 */ ++ MapMask(8); ++ grub_memcpy(mem, s8, 38400); ++ ++ MapMask(15); ++ ++ if (no_cursor) { ++ no_cursor = 0; ++ set_int1c_handler(); ++ } ++} ++ ++void graphics_setcolorstate (color_state state) { ++ switch (state) { ++ case COLOR_STATE_STANDARD: ++ graphics_current_color = graphics_standard_color; ++ break; ++ case COLOR_STATE_NORMAL: ++ graphics_current_color = graphics_normal_color; ++ break; ++ case COLOR_STATE_HIGHLIGHT: ++ graphics_current_color = graphics_highlight_color; ++ break; ++ default: ++ graphics_current_color = graphics_standard_color; ++ break; ++ } ++ ++ graphics_color_state = state; ++} ++ ++void graphics_setcolor (int normal_color, int highlight_color) { ++ graphics_normal_color = normal_color; ++ graphics_highlight_color = highlight_color; ++ ++ graphics_setcolorstate (graphics_color_state); ++} ++ ++int graphics_setcursor (int on) { ++ if (!no_cursor && !on) { ++ no_cursor = 1; ++ unset_int1c_handler(); ++ graphics_cursor(0); ++ } ++ else if(no_cursor && on) { ++ no_cursor = 0; ++ set_int1c_handler(); ++ graphics_cursor(1); ++ } ++ return 0; ++} ++ ++/* Read in the splashscreen image and set the palette up appropriately. ++ * Format of splashscreen is an xpm (can be gzipped) with 16 colors and ++ * 640x480. */ ++int read_image(char *s) ++{ ++ char buf[32], pal[16], c; ++ unsigned char base, mask, *s1, *s2, *s4, *s8; ++ unsigned i, len, idx, colors, x, y, width, height; ++ ++ if (!grub_open(s)) ++ return 0; ++ ++ /* read header */ ++ if (!grub_read((char*)&buf, 10) || grub_memcmp(buf, "/* XPM */\n", 10)) { ++ grub_close(); ++ return 0; ++ } ++ ++ /* parse info */ ++ while (grub_read(&c, 1)) { ++ if (c == '"') ++ break; ++ } ++ ++ while (grub_read(&c, 1) && (c == ' ' || c == '\t')) ++ ; ++ ++ i = 0; ++ width = c - '0'; ++ while (grub_read(&c, 1)) { ++ if (c >= '0' && c <= '9') ++ width = width * 10 + c - '0'; ++ else ++ break; ++ } ++ while (grub_read(&c, 1) && (c == ' ' || c == '\t')) ++ ; ++ ++ height = c - '0'; ++ while (grub_read(&c, 1)) { ++ if (c >= '0' && c <= '9') ++ height = height * 10 + c - '0'; ++ else ++ break; ++ } ++ while (grub_read(&c, 1) && (c == ' ' || c == '\t')) ++ ; ++ ++ colors = c - '0'; ++ while (grub_read(&c, 1)) { ++ if (c >= '0' && c <= '9') ++ colors = colors * 10 + c - '0'; ++ else ++ break; ++ } ++ ++ base = 0; ++ while (grub_read(&c, 1) && c != '"') ++ ; ++ ++ /* palette */ ++ for (i = 0, idx = 1; i < colors; i++) { ++ len = 0; ++ ++ while (grub_read(&c, 1) && c != '"') ++ ; ++ grub_read(&c, 1); /* char */ ++ base = c; ++ grub_read(buf, 4); /* \t c # */ ++ ++ while (grub_read(&c, 1) && c != '"') { ++ if (len < sizeof(buf)) ++ buf[len++] = c; ++ } ++ ++ if (len == 6 && idx < 15) { ++ int r = ((hex(buf[0]) << 4) | hex(buf[1])) >> 2; ++ int g = ((hex(buf[2]) << 4) | hex(buf[3])) >> 2; ++ int b = ((hex(buf[4]) << 4) | hex(buf[5])) >> 2; ++ ++ pal[idx] = base; ++ graphics_set_palette(idx, r, g, b); ++ ++idx; ++ } ++ } ++ ++ x = y = len = 0; ++ ++ s1 = (unsigned char*)VSHADOW1; ++ s2 = (unsigned char*)VSHADOW2; ++ s4 = (unsigned char*)VSHADOW4; ++ s8 = (unsigned char*)VSHADOW8; ++ ++ for (i = 0; i < 38400; i++) ++ s1[i] = s2[i] = s4[i] = s8[i] = 0; ++ ++ /* parse xpm data */ ++ while (y < height) { ++ while (1) { ++ if (!grub_read(&c, 1)) { ++ grub_close(); ++ return 0; ++ } ++ if (c == '"') ++ break; ++ } ++ ++ while (grub_read(&c, 1) && c != '"') { ++ for (i = 1; i < 15; i++) ++ if (pal[i] == c) { ++ c = i; ++ break; ++ } ++ ++ mask = 0x80 >> (x & 7); ++ if (c & 1) ++ s1[len + (x >> 3)] |= mask; ++ if (c & 2) ++ s2[len + (x >> 3)] |= mask; ++ if (c & 4) ++ s4[len + (x >> 3)] |= mask; ++ if (c & 8) ++ s8[len + (x >> 3)] |= mask; ++ ++ if (++x >= 640) { ++ x = 0; ++ ++ if (y < 480) ++ len += 80; ++ ++y; ++ } ++ } ++ } ++ ++ grub_close(); ++ ++ graphics_set_palette(0, (background >> 16), (background >> 8) & 63, ++ background & 63); ++ graphics_set_palette(15, (foreground >> 16), (foreground >> 8) & 63, ++ foreground & 63); ++ graphics_set_palette(0x11, (window_border >> 16), (window_border >> 8) & 63, ++ window_border & 63); ++ ++ return 1; ++} ++ ++/* Convert a character which is a hex digit to the appropriate integer */ ++int hex(int v) ++{ ++ if (v >= 'A' && v <= 'F') ++ return (v - 'A' + 10); ++ if (v >= 'a' && v <= 'f') ++ return (v - 'a' + 10); ++ return (v - '0'); ++} ++ ++void graphics_cursor(int set) { ++ unsigned char *pat, *mem, *ptr, chr[16 << 2]; ++ int i, ch, invert, offset; ++ ++ if (set && (no_cursor || no_scroll)) ++ return; ++ ++ offset = cursorY * 80 + fontx; ++ ch = text[fonty * 80 + fontx] & 0xff; ++ invert = (text[fonty * 80 + fontx] & 0xff00) != 0; ++ pat = font8x16 + (ch << 4); ++ ++ mem = (unsigned char*)VIDEOMEM + offset; ++ ++ if (!set) { ++ for (i = 0; i < 16; i++) { ++ unsigned char mask = pat[i]; ++ ++ if (!invert) { ++ chr[i ] = ((unsigned char*)VSHADOW1)[offset]; ++ chr[16 + i] = ((unsigned char*)VSHADOW2)[offset]; ++ chr[32 + i] = ((unsigned char*)VSHADOW4)[offset]; ++ chr[48 + i] = ((unsigned char*)VSHADOW8)[offset]; ++ ++ if (shade) { ++ if (ch == DISP_VERT || ch == DISP_LL || ++ ch == DISP_UR || ch == DISP_LR) { ++ unsigned char pmask = ~(pat[i] >> 1); ++ ++ chr[i ] &= pmask; ++ chr[16 + i] &= pmask; ++ chr[32 + i] &= pmask; ++ chr[48 + i] &= pmask; ++ } ++ if (i > 0 && ch != DISP_VERT) { ++ unsigned char pmask = ~(pat[i - 1] >> 1); ++ ++ chr[i ] &= pmask; ++ chr[16 + i] &= pmask; ++ chr[32 + i] &= pmask; ++ chr[48 + i] &= pmask; ++ if (ch == DISP_HORIZ || ch == DISP_UR || ch == DISP_LR) { ++ pmask = ~pat[i - 1]; ++ ++ chr[i ] &= pmask; ++ chr[16 + i] &= pmask; ++ chr[32 + i] &= pmask; ++ chr[48 + i] &= pmask; ++ } ++ } ++ } ++ chr[i ] |= mask; ++ chr[16 + i] |= mask; ++ chr[32 + i] |= mask; ++ chr[48 + i] |= mask; ++ ++ offset += 80; ++ } ++ else { ++ chr[i ] = mask; ++ chr[16 + i] = mask; ++ chr[32 + i] = mask; ++ chr[48 + i] = mask; ++ } ++ } ++ } ++ else { ++ MapMask(15); ++ ptr = mem; ++ for (i = 0; i < 16; i++, ptr += 80) { ++ cursorBuf[i] = pat[i]; ++ *ptr = ~pat[i]; ++ } ++ return; ++ } ++ ++ offset = 0; ++ for (i = 1; i < 16; i <<= 1, offset += 16) { ++ int j; ++ ++ MapMask(i); ++ ptr = mem; ++ for (j = 0; j < 16; j++, ptr += 80) ++ *ptr = chr[j + offset]; ++ } ++ ++ MapMask(15); ++} ++ ++#endif /* SUPPORT_GRAPHICS */ +diff -Naur grub-0.97.orig/stage2/graphics.h grub-0.97/stage2/graphics.h +--- grub-0.97.orig/stage2/graphics.h 1969-12-31 21:00:00.000000000 -0300 ++++ grub-0.97/stage2/graphics.h 2005-06-12 20:56:49.000000000 -0300 +@@ -0,0 +1,44 @@ ++/* graphics.h - graphics console interface */ ++/* ++ * GRUB -- GRand Unified Bootloader ++ * Copyright (C) 2002 Free Software Foundation, Inc. ++ * ++ * This program 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 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program 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 this program; if not, write to the Free Software ++ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ++ */ ++ ++#ifndef GRAPHICS_H ++#define GRAPHICS_H ++ ++/* magic constant */ ++#define VIDEOMEM 0xA0000 ++ ++/* function prototypes */ ++char *graphics_get_splash(void); ++ ++int read_image(char *s); ++void graphics_cursor(int set); ++ ++/* function prototypes for asm functions */ ++void * graphics_get_font(); ++void graphics_set_palette(int idx, int red, int green, int blue); ++void set_int1c_handler(); ++void unset_int1c_handler(); ++ ++extern short cursorX, cursorY; ++extern char cursorBuf[16]; ++extern int shade; ++extern int view_x0, view_y0, view_x1, view_y1; ++ ++#endif /* GRAPHICS_H */ +diff -Naur grub-0.97.orig/stage2/Makefile.am grub-0.97/stage2/Makefile.am +--- grub-0.97.orig/stage2/Makefile.am 2005-02-02 18:37:35.000000000 -0200 ++++ grub-0.97/stage2/Makefile.am 2005-06-12 20:56:49.000000000 -0300 +@@ -7,7 +7,7 @@ + fat.h filesys.h freebsd.h fs.h hercules.h i386-elf.h \ + imgact_aout.h iso9660.h jfs.h mb_header.h mb_info.h md5.h \ + nbi.h pc_slice.h serial.h shared.h smp-imps.h term.h \ +- terminfo.h tparm.h nbi.h ufs2.h vstafs.h xfs.h ++ terminfo.h tparm.h nbi.h ufs2.h vstafs.h xfs.h graphics.h + EXTRA_DIST = setjmp.S apm.S $(noinst_SCRIPTS) + + # For . +@@ -19,7 +19,7 @@ + disk_io.c fsys_ext2fs.c fsys_fat.c fsys_ffs.c fsys_iso9660.c \ + fsys_jfs.c fsys_minix.c fsys_reiserfs.c fsys_ufs2.c \ + fsys_vstafs.c fsys_xfs.c gunzip.c md5.c serial.c stage2.c \ +- terminfo.c tparm.c ++ terminfo.c tparm.c graphics.c + libgrub_a_CFLAGS = $(GRUB_CFLAGS) -I$(top_srcdir)/lib \ + -DGRUB_UTIL=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 \ + -DFSYS_ISO9660=1 -DFSYS_JFS=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 \ +@@ -79,8 +79,14 @@ + HERCULES_FLAGS = + endif + ++if GRAPHICS_SUPPORT ++GRAPHICS_FLAGS = -DSUPPORT_GRAPHICS=1 ++else ++GRAPHICS_FLAGS = ++endif ++ + STAGE2_COMPILE = $(STAGE2_CFLAGS) -fno-builtin -nostdinc \ +- $(NETBOOT_FLAGS) $(SERIAL_FLAGS) $(HERCULES_FLAGS) ++ $(NETBOOT_FLAGS) $(SERIAL_FLAGS) $(HERCULES_FLAGS) $(GRAPHICS_FLAGS) + + STAGE1_5_LINK = -nostdlib -Wl,-N -Wl,-Ttext -Wl,2000 + STAGE1_5_COMPILE = $(STAGE2_COMPILE) -DNO_DECOMPRESSION=1 -DSTAGE1_5=1 +@@ -90,7 +96,8 @@ + cmdline.c common.c console.c disk_io.c fsys_ext2fs.c \ + fsys_fat.c fsys_ffs.c fsys_iso9660.c fsys_jfs.c fsys_minix.c \ + fsys_reiserfs.c fsys_ufs2.c fsys_vstafs.c fsys_xfs.c gunzip.c \ +- hercules.c md5.c serial.c smp-imps.c stage2.c terminfo.c tparm.c ++ hercules.c md5.c serial.c smp-imps.c stage2.c terminfo.c tparm.c \ ++ graphics.c + pre_stage2_exec_CFLAGS = $(STAGE2_COMPILE) $(FSYS_CFLAGS) + pre_stage2_exec_CCASFLAGS = $(STAGE2_COMPILE) $(FSYS_CFLAGS) + pre_stage2_exec_LDFLAGS = $(PRE_STAGE2_LINK) +diff -Naur grub-0.97.orig/stage2/shared.h grub-0.97/stage2/shared.h +--- grub-0.97.orig/stage2/shared.h 2004-06-19 13:40:09.000000000 -0300 ++++ grub-0.97/stage2/shared.h 2005-06-12 20:56:49.000000000 -0300 +@@ -792,6 +792,11 @@ + /* Set the cursor position. */ + void gotoxy (int x, int y); + ++/* Internal pager ++ Returns 1 = if pager was used ++ 0 = if pager wasn't used */ ++int do_more (void); ++ + /* Displays an ASCII character. IBM displays will translate some + characters to special graphical ones (see the DISP_* constants). */ + void grub_putchar (int c); +@@ -871,6 +876,7 @@ + int grub_tolower (int c); + int grub_isspace (int c); + int grub_strncat (char *s1, const char *s2, int n); ++void grub_memcpy(void *dest, const void *src, int len); + void *grub_memmove (void *to, const void *from, int len); + void *grub_memset (void *start, int c, int len); + int grub_strncat (char *s1, const char *s2, int n); +diff -Naur grub-0.97.orig/stage2/stage2.c grub-0.97/stage2/stage2.c +--- grub-0.97.orig/stage2/stage2.c 2005-03-19 14:51:57.000000000 -0300 ++++ grub-0.97/stage2/stage2.c 2005-06-13 22:38:08.000000000 -0300 +@@ -20,6 +20,12 @@ + #include + #include + ++#ifdef SUPPORT_GRAPHICS ++# include ++#endif ++ ++int col_start, col_end, row_start, box_size; ++ + grub_jmp_buf restart_env; + + #if defined(PRESET_MENU_STRING) || defined(SUPPORT_DISKLESS) +@@ -105,13 +111,13 @@ + if (highlight && current_term->setcolorstate) + current_term->setcolorstate (COLOR_STATE_HIGHLIGHT); + +- gotoxy (2, y); ++ gotoxy (2 + col_start, y); + grub_putchar (' '); +- for (x = 3; x < 75; x++) ++ for (x = 3 + col_start; x < (col_end - 5); x++) + { +- if (*entry && x <= 72) ++ if (*entry && x <= (col_end - 8)) + { +- if (x == 72) ++ if (x == (col_end - 8)) + grub_putchar (DISP_RIGHT); + else + grub_putchar (*entry++); +@@ -119,7 +125,7 @@ + else + grub_putchar (' '); + } +- gotoxy (74, y); ++ gotoxy ((col_end - 6), y); + + if (current_term->setcolorstate) + current_term->setcolorstate (COLOR_STATE_STANDARD); +@@ -131,7 +137,7 @@ + { + int i; + +- gotoxy (77, y + 1); ++ gotoxy ((col_end - 3), y + 1); + + if (first) + grub_putchar (DISP_UP); +@@ -151,14 +157,14 @@ + menu_entries++; + } + +- gotoxy (77, y + size); ++ gotoxy ((col_end - 3), y + size); + + if (*menu_entries) + grub_putchar (DISP_DOWN); + else + grub_putchar (' '); + +- gotoxy (74, y + entryno + 1); ++ gotoxy ((col_end - 6), y + entryno + 1); + } + + static void +@@ -196,30 +202,30 @@ + if (current_term->setcolorstate) + current_term->setcolorstate (COLOR_STATE_NORMAL); + +- gotoxy (1, y); ++ gotoxy (1 + col_start, y); + + grub_putchar (DISP_UL); +- for (i = 0; i < 73; i++) ++ for (i = col_start; i < (col_end - 7); i++) + grub_putchar (DISP_HORIZ); + grub_putchar (DISP_UR); + + i = 1; + while (1) + { +- gotoxy (1, y + i); ++ gotoxy (1 + col_start, y + i); + + if (i > size) + break; + + grub_putchar (DISP_VERT); +- gotoxy (75, y + i); ++ gotoxy ((col_end - 5), y + i); + grub_putchar (DISP_VERT); + + i++; + } + + grub_putchar (DISP_LL); +- for (i = 0; i < 73; i++) ++ for (i = col_start; i < (col_end - 7); i++) + grub_putchar (DISP_HORIZ); + grub_putchar (DISP_LR); + +@@ -233,6 +239,7 @@ + { + int c, time1, time2 = -1, first_entry = 0; + char *cur_entry = 0; ++ struct term_entry *prev_term = NULL; + + /* + * Main loop for menu UI. +@@ -250,6 +257,22 @@ + } + } + ++ col_start = 0; ++ col_end = 80; ++ row_start = 0; ++ box_size = 12; ++ /* if we're using viewport we need to make sure to setup ++ coordinates correctly. */ ++#ifdef SUPPORT_GRAPHICS ++ if (grub_memcmp (current_term->name, "graphics", sizeof ("graphics") - 1) == 0) ++ { ++ col_start = view_x0; ++ col_end = view_x1; ++ row_start = view_y0; ++ box_size = (view_y1 - view_y0) - 13; ++ } ++#endif ++ + /* If the timeout was expired or wasn't set, force to show the menu + interface. */ + if (grub_timeout < 0) +@@ -302,36 +325,36 @@ + if (current_term->flags & TERM_DUMB) + print_entries_raw (num_entries, first_entry, menu_entries); + else +- print_border (3, 12); ++ print_border (3 + row_start, box_size); + + grub_printf ("\n\ +- Use the %c and %c keys to select which entry is highlighted.\n", ++ Use the %c and %c keys to select which entry is highlighted.\n", + DISP_UP, DISP_DOWN); + + if (! auth && password) + { + printf ("\ +- Press enter to boot the selected OS or \'p\' to enter a\n\ +- password to unlock the next set of features."); ++ Press enter to boot the selected OS or \'p\' to enter a\n\ ++ password to unlock the next set of features."); + } + else + { + if (config_entries) + printf ("\ +- Press enter to boot the selected OS, \'e\' to edit the\n\ +- commands before booting, or \'c\' for a command-line."); ++ Press enter to boot the selected OS, \'e\' to edit the\n\ ++ commands before booting, or \'c\' for a command-line."); + else + printf ("\ +- Press \'b\' to boot, \'e\' to edit the selected command in the\n\ +- boot sequence, \'c\' for a command-line, \'o\' to open a new line\n\ +- after (\'O\' for before) the selected line, \'d\' to remove the\n\ +- selected line, or escape to go back to the main menu."); ++ Press \'b\' to boot, \'e\' to edit the selected command in the\n\ ++ boot sequence, \'c\' for a command-line, \'o\' to open a new line\n\ ++ after (\'O\' for before) the selected line, \'d\' to remove the\n\ ++ selected line, or escape to go back to the main menu."); + } + + if (current_term->flags & TERM_DUMB) + grub_printf ("\n\nThe selected entry is %d ", entryno); + else +- print_entries (3, 12, first_entry, entryno, menu_entries); ++ print_entries (3 + row_start, box_size, first_entry, entryno, menu_entries); + } + + /* XX using RT clock now, need to initialize value */ +@@ -358,10 +381,10 @@ + entryno, grub_timeout); + else + { +- gotoxy (3, 22); +- grub_printf ("The highlighted entry will be booted automatically in %d seconds. ", ++ gotoxy (3 + col_start, 10 + box_size + row_start); ++ grub_printf (" The highlighted entry will be booted automatically in %d seconds. ", + grub_timeout); +- gotoxy (74, 4 + entryno); ++ gotoxy ((col_end - 6), 4 + entryno + row_start); + } + + grub_timeout--; +@@ -387,12 +410,12 @@ + if (current_term->flags & TERM_DUMB) + grub_putchar ('\r'); + else +- gotoxy (3, 22); ++ gotoxy (3 + col_start, 10 + box_size + row_start); + printf (" "); + grub_timeout = -1; + fallback_entryno = -1; + if (! (current_term->flags & TERM_DUMB)) +- gotoxy (74, 4 + entryno); ++ gotoxy ((col_end - 6), 4 + entryno + row_start); + } + + /* We told them above (at least in SUPPORT_SERIAL) to use +@@ -408,12 +431,12 @@ + { + if (entryno > 0) + { +- print_entry (4 + entryno, 0, ++ print_entry (4 + entryno + row_start, 0, + get_entry (menu_entries, + first_entry + entryno, + 0)); + entryno--; +- print_entry (4 + entryno, 1, ++ print_entry (4 + entryno + row_start, 1, + get_entry (menu_entries, + first_entry + entryno, + 0)); +@@ -421,7 +444,7 @@ + else if (first_entry > 0) + { + first_entry--; +- print_entries (3, 12, first_entry, entryno, ++ print_entries (3 + row_start, box_size, first_entry, entryno, + menu_entries); + } + } +@@ -433,29 +456,29 @@ + entryno++; + else + { +- if (entryno < 11) ++ if (entryno < (box_size - 1)) + { +- print_entry (4 + entryno, 0, ++ print_entry (4 + entryno + row_start, 0, + get_entry (menu_entries, + first_entry + entryno, + 0)); + entryno++; +- print_entry (4 + entryno, 1, ++ print_entry (4 + entryno + row_start, 1, + get_entry (menu_entries, + first_entry + entryno, + 0)); + } +- else if (num_entries > 12 + first_entry) ++ else if (num_entries > box_size + first_entry) + { + first_entry++; +- print_entries (3, 12, first_entry, entryno, menu_entries); ++ print_entries (3 + row_start, box_size, first_entry, entryno, menu_entries); + } + } + } + else if (c == 7) + { + /* Page Up */ +- first_entry -= 12; ++ first_entry -= box_size; + if (first_entry < 0) + { + entryno += first_entry; +@@ -463,20 +486,20 @@ + if (entryno < 0) + entryno = 0; + } +- print_entries (3, 12, first_entry, entryno, menu_entries); ++ print_entries (3 + row_start, box_size, first_entry, entryno, menu_entries); + } + else if (c == 3) + { + /* Page Down */ +- first_entry += 12; ++ first_entry += box_size; + if (first_entry + entryno + 1 >= num_entries) + { +- first_entry = num_entries - 12; ++ first_entry = num_entries - box_size; + if (first_entry < 0) + first_entry = 0; + entryno = num_entries - first_entry - 1; + } +- print_entries (3, 12, first_entry, entryno, menu_entries); ++ print_entries (3 + row_start, box_size, first_entry, entryno, menu_entries); + } + + if (config_entries) +@@ -489,7 +512,7 @@ + if ((c == 'd') || (c == 'o') || (c == 'O')) + { + if (! (current_term->flags & TERM_DUMB)) +- print_entry (4 + entryno, 0, ++ print_entry (4 + entryno + row_start, 0, + get_entry (menu_entries, + first_entry + entryno, + 0)); +@@ -537,7 +560,7 @@ + + if (entryno >= num_entries) + entryno--; +- if (first_entry && num_entries < 12 + first_entry) ++ if (first_entry && num_entries < box_size + first_entry) + first_entry--; + } + +@@ -549,7 +572,7 @@ + grub_printf ("\n"); + } + else +- print_entries (3, 12, first_entry, entryno, menu_entries); ++ print_entries (3 + row_start, box_size, first_entry, entryno, menu_entries); + } + + cur_entry = menu_entries; +@@ -570,7 +593,7 @@ + if (current_term->flags & TERM_DUMB) + grub_printf ("\r "); + else +- gotoxy (1, 21); ++ gotoxy (1 + col_start, 9 + box_size + row_start); + + /* Wipe out the previously entered password */ + grub_memset (entered, 0, sizeof (entered)); +@@ -714,6 +737,15 @@ + + cls (); + setcursor (1); ++ /* if our terminal needed initialization, we should shut it down ++ * before booting the kernel, but we want to save what it was so ++ * we can come back if needed */ ++ prev_term = current_term; ++ if (current_term->shutdown) ++ { ++ current_term->shutdown(); ++ current_term = term_table; /* assumption: console is first */ ++ } + + while (1) + { +@@ -748,6 +780,13 @@ + break; + } + ++ /* if we get back here, we should go back to what our term was before */ ++ current_term = prev_term; ++ if (current_term->startup) ++ /* if our terminal fails to initialize, fall back to console since ++ * it should always work */ ++ if (current_term->startup() == 0) ++ current_term = term_table; /* we know that console is first */ + show_menu = 1; + goto restart; + } +@@ -1050,6 +1089,16 @@ + while (is_preset); + } + ++ /* go ahead and make sure the terminal is setup */ ++ if (current_term->startup) ++ { ++ /* If initialization fails, go back to default terminal */ ++ if (current_term->startup() == 0) ++ { ++ current_term = term_table; ++ } ++ } ++ + if (! num_entries) + { + /* If no acceptable config file, goto command-line, starting +diff -Naur grub-0.97.orig/stage2/term.h grub-0.97/stage2/term.h +--- grub-0.97.orig/stage2/term.h 2003-07-09 08:45:53.000000000 -0300 ++++ grub-0.97/stage2/term.h 2005-06-13 14:07:40.000000000 -0300 +@@ -60,6 +60,8 @@ + const char *name; + /* The feature flags defined above. */ + unsigned long flags; ++ /* Default for maximum number of lines if not specified */ ++ unsigned short max_lines; + /* Put a character. */ + void (*putchar) (int c); + /* Check if any input character is available. */ +@@ -79,6 +81,10 @@ + void (*setcolor) (int normal_color, int highlight_color); + /* Turn on/off the cursor. */ + int (*setcursor) (int on); ++ /* function to start a terminal */ ++ int (*startup) (void); ++ /* function to use to shutdown a terminal */ ++ void (*shutdown) (void); + }; + + /* This lists up available terminals. */ +@@ -124,4 +130,24 @@ + int hercules_setcursor (int on); + #endif + ++#ifdef SUPPORT_GRAPHICS ++extern int foreground, background, window_border, graphics_inited, saved_videomode; ++ ++void graphics_set_splash(char *splashfile); ++int set_videomode(int mode); ++int get_videomode(void); ++void graphics_putchar (int c); ++int graphics_getxy(void); ++void graphics_gotoxy(int x, int y); ++void graphics_cls(void); ++void graphics_setcolorstate (color_state state); ++void graphics_setcolor (int normal_color, int highlight_color); ++int graphics_setcursor (int on); ++int graphics_init(void); ++void graphics_end(void); ++ ++int hex(int v); ++void graphics_set_palette(int idx, int red, int green, int blue); ++#endif /* SUPPORT_GRAPHICS */ ++ + #endif /* ! GRUB_TERM_HEADER */ --- grub-0.97.orig/debian/patches/grub-install_regexp.diff +++ grub-0.97/debian/patches/grub-install_regexp.diff @@ -0,0 +1,28 @@ +--- a/util/grub-install.in~ 2004-07-24 15:57:31.000000000 -0300 ++++ b/util/grub-install.in 2006-04-17 08:59:54.000000000 -0300 +@@ -131,7 +131,7 @@ + + # Get the drive name. + tmp_drive=`grep -v '^#' $device_map | grep "$tmp_disk *$" \ +- | sed 's%.*\(([hf]d[0-9][a-g0-9,]*)\).*%\1%'` ++ | sed 's%.*\(([hf]d[0-9][a-z0-9,]*)\).*%\1%'` + + # If not found, print an error message and exit. + if test "x$tmp_drive" = x; then +@@ -148,13 +148,13 @@ + gnu*) + if echo $tmp_part | grep "^s" >/dev/null; then + tmp_pc_slice=`echo $tmp_part \ +- | sed "s%s\([0-9]*\)[a-g]*$%\1%"` ++ | sed "s%s\([0-9]*\)[a-z]*$%\1%"` + tmp_drive=`echo "$tmp_drive" \ + | sed "s%)%,\`expr "$tmp_pc_slice" - 1\`)%"` + fi +- if echo $tmp_part | grep "[a-g]$" >/dev/null; then ++ if echo $tmp_part | grep "[a-z]$" >/dev/null; then + tmp_bsd_partition=`echo "$tmp_part" \ +- | sed "s%[^a-g]*\([a-g]\)$%\1%"` ++ | sed "s%[^a-z]*\([a-z]\)$%\1%"` + tmp_drive=`echo "$tmp_drive" \ + | sed "s%)%,$tmp_bsd_partition)%"` + fi --- grub-0.97.orig/debian/patches/menu.lst_gnu-hurd.diff +++ grub-0.97/debian/patches/menu.lst_gnu-hurd.diff @@ -0,0 +1,28 @@ +diff -Naur grub-0.91.orig/docs/menu.lst grub-0.91/docs/menu.lst +--- grub-0.91.orig/docs/menu.lst Sat Feb 26 19:48:49 2000 ++++ grub-0.91/docs/menu.lst Thu Apr 4 16:18:56 2002 +@@ -14,8 +14,9 @@ + # For booting the GNU Hurd + title GNU/Hurd + root (hd0,0) +-kernel /boot/gnumach.gz root=hd0s1 +-module /boot/serverboot.gz ++kernel /boot/gnumach.gz root=device:hd0s1 ++module /hurd/ext2fs.static --multiboot-command-line=${kernel-command-line} --host-priv-port=${host-port} --device-master-port=${device-port} --exec-server-task=${exec-task} -T typed ${root} $(task-create) $(task-resume) ++module /lib/ld.so.1 /hurd/exec $(exec-task=task-create) + + # For booting Linux + title GNU/Linux +--- grub-0.93+cvs20031021/docs/menu.lst.orig 2003-10-21 16:10:01.000000000 +0000 ++++ grub-0.93+cvs20031021/docs/menu.lst 2003-10-21 16:10:40.000000000 +0000 +@@ -11,8 +11,8 @@ + # Fallback to the second entry. + fallback 1 + +-# For booting GNU/Hurd +-title GNU/Hurd ++# For booting GNU (also known as GNU/Hurd) ++title GNU (also known as GNU/Hurd) + root (hd0,0) + kernel /boot/gnumach.gz root=device:hd0s1 + module /hurd/ext2fs.static --multiboot-command-line=${kernel-command-line} --host-priv-port=${host-port} --device-master-port=${device-port} --exec-server-task=${exec-task} -T typed ${root} $(task-create) $(task-resume) --- grub-0.97.orig/debian/README.Debian +++ grub-0.97/debian/README.Debian @@ -0,0 +1,146 @@ +grub for Debian +--------------- + +GRUB is a GPLed bootloader intended to unify bootloading across x86 +operating systems. In addition to loading Linux and FreeBSD, it +implements the Multiboot standard, which allows for flexible loading +of multiple boot images (needed for modular kernels such as the GNU +Hurd). + +One unique feature of GRUB is that it can understand filesystems at +boot time, rather than just simple blocklists. Hence, you can load +any kernel in the file system from the boot prompt without having to +edit configuration files or rerun a special installation program. + +GRUB also automatically detects BIOS lba block addressing. To force +lba mode see the GRUB `setup` command. Lilo's install and map +directives are fulfilled by GRUB's `root` and `setup` commands. To +reinstall GRUB, the installation location is either determined at +runtime by the `grub-install` script or given as an option to the +`setup` command. + +more documentation +------------------ +the full grub documentation is available in the grub-doc package. + +quick setup +----------- + +after installing the package: + +1) grub-install "(hd0)" + or if /boot is a separate partition + grub-install --root-directory=/boot "(hd0)" + + using in place of "(hd0)" the device that you boot from + +2) update-grub which will create a menu.lst for you if one does not exist + or manually create one, and skip to step 4 + +3) edit /boot/grub/menu.lst + or if /boot is a separate partition + edit /boot/boot/grub/menu.lst + + and change groot, and kopt to whatever settings you need. + modify anything else in the menu.lst you want, + + re-run update-grub to update the lines for each kernel to those + that you specified with groot and kopt + +4) thats it, making sure you have a rescue disk or some other way to boot + your machine attempt to reboot using grub! + + to create a grub boot floppy: + + cat /boot/grub/stage1 /boot/grub/stage2 > /dev/fd0 + + using in place of /dev/fd0 the device that is for your floppy drive. + + note: that you need to run grub-install each time a new grub package + is installed, this script updates the grub images in /boot/grub + or /boot/boot/grub and installs grub into the boot sector. + +for more detailed information see the info documentation or manpages + +update-grub +----------- +This script is a debian specific addon used to generate a menu.lst for you +either intially, and/or automatically everytime you install a new kernel. + +To setup automatic updates add these lines to your /etc/kernel-img.conf: + +postinst_hook = /usr/sbin/update-grub +postrm_hook = /usr/sbin/update-grub +do_bootloader = no + +For further information see the manpage kernel-img.conf(5) or update-grub(8) + +Unlike Lilo, it is not necessary to re-run or re-install the boot loader +after every change to /boot/grub/menu.lst. menu.lst is automatically +found on GRUB's root disk and read during GRUB's boot process. + +initrd +------ +Be warned if your initrd image is larger than 4MB it is bigger than the +default ramdisk size and you will need to use a kernel command line +option like the following: + +ramdisk_size=16384 + +splashimage support +------------------- +The use of graphics is an unofficial extension to Grub that has not yet been +included by the developers in the official software. The patch +was first proposed on the bug-grub mail list late in 2001. This feature will +not be supported by upstream until after the 1.0 version of Grub is released. + +However, this Debian package has been patched and supports splash images. +This is how you can add a splash image to your grub configuration: + +1) Be sure to run grub-install, or you will still be running the old + (unpatched) version + +2) Create your image, and transform it into a XPM file, 640x480, with + 14 colors: + + $ convert my-nice-image.jpg -colors 14 -geometry 640x480! my-nice-image.xpm + + gzip it: + + $ gzip my-nice-image.xpm + +3) Change your menu.lst file to include the new commands: + +# Set colors for foreground and background: +# (RRGGBB, in hex) +# +# These are optional it will still work without them +# +foreground = ffffff +background = 000000 + +# The splash image location (doesn't need to be the root partition, BTW, +# since grub can read your filesystem): +# +splashimage=(hd0,5)/boot/grub/my-nice-image.xpm.gz + +4) Reboot, and see your splash image. You may want to fine tune the colors used + for the text + +Note if the path to the splashimage file happens to be wrong you will get a really messed up looking screen. + +There is a grub splashimage howto here: +http://ruslug.rutgers.edu/~mcgrof/grub-images/ + +netbsd/freebsd/*bsd +------------------- +From http://www.gnu.org/software/grub/#bsd : + +"We really need help by BSD hackers. Currently, almost nobody works for +BSD-based operating systems, such as FreeBSD, NetBSD, and OpenBSD. So we have +critical problems in booting later versions of NetBSD and OpenBSD. FreeBSD is +not a big problem, because GRUB can boot it via /boot/loader for now. + +If you're willing to give help to us, please contact us." + + -- Otavio Salvador , Thu, 14 Sep 2006 23:27:33 -0300 --- grub-0.97.orig/debian/watch +++ grub-0.97/debian/watch @@ -0,0 +1,3 @@ +version=3 +opts="uversionmangle=s/^[0-9]./0./" \ +ftp://alpha.gnu.org/gnu/grub/grub-([0-9.]+).tar.gz debian uupdate --- grub-0.97.orig/debian/grub-doc.doc-base.multiboot +++ grub-0.97/debian/grub-doc.doc-base.multiboot @@ -0,0 +1,14 @@ +Document: multiboot +Title: Grub Multiboot Specification +Author: OKUJI Yoshinori +Abstract: This documents the Multiboot Specification, the proposal for the boot + sequence standard. +Section: admin + +Format: HTML +Index: /usr/share/doc/grub-doc/html/multiboot.html +Files: /usr/share/doc/grub-doc/html/multiboot_*.html + +Format: info +Index: /usr/share/info/multiboot.info.gz +Files: /usr/share/info/multiboot.info.gz --- grub-0.97.orig/debian/grub.install +++ grub-0.97/debian/grub.install @@ -0,0 +1,5 @@ +debian/update-grub usr/sbin +debian/grub-floppy usr/sbin +debian/grub-reboot usr/sbin +debian/mkbimage usr/bin +debian/presubj usr/share/bug/grub --- grub-0.97.orig/debian/compat +++ grub-0.97/debian/compat @@ -0,0 +1 @@ +4 --- grub-0.97.orig/debian/grub-reboot +++ grub-0.97/debian/grub-reboot @@ -0,0 +1,90 @@ +#!/bin/sh -e + +NAME=grub-reboot +VERSION=0.01 + +if ! test -n "$1" || test "$1" = "-h" || test "$1" = "--help" ; then + echo $NAME + echo + echo "Reboots into the specified OS entry in menu.lst" + echo + echo "Usage: $0 entry [options to grub]" + echo " (where \"entry\" is the entry number in menu.lst)" + echo + exit +fi + +if test "$1" = "-v" || test "$1" = "--version" ; then + echo $NAME $VERSION + exit +fi + +if test "`whoami`" != "root" ; then + echo "You must be root" + exit +fi + +abort() { + message=$@ + + echo >&2 + echo -e "$message" >&2 + echo >&2 + exit 1 +} + +find_grub_dir () +{ + echo -n "Searching for GRUB installation directory ... " >&2 + + for d in $grub_dirs ; do + if [ -d "$d" ] ; then + grub_dir="$d" + break + fi + done + + if [ -z "$grub_dir" ] ; then + abort "No GRUB directory found.\n###" + else + echo "found: $grub_dir" >&2 + fi + + echo $grub_dir +} + +grub_dirs="/boot/grub /boot/boot/grub" + +grub_dir=$(find_grub_dir) + +config_file=$grub_dir/menu.lst + +default_file=$grub_dir/default + +default="$1" ; shift +grub --batch --config-file=$config_file $@ <> $default_file + +echo +echo -n "Do you want to reboot now? [y/N] " +read REBOOT +case $REBOOT in + y*|Y*) reboot ;; +esac --- grub-0.97.orig/debian/grub-reboot.8 +++ grub-0.97/debian/grub-reboot.8 @@ -0,0 +1,13 @@ +.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.33. +.TH GRUB-REBOOT "8" "November 2003" "grub-reboot 0.01" "System Administration Utilities" +.SH NAME +grub-reboot \- manual page for grub-reboot 0.01 +.SH SYNOPSIS +.B grub-reboot +\fIentry \fR[\fIoptions to grub\fR] +.SH DESCRIPTION +grub-reboot +.PP +Reboots into the specified OS entry in menu.lst +.IP +(where "entry" is the entry number in menu.lst) --- grub-0.97.orig/debian/presubj +++ grub-0.97/debian/presubj @@ -0,0 +1,11 @@ + +GRUB LEGACY IS IN FEATURE FREEZE + + Before you submit a request for new feature, please note that GRUB Legacy is + in feature freeze (both in upstream and in debian) and only bug fixes are + accepted. All requests for new features will be rejected; even if you provide + a patch, or if the feature is specific to debian. + + Please, rather than directing your work at a frozen branch, look at wether + your proposed feature makes sense in GRUB 2. GRUB 2 is in active development + (both debian and upstream) and new features are welcome there. --- grub-0.97.orig/debian/grub-doc.install +++ grub-0.97/debian/grub-doc.install @@ -0,0 +1,3 @@ +docs/grub/*.html usr/share/doc/grub-doc/html +docs/multiboot/*.html usr/share/doc/grub-doc/html +debian/presubj usr/share/bug/grub-doc --- grub-0.97.orig/debian/rules +++ grub-0.97/debian/rules @@ -0,0 +1,284 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# GNU copyright 1997 to 1999 by Joey Hess. +# +# Modified to make a template file for a multi-binary package with separated +# build-arch and build-indep targets by Bill Allombert 2001 + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +# This has to be exported to make some magic below work. +export DH_OPTIONS + +SHELL = bash + +CFLAGS = -Wall -g +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O0 +else + CFLAGS += -O2 +endif +ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) + INSTALL_PROGRAM += -s +endif + + +# These are used for cross-compiling and for saving the configure script +# from having to guess our platform (since we know it already) +DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_HOST_GNU_SYSTEM ?= $(shell dpkg-architecture -qDEB_HOST_GNU_SYSTEM) +DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +DEB_BUILD_GNU_CPU ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU) +DEB_BUILD_GNU_SYSTEM ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_SYSTEM) + +# Add backward compatibility to allow backport to stable (+ lpia compatibility) +ifneq (,$(findstring linux, $(DEB_HOST_GNU_SYSTEM))) +DEB_HOST_GNU_SYSTEM=linux-gnu +endif +ifneq (,$(findstring linux, $(DEB_BUILD_GNU_SYSTEM))) +DEB_BUILD_GNU_SYSTEM=linux-gnu +endif + +GRUB_VERSION=0.97 +GRUB_DISK_IMAGE=grub-${GRUB_VERSION}-$(DEB_BUILD_GNU_CPU)-pc + +ifeq ($(DEB_BUILD_GNU_SYSTEM),linux-gnu) +filesystems=e2fs jfs minix reiserfs xfs fat +endif +ifeq ($(DEB_BUILD_GNU_SYSTEM),gnu) +filesystems=e2fs ffs minix +endif +ifeq ($(DEB_BUILD_GNU_SYSTEM),kfreebsd-gnu) +filesystems=e2fs ffs ufs2 +endif +ifeq ($(DEB_BUILD_GNU_SYSTEM),knetbsd-gnu) +filesystems=e2fs ffs ufs2 +endif + +ifeq ($(DEB_BUILD_GNU_CPU),x86_64) + LDFLAGS=-static +endif + +CC=gcc + +patch: patch-stamp +patch-stamp: + dh_testdir + + # Add here commands to patch the source.. + set -e ; for i in `cat debian/patches/00list | grep -v ^#` ; \ + do \ + echo "--- $$i ---" ; patch -p1 < debian/patches/$$i ; \ + done + + touch patch-stamp + +unpatch: + dh_testdir + + # Add here commands to reverse patchs to the source. + if [ -f patch-stamp ] ; then \ + set -e ; for i in `tac debian/patches/00list | grep -v ^#` ; \ + do \ + echo "--- $$i ---" ; patch -R -p1 < debian/patches/$$i ; \ + done ; \ + fi \ + + if [ -f patch-stamp ] ; then \ + rm patch-stamp ; \ + fi + +configure: configure-stamp +configure-stamp: patch-stamp + dh_testdir + + # Add here commands to configure the package. + aclocal-1.9 && automake-1.9 && autoconf + CC=$(CC) LDFLAGS=$(LDFLAGS) ./configure \ + --host=$(DEB_HOST_GNU_TYPE) \ + --build=$(DEB_BUILD_GNU_TYPE) \ + --prefix=/usr \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --disable-auto-linux-mem-opt + + touch configure-stamp + +build: build-arch + +build-arch: build-arch-stamp +build-arch-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + + ## the creation of these manpages here is temporary, + ## when building grub finally works with the version + ## of autoconf in debian we can use MAINTAINER_MODE_TRUE + # create man page for grub + ( cd docs && ./help2man \ + --name="the grub shell" \ + --include=grub.8.additions \ + --section=8 --output=grub.8 \ + ../grub/grub ) + + # create man page for grub-install + ( cd util && chmod 755 grub-install ) + ( cd docs && ./help2man \ + --name="install GRUB on your drive" \ + --include=grub-install.8.additions \ + --section=8 --output=grub-install.8 \ + ../util/grub-install ) + + # create man page for mbchk + ( cd docs && ./help2man \ + --name="check the format of a Multiboot kernel" \ + --section=1 --output=mbchk.1 \ + ../util/mbchk ) + + # create man page for grub-md5-crypt + ( cd util && chmod 755 grub-md5-crypt ) + ( cd docs && ./help2man \ + --name="Encrypt a password in MD5 format" \ + --section=8 --output=grub-md5-crypt.8 \ + ../util/grub-md5-crypt ) + + touch build-arch-stamp + +build-indep: build-indep-stamp +build-indep-stamp: configure-stamp + dh_testdir + + # create html documentation from texi files + ( cd docs && texi2html -split_chapter grub.texi ) + ( cd docs && texi2html -split_chapter multiboot.texi ) + + touch build-indep-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-arch-stamp build-indep-stamp configure-stamp config.log + + # Add here commands to clean up after the build process. + -$(MAKE) distclean + + # The Makefile doesn't clean up the generated info files so we will do + # it here so the doco is uptodate. + -( cd docs && rm -f *.info* ) + + # clean up generated html documentation + -( cd docs && rm -f *.html ) + + # clean up documentation directory removing created dirs. + -( cd docs && rm -rf grub multiboot ) + + # remove files that will be change due our automake and autoconf rebuilding + -rm -f $(shell find . -name 'Makefile.in' -o \ + -name 'aclocal.m4' -o \ + -name 'configure') + + # reverse patches we applied. this has to happen after make distclean + -$(MAKE) -s -f debian/rules unpatch + + dh_clean + +install: install-indep install-arch +install-indep: install-arch + dh_testdir + dh_testroot + dh_clean -k -i + dh_installdirs -i + + # Add here commands to install the indep part of the package into + # debian/-doc. + #INSTALLDOC# + + dh_install -i + +install-arch: + dh_testdir + dh_testroot + dh_clean -k -s + dh_installdirs -s + + # Add here commands to install the package into debian/grub. + $(MAKE) install DESTDIR=$(CURDIR)/debian/grub/ + + # make install puts the info files in the grub package but we want them + # in the grub-doc package so lets clean shop and let dh_installinfo do + # the work + rm -rf debian/grub/usr/share/info + + # Cleanup filesystems not used natively in Debian. + # (non-native filesystems are supported via stage2) + mkdir debian/grub/usr/lib/grub/tmp/ + mv debian/grub/usr/lib/grub/*-*/*_stage1_5 \ + debian/grub/usr/lib/grub/tmp/ + for i in $(filesystems) ; do \ + mv debian/grub/usr/lib/grub/tmp/$${i}_stage1_5 \ + debian/grub/usr/lib/grub/*-*/ ; \ + done + rm -rf debian/grub/usr/lib/grub/tmp/ + + dh_install -s + +# Must not depend on anything. This is to be called by +# binary-arch/binary-indep +# in another 'make' thread. +binary-common: + # Add a wrapper for update-grub. Remove it post-etch + cp debian/update-grub.wrapper debian/grub/sbin/update-grub + + # Add a wrapper for grub-install. Remove it post-etch + cp debian/grub-install.wrapper debian/grub/sbin/grub-install + + dh_testdir + dh_testroot + dh_installchangelogs ChangeLog + dh_installdocs + dh_installexamples +# dh_installmenu + dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_installinit +# dh_installcron + dh_installinfo + dh_installman +# dh_link + dh_strip + dh_compress + dh_fixperms +# dh_perl +# dh_python + dh_makeshlibs + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb +# Build architecture independant packages using the common target. +binary-indep: build-indep install-indep + $(MAKE) -f debian/rules DH_OPTIONS=-i binary-common + +# Build architecture dependant packages using the common target. +binary-arch: build-arch install-arch + $(MAKE) -f debian/rules DH_OPTIONS=-a binary-common + +# Grab fixes from CVS using our version as reference. +cvs-sync: + cvs -d:pserver:anonymous@cvs.savannah.gnu.org:/cvsroot/grub checkout -d grub-cvs grub; \ + UVERSION=$$(dpkg-parsechangelog | grep Version | sed 's,Version: ,,g;s,-[0-9]*$$,,g;s,\.,_,g'); \ + cd grub-cvs && \ + cvs diff -uN -r release_$$UVERSION -r HEAD \ + | sed 's,^\(---\|+++\) \(.*\)$$,\1 foo/\2,g' \ + | filterdiff -x '*/.cvsignore' -x '*/docs/version.texi' -x '*/docs/stamp-vti' > ../debian/patches/cvs-sync.patch; \ + cd .. && rm -rf grub-cvs +binary: binary-arch binary-indep +.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch configure patch unpatch --- grub-0.97.orig/debian/mkbimage +++ grub-0.97/debian/mkbimage @@ -0,0 +1,6 @@ +#!/bin/bash -e +cat << EOF +This program is broken, unsupported upstream, and has been deprecated in favour +of grub-mkrescue (grub-pc package). +EOF +exit 0 --- grub-0.97.orig/debian/grub-doc.info +++ grub-0.97/debian/grub-doc.info @@ -0,0 +1,2 @@ +docs/grub.info +docs/multiboot.info --- grub-0.97.orig/debian/grub.templates +++ grub-0.97/debian/grub.templates @@ -0,0 +1,9 @@ +Template: grub/update_grub_changeprompt_threeway +Type: select +# Translators, please keep translations *short* (less than 65 columns) +__Choices: install the package maintainer's version, keep the local version currently installed, show the differences between the versions, show a side-by-side difference between the versions, show a 3-way difference between available versions, do a 3-way merge between available versions (experimental), start a new shell to examine the situation +Choices-C: install_new, keep_current, diff, sdiff, diff_threeway, merge_threeway, shell +Default: keep_current +_Description: What would you like to do about ${BASENAME}? + A new version of /boot/grub/menu.lst is available, but the version installed + currently has been locally modified. --- grub-0.97.orig/debian/changelog +++ grub-0.97/debian/changelog @@ -0,0 +1,2199 @@ +grub (0.97-29ubuntu13) hardy; urgency=low + + * /host is not accessible when update-grub is run by grub-installer so + the file test will always fail (LP: #175772). Thanks Agostino Russo. + + -- Evan Dandrea Wed, 30 Jan 2008 09:11:41 -0500 + +grub (0.97-29ubuntu12) hardy; urgency=low + + * debian/update-grub: templates should be registered under grub, not under + ucf + + -- Steve Langasek Mon, 28 Jan 2008 13:32:01 -0800 + +grub (0.97-29ubuntu11) hardy; urgency=low + + * debian/control: point XS-Vcs-Bzr at the Ubuntu repository instead of + pointing at the Debian repository. + * debian/update-grub: if menu.lst does not exist at the time update-grub is + called, the "current" and "proposed" kernel lists should always be + identical, so set them equal in ucf_update_kernels. This fixes a + remaining bug where regenerating menu.lst from scratch after it's been + registered once with ucf would result in an empty kernel list. + LP: #186412. + * Add a debconf template so that our ucf prompts don't refer to a filename + that has no meaning to the user + * Add Build-Depends on po-debconf for the above, and depend on + debconf-utils to allow for loading the debconf template from a + script that is not a package maintainer script. + * Raise depends to ucf (>= 3.004-0ubuntu2) + + -- Steve Langasek Mon, 28 Jan 2008 13:11:25 -0800 + +grub (0.97-29ubuntu10) hardy; urgency=low + + * Add build-dependency on gcc-4.2-multilib for amd64, fixing build + failure. + + -- Steve Langasek Fri, 25 Jan 2008 14:24:03 +0000 + +grub (0.97-29ubuntu9) hardy; urgency=low + + * Add debian/patches/varargs.diff: Use proper va_start/arg/end macros + instead of pointer cowboying, so that grub does not segfault with anything + less ancient than gcc 3.4. + * debian/rules: Build with default gcc. + * debian/control: Drop gcc-3.4 build dependency. + + -- Martin Pitt Thu, 24 Jan 2008 12:51:23 +0000 + +grub (0.97-29ubuntu8) hardy; urgency=low + + * Add missing #!/bin/sh line to debian/grub.postrm + * Handle the special case of ucf registration on initial file creation; + we should always generate an empty kernel list in this case. + + -- Steve Langasek Wed, 23 Jan 2008 11:03:35 +0000 + +grub (0.97-29ubuntu7) hardy; urgency=low + + * debian/update-grub: use ucf to record changes to the autogenerated + kernel list + * debian/grub.postinst: + - run update-grub on upgrade from pre-ucf versions, so that we get a + registered copy of the file immediately and not just the next time a + kernel is installed. + - add missing debhelper token for completeness' sake + * debian/grub.postrm: purge ucf state when the package is purged + + -- Steve Langasek Wed, 23 Jan 2008 09:29:43 +0000 + +grub (0.97-29ubuntu6) hardy; urgency=low + + * Set kopt correctly for loop installations (LP: #175772). Thanks + Agostino Russo. + + -- Evan Dandrea Fri, 18 Jan 2008 14:41:27 -0500 + +grub (0.97-29ubuntu5) hardy; urgency=low + + * debian/control: Remove Build-Depends-Indep on e2tools and mkisofs, they + are useless and mkisofs is in multiverse (LP: #173717). + * debian/patches/use_genisoimage_instead_of_mkisofs: added, point to the + right program in the documentation. + + -- Albin Tonnerre Mon, 03 Dec 2007 19:28:59 +0100 + +grub (0.97-29ubuntu4) gutsy; urgency=low + + * debian/update-grub: replace Ubuntu with lsb_release if possible + (LP: #83690, #19040) + * debian/update-grub: on upgrades, set the new savedefault option + to "true" if the user was using "default saved" (LP: #131858) + + -- Tormod Volden Mon, 03 Sep 2007 22:56:34 +0200 + +grub (0.97-29ubuntu3) gutsy; urgency=low + + * No-change upload to work around a soyuz bug and get us some + actual build records for lpia. + + -- Adam Conrad Fri, 10 Aug 2007 20:47:19 +1000 + +grub (0.97-29ubuntu2) gutsy; urgency=low + + * Add lpia to the list of supported architectures. + + -- Matthias Klose Fri, 10 Aug 2007 08:05:31 +0000 + +grub (0.97-29ubuntu1) gutsy; urgency=low + + * Merge from Debian unstable. Remaining Ubuntu changes: + - debian/control: build-depends on libc6-dev and gcc-3.4 + - debian/control: depends on volumeid, provides linux-boot-loader + - debian/rules: use gcc-3.4 + - debian/patches/grub-install_storeversion.diff + - debian/patches/quiet.diff + - debian/patches/gpt.diff + - debian/patches/grub-0.95-mem_lower.patch + - debian/update-grub: assorted Ubuntu tweaks + - use printf instead of echo -e + - split up warning about missing /boot/grub + - is_removable device handling + - crashdump handling + - get default root device from /etc/fstab + - rename title to "Ubuntu" + - quiet and splash default defoptions + - rename "single-user" to "recovery" + - timeout/hiddenmenu/colours defaults + - robust oldversion handling + - don't treat memtest as a kernel + - convert_kopt_to_uuid + - kopt_2_6 handling + - remove freebsd support + - configure.ac: -fno-strict-aliasing + - debian/grub.postinst: run update-grub on upgrade from dapper + * debian/patches/quiet.diff: Fix "help quiet" segfault (LP: #60163) + * debian/update-grub: New "savedefault" automagic option (default: false) + for adding the savedefault command to menu entries (LP: #66278) + + -- Tormod Volden Fri, 29 Jun 2007 16:38:06 +0200 + +grub (0.97-29) unstable; urgency=low + + [ Otavio Salvador ] + * update-grub: Improve sorting with mixed numeric and non-numeric + characters. Thanks dann frazier for the + patch. Closes: #422759 + + [ Robert Millan ] + * Add myself to Uploaders. + * update-grub: Remove core.img handling. It was becoming meaningless + without presence of the grub-pc package. + * control (Architecture): Replace any-* arches with the old, boring, + hardcoded list. (Closes: #424510) + * Get rid of grub-disk, mkbimage and grub-floppy. They're deprecated + in favour of grub-rescue-pc now. (Closes: #399168, #250938, #429576, + #352731) + + -- Robert Millan Tue, 26 Jun 2007 07:48:57 +0200 + +grub (0.97-28) unstable; urgency=low + + * Remove second /sbin/update-grub warning. Apparently, it is + impossible to detect /etc/kernel-img.conf syntax by checking $0. + (Closes: #421321) + * update-grub.8: Don't recommend /sbin/update-grub anymore. (Closes: #418064) + * control (Build-Depends): s/libc6-dev-i386/gcc-multilib/g. + * update-grub: When GRUB 2 core.img is detected, set it as first option + (note that first doesn't imply default). + + -- Robert Millan Mon, 7 May 2007 20:58:31 +0200 + +grub (0.97-27) unstable; urgency=high + + * When counting the number of kernels, do not count invalid xen + ones. Thanks to "Jon H. Davis" by investigate + and produce the patch for it. Closes: #411908 + + -- Otavio Salvador Fri, 30 Mar 2007 02:38:31 -0300 + +grub (0.97-26) unstable; urgency=high + + * Brown bag release! + * Fix two stupid mistakes on previous changes. Thanks to Steve Langasek + by identify them. + + -- Otavio Salvador Fri, 23 Mar 2007 08:34:00 -0300 + +grub (0.97-25) unstable; urgency=high + + * Fix grub-install regexp to work when providing the whole device as in + /dev/cciss/c0d0. Thanks to Jason Cormie by + the patch. Closes: #414161 + + -- Otavio Salvador Thu, 22 Mar 2007 23:04:13 -0300 + +grub (0.97-24) unstable; urgency=high + + [ Leandro Dorileo ] + * Changed grub-set-default to search for grub dir if rootdir is not + informed. Closes: #411109, #412334 + * Applied changes from Friedemann Baitinger + to savedefault-once. closes: #254475 + + -- Otavio Salvador Tue, 20 Mar 2007 23:37:46 -0300 + +grub (0.97-23) unstable; urgency=high + + [ Tomas Pospisek ] + * Cross-referenced grub-install(8), grub(8) and update-grub(8) with + each other. Closes: #267998, + * Mention in the manpages that the info documentation comes with + the grub-doc package. Closes: #160337, #345655 + * Note in the referring manpage, that kernel-img.conf comes with the + kernel-package package. Closes: #398419 + + [ Otavio Salvador ] + * Applied patch from Jason Rhinelander to fix + kernel ordering on menu.lst generated file. Closes: #374371, #410464 + + -- Otavio Salvador Tue, 13 Feb 2007 14:48:40 -0200 + +grub (0.97-22) unstable; urgency=high + + * Applied patch from Chip Salzenberg to avoid to write + to stdout. Fix kernel postrm calls. Closes: #409190. + * Applied patch from Joey Hess to put xen kernels + when running inside of a domU. Closes: #404536. + + -- Otavio Salvador Wed, 31 Jan 2007 21:49:14 -0200 + +grub (0.97-21) unstable; urgency=medium + + [ Leandro Dorileo ] + * Changed update-grub to call grub-set-default 0, and a warning a message + telling the user that the default file was regeneraged. Closes: #406068. + * Added some missing savedefault_func return in stage2.c and how the read + default buf was being handled. Thanks Len Sorensen + by the suggestions. Closes: #403763. + + -- Otavio Salvador Sun, 14 Jan 2007 23:20:48 -0200 + +grub (0.97-20ubuntu7) gutsy; urgency=low + + * Add patch from Mandriva grub-0.95-mem_lower.patch (Ubuntu bug #106887) + Allows grub to boot on some computer where only lilo and syslinux + would work. Uses memory detection similar to syslinux. + http://www.mail-archive.com/bug-grub@gnu.org/msg06526.html + + -- Tormod Volden Sat, 26 May 2007 11:15:23 +0200 + +grub (0.97-20ubuntu6) feisty; urgency=low + + * Migrate root=/dev/evms/[hs]d[a-z][0-9]* to UUIDs, since systems upgraded + from dapper to edgy may find themselves with such a root= option by + mistake (LP: #102148). + + -- Colin Watson Tue, 10 Apr 2007 13:37:42 +0100 + +grub (0.97-20ubuntu5) feisty; urgency=low + + * gcc-4.0 is no longer available. Switch back to gcc-3.4. Update build-deps + accordingly. + + -- Ben Collins Tue, 20 Mar 2007 08:32:42 -0400 + +grub (0.97-20ubuntu4) feisty; urgency=low + + * Change update-grub crashdump menu addition handling. We no longer have + kdump kernels, so users need to set crashdump=1 in menu.lst and rerun + update-grub to get this functionality. + + -- Ben Collins Fri, 2 Mar 2007 13:09:34 -0500 + +grub (0.97-20ubuntu3) feisty; urgency=low + + * Add GPT patch from + http://lists.gnu.org/archive/html/bug-grub/2006-07/msg00037.html, to + simplify support for Intel Macs (LP: #62386). + + -- Colin Watson Fri, 19 Jan 2007 10:42:32 +0000 + +grub (0.97-20ubuntu2) feisty; urgency=low + + * Fix broken comma-separation for memtest86 boot items. + * Migrate existing kopt_2_6 options to UUID (LP: #78901). + + -- Colin Watson Sun, 14 Jan 2007 01:29:08 +0000 + +grub (0.97-20ubuntu1) feisty; urgency=low + + * Resynchronise with Debian. Remaining changes: + - provide linux-boot-loader virtual package + - compile with gcc-4.0 + - use -fno-strict-aliasing + - quiet boot and usplash support + - disabled patch to set splash + - store version of grub in /boot/grub/installed-version + - in update-grub use this file to determine whether the quiet option + is supported + - transition root option to mounting by UUID + - fix bashisms in update-grub + - rename "single-user" mode to "recovery" mode + - detect installation onto removable devices, and adjust root device + - don't override UUID= or LABEL= from /etc/fstab, leave it to the + initramfs to do the right thing + - kdump option detection + - drop "any-" from architecture names in debian/control + * update-grub: Remember to pass lockold arguments to write_kernel_entry + (LP: #73906). + + -- Colin Watson Wed, 20 Dec 2006 15:05:21 +0000 + +grub (0.97-20) unstable; urgency=low + + * Add manpage for grub-set-default. Thanks for Patrick Schönfeld + by the patch. Closes: #399699 + * Write grub-install wrapper messages on stderr instead of stdout. + Closes: #390038, #388696, #395359. + * Write update-grub wrapper messages on stderr instead of stdout. + + -- Otavio Salvador Wed, 6 Dec 2006 11:01:44 -0200 + +grub (0.97-19ubuntu2) feisty; urgency=low + + * s/any-// in debian/control -- Soyuz doesn't support it. + + -- Scott James Remnant Wed, 29 Nov 2006 14:02:30 +0000 + +grub (0.97-19ubuntu1) feisty; urgency=low + + * Merge from debian unstable, remaining changes: + - provide linux-boot-loader virtual package + - compile with gcc-4.0 + - use -fno-strict-aliasing + - quiet boot and usplash support + - disabled patch to set splash + - store version of grub in /boot/grub/installed-version + - in update-grub use this file to determine whether the quiet option + is supported + - transition root option to mounting by UUID + - fix bashisms in update-grub + - rename "single-user" mode to "recovery" mode + - detect installation onto removable devices, and adjust root device + - don't override UUID= or LABEL= from /etc/fstab, leave it to the + initramfs to do the right thing + - kdump option detection + + * Fix UUID conversion to correctly notice symlinks to /dev/mapper. + * Convert kopt_2_6 to UUID as well. LP: #73090. + + -- Scott James Remnant Tue, 28 Nov 2006 11:40:54 +0000 + +grub (0.97-19) unstable; urgency=low + + [ Leandro Dorileo ] + * Changed how grub handles the saved default entry in the savedefault(once) + patch in stage2/stage2.c cmain function, changed grub-reboot to print + the warning already being printed in grub-set-default to default file. + Closes: #367889, #397021. + + [ Otavio Salvador ] + * Applied patch from "Christian Eckerle" to not + always prepend /boot in front of the kernel line for xen if /boot is + on its on partition. Closes: #393488. + * Applied patch from Mike Kasick to fix the + handle of null options. Closes: #395275. + * Applied patch from Markus Schulz to fix xen kernel + name detection. Closes: #397775. + * Fix grub-install and update-grub mess. Closes: #394020. + * Applied patch from "A. Costa" to fix a typo on + update-grub.8. Closes: #396315. + + -- Otavio Salvador Thu, 9 Nov 2006 11:15:39 -0200 + +grub (0.97-18) unstable; urgency=low + + [ Otavio Salvador ] + * Fix clean target to remove generated files. Thanks to Joey Hess + for the patch. Closes: #385980 + * Fix grub-install.wrapper to check for /usr/sbin/grub-install.real + otherwise grub-install will never be run. Thanks to Pier Luigi Pau + by noticed it. Closes: #387729 + + [ Robert Millan ] + * grub-floppy: Update old /lib path. (Closes: #390167) + + -- Otavio Salvador Tue, 3 Oct 2006 14:03:35 -0300 + +grub (0.97-17) unstable; urgency=low + + [ Petter Reinholdtsen ] + * Install grub-install.wrapper as /sbin/grub-install, not + /usr/sbin/grub-install. (Closes: #387500, #387729) + + [ Leandro Dorileo ] + * Changed few mistakes in NEWS. Closes: #387700 + * Install grub-install as /usr/sbin/grub-install.real and changed its wrapper. + * Corrected few english mistakes in grub-install.wrapper and + update-grub.wrapper. + * Changed the wrappers to call the real script with "$@" instead of $*. + Closes: #388277 + + [ Robert Millan ] + * update-grub: Detect GRUB 2 core image (and add title to chainload it). + * Get rid of type-handling. + - control.in: Remove. + - rules: Drop control generation target. + - control: Staticalise the dynamicaly generated tags. + * control (Suggests): Remove grubconf (Closes: #389094). + * Add a big warning to bug reporters, explaining that GRUB Legacy is feature + frozen. + - presubj: New. Install it in every package. + + [ Otavio Salvador ] + * Add XS-X-Vcs-Svn on control file and point it to our current svn + repository. + + -- Otavio Salvador Mon, 2 Oct 2006 11:42:58 -0300 + +grub (0.97-16) unstable; urgency=high + + ### High urgency since it solve a installation problem on beta3 of d-i ### + + [ Bastian Blank ] + * Add selection of xen hypervisors. + + [ Robert Millan ] + * rules: Install grub-disk iso uncompressed (tradeoff is reasonable, unlike + the ext2fs image). + + [ Otavio Salvador ] + * Add grub-install wrapper forgotten in transition handle. Closes: #387500 + * Edited NEWS.Debian following Manoj Srivastava + suggestion to avoid brokeness when removing old kernels. Closes: #387325 + * Fix README.Debian to cite the new scripts place. + + -- Otavio Salvador Fri, 15 Sep 2006 09:50:32 -0300 + +grub (0.97-15) unstable; urgency=low + + * Remove bashism from update-grub wrapper. + + -- Otavio Salvador Sat, 2 Sep 2006 08:53:20 -0300 + +grub (0.97-14) unstable; urgency=low + + [ Robert Millan ] + * Make update-grub more $menu_file agnostic to ease code sharing with grub2 + (which uses grub.cfg). Also remove explicit "boot" command that has never + been required, and would break grub2. + * Fix FHS-me-harder headache. (Closes: #361929) + - rules: --prefix=/usr. + - grub.install: Move the stuff to /usr. + * update-grub: Set interpreter to /bin/bash to cope with non-POSIX + extensions. (also mentioned in #361929) + + [ Otavio Salvador ] + * Remove convert_kernel26 usage since it's not necessary anymore and due + initramfs-tools changes it's bug too. + * Add a NEWS file describing how to upgrade the system regarting to + grub-install and update-grub moving. + * Change the way we handle FHS headache: + - debian/wrappers: New. Provide a wrapper to old locations. + - debian/rules: install the wrappers. + - grub.dirs: New. Create /sbin. + + -- Otavio Salvador Wed, 30 Aug 2006 12:24:48 -0300 + +grub (0.97-13) unstable; urgency=low + + [ Otavio Salvador ] + * Use automake1.9 instead of automake1.8; + * Added build-depends of autotools-dev since it uses autoconf; + * Applied patch to add support to Xen hypervisor kernel handling. Thanks + to Alastair McKinstry and Thomas Schwinge + for the patch. (Closes: #343076) + * Remove all autogenerated files before make the package diff so we + reduce the delta size between us and upstream a lot. + * Applied patch to add support to AoE devices. Thanks to James Harper + for the patch. (Closes: #377005) + * Add mdadm as suggested since it's need to support RAID installations. + (Closes: #299751) + + -- Otavio Salvador Mon, 24 Jul 2006 10:43:07 -0300 + +grub (0.97-12) unstable; urgency=HIGH + + [ Otavio Salvador ] + * Bump Standards-Version to 3.7.2.1 (no changes); + + [ Robert Millan ] + * New snapshot. (Closes: #374952) + patches: + - cvs-sync.patch: Update manualy to latest version _before_ GFDL change. + - grub-special_device_names.diff: Resync. + + [ Otavio Salvador ] + * Applied patch from Michael Biebl to fix failure to + catch the right root device when using RAID and new mdadm + packages. (Closes: #375927) + * Set urgency as 'high' due the mdadm issue that can break installations + on Etch. + + -- Otavio Salvador Mon, 3 Jul 2006 20:25:36 -0300 + +grub (0.97-11ubuntu14) edgy; urgency=low + + * s/single-user/recovery/, revert Debian #370110. Ubuntu: #62600. + + -- Scott James Remnant Thu, 19 Oct 2006 14:19:59 +0100 + +grub (0.97-11ubuntu13) edgy; urgency=low + + * Fix two missing redirects to stderr. This caused kernel postinst + to fail (lp: #63074) + + -- Michael Vogt Thu, 5 Oct 2006 11:50:36 +0200 + +grub (0.97-11ubuntu12) edgy; urgency=low + + * Don't convert /dev/md[0-9]* to UUID for now. Ubuntu: #62476. + + -- Scott James Remnant Tue, 26 Sep 2006 17:18:55 +0100 + +grub (0.97-11ubuntu11) edgy; urgency=low + + * Make the boot message a little less jargon-y. + + -- Scott James Remnant Thu, 14 Sep 2006 09:33:41 +0100 + +grub (0.97-11ubuntu10) edgy; urgency=low + + * Don't transition LVM, evms and dev-mapper devices. (Ubuntu #54002) + + -- Scott James Remnant Mon, 21 Aug 2006 09:48:55 +0200 + +grub (0.97-11ubuntu9) edgy; urgency=low + + * Fix a bashism in update-grub's abort function. + * Don't call update-grub on fresh install (closes: Malone #54067). + + -- Colin Watson Wed, 26 Jul 2006 11:29:08 +0100 + +grub (0.97-11ubuntu8) edgy; urgency=low + + * Change dependency to one on volumeid. + + -- Scott James Remnant Tue, 25 Jul 2006 14:04:57 +0100 + +grub (0.97-11ubuntu7) edgy; urgency=low + + * Provide linux-boot-loader virtual package. + + * Fix detection of kdump kernels to not abandon all hope when there + aren't any, and thus prevent kernel installs. + + * On upgrade, alter the kopt line in menu.lst to refer to the root + filesystem by UUID. We get install for free because fstab is parsed. + + -- Scott James Remnant Tue, 25 Jul 2006 02:36:33 +0100 + +grub (0.97-11ubuntu6) edgy; urgency=low + + * Add detection of kdump kernels to update-grub. Create hardcoded altoption + entries for usage. + + -- Ben Collins Tue, 18 Jul 2006 22:48:37 +0000 + +grub (0.97-11ubuntu5) edgy; urgency=low + + * Fix build-dep from gcc-3.4 to gcc-4.0, dropped somewhere during test + builds + + -- Matt Zimmerman Mon, 10 Jul 2006 10:52:21 -0700 + +grub (0.97-11ubuntu4) edgy; urgency=low + + * When grub-install runs, store the version number of the package in + /boot/grub/installed-version + * In update-grub, use this file to determine whether the quiet option is + supported by the version of grub which has been installed + + -- Matt Zimmerman Sun, 9 Jul 2006 15:49:25 -0700 + +grub (0.97-11ubuntu3) edgy; urgency=low + + * Use gcc-4.0 rather than gcc-3.4 + * Disable diskless support. This seems to cause some weird regressions + + -- Matt Zimmerman Sun, 9 Jul 2006 14:57:46 -0700 + +grub (0.97-11ubuntu2) edgy; urgency=low + + * Use gcc-3.4 by default. Grub does wacky things when using 4.1. + (Closes: #51518). Work around for now until I can fix it properly. + * Enable diskless support. Enabled pci-drivers for diskless support + (Closes: #49998). + * Updated patch from me to quiet grub when booting, + resolves the quieten-grub spec on the grub side (Closes: #20736). + * Turn off verbose booting by default for non-recovery kernels. + * Taken from debian: + - Applied patch from Michael Biebl to fix failure to + catch the right root device when using RAID and new mdadm packages. + + -- Chuck Short Sat, 8 Jul 2006 07:42:21 -0400 + +grub (0.97-11ubuntu1) edgy; urgency=low + + * Resynchronize with Debian: + - debian/control: Updated build depends. + - debian/control.in: Updated build-depends. + - debian/update-grub: Retained Ubuntu changes + - Patches: + - Dropped odirect.diff since it breaks raid detection. + - Added grub-install_regxp - Use POSIX regexp to support more + locales. Fixes regexp to allow partitions later of hdg to work. + - Added print-func.diff. Allows beep in menu.lst. Useful for + blind people. + - Added intelmac.diff.Kind of obvious. Allows intelmac support. + - Added cvs-sync.patch. Latest updates from grub cvs. + + -- Chuck Short Wed, 28 Jun 2006 17:11:45 +0100 + +grub (0.97-11) unstable; urgency=low + + * Don't use /dev/ida!cXdYpZ format since ida RAID controllers aren't + using that format in newer kernels. Current code already skip + /dev/cciss devices. Closes: #362095 + * Applied patch from Matt Taggart to fix a + regression in update-grub code when using memtest86 enabled. + Closes: #371196, #372648 + + -- Otavio Salvador Thu, 15 Jun 2006 08:53:14 -0300 + +grub (0.97-10) unstable; urgency=low + + * Fix build-depends for amd64. Closes: #369452, #369723. + * Apply patch from Tino Keitel to allow grub to + work in Apple Intel based machines. Closes: #369655. + * Fix problem registering documentation in doc-base. Closes: #369578. + * Add doc-base as suggestion for grub-doc package. + * Replace the alternative boot images from recovery mode to single-user + mode. Closes: 370110. + * Apply patch from Martin F. Krafft to implement + the lockold feature, which allows older kernel stanzas to be + automatically locked (pasword-protected). His work is based on a patch + by Dominic Hargreaves Closes: #120125. + + -- Otavio Salvador Mon, 5 Jun 2006 12:26:47 -0300 + +grub (0.97-9) unstable; urgency=low + + * Revert move of files to /usr/sbin 'cause it broke d-i. (reopen: #361929) + + -- Otavio Salvador Mon, 29 May 2006 15:21:56 -0300 + +grub (0.97-8) unstable; urgency=low + + [ Otavio Salvador ] + * Sync with CVS due to 20060529. + * Ack NMU: + - Regenerate control file. (closes: #360987) + * Use POSIX regexp to support more locales. Thanks to Hasso Tepper + for the patch. (closes: #361438, #352670) + * Fix doc-base files. Thanks to Russ Allbery for the + patch. (closes: #362993) + * Fix regexp to allow partitions later of hdg to work. Thanks to Andreas + John . (closes: #362658) + * Move update-grub and grub-install to /usr/sbin since they are intent + to be only in full system. (closes: #361929) + * Apply patch from Robert Millan to fix kFreeBSD issues. + (closes: #363698) + * Apply patch from Luca Capello to improve update-grub + output regarding to splash images. (closes: #368097) + + [ Leandro Dorileo ] + * Fix a typo in mkbimage.8. (closes: #277039) + + -- Otavio Salvador Mon, 29 May 2006 13:45:06 -0300 + +grub (0.97-7) unstable; urgency=low + + [ Kristian Edlund ] + * Added the feature of letting update-grub update the default entry when + a new kernel is installed. Done partly by applying a patch from Thomas + Braun (closes: #233966, #276477, #330083) + * Applied a patch from Vince Busam sort suffixes on + the kernel more detailed. (closes: #355790) + + [ Leandro Dorileo ] + * Changed grub-reboot to handle /boot in other partition. + (closes: #360041) + + -- Otavio Salvador Sat, 1 Apr 2006 09:43:24 -0300 + +grub (0.97-6) unstable; urgency=low + + [ Otavio Salvador ] + * Applied patch from Colin Watson to fix segfaults + in hardware that has NX bit available (amd64, for example). + (closes: #293722) + * Remove comment from grub-reboot since we'll have savedefault --once + back :-D + * Applied patch from Frans Pop to invert + convert_kernel26 logic. (closes: #353725) + * Change build-dependencie for amd64. (closes: #357287, #357286) + + [ Leandro Dorileo ] + * Reimplementation of savedefault --once. Now it reads and writes to + /boot/grub/default. + (closes: #254475, #341106, #341995, #353691, #355870, #342590) + + -- Otavio Salvador Tue, 28 Mar 2006 23:12:45 -0300 + +grub (0.97-5) unstable; urgency=HIGH + + [ Urgency set to HIGH since it broke LVM installations ] + + [ Otavio Salvador ] + * Applied patch from David Golombek to handle + DEB_BUILD_GNU_SYSTEM definition while building in sarge. + (closes: #351822, #350168) + * Fix device handling allowing LVM installation. (closes: #352654) + + -- Otavio Salvador Mon, 13 Feb 2006 21:19:09 -0200 + +grub (0.97-4) unstable; urgency=low + + [ Kristian Edlund ] + * Solved problems in update-grub so running the script will sort + the kernels the same way using dash or bash. (closes: #346544) + * Applied patch provided by Ole Janssen + to fix a problem when /boot is on an extra partion (closes: #346596) + * Fixed the problem with multiple splashimage lines, if there is a + splashimage outside the autoupdated part of the file. (closes: #341538, + #318706, #345208, #283308, #345346) + * Corrected the README.Debian to contain the right path if /boot + is on another partion. (closes: #281051) + + [ Otavio Salvador ] + * Don't convert /dev/mapper to new kernel 2.6 device scheme. + (closes: #347482) + + -- Otavio Salvador Thu, 19 Jan 2006 07:02:55 -0200 + +grub (0.97-3) unstable; urgency=low + + * Replace automake1.9 build-dependencie with automake1.8 to fix a FTBFS + issue. (closes: #344739, #346080) + * Redirect output to stderr. Thanks Bastian Blank for + a better solution. (closes: #344767, #346327) + * Add print_func.diff patch to beep in menu.lst. Useful for blind + people. Really thank up Osvaldo La rosa for the + patch. (closes: #314210) + * Applied patch provided by Kristian Edlund to fix + ordering kernel issues. (closes: #264312, #342221) + * Applied patch provided by Michal Cihar to allow + update-grub to run with dash. (closes: #346127) + + -- Otavio Salvador Mon, 9 Jan 2006 13:37:41 -0200 + +grub (0.97-2) unstable; urgency=low + + * Update debian/control. This caused the wrong NMU identification :( + * Disable fix_amd64_compile.diff since it broke amd64 building. (closes: #340849) + * Add message to show that grub-reboot isn't supported in this release anymore. + * Drop odirect.diff since it broke RAID disk detection. (closes: #341888) + * Applied patch from Piotr Roszatycki to + fix grub-install detection of RAID root device. (closes: #302359) + * Applied patch from Sven Joachim to fix some + typos on grub-floppy manpage. (closes: #342259) + + -- Otavio Salvador Thu, 22 Dec 2005 15:57:17 -0200 + +grub (0.97-1ubuntu9) dapper; urgency=low + + * Taken from debian 0.97-7: (Ubuntu: #38182) + [ Kristian Edlund ] + Added the feature of letting update-grub update the default entry when + a new kernel is installed. Done partly by applying a patch from Thomas + Braun + * fix grub-reboot (Ubuntu: #31915) + + -- Michael Vogt Thu, 6 Apr 2006 05:03:48 +0200 + +grub (0.97-1ubuntu8) dapper; urgency=low + + * Drop build dependency on ia32-libs-dev. + + -- Matthias Klose Thu, 16 Mar 2006 15:32:40 +0000 + +grub (0.97-1ubuntu7) dapper; urgency=low + + * Build-depend on libc6-dev-i386, not libc6-i386-dev. + + -- Colin Watson Wed, 15 Mar 2006 12:56:27 +0000 + +grub (0.97-1ubuntu6) dapper; urgency=low + + * Build-depend on libc6-i386-dev on amd64 in preference to ia32-libs-dev. + * Add I2O support (patch from i2o.shadowconnect.com; closes: Malone + #15466, #22220). + + -- Colin Watson Wed, 15 Mar 2006 12:25:17 +0000 + +grub (0.97-1ubuntu5) dapper; urgency=low + + * debian/patches/ubuntu_update_grub.diff: + - disabled again, caused too many trouble + + -- Michael Vogt Tue, 21 Feb 2006 09:59:24 +0100 + +grub (0.97-1ubuntu4) dapper; urgency=low + + * debian/update-grub: + - if the user has not specified his own splash-image, use the one from + ubuntu + * debian/rules: use automake-1.9 instead of automake-1.8 + + -- Michael Vogt Thu, 16 Feb 2006 10:03:35 +0100 + +grub (0.97-1ubuntu3) dapper; urgency=low + + * Don't override UUID or LABEL statements from fstab, but leave it to + the initrd, initramfs or kernel to DTRT with them. + + -- Tollef Fog Heen Fri, 3 Feb 2006 18:31:02 +0100 + +grub (0.97-1ubuntu2) dapper; urgency=low + + * Modify update-grub to check if our root/boot is on a removable device + and take appropriate actions to write a proper menu.lst. + This happens only at install time. Further calls to update-grub will use + the default in menu.lst. + + -- Fabio M. Di Nitto Tue, 10 Jan 2006 10:49:38 +0100 + +grub (0.97-1ubuntu1) dapper; urgency=low + + * Resynchronise with Debian. + * Drop Nathaniel McCallum's nonaltoptions patch, done differently in + Debian (as defoptions); added migration code to deal with old Ubuntu + menu.lst files. + * Drop Matthew Garrett's stage 2 drive fallback patch, since upstream has + implemented a different solution which appears to address essentially + the same problem. + * Generated debian/control once from debian/control.in using + type-handling, but continue to avoid the build-dependency on + type-handling; the generated debian/control is in the source package. + * Disable fix_amd64_compile.diff for now; it causes configure to fail with + "GRUB requires a working absolute objcopy; upgrade your binutils". + + -- Colin Watson Wed, 30 Nov 2005 18:00:45 +0000 + +grub (0.97-1) unstable; urgency=low + + * New upstream release: (closes: #303967) + Patches: + - 2gb_limit.diff: resync; + - kfbsd_chainload.diff: dropped; not needed; + - fwritable-strings_remove.diff: dropped, merged upstream; + - console_current_color.diff: dropped, merged upstream; + - xsi_mkbimage.diff: dropped, merged upstream; + - smp-imps.diff: dropped, not needed; + - revert_grub-set-default.diff: dropped, not needed; + - savedefault.diff: disabled, don't apply anymore; (reopen: #195833) + - static_subfunc.diff: dropped, not needed; + Fixes: + - Fallback to a sane console if fail to set graphical mode; (closes: #267224) + * Doesn't output a error when no kernel is installed. (closes: #336730) + * Make update-grub output consistent. (closes: #336729) + * Applied patch from Antonio Kanouras + to remove bashism from update-grub and allow it to run with + dash. (closes: #337145) + * Add a watch file to be easier to identify upstream releases + * debian/patches/fix_amd64_compile.diff: Added. Ensure that we build in + 64bit mode in x86_64 arch. (closes: #337288) + * Start to use automake1.9 when building. + * Applied patch from Marco Amadori to + document, in menu.lst, to avoid _default saved_ option in case of + being use dmraid. + * Applied patch from Jason Thomas to give a example + how to use kernel options to specific kernel version. (closes: #338371) + * Applied patches from Andrew Stribblehill and Tony + Mancill to fix grub-floppy to don't falsely + reports "stage1" as missing. (closes: #288678) + * Applied patch from Free Ekanayaka to allow custom + title name in menu.lst. (closes: #298110, #138318) + * Applied patch from Georg Wittenburg to + allow specific options to default entry. (closes: #266101) + * Fix documentation installing. (closes: #339687) + * Clean the source code. (closes: #340656) + * Patches stolen from other vendors: + - [SuSE] initrd_max_address.diff: added. This change the max address + to host initrd image and add a safe default value in case of failure; + - [Fedora] splashimage_help.diff: added. Add documentation about + splashimage option; (closes: #200269) + - [Fedora] grub-install_addsyncs.diff: added. Ensure that filesystem + caches are flushed; + - [Fedora] geometry-26kernel.diff: added. Add geometry detection since + kernel 2.6 doesn't do that anymore, for IDE devices; + - [Fedora] odirect.diff: added. Use O_DIRECT to avoid cache issues. + - [Mandriva] graphics.diff: updated; + + -- Otavio Salvador Thu, 24 Nov 2005 22:52:31 -0200 + +grub (0.95+cvs20040624-19) unstable; urgency=low + + * Applied patch to fix a typo on update-grub script. (closes: #336573) + + -- Otavio Salvador Mon, 31 Oct 2005 18:54:39 -0200 + +grub (0.95+cvs20040624-18) unstable; urgency=low + + * Fix update-grub to handle the case when /boot is in another partition + then /. (closes: #280086, #261936) + * Fix update-grub to don't fail when called from /usr/bin. (closes: #321072) + * Applied patch from Martin Michlmayr to not generate + trailing white space. (closes: #310030) + * Applied patch from Y Giridhar Appaji Nag to fix + FTBFS due invalid storage class for function. (closes: #318539) + * Remove code to use gcc-3.4 in case of x86-64 architecture since we now + use gcc-4.0 as default compiler. + * fwritable-strings_remove.diff: New. Remove -fwritable-strings from + Makefiles to allow the build with GCC 4.0. + * Change code to handle architectures to be compatible with new dpkg + versions but maintaining it backward compatible to make easier to + backport it to stable. (closes: #335038) + * Clean up doc directory in clean targe of rules. + * Bump Standards-Version to 3.6.2.1 (no changes need). + * Add myself in Uploaders field. + * Remove Robert Millan from Uploaders field as + requested by him. + * Applied patch from Jason Thomas to remove the use + of awk. (closes: #266243) + * Applied patch from Jens Kubieziel to fix a typo in + update-grub script. (closes: #333181, #306255) + * Add gen-control target in rules and remove the control update from + clean target since it isn't allowed in Debian Police anymore. + * Update FSF address in copyright file. + + -- Otavio Salvador Sat, 29 Oct 2005 14:14:27 -0200 + +grub (0.95+cvs20040624-17ubuntu7) breezy; urgency=low + + * Build using gcc-3.4 -fno-strict-aliasing on all architectures. + + -- Matthias Klose Mon, 22 Aug 2005 18:32:25 +0200 + +grub (0.95+cvs20040624-17ubuntu6) breezy; urgency=low + + * Fix up the previous patch to avoid breaking some systems (Ubuntu + #13910) + + -- Matthew Garrett Mon, 22 Aug 2005 04:06:26 +0100 + +grub (0.95+cvs20040624-17ubuntu5) breezy; urgency=low + + * Add support for falling back to the drive that grub was installed on + when looking for stage 2 (Ubuntu #13511) + + -- Matthew Garrett Sat, 20 Aug 2005 13:03:45 +0100 + +grub (0.95+cvs20040624-17ubuntu4) breezy; urgency=low + + * In update-grub, don't set savedefault on recovery mode kernels + + -- Matt Zimmerman Mon, 4 Jul 2005 09:11:31 -0700 + +grub (0.95+cvs20040624-17ubuntu3) breezy; urgency=low + + * Remove kernel name from memtest86 + thanks to Simon Morgan (Ubuntu #11089) + + -- Charles Majola Fri, 1 Jul 2005 11:40:31 +0200 + +grub (0.95+cvs20040624-17ubuntu2) breezy; urgency=low + + * Use DEB_HOST_ARCH_* variables if available so that we work correctly + with dpkg 1.13. + + -- Colin Watson Tue, 31 May 2005 19:40:34 +0100 + +grub (0.95+cvs20040624-17ubuntu1) breezy; urgency=low + + * Resynchronise with Debian. + + -- Adam Conrad Sat, 21 May 2005 12:26:49 +0000 + +grub (0.95+cvs20040624-17) unstable; urgency=low + + * update-grub: fix sort order of new 4 digit kernel versions. + (closes: #304841) + + -- Jason Thomas Tue, 19 Apr 2005 09:38:07 +1000 + +grub (0.95+cvs20040624-16ubuntu2) breezy; urgency=low + + * Build using gcc-3.3 on i386*, upstream 0.97 is prepared for + gcc-4. + + -- Matthias Klose Mon, 16 May 2005 11:38:27 +0000 + +grub (0.95+cvs20040624-16ubuntu1) breezy; urgency=low + + * Merge Debian changes (#9367). + + -- Martin Pitt Fri, 15 Apr 2005 09:55:48 +0200 + +grub (0.95+cvs20040624-16) unstable; urgency=low + + * update-grub: fix kopt parsing to handle + signs in kernel versions + (closes: #299528) + * update-grub: fix variable parsing in get_kernel_opt function. + (closes: #296724) + * update-grub: don't add savedefault entry to memtest86 entries. + (closes: #291733) + * update-grub: fixed spelling mistake + (closes: #283072) + * update-grub: remove temp files + (closes: #284731) + * grub-floppy: fixed shell expansion + finally a nice patch from "Clement 'nodens' Hermann" + (closes: #278529) + + -- Jason Thomas Sun, 20 Mar 2005 10:25:41 +1100 + +grub (0.95+cvs20040624-15) unstable; urgency=low + + * update-grub: fix kopt parsing to support -anything kernel versions. + (closes: #295749) + + -- Jason Thomas Fri, 18 Feb 2005 10:20:31 +1100 + +grub (0.95+cvs20040624-14ubuntu2) hoary; urgency=low + + * A kernel named /boot/vmlinuz caused update-grub to loop infinitely. + + -- Matthias Urlichs Sat, 26 Feb 2005 09:58:20 +0100 + +grub (0.95+cvs20040624-14ubuntu1) hoary; urgency=low + + * Resynchronise with Debian. + + -- Colin Watson Sun, 6 Feb 2005 11:30:58 +0000 + +grub (0.95+cvs20040624-14) unstable; urgency=low + + * update-grub: add support for raid1 + (closes: #292274) + + -- Jason Thomas Fri, 4 Feb 2005 13:28:53 +1100 + +grub (0.95+cvs20040624-13) unstable; urgency=high + + * patches/grub-special_device_names.diff: add support for special devices. + (closes: #290098) + + -- Jason Thomas Mon, 17 Jan 2005 09:29:18 +1100 + +grub (0.95+cvs20040624-12ubuntu2) hoary; urgency=low + + * patches/mprotect.diff: New. Make simulated stack executable, fixing + segfaults with Linux 2.6.10 on systems with a hardware NX bit. + + -- Colin Watson Sat, 5 Feb 2005 10:27:27 +0000 + +grub (0.95+cvs20040624-12ubuntu1) hoary; urgency=low + + * Resynchronise with Debian. + + -- Colin Watson Mon, 29 Nov 2004 12:47:39 +0000 + +grub (0.95+cvs20040624-12) unstable; urgency=low + + * update-grub should look for memtest86 in /boot + (closes: #229649) + * Add support for memtest86+ to update-grub + (closes: #282530) + + -- Jason Thomas Tue, 23 Nov 2004 10:07:30 +1100 + +grub (0.95+cvs20040624-11ubuntu1) hoary; urgency=low + + * Resynchronise with Debian. + + -- LaMont Jones Mon, 22 Nov 2004 20:40:32 -0700 + +grub (0.95+cvs20040624-11) unstable; urgency=low + + * Added support for LABEL/UUID to update-grub. + (Closes: #211096, #215116) + * Added support for 4 digit kernel version to update-grub. + (Closes: #266049) + * Added support for memtest86 to update-grub. + (Closes: #229649) + * Fixed update-grub to detect default and previous kernels correctly. + (Closes: #230136, #240599, #250545, #268141) + * Update-grub now ignores .dpkg-* + (Closes: #265915) + * Added support for fat_stage1_5 to linux build. + (Closes: #281652) + * Removed e2fsprogs from Build-Depends-Indep as it is an Essential package. + + -- Jason Thomas Fri, 19 Nov 2004 09:40:53 +1100 + +grub (0.95+cvs20040624-10ubuntu1) hoary; urgency=low + + * Resynchronise with Debian. + * Avoid use of type-handling. + + -- Colin Watson Mon, 1 Nov 2004 14:50:22 +0000 + +grub (0.95+cvs20040624-10) unstable; urgency=medium + + * Fixes to build on x86_64 cpus. Thanks Andreas Jochens. (Closes: #250225) + - control.in (Build-Depends): Add ia32-libs [@x86_64@], gcc-3.4 [@x86_64@] + - rules + * update-grub: detect and handle splash images. Thanks Nathaniel McCallum. + (Closes: #261936) + * patches/raid_cciss.diff: Add analogous support for IDA devices. + Thanks Piotr Roszatycki. (Closes: #265027) + + -- Robert Millan Thu, 14 Oct 2004 02:18:15 +0200 + +grub (0.95+cvs20040624-9) unstable; urgency=low + + * patches/kfreebsd.diff: New. Support for direct loading of kFreeBSD. + Thanks Guillem Jover. + + -- Robert Millan Fri, 1 Oct 2004 21:45:13 +0200 + +grub (0.95+cvs20040624-8) unstable; urgency=low + + * patches/2gb_limit.diff: New. Fix problem with systems with more than + 2 GB memory (notably, x86_64-based systems). Thanks Goswin Brederlow. + + -- Robert Millan Sat, 14 Aug 2004 19:29:55 +0200 + +grub (0.95+cvs20040624-7) unstable; urgency=low + + * patches/xfs_freeze.diff: New. Fix grub-install for XFS. (Closes: #239111) + * update-grub: s/local tmp//g. Thanks again, David. (Closes: #261570) + * patches/raid_cciss.diff: New. Support for CCISS devices. (Closes: #261447) + * Use type-handling to auto-generate dpkg archlist for i386 cpus. + - control.in: New. Set 'Architecture: @i386@' and add type-handling to + Build-Depends. + - rules: Auto-generate debian/control in clean target. + + -- Robert Millan Mon, 26 Jul 2004 23:39:43 +0200 + +grub (0.95+cvs20040624-6) unstable; urgency=low + + * Fix XSI-isms in update-grub and mkbimage. Thanks David Weinehall. + (Closes: #256100) + - patches/xsi_mkbimage.diff: New. Fix util/mkbimage. + - update-grub + * rules: Select only filesystems supported natively in Debian for installing + ${fs}_stage1_5 files (non-native filesystems are supported in stage2). + * Fix syntax error introduced in previous upload. + - patches/raid.diff + - update-grub + + -- Robert Millan Fri, 23 Jul 2004 00:49:10 +0200 + +grub (0.95+cvs20040624-5) unstable; urgency=low + + * Fix update-grub and grub-install for d-i installs on RAID hardware. + Thanks Charles Steinkuehler. (Closes: #259238) + - patches/raid.diff: New. Fix util/grub-install.in. + - update-grub + + -- Robert Millan Wed, 21 Jul 2004 01:03:34 +0200 + +grub (0.95+cvs20040624-4) unstable; urgency=low + + * rules: + - Make build not depend on build-indep. (Closes: #258643) + - Use stage2_eltorito for building cdrom image. + * control: + - Make grub suggest grubconf. + - Merge Build-Depends in a single line to keep lintian happy. + - s/Grub-Devel/Grub Maintainers/g with the same goal. + + -- Robert Millan Mon, 12 Jul 2004 14:09:29 +0200 + +grub (0.95+cvs20040624-3ubuntu17) warty; urgency=low + + * [debian/update-grub] Add an entry for memtest86+ if it is present + + -- Matt Zimmerman Tue, 28 Sep 2004 00:34:02 -0700 + +grub (0.95+cvs20040624-3ubuntu16) warty; urgency=low + + * Add 2gb_limit from the 0.95+cvs20040624-8 grub package in Debian. + Thanks to Goswin Brederlow for writing the patch. (#1545) + + -- Tollef Fog Heen Sat, 25 Sep 2004 10:55:37 +0200 + +grub (0.95+cvs20040624-3ubuntu15) warty; urgency=low + + * Backport from Debian: + - patches/raid_cciss.diff: New. Support for CCISS devices. (Closes: #261447) + + -- Colin Watson Fri, 17 Sep 2004 18:18:25 +0100 + +grub (0.95+cvs20040624-3ubuntu14) warty; urgency=low + + * Really add Build-Depends: ia32-libs-dev [amd64] + + -- Matt Zimmerman Sun, 5 Sep 2004 09:33:16 -0700 + +grub (0.95+cvs20040624-3ubuntu13) warty; urgency=low + + * use -static for compilation on amd64. + * fix up grub-disk to look in the correct pkglibdir + * Add ia32-libs-dev to build-depends for amd64. + + -- Tollef Fog Heen Wed, 1 Sep 2004 10:08:13 +0200 + +grub (0.95+cvs20040624-3ubuntu12) warty; urgency=low + + * Changed default timeout from 2 to 3 seconds + + -- Nathaniel McCallum Fri, 3 Sep 2004 15:53:48 -0400 + +grub (0.95+cvs20040624-3ubuntu11) warty; urgency=low + + * debian/update-grub: Cope with /boot on a separate partition (closes: + Warty #831). + + -- Colin Watson Thu, 26 Aug 2004 17:58:39 +0100 + +grub (0.95+cvs20040624-3ubuntu10) warty; urgency=low + + * debian/update-grub: added the hiddenmenu flag and lowered the timeout for + the default config + + -- Nathaniel McCallum Tue, 24 Aug 2004 16:30:09 -0400 + +grub (0.95+cvs20040624-3ubuntu9) warty; urgency=low + + * debian/update-grub: Ubuntu branding. + + -- Colin Watson Tue, 24 Aug 2004 20:53:40 +0100 + +grub (0.95+cvs20040624-3ubuntu8) warty; urgency=low + + * debian/update-grub: the quietinit option has been changed to 'splash' + + -- Nathaniel McCallum Fri, 20 Aug 2004 14:02:38 -0400 + +grub (0.95+cvs20040624-3ubuntu7) warty; urgency=low + + * debian/update-grub: added nonaltoptions, with quiet and quiet init + as a default nonaltoption + + -- Nathaniel McCallum Fri, 13 Aug 2004 17:55:02 -0400 + +grub (0.95+cvs20040624-3ubuntu6) warty; urgency=low + + * Fix Build-Depends[-Indep]. + + -- LaMont Jones Fri, 13 Aug 2004 02:50:27 -0600 + +grub (0.95+cvs20040624-3ubuntu5) warty; urgency=low + + * cleanup patches. + + -- LaMont Jones Mon, 9 Aug 2004 14:10:38 +0000 + +grub (0.95+cvs20040624-3ubuntu4) warty; urgency=low + + * debian/update-grub: turned off color menu as the default (clashes with splash) + + -- Nathaniel McCallum Thu, 29 Jul 2004 13:26:42 -0400 + +grub (0.95+cvs20040624-3ubuntu3) warty; urgency=low + + * debian/update-grub: now uses dynamically created directory variables + + -- Nathaniel McCallum Wed, 28 Jul 2004 21:26:17 -0400 + +grub (0.95+cvs20040624-3ubuntu2) warty; urgency=low + + * debian/update-grub: now detects for splash images and adds it to menu.lst + + -- Nathaniel McCallum Wed, 28 Jul 2004 20:19:52 -0400 + +grub (0.95+cvs20040624-3ubuntu1) warty; urgency=low + + * debian/control: Add amd64 to architecture list. + + -- Colin Watson Mon, 19 Jul 2004 19:06:39 +0100 + +grub (0.95+cvs20040624-3) unstable; urgency=low + + * rules: Nuke --exec-prefix and replace the install target prefix overrides + with DESTDIR override, in order to fix grub-install breakage. + As a side effect, this moves /usr/lib/grub to /lib/grub (which happens + to fix FHS compliance ;) + * grub-floppy: Cope with that. + + -- Robert Millan Sat, 26 Jun 2004 04:07:39 +0200 + +grub (0.95+cvs20040624-2) unstable; urgency=low + + * update-grub: Really apply Kiko's patch. (Realy closes: #224441) + + -- Robert Millan Sat, 26 Jun 2004 02:15:06 +0200 + +grub (0.95+cvs20040624-1) unstable; urgency=low + + * New upstream snapshot. (Closes: #254433) + - Fixes FTBFS in UFS2 code. (Closes: #253945) + - Resync all patches. + - patches/revert_grub-set-default.diff: New. Revert to old interface in + setdefault, untill we implement --once with the new one. + * FHS compliance for stage files. + - rules: Unset --datadir. + - rules: s|/usr/lib/grub|/lib/grub|g. + - grub-floppy: Likewise. + - patches/02grub-doco-path.patch: Nuked. Merged in upstream. + * update-grub: Fix ordering by Linux version for test/rc/ac/pre. + Gràcis Kiko Piris. (Closes: #224441) + * update-grub: Minor k*bsd-related portability fixes. + + -- Robert Millan Thu, 24 Jun 2004 16:56:19 +0200 + +grub (0.94+cvs20040511-1) unstable; urgency=low + + * New upstream snapshot. + * patches/ufs2.diff: New. Add UFS2 support. (Closes: #212340) + - patches/graphics.diff: Resync. + * control (Build-Depends): Moved e2tools, e2fsprogs and mkisofs to + Build-Depends-Indep (they are only needed for grub-disk). + * control (Build-Depends): Bump debhelper dependency to >= 4. + + -- Robert Millan Tue, 11 May 2004 22:13:15 +0200 + +grub (0.94+cvs20040429-1) unstable; urgency=low + + * New upstream snapshot. (Closes: #245350) + - patches/*.diff: Resync. + - Syntax fixes in mkbimage. Thanks Yann Dirson. (Closes: #239066, #242319) + - Includes CDROM support (at last!). (Closes: #154534) + - Fixes for kernel of FreeBSD 5.x. (Closes: #216875) + * Migrating to automake 1.8. + - control (Build-Depends): s/1.7/1.8/g + - rules: Ditto. + + -- Robert Millan Thu, 29 Apr 2004 21:15:59 +0200 + +grub (0.93+cvs20031021-8) unstable; urgency=high + + * debian/update-grub: Fix initrd entry generation. Thanks Jean Charles + Delepine. (Closes: #224853). + * Set Maintainer to mailing list. + - debian/control (Maintainer): Set to pkg-grub-devel@lists.alioth.d.o. + - debian/control (Uploaders): Add Jason. + + -- Robert Millan Tue, 6 Jan 2004 21:34:29 +0100 + +grub (0.93+cvs20031021-7) unstable; urgency=low + + * debian/update-grub: more missing quotes in get_kernel_opt func + + -- Jason Thomas Thu, 11 Dec 2003 11:26:51 +1100 + +grub (0.93+cvs20031021-6) unstable; urgency=low + + * debian/update-grub: was generating mangled menu.lst due to missing quotes + around arguments to function. + (closes: #222411, #222738, #222789, #222800) + + -- Jason Thomas Wed, 10 Dec 2003 10:01:40 +1100 + +grub (0.93+cvs20031021-5) unstable; urgency=low + + * debian/update-grub: fixed to handle seperate /boot partition. + (closes: #219833) + + -- Jason Thomas Thu, 20 Nov 2003 11:52:02 +1100 + +grub (0.93+cvs20031021-4) unstable; urgency=low + + * debian/update-grub: fixed bug introduced by patch below. + (closes: #221395) + * patches/00list: disabled update-grub-linux2.6.diff as it is now permanetly + applied. will delete it later. + * debian/grub-reboot: add --version parameter + * created manpage for grub-reboot. + * debian/rules: moved compat version to debian/compat and made version 4 + * debian/rules: moved multiple install lines to grub.install for use by + dh_install + * debian/rules: updated to closely match what dh_make produces for multi + binary packages. so added binary-common target and install-arch targets. + * debian/control: updated standards-version to 3.6.1.0 + + -- Jason Thomas Tue, 18 Nov 2003 14:04:01 +1100 + +grub (0.93+cvs20031021-3) unstable; urgency=low + + * Provide an iso9660 CD image with grub-disk + - control (Build-Depends): Add mkisofs. + - rules: Uncomment and misc fixes in mkisofs commands. + + -- Robert Millan Sat, 15 Nov 2003 19:53:46 +0100 + +grub (0.93+cvs20031021-2) unstable; urgency=low + + * Added "one-time savedefault" feature, thanks to Keir Freser for his + patch. (Closes: #195833) + - patches/savedefault.diff: New. + - patches/00list: Add it. + * Wrote script for "lilo -R" like functionality, using the feature above). + (Closes: #155807) + - grub-reboot: New. + - rules: Install grub-reboot. + * rules: Move mkbimage to /bin since non-root may also use it now. + + -- Robert Millan Wed, 5 Nov 2003 13:20:03 +0100 + +grub (0.93+cvs20031021-1) unstable; urgency=low + + * New upstream snapshot. + - patches/automake.diff: Nuked. + - patches/graphics.diff: Update. + * patches/menu.lst_gnu-hurd.diff: New. Clarify GNU/Hurd entry. + * patches/update-grub_linux2.6.diff: New. Support different options for + Linux 2.6. Thanks Michal Cihar. (Closes: #208051) + * rules (clean): Remove config.log. + + -- Robert Millan Tue, 21 Oct 2003 14:41:08 +0000 + +grub (0.93+cvs20031008-1) unstable; urgency=low + + * New upstream snapshot. + - mkbimage: Nuked. + - rules: install mkbimage from util/mkbimage. + - patches/04ext2_msdos.patch: Nuked. + - patches/00list: Update. + * Update autotools. (Closes: #212092) + - patches/automake.patch: New. + - patches/00list: Add it. + - control: Build-Depend on automake1.7 and autoconf (2.5x). + - rules: Use automake1.7 and autoconf (2.5x). + * Chainload fix for KFreeBSD. (Closes: #201760) + - patches/07kfbsd_chainload.patch: Rename to.. + - patches/kfbsd_chainload.diff: This. + - patches/00list: Enable it. + * grub-doc.install: Add '\n'. + * patches/01misc_doc.patch: Commented. + + -- Robert Millan Wed, 8 Oct 2003 20:49:58 +0000 + +grub (0.93+cvs20030905-2) unstable; urgency=low + + * rules (clean): Get rid of config.{log,status} hack. + * Reapplied graphics patch. (Closes: #209068) + - patches/graphics.diff: New. + - patches/00list: Add graphics.diff. + * Generate autotools stuff dynamicaly (for graphics.diff to take effect). + - control (Build-Depends): Add automake1.5 and autoconf2.13. + - rules (configure): Run aclocal-1.5 && automake-1.5 && autoconf2.13. + + -- Robert Millan Tue, 9 Sep 2003 17:31:06 +0000 + +grub (0.93+cvs20030905-1) unstable; urgency=low + + * New upstream snapshot. + - debian/patches/06bsd_menu.lst.patch: Nuked (merged in upstream). + * build-indep split. + - debian/rules: Split build-indep stuff into build-indep target. + - debian/control: Move texi2html to Build-Depends-Indep. + - debian/rules: Moved grub-doc html install to grub-doc.install. + - debian/grub-doc.install: New. + * debian/grub-floppy: Use /bin/echo which supports -e. (Closes: #208216) + * debian/patches/01misc_doc.patch: New. Extracted from debian diff.gz. + What is it? :) + * debian/patches/04ext2_msdos.patch: New. Fix ext2fs detected as msdos, + patch from upstream. (Closes: #175358) + * Add 00list support in patch system; patches are now selectable. + - debian/patches/00list: New. + - debian/rules (patch): Use 00list for patch selection. + * debian/patches/00list: Disable 07kfbsd_chainload.patch, since it's causing + FTBFS. Will ask for a review. (Reopens: #201760) + * debian/rules (clean): Remove config.{log,status} to fix possible FTBFS in + autobuilders. Should be fixed in upstream Makefiles. + + -- Robert Millan Fri, 5 Sep 2003 03:05:56 +0000 + +grub (0.93+cvs20030813-4) unstable; urgency=low + + * update-grub: abort function is called from find_grub_dir so needs to be + declared above this. + (closes: #206134) + * removed resolve_symlink function in favour of the readlink from the + coreutils package. Thanks to Steven Barker + (closes: #205726) + + -- Jason Thomas Tue, 19 Aug 2003 10:24:54 +1000 + +grub (0.93+cvs20030813-3) unstable; urgency=low + + * added patch to make chainloading FreeBSD work when using the graphic mode. + thanks to Carlos Liu + (closes: #201760) + + -- Jason Thomas Thu, 14 Aug 2003 10:53:33 +1000 + +grub (0.93+cvs20030813-2) unstable; urgency=low + + * update-grub: we need to have initial values for menu.lst in case they + where accidentally removed from the menu.lst + (closes: #188084) + + -- Jason Thomas Wed, 13 Aug 2003 14:41:24 +1000 + +grub (0.93+cvs20030813-1) unstable; urgency=low + + * New CVS snapshot + - resolves symlinks for devices + (closes: #204991, #189815, #181243) + - support for --no-floppy with grub-install + (closes: #199470) + + * update-grub: added function to resolve symlinks. + other places in the script that were doing this now use this function. + default/previous now handle absolute symlinks. + + -- Jason Thomas Wed, 13 Aug 2003 12:44:17 +1000 + +grub (0.93+cvs20030624-6) unstable; urgency=low + + * update-grub was using '==' for comparsion in some places which is wrong. + (closes: #189253, #204331) + * update-grub now resolves root device if its a symlink + * update-grub now resolves symlinks for default/previous kernels and put in + the verison number. + + -- Jason Thomas Tue, 12 Aug 2003 14:34:25 +1000 + +grub (0.93+cvs20030624-5) unstable; urgency=low + + * added new package grub-disk which provides a 1.44meg bootable image. + (closes: #190392) + * debian/update-grub: added patch to fix sorting of kernels + (closes: #187006) + * debian/control: added Robert Millan to Uploaders + + -- Jason Thomas Fri, 1 Aug 2003 12:44:50 +1000 + +grub (0.93+cvs20030624-4) unstable; urgency=low + + * updated update-grub, to support a default and previous kernel image. + using /boot/vmlinuz and /boot/vmlinuz.old. + + -- Jason Thomas Fri, 1 Aug 2003 10:57:43 +1000 + +grub (0.93+cvs20030624-3) unstable; urgency=low + + * Updated mkbimage, from upstream plus patch from Robert Millan + (closes: #200282) + + -- Jason Thomas Mon, 7 Jul 2003 14:03:21 +1000 + +grub (0.93+cvs20030624-2) unstable; urgency=low + + * debian/control: added freebsd and netbsd arches + * docs/menu.lst: added patch to update this with examples for freebsd and + netbsd. + (closes: #199301) + + -- Jason Thomas Mon, 30 Jun 2003 07:46:21 +1000 + +grub (0.93+cvs20030624-1) unstable; urgency=low + + * New CVS snapshot. + * Fixes FTBFS with gcc-3.3 + (closes: #195234) + + -- Jason Thomas Tue, 24 Jun 2003 07:35:30 +1000 + +grub (0.93+cvs20030224-2) unstable; urgency=low + + * applied patch to mkbimage which fixes it for other filesystems types, + thanks to Carlo Contavalli. + (closes: #182646) + * update-grub should not go looking for a root device and friends if we + already have a menu.lst file as it will have all the info we need in it. + * update-grub does not try to calculate the grub root device if we don't + have a device.map file or if /boot is the root dir + (closes: #182504) + + -- Jason Thomas Thu, 27 Feb 2003 12:13:46 +1100 + +grub (0.93+cvs20030224-1) unstable; urgency=low + + * New CVS snapshot. + - upstream fixed a bug in grub-install caused by new sed. + (closes: #182071) + + -- Jason Thomas Mon, 24 Feb 2003 12:58:53 +1100 + +grub (0.93+cvs20030217-1) unstable; urgency=low + + * New CVS snapshot. + * Allow mkbimage to be installed into different dir on gnu systems, thanks + to Robert Millan. + (closes: #160912) + * Fixed error in mkbimage script, thanks to Bruce Edge. + (closes: #176607) + * This could bite me in that ass later, but update-grub now figures out the + root_device and grub_device. + (closes: #110431) + * update-grub now prints each kernel that it finds. + * more info about splashimages in README.Debian, thanks to Jeronimo + Pellegrini + (closes: #176055) + * update-grub can now run can now be run noninteractively. + (closes: #158485) + * forgot to close a bunch of bugs todo with splashimage last upload. + (closes: #121083, #116965, #118701) + + -- Jason Thomas Mon, 17 Feb 2003 11:45:45 +1100 + +grub (0.93+cvs20030102-1) unstable; urgency=low + + * New CVS snapshot + automake patch + splashimage patch + * It was necessary to apply the automake and splashimage patches before + creating the tarball, so I would not need to run automake and autoconf + from the build scripts. + + -- Jason Thomas Thu, 9 Jan 2003 14:26:20 +1100 + +grub (0.92+cvs20021128-1) unstable; urgency=low + + * New CVS snapshot. + * removed 01force-lba.patch which is no longer needed + + -- Jason Thomas Mon, 28 Oct 2002 12:52:42 +1100 + +grub (0.92+cvs20020923-1) unstable; urgency=low + + * CVS snapshot, fixes: + - /dev/root problem with devfs. + - kernel to big for memory problem. + - -no-curses option causes bad output. + (closes: #154543, #153978, #136766) + * remove patch 04device.map_dup.patch, not needed now! + + -- Jason Thomas Fri, 23 Aug 2002 10:40:09 +1000 + +grub (0.92-4) unstable; urgency=low + + * update-grub now handles rc kernels thanks to Decklin Foster. + (closes: #155455) + + -- Jason Thomas Sat, 17 Aug 2002 09:55:26 +1000 + +grub (0.92-3) unstable; urgency=low + + * added 01force-lba.patch to fix grub install when --force-lba is specified + (closes: #152420) + * added 04device.map_dup.patch which checks for duplicates in the device.map + (closes: #147109) + * update-grub now writes the implied boot line to menu.lst + (closes: #150570) + * fixed typo in README.Debian, fdo should be fd0 + (closes: #151476) + + -- Jason Thomas Wed, 10 Jul 2002 10:22:58 +1000 + +grub (0.92-2) unstable; urgency=low + + * added 05hurd-boot.patch again, which was still needed. + (closes: #145673) + * fixed typo in update-grub manpage. + (closes: #146318) + * added info about splashimage to README.Debian + (closes: #145418) + + -- Jason Thomas Thu, 9 May 2002 10:36:47 +1000 + +grub (0.92-1) unstable; urgency=low + + * New upstream release + * removed the following unneeded patches: + 04xfs_md5_serial.patch + 05hurd-boot.patch + 06xfs_savedefault.patch + + -- Jason Thomas Wed, 1 May 2002 15:17:56 +1000 + +grub (0.91-6) unstable; urgency=low + + * patch from upstream for xfs and jfs savedefault. Thanks to Ian Cumming. + + -- Jason Thomas Tue, 23 Apr 2002 11:33:51 +1000 + +grub (0.91-5) unstable; urgency=low + + * update-grub now adds more comments to the generated menu.lst file. + error messages are more verbose. + makes a back up copy of the existing menu.lst + (closes: #142961) + * some updates to README.Debian thanks to Grant Bowman. + (closes: #142959) + * correct example menu.lst patch for booting the hurd + (closes: #142362) + + -- Jason Thomas Thu, 18 Apr 2002 08:57:23 +1000 + +grub (0.91-4) unstable; urgency=low + + * fix to make mkbimage create a node directory, from Robert Millan + (closes: #142211) + + -- Jason Thomas Thu, 11 Apr 2002 08:26:20 +1000 + +grub (0.91-3) unstable; urgency=low + + * removed special mention of xfs and jfs from README.debian since they are + now in upstream tarball. also fixed small typo + (closes: #130526) + * updated the example menu.lst to have current boot method for GNU/Hurd + (closes: #141048) + * added mkbimage + (closes: #121640) + + -- Jason Thomas Thu, 4 Apr 2002 16:29:21 +1000 + +grub (0.91-2) unstable; urgency=low + + * added patch from upstream which fixes a typo in the makefile that broke + xfs support, md5crypt, serial support and hercules support + + -- Jason Thomas Mon, 4 Feb 2002 15:35:01 +1100 + +grub (0.91-1) unstable; urgency=low + + * New upstream release + (closes: #130272) + * removed the following unneeded patches: + 00grub-dac960.patch + 01grub-devfs-floppy.patch + 04grub-jfs+xfs-0.9-build.patch + 05grub-jfs+xfs-0.9-core.patch + 06grub-hide-unhide.patch + 07grub-md5-crypt.patch + 08grub-mkreiserfs.patch + 09grub-sigwinch.patch + * added info about *bsd's to README.Debian + * removed mention of bsd from the description for now as they are not + properly supported. + + -- Jason Thomas Wed, 23 Jan 2002 13:02:44 +1100 + +grub (0.90-19) unstable; urgency=low + + * typo in update-grub which caused an syntax error with ash. + (closes: #126174) + + -- Jason Thomas Wed, 2 Jan 2002 09:02:42 +1100 + +grub (0.90-18) unstable; urgency=low + + * add patch from upstream to ignore SIGWINCH. + (closes: #122905) + * update-grub now allows you to control howmany kernels will be added + to the menu.lst + (closes: #123038) + + -- Jason Thomas Mon, 10 Dec 2001 10:15:42 +1100 + +grub (0.90-17) unstable; urgency=low + + * kernel sorting function in update-grub now handles other kernel suffixes + it doesn't know about properly + (closes: #122013) + * fixed blank line that had a 'tab' in it, in the rules file + (closes: #121955) + * only look for update-grub configuration options between the magic markers. + (closes: #121320) + + -- Jason Thomas Sat, 8 Dec 2001 16:32:28 +1100 + +grub (0.90-16) unstable; urgency=low + + * added new function to update-grub which looks for the various formats of + initrd images, looks like we have a new name initrd.img. this currently + supports 'initrd', 'initrd.img', 'initrd-lvm' and those three with .gz. + (closes: #116153, #121084) + + -- Jason Thomas Mon, 26 Nov 2001 09:19:25 +1100 + +grub (0.90-15) unstable; urgency=low + + * fixed a cosmetic error message in the update-grubs new function to sort + the kernels + * added a y to Crispins last name in the changelog below. Sorry! + * initrd line in update-grub was missing the version string. + (closes: #120196) + + -- Jason Thomas Tue, 20 Nov 2001 08:01:53 +1100 + +grub (0.90-14) unstable; urgency=low + + * I broke update-grub on /boot partitions + "sed -e" is not the same as "sed -ne" + changed it to use basename instead of sed, a few variable name changes + (closes: #119453, #119455) + * added suport allow multiple alternative boot options + * added 'lockalternatives' to support locking of alternative boot options + so no we have 'alternatives', 'lockalternatives' and 'altoptions' + * updated the man page to reflect the above changes + * added a function from Crispin Flowerday which sorts the kernels properly + by weighting the kernels by their suffix, being 'ac', 'pre' or nothing. + (closes: #103437) + + -- Jason Thomas Fri, 16 Nov 2001 15:19:06 +1100 + +grub (0.90-13) unstable; urgency=low + + * 0.90-11 closes the wrong bug should have been 113460 not 114360. + (closes: #113460) + * new option for update-grub to allow alternative boot options, rather than + just the recovery option, Thanks to Marc Haber. + * added some examples to the menu.lst output by update-grub. + * updated update-grub man page to reflect the above change. + * added initrd info about ramdisk size to README.Debian. + (closes: #117252) + * added support to update-grub for saveddefault, see grub doc. + * added more explanation about default to update-grub generated menu.lst + * added support to update-grub to lock for the alternative boot option, see + grub doc. + (closes: #116988) + * updated update-grub man page to reflect the above change. + + -- Jason Thomas Fri, 9 Nov 2001 10:05:09 +1100 + +grub (0.90-12) unstable; urgency=low + + * changed naming scheme for debian/patchs/* so they can be applied and + reversed safely. + * added patch to fsys_reiserfs.c which enables booting on newer reiserfs + partitions. + + -- Jason Thomas Sun, 21 Oct 2001 11:27:02 +1000 + +grub (0.90-11) unstable; urgency=low + + * fixed update-grub to sort kernels better. Thanks to Matthew Mueller + (closes: #113460) + * added a mention about grub-doc package in README.Debian (closes: #116095) + + -- Jason Thomas Fri, 19 Oct 2001 07:51:53 +1000 + +grub (0.90-10) unstable; urgency=low + + * added --disable-auto-mem-opt to configure options in debian/rules + this option stops grub from automatically adding a mem= option to + the kernel command line. From discussions on the grub mailing list + adding this option should not cause any problems. + (closes: #110793) + * added a quick setup section to README.Debian + * debian/rules commented out dh_installman in binary-indep + * debian/rules commented out dh_installinfo in binary-dep + * update-grub should work on systems that have the grub directory + mounted under /boot (closes: #113380) + + -- Jason Thomas Tue, 25 Sep 2001 08:59:25 +1000 + +grub (0.90-9) unstable; urgency=low + + * more patches + * patch to support DAC960 raid controller (closes: #104558) + * patch to support hide and unhide of logical partitions + * updated devfs-floppy.patch to not conflict with DAC960 patch + + -- Jason Thomas Fri, 31 Aug 2001 10:46:55 +1000 + +grub (0.90-8) unstable; urgency=low + + * okay i fixed up authors in debian/copyright to be less ugly. + * added patches to support jfs and xfs, + http://tzukanov.narod.ru/grub-jfs_xfs/ + * added info about theses patches to debian/README.debian + * updated md5-crypt patch to work with the jfs/xfs patches + + -- Jason Thomas Wed, 29 Aug 2001 16:38:45 +1000 + +grub (0.90-7) unstable; urgency=low + + * added support to debian/rules to handle appling patches to upstream + source + * added debian/patches directory which is used to hold the patches + * modified update-grub to output more comments to the menu.lst and + modified util/grub-install.in to output more info on what it does in + the usage, which will inturn be added to the grub-install.8 manpage + (closes: #110152) + * updated standards-version to 3.5.6 + * changed dashes to underscores in changelog for + emacs add_log_mailing_address to remove lintian warning + * added to debian/rules generation of manpages, + grub.8, grub-install.8, grub-md5-crypt.8 and mbchk.1. + * some tidying up in debian/rules file + * changed "Upstream Author(s)" to "Author(s)" in debian/copyright + to remove lintian error. + * changed debian/README.Debian to mention update-grub manpage + * changed debian/rules so clean does not nuke texinfo.tex from doc dir + + -- Jason Thomas Mon, 27 Aug 2001 15:35:34 +1000 + +grub (0.90-6) unstable; urgency=low + + * added a shell script (grub-floppy) for creating a grub boot floppy + * added a manpage for the above script. + + -- Jason Thomas Fri, 17 Aug 2001 10:38:49 +1000 + +grub (0.90-5) unstable; urgency=low + + * patched stage2/Makefile.am to build md5cyrpt support, from upstream + cvs (closes: #106407) + + -- Jason Thomas Thu, 2 Aug 2001 16:32:52 +1000 + +grub (0.90-4) unstable; urgency=low + + * patched update-grub to correctly generate the initrd line (closes: #106807) + + -- Jason Thomas Sat, 28 Jul 2001 00:10:59 +1000 + +grub (0.90-3) unstable; urgency=low + + * updated grub doc to show correct location of arch specific files + thanks to Carlos Valdivia Yague + * add Build-Depends on libncurses5-dev | libncurses-dev (closes: #105557) + * added recovery option to update-grub, if recovery=false is set in + menu.lst update-grub will not create the recovery lines in menu.lst + * updated update-grub man page to reflect above. + + -- Jason Thomas Mon, 23 Jul 2001 18:07:30 +1000 + +grub (0.90-2) unstable; urgency=low + + * patched grub-install to handle devfs when making a boot floppy. + thanks to upstream OKUJI Yoshinori + + -- Jason Thomas Fri, 13 Jul 2001 21:30:33 +1000 + +grub (0.90-1) unstable; urgency=low + + * New upstream release + * removed mention of version from doc-base files so there is no + need to update with each new release + + -- Jason Thomas Fri, 13 Jul 2001 09:20:59 +1000 + +grub (0.5.96.1.cvs20010530-7) unstable; urgency=low + + * patched update-grub to detect /boot on seperate partition + thanks to Aaron Schrab (closes: #103082, #103662) + * patched update-grub to support loading of ramdisks, + thanks to Francis J. Lacoste (closes: #103498) + + -- Jason Thomas Tue, 10 Jul 2001 12:53:19 +1000 + +grub (0.5.96.1.cvs20010530-6) unstable; urgency=low + + * add postrm_hook to README.debian + * corrected bad grammar and other stuff in the manpage, + thanks to David B. Harris + + -- Jason Thomas Tue, 19 Jun 2001 13:23:35 +1000 + +grub (0.5.96.1.cvs20010530-5) unstable; urgency=low + + * fixed bashism in update-grub, "echo -e". (closes: #101378) + + -- Jason Thomas Tue, 19 Jun 2001 12:06:08 +1000 + +grub (0.5.96.1.cvs20010530-4) unstable; urgency=low + + * fixed the doc-base stuff. (closes: #101305) + + -- Jason Thomas Mon, 18 Jun 2001 19:05:27 +1000 + +grub (0.5.96.1.cvs20010530-3) unstable; urgency=low + + * moved grub binaries and scripts to /sbin from /usr/sbin (closes: #100854) + * added update-grub script which generates menu.lst. + * removed gen-menu.sh example, now we have update-grub + * added manpage for update-grub. + * added instructions for adding update-grub to kernel-img.conf in + README.Debian + + -- Jason Thomas Mon, 18 Jun 2001 14:21:55 +1000 + +grub (0.5.96.1.cvs20010530-2) unstable; urgency=low + + * moved html doco in grub-doc from /usr/share/doc/grub-doc/ to + /usr/share/doc/grub-doc/html/ + * added support for doc-base + * moved the info files from grub to grub-doc. + * use dh_installinfo so that info files are registered (closes: #100484) + * added example menu generation script, thanks to + Wichert Akkerman (closes: #86750) + * removed add_log_mailing_address from bottom of changelog + * updated standards version + + -- Jason Thomas Tue, 12 Jun 2001 12:50:40 +1000 + +grub (0.5.96.1.cvs20010530-1) unstable; urgency=low + + * New cvs snapshot + * Upstream has removed the debian specific files from cvs. + * Corrected the Sections in the Control file for each package. + * Corrected documentation to reflect change of directory for arch + specific files. (closes #99429) + + -- Jason Thomas Fri, 1 Jun 2001 12:03:41 +1000 + +grub (0.5.96.1.cvs20010528-1) unstable; urgency=low + + * New Maintainer (closes: #80394) + * updated standards version. + * changed to use debhelper. + * move html doco into a seperate grub-doc package. + * Took a cvs snapshot to help close a bunch of bugs. + * cvs snapshot fixes grub-install (closes: #75333, #80276, #98750) + * cvs snapshot should fix "Error 22: No such partition" (closes: #80241) + * cvs snapshot should fix symlink problem (closes: #95594) + * grub supports /boot as seperate partition (closes: #78471) + * grub supports devfs already (closes: #72346) + * Changed dir of architecture specific files to /usr/lib (closes: #72311) + * texi2html problem fixed in previous NMU (closes: #80422) + * kernel-package supports kernel images in /boot (closes: #74429) + * the current method for a temporary modification of a menu option is + to press 'e' for edit. I think this is satisfactory. (closes: #35849) + * update-grub is in the progeny package of grub + please contact them (closes: #92269) + + -- Jason Thomas Mon, 28 May 2001 17:04:44 +1000 + +grub (0.5.96.1-0.1) unstable; urgency=low + + * Non Maintainer Update by Ralf Treinen + * added build-dependencies: texi2html (bug #80394) + * applied patch of bug report # 80394: insert blank after "-I" option + to texi2html in rules file (thanks to Matt Zimmerman ) + + -- Ralf Treinen Sat, 24 Feb 2001 23:09:55 +0100 + +grub (0.5.96.1) unstable; urgency=low + + * We lied: this release is to fix some important bugs before 1.0. + * Open devices with O_RDWR in the grub shell. (closes:bug#73654) + * Stricter Linux kernel command line passing. (closes:bug#74618) + * Linux devfs support added to the grub shell. (closes:bug#74740) + + -- Gordon Matzigkeit Mon, 16 Oct 2000 12:43:30 -0600 + +grub (0.5.96) unstable; urgency=low + + * Many, many new features and bugfixes. This is the final test release; + the next release will be version 1.0. + * Install HTML documentation in addition to Info pages. + (closes:bug#42242,bug#42273) + * Fix documentation to refer to /usr/sbin/grub as well as + /sbin/grub. (closes:bug#67132) + * Be more verbose about missing setup files. (closes:bug#71661) + + -- Gordon Matzigkeit Wed, 4 Oct 2000 10:44:42 -0600 + +grub (0.5.95) unstable; urgency=low + + * ReiserFS support from Jochen Hoenicke. + * `--disable-lba-support-bitmap-check' is now a runtime option, + `--force-lba', which works with `install', `setup', and + `grub-install.' (closes:bug#61513) + * Fixed a bug in LBA support checking. Please let us know if you + need to use `--force-lba' for Grub to work. + * NetBSD ELF kernel support is added. + + -- Gordon Matzigkeit Tue, 27 Jun 2000 09:44:41 -0600 + +grub (0.5.94) unstable; urgency=low + + * Fix /usr/doc symlink. (closes:bug#50932) + * Better testing for BIOS LBA support. (closes:bug#53507) + * New installation script. (closes:bug#48755) + + -- Gordon Matzigkeit Fri, 10 Mar 2000 14:55:02 -0600 + +grub (0.5.93.1) unstable; urgency=low + + * Update to Standards-Version: 3.0.1, mainly for FHS support. + * Fix definition of ext2_dir_entry. (closes:bug#49017) + * Fix rules for cross-compiling. (closes:bug#49034) + * Update synopsis for grub(8). (closes:bug#48991) + * Don't clear the line when hitting enter in the GRUB shell. + (closes:bug#48989) + + -- Gordon Matzigkeit Fri, 5 Nov 1999 22:31:30 -0600 + +grub (0.5.93) unstable; urgency=low + + * Updated example configurations. (closes:bug#42136) + * Highlight color set correctly when editing. (closes:bug#42549) + * dpkg-shlibdeps called on /usr/sbin/grub. (closes:bug#42704) + * Properly install Texinfo documentation. (closes:bug#42705,bug#42919) + (closes:bug#43080,bug#45150) + * Update file locations in README.debian. (closes:bug#42834) + * Upstream fixes for new binutils assembler syntax. (closes:bug#47946) + * FAT32 support. (closes:bug#47970) + * Password option fixed. (closes:bug#43798) + * Sample menu.lst included in doc directory. (closes:bug#47181) + + -- Gordon Matzigkeit Sat, 30 Oct 1999 09:59:09 -0600 + +grub (0.5.92) unstable; urgency=low + + * Data files are now in /usr/lib/grub/$(HWARCH). + * Unix boot utility available as /usr/sbin/grub. + * Full Texinfo documentation. + + -- GRUB Maintainers Mon, 26 Jul 1999 12:46:37 -0600 + +grub (0.5.91) unstable; urgency=low + + * Added support for LBA mode and preliminary AWARD/AMI hard disk BIOS + extensions. + * GRUB data now installed in /share/grub/$(host_cpu)-$(host_vendor). + * Preliminary Texinfo documentation. + + -- Gordon Matzigkeit Sun, 14 Mar 1999 20:23:04 -0600 + +grub (0.5.90) unstable; urgency=low + + * Beta-testing release. + * GRUB is now officially part of the GNU Project, and the Debian package + is maintained by its upstream maintainers. + * LS-120 IDE floppy support should work now (fixes: #33720). + + -- Gordon Matzigkeit Mon, 1 Mar 1999 12:59:06 -0600 + +grub (0.5-3) unstable; urgency=low + + * GRUB now understands symbolic links (fixes: #17306). + + -- Gordon Matzigkeit Sun, 21 Feb 1999 05:13:25 -0600 + +grub (0.5-2) unstable; urgency=low + + * Assembly source cleanups. + + -- Gordon Matzigkeit Sun, 14 Feb 1999 20:33:39 -0600 + +grub (0.5-1) unstable; urgency=low + + * Put everything in /lib/grub (not /boot/grub) and don't install during + postinst so that we can't accidentally wreck a working system. This + means the package needn't be experimental anymore. + * Get rid of grubinst because it doesn't work with 0.5, and I'd rather + improve GRUB's builtin installation process. + * Use `e' rather than enter to edit. + * Minor bug fixes. + + -- Gordon Matzigkeit Sun, 31 Jan 1998 14:11:32 -0600 + +grub (0.4-2) experimental; urgency=low + + * Make postinstall script + * Create manpage for grubinst + * Make grubinst more flexible + * Address bugs 15227 and 15163 (packaging and clue endowment) + + -- Steve Dunham Thu, 1 Jan 1998 00:38:22 -0500 + +grub (0.4-2) experimental; urgency=low + + * Make postinstall script + * Create manpage for grubinst + * Make grubinst more flexible + * Address bugs 15227 and 15163 (packaging and clue endowment) + + -- Steve Dunham Thu, 1 Jan 1998 00:38:22 -0500 + +grub (0.4-1) unstable; urgency=low + + * Initial Release. + + -- Steve Dunham Wed, 19 Nov 1997 23:42:47 -0500 + --- grub-0.97.orig/debian/NEWS +++ grub-0.97/debian/NEWS @@ -0,0 +1,24 @@ +grub (0.97-16) unstable; urgency=low + + grub-install and update-grub has changed location. + + There's a wrapper available in /sbin to keep backward compatibility but + it'll be removed once Etch is release as stable. You _must_ edit your + /etc/kernel-img.conf and change the paths to /usr/sbin/update-grub. + For example: + + ,----[ /etc/kernel-img.conf ] + | ... + | postinst_hook = /sbin/update-grub + | postrm_hook = /sbin/update-grub + `---- + + Should be change to: + + ,----[ /etc/kernel-img.conf ] + | ... + | postinst_hook = /usr/sbin/update-grub + | postrm_hook = /usr/sbin/update-grub + `---- + + -- Otavio Salvador Thu, 14 Sep 2006 23:25:36 -0300 --- grub-0.97.orig/debian/copyright +++ grub-0.97/debian/copyright @@ -0,0 +1,70 @@ +This package was re-debianized by Jason Thomas on +Mon, 28 May 2001 14:29:03 +1000. + +It was downloaded from ftp://alpha.gnu.org/gnu/grub/ + +Upstream Authors: + + Erich Boleyn originally designed and implemented GRUB. + + VaX#n8 (real name unknown) wrote shared_src/fsys_ext2fs.c. + + Heiko Schroeder rewrote shared_src/stage1.S to be more readable. + + The following authors assigned copyright on their work to the Free + Software Foundation: + + Gordon Matzigkeit adopted GRUB into the GNU Project. He fixed several + bugs, added symbolic link support to shared_src/fsys_ext2fs.c, and + began the implementation of /sbin/grub. + + OKUJI Yoshinori contributed many bugfixes and new features, such as + working LBA support, /sbin/grub support for configuration files, the + script /sbin/grub-install, the utility /bin/mbchk, the new engine for + builtin commands, disk swapping support, keyboard configuration support, + network support, online help support, command-line history support, + hidden menu support, the new Linux loader, serial terminal support, + single-line editing support, the utility /sbin/grub-md5-crypt, the new + GRUB manual, and several new commands. + + Peter Astrand added support for a color menu. + + Pavel Roskin contributed many bugfixes and new features, such as FreeBSD + support for the grub shell, and configure process cleanups. + + Klaus Reichl wrote stage2/fsys_minix.c. + + Per Lundberg added graphics support to the Multiboot Specification. + + Jochen Hoenicke rewrote stage2/fsys_fat.c and wrote + stage2/fsys_reiserfs.c and stage2/md5.c. + + Christoph Plattner added support for Net Boot Image Proposal. + + Stefan Ondrejicka added the commands "partnew" and "parttype". + + Frank Mehnert added support for hercules console. + + +Copyright: + + Copyright (C) 1996 Erich Boleyn + Copyright (C) 1999-2000 Free Software Foundation, Inc. + + This program 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 2, or (at your option) + any later version. + + This program 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 this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + + +On Debian GNU systems, the complete text of the GNU General Public +License can be found in `/usr/share/common-licenses/GPL'. --- grub-0.97.orig/debian/update-grub.wrapper +++ grub-0.97/debian/update-grub.wrapper @@ -0,0 +1,21 @@ +#!/bin/sh +# +# Wrapper to warn user about kernel-img.conf move +# + +if grep -q ' */sbin/update-grub$' /etc/kernel-img.conf 2> /dev/null ; then + cat >&2 <&2 +fi --- grub-0.97.orig/debian/update-grub +++ grub-0.97/debian/update-grub @@ -0,0 +1,1410 @@ +#!/bin/bash +# +# Insert a list of installed kernels in a grub config file +# Copyright 2001 Wichert Akkerman +# Copyright 2007, 2008 Canonical Ltd. +# +# This file 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 2 of the License, or +# (at your option) any later version. +# +# This program 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 this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# Contributors: +# Jason Thomas +# David B.Harris +# Marc Haber +# Crispin Flowerday +# Steve Langasek + +# Abort on errors +set -e + +host_os=`uname -s | tr '[A-Z]' '[a-z]'` + +abort() { + message=$@ + + echo >&2 + printf '%s\n' "$message" >&2 + echo >&2 + exit 1 +} + +find_grub_dir () +{ + echo -n "Searching for GRUB installation directory ... " >&2 + + for d in $grub_dirs ; do + if [ -d "$d" ] ; then + grub_dir="$d" + break + fi + done + + if [ -z "$grub_dir" ] ; then + abort "No GRUB directory found. + To create a template run 'mkdir /boot/grub' first. + To install grub, install it manually or try the 'grub-install' command. + ### Warning, grub-install is used to change your MBR. ###" + else + echo "found: $grub_dir" >&2 + fi + + echo $grub_dir +} + +find_device () +{ + mount_point=$1 + + # Autodetect current root device + device= + if [ -f /etc/fstab ] ; then + while read DEV MNT FOO; do + if `echo "$DEV" | grep -q "^#"`; then + continue + fi + if [ "$MNT" = "$mount_point" ]; then + device="$DEV"; + fi + done < /etc/fstab + fi + + if [ -n "$device" ] ; then + case "$device" in + LABEL=* | UUID=*) + device=`readlink -f "$(findfs $device)"` + ;; + *) + device=`readlink -f "$device"` + ;; + esac + fi + + echo $device +} + +find_root_device () +{ + device=$(find_device "/") + + if [ -z "$device" ]; then + echo "Cannot determine root device. Assuming /dev/hda1" >&2 + echo "This error is probably caused by an invalid /etc/fstab" >&2 + device=/dev/hda1 + fi + + echo $device +} + +# Usage: convert_raid1 os_device +# Checks if os_device is a software raid1. +# If so, converts to first physical device in array. +convert_raid1 () +{ + case $1 in + /dev/md[0-9]) + : ;; # Continue + *) + return 1 ;; + esac + + [ -x /sbin/mdadm ] || return 1 + + # Check that the raid device is raid1 + raidlevel=$(mdadm -D -b $1 | grep "^ARRAY" | \ + sed "s/^.*level=//" | cut -d" " -f1) + [ "$raidlevel" = "raid1" ] || return 1 + + # Take only the first device that makes up the raid + raiddev=$(mdadm -D $1 | grep -A1 "Number" | grep "dev" \ + | sed "s/^.*\(\/dev\/.*\)$/\1/") + [ -n "$raiddev" ] || return 1 + + echo $raiddev + return 0 +} + +# Usage: convert os_device +# Convert an OS device to the corresponding GRUB drive. +# This part is OS-specific. +convert () { + # First, check if the device file exists. + if test -e "$1"; then + : + else + echo "$1: Not found or not a block device." 1>&2 + exit 1 + fi + + host_os=`uname -s | tr '[[:upper:]]' '[[:lower:]]'` + + # Break the device name into the disk part and the partition part. + case "$host_os" in + linux) + tmp_disk=`echo "$1" | sed -e 's%\([sh]d[[:lower:]]\)[0-9]*$%\1%' \ + -e 's%\(fd[0-9]*\)$%\1%' \ + -e 's%/part[0-9]*$%/disc%' \ + -e 's%\(c[0-7]d[0-9]*\).*$%\1%'` + tmp_part=`echo "$1" | sed -e 's%.*/[sh]d[[:lower:]]\([0-9]*\)$%\1%' \ + -e 's%.*/fd[0-9]*$%%' \ + -e 's%.*/floppy/[0-9]*$%%' \ + -e 's%.*/\(disc\|part\([0-9]*\)\)$%\2%' \ + -e 's%.*c[0-7]d[0-9]*p*%%'` + ;; + gnu) + tmp_disk=`echo "$1" | sed 's%\([sh]d[0-9]*\).*%\1%'` + tmp_part=`echo "$1" | sed "s%$tmp_disk%%"` ;; + freebsd|*/kfreebsd) + tmp_disk=`echo "$1" | sed 's%r\{0,1\}\([saw]d[0-9]*\).*$%\1%' \ + | sed 's%r\{0,1\}\(da[0-9]*\).*$%\1%'` + tmp_part=`echo "$1" \ + | sed "s%.*/r\{0,1\}[saw]d[0-9]\(s[0-9]*[a-h]\)%\1%" \ + | sed "s%.*/r\{0,1\}da[0-9]\(s[0-9]*[a-h]\)%\1%"` + ;; + netbsd|*/knetbsd) + tmp_disk=`echo "$1" | sed 's%r\{0,1\}\([sw]d[0-9]*\).*$%r\1d%' \ + | sed 's%r\{0,1\}\(fd[0-9]*\).*$%r\1a%'` + tmp_part=`echo "$1" \ + | sed "s%.*/r\{0,1\}[sw]d[0-9]\([abe-p]\)%\1%"` + ;; + *) + echo "update-grub does not support your OS yet." 1>&2 + exit 1 ;; + esac + + # Get the drive name. + tmp_drive=`grep -v '^#' $device_map | grep "$tmp_disk *$" \ + | sed 's%.*\(([hf]d[0-9][a-z0-9,]*)\).*%\1%'` + + # If not found, print an error message and exit. + if test "x$tmp_drive" = x; then + echo "$1 does not have any corresponding BIOS drive." 1>&2 + exit 1 + fi + + if test "x$tmp_part" != x; then + # If a partition is specified, we need to translate it into the + # GRUB's syntax. + case "$host_os" in + linux) + echo "$tmp_drive" | sed "s%)$%,`expr $tmp_part - 1`)%" ;; + gnu) + if echo $tmp_part | grep "^s" >/dev/null; then + tmp_pc_slice=`echo $tmp_part \ + | sed "s%s\([0-9]*\)[a-z]*$%\1%"` + tmp_drive=`echo "$tmp_drive" \ + | sed "s%)%,\`expr "$tmp_pc_slice" - 1\`)%"` + fi + if echo $tmp_part | grep "[a-z]$" >/dev/null; then + tmp_bsd_partition=`echo "$tmp_part" \ + | sed "s%[^a-z]*\([a-z]\)$%\1%"` + tmp_drive=`echo "$tmp_drive" \ + | sed "s%)%,$tmp_bsd_partition)%"` + fi + echo "$tmp_drive" ;; + freebsd|*/kfreebsd) + if echo $tmp_part | grep "^s" >/dev/null; then + tmp_pc_slice=`echo $tmp_part \ + | sed "s%s\([0-9]*\)[a-h]*$%\1%"` + tmp_drive=`echo "$tmp_drive" \ + | sed "s%)%,\`expr "$tmp_pc_slice" - 1\`)%"` + fi + if echo $tmp_part | grep "[a-h]$" >/dev/null; then + tmp_bsd_partition=`echo "$tmp_part" \ + | sed "s%s\{0,1\}[0-9]*\([a-h]\)$%\1%"` + tmp_drive=`echo "$tmp_drive" \ + | sed "s%)%,$tmp_bsd_partition)%"` + fi + echo "$tmp_drive" ;; + netbsd|*/knetbsd) + if echo $tmp_part | grep "^[abe-p]$" >/dev/null; then + tmp_bsd_partition=`echo "$tmp_part" \ + | sed "s%\([a-p]\)$%\1%"` + tmp_drive=`echo "$tmp_drive" \ + | sed "s%)%,$tmp_bsd_partition)%"` + fi + echo "$tmp_drive" ;; + esac + else + # If no partition is specified, just print the drive name. + echo "$tmp_drive" + fi +} + +# Usage: convert_default os_device +# Convert an OS device to the corresponding GRUB drive. +# Calls OS-specific convert, and returns a default of +# (hd0,0) if anything goes wrong +convert_default () { + # Check if device is software raid1 array + if tmp_dev=$(convert_raid1 $1 2>/dev/null) ; then + : # Use device returned by convert_raid1 + else + tmp_dev=$1 + fi + + if tmp=$(convert $tmp_dev 2>/dev/null) ; then + echo $tmp + else + echo "(hd0,0)" + fi +} + +is_removable () { + removabledevice="$(echo "$1" | sed -e 's%\([sh]d[a-z]\)[0-9]*$%\1%' -e 's%\(fd[0-9]*\)$%\1%' -e 's%/part[0-9]*$%/disc%' -e 's%\(c[0-7]d[0-9]*\).*$%\1%' -e 's%^/dev/%%g')" + if [ -e "/sys/block/$removabledevice/removable" ]; then + if [ "$(cat /sys/block/$removabledevice/removable)" != "0" ]; then + echo "/dev/$removabledevice" + return + fi + fi + echo "" +} + +## Configuration Options +# directory's to look for the grub installation and the menu file +grub_dirs="/boot/grub /boot/boot/grub" + +# The grub installation directory +grub_dir=$(find_grub_dir) + +# Full path to the menu.lst +menu_file_basename=menu.lst +menu_file=$grub_dir/$menu_file_basename + +# Full path to the menu.lst fragment used for ucf management +ucf_menu_file=/var/run/grub/$menu_file_basename + +# Full path to the default file +default_file_basename=default +default_file=$grub_dir/$default_file_basename + +# the device for the / filesystem +root_device=$(find_root_device) + +# the device for the /boot filesystem +boot_device=$(find_device "/boot") + +# Full path to the device.map +device_map=$grub_dir/device.map + +# Enable crashdump menu alternative +crashdump="0" + +# Default kernel options, overidden by the kopt statement in the menufile. +loop_file=$(awk '$2=="/" && $4~"loop" {print $1}' /etc/fstab) +if [ -n "$loop_file" ]; then + dev_mountpoint=$(awk '"'${loop_file}'"~"^"$2 && $2!="/" {print $1";"$2}' /proc/mounts|tail -n 1) + host_device="${dev_mountpoint%;*}" + host_mountpoint="${dev_mountpoint#*;}" +fi +if [ -n "$host_device" ]; then + boot_device= + root_device="$host_device" + default_kopt="root=$host_device loop=${loop_file#$host_mountpoint} ro" +else + default_kopt="root=$root_device ro" +fi +kopt="$default_kopt" + +# Title +title=$(lsb_release --short --description 2>/dev/null) || title="Ubuntu" + +# should update-grub remember the default entry +updatedefaultentry="false" + +# Drive(in GRUB terms) where the kernel is located. Overridden by the +# kopt statement in menufile. +# if we don't have a device.map then we can't use the convert function. +check_removable="" +if test -f "$device_map" ; then + if test -z "$boot_device" ; then + grub_root_device=$(convert_default "$root_device") + check_removable="$(is_removable "$root_device")" + else + grub_root_device=$(convert_default "$boot_device") + check_removable="$(is_removable "$boot_device")" + fi +else + grub_root_device="(hd0,0)" +fi + +# If the root/boot device is on a removable target, we need to override +# the grub_root_device to (hd0,X). This is a requirement since the BIOS +# will change device mapping dynamically if we switch boot device. + +if test -n "$check_removable" ; then + grub_root_device="$(echo "$grub_root_device" | sed -e 's/d.*,/d0,/g')" +fi + +# should grub create the alternative boot options in the menu + alternative="true" + +# should grub lock the alternative boot options in the menu + lockalternative="false" + +# additional options to use with the default boot option, but not with the +# alternatives + defoptions="quiet splash" + +# should grub lock the old kernels + lockold="false" + +# Xen hypervisor options to use with the default Xen boot option + xenhopt="" + +# Xen Linux kernel options to use with the default Xen boot option + xenkopt="console=tty0" + +# options to use with the alternative boot options + altoptions="(recovery mode) single" + +# controls howmany kernels are listed in the config file, +# this does not include the alternative kernels + howmany="all" + +# should grub create a memtest86 entry + memtest86="true" + +# should grub add "savedefault" to default boot options + savedefault="false" + +# stores the command line arguments + command_line_arguments=$1 + +# does this version of grub support the quiet option? +if [ -f ${grub_dir}/installed-version ] && dpkg --compare-versions `cat ${grub_dir}/installed-version` ge 0.97-11ubuntu4; then + supports_quiet=true +else + supports_quiet=false +fi + +# read user configuration +if test -f "/etc/default/grub" ; then + . /etc/default/grub +fi + +# Default options to use in a new config file. This will only be used if $menu_file +# doesn't already exist. Only edit the lines between the two "EOF"s. The others are +# part of the script. +newtemplate=$(tempfile) +cat > "$newtemplate" <&2 +if [ -f "$default_file" ] ; then + echo "found: $default_file" >&2 +else + echo "Generating $default_file file and setting the default boot entry to 0" >&2 + grub-set-default 0 +fi + +# Make sure we use the standard sorting order +LC_COLLATE=C +# Magic markers we use +start="### BEGIN AUTOMAGIC KERNELS LIST" +end="### END DEBIAN AUTOMAGIC KERNELS LIST" + +startopt="## ## Start Default Options ##" +endopt="## ## End Default Options ##" + +# path to grub2 +grub2name="/boot/grub/core.img" + +# Extract options from config file +ExtractMenuOpt() +{ + opt=$1 + + sed -ne "/^$start\$/,/^$end\$/ { + /^$startopt\$/,/^$endopt\$/ { + /^# $opt=/ { + s/^# $opt=\(.*\)\$/\1/ + p + } + } + }" $menu +} + +GetMenuOpts() +{ + opt=$1 + + sed -ne "/^$start\$/,/^$end\$/ { + /^$startopt\$/,/^$endopt\$/ { + /^# $opt=/ { + p + } + } + }" $menu +} + +ExtractMenuOpts() +{ + opt=$1 + + GetMenuOpts $opt | sed "s/^# $opt=\(.*\)\$/\1=\"\2\"/" +} + +GetMenuOpt() +{ + opt=$1 + value=$2 + + [ -z "$(GetMenuOpts "$opt")" ] || value=$(ExtractMenuOpt "$opt") + + echo $value +} + +# Compares two version strings A and B +# Returns -1 if AB +# This compares version numbers of the form +# 2.4.14.2 > 2.4.14 +# 2.4.14random = 2.4.14-random > 2.4.14-ac10 > 2.4.14 > 2.4.14-pre2 > +# 2.4.14-pre1 > 2.4.13-ac99 +CompareVersions() +{ + #Changes the line something-x.y.z into somthing-x.y.z.q + #This is to ensure that kernels with a .q is treated as higher than the ones without + #First a space is put after the version number + v1=$(echo $1 | sed -e 's!^\(.*-\([0-9]\+\.\)\{2,3\}[0-9]\+\)\(.*\)!\1 \3!g') + v2=$(echo $2 | sed -e 's!^\(.*-\([0-9]\+\.\)\{2,3\}[0-9]\+\)\(.*\)!\1 \3!g') + #If the version number only has 3 digits then put in another .0 + v1=$(echo $v1 | sed -e 's!^\(.*-\([0-9]\+\.\)\{2\}[0-9]\+\)\( .*\|$\)!\1.0 \3!g') + v2=$(echo $v2 | sed -e 's!^\(.*-\([0-9]\+\.\)\{2\}[0-9]\+\)\( .*\|$\)!\1.0 \3!g') + + # Then split the version number and remove any '.' 's or dashes + v1=$(echo $v1 | sed -e 's![-\.]\+! !g' -e 's!\([0-9]\)\([[:alpha:]]\)!\1 \2!') + v2=$(echo $v2 | sed -e 's![-\.]\+! !g' -e 's!\([0-9]\)\([[:alpha:]]\)!\1 \2!') + + # we weight different kernel suffixes here + # ac = 50 + # pre = -50 + # rc = -40 + # test = -60 + # others are given 99 + v1=$(echo $v1 | sed -e 's! k7! 786 !g' -e 's! ac! 50 !g' -e 's! rc! -40 !g' -e 's! pre! -50 !g' -e 's! test! -60 !g' -e 's![^ ]*[^-0-9 ][^ ]*!99!g') + + v2=$(echo $v2 | sed -e 's! k7! 786 !g' -e 's! ac! 50 !g' -e 's! rc! -40 !g' -e 's! pre! -50 !g' -e 's! test! -60 !g' -e 's![^ ]*[^-0-9 ][^ ]*!99!g') + + result=0; v1finished=0; v2finished=0; + while [ $result -eq 0 ] && [ $v1finished -eq 0 ] && [ $v2finished -eq 0 ]; + do + if [ "$v1" = "" ]; then + v1comp=0; v1finished=1 + else + set -- $v1; v1comp=$1; shift; v1=$* + fi + + if [ "$v2" = "" ]; then + v2comp=0; v2finished=1 + else + set -- $v2; v2comp=$1; shift; v2=$* + fi + + set +e + result=`expr $v1comp - $v2comp` + result=`expr substr $result 1 2` + set -e + + if [ $result -gt 0 ]; then result=1 + elif [ $result -lt 0 ]; then result=-1 + fi + done + + # finally return the result + echo $result +} + +# looks in the directory specified for an initrd image with the version specified +FindInitrdName() +{ + # strip trailing slashes + directory=$(echo $1 | sed -e 's#/*$##') + version=$2 + + # initrd + # initrd.img + # initrd-lvm + # .*.gz + + initrdName="" + names="initrd initrd.img initrd-lvm" + compressed="gz" + + for n in $names ; do + # make sure we haven't already found it + if [ -z "$initrdName" ] ; then + if [ -f "$directory/$n$version" ] ; then + initrdName="$n$version" + break + else + for c in $compressed ; do + if [ -f "$directory/$n$version.$c" ] ; then + initrdName="$n$version.$c" + break + fi + done + fi + else + break + fi + done + + # return the result + echo $initrdName +} + +FindXenHypervisorVersions () +{ + version=$1 + + if [ -f "/var/lib/linux-image-$version/xen-versions" ]; then + ret="$(cat /var/lib/linux-image-$version/xen-versions)" + fi + + echo $ret +} + +get_kernel_opt() +{ + kernel_version=$1 + + version=$(echo $kernel_version | sed 's/^[^0-9]*//') + version=$(echo $version | sed 's/[-\+\.]/_/g') + if [ -n "$version" ] ; then + while [ -n "$version" ] ; do + currentOpt="$(eval "echo \${kopt_$version}")" + if [ -n "$currentOpt" ] ; then + break + fi + + oldversion="$version" + version=$(echo $version | sed 's/_\?[^_]*$//') + if [ "$version" = "$oldversion" ] ; then + # Break infinite loop, if the version isn't what we expect + break + fi + done + fi + + if [ -z "$currentOpt" ] ; then + currentOpt=$kopt + fi + + echo $currentOpt +} + +write_kernel_entry() +{ + local kernel_version; kernel_version=$1; shift + local recovery_desc; recovery_desc=$1; shift + local lock_alternative; lock_alternative=$1; shift + local grub_root_device; grub_root_device=$1; shift + local kernel; kernel=$1; shift + local kernel_options; kernel_options=$1; shift + local recovery_suffix; recovery_suffix=$1; shift + local initrd; initrd=$1; shift + local savedefault; savedefault=$1; shift + local lockold; lockold=$1; shift + local hypervisor + if [ -n "$1" ]; then + # Hypervisor. + hypervisor=$1; shift + local hypervisor_image; hypervisor_image=$1; shift + local hypervisor_version; hypervisor_version=$1; shift + local hypervisor_options; hypervisor_options=$1; shift + fi + + echo -n "title " >> $buffer + + if [ -n "$hypervisor" ]; then + echo -n "$hypervisor $hypervisor_version / " >> $buffer + fi + + echo -n "$title" >> $buffer + if [ -n "$kernel_version" ]; then + echo -n ", " >> $buffer + # memtest86 is not strictly a kernel + if ! echo "$kernel_version" | grep -q ^memtest86; then + echo -n "kernel " >> $buffer + fi + echo -n "$kernel_version" >> $buffer + fi + if [ -n "$recovery_desc" ]; then + echo -n " $recovery_desc" >> $buffer + fi + echo >> $buffer + + # lock the alternative options + if test x"$lock_alternative" = x"true" ; then + echo "lock" >> $buffer + fi + # lock the old entries + if test x"$lockold" = x"true" ; then + echo "lock" >> $buffer + fi + + echo "root $grub_root_device" >> $buffer + + echo -n "kernel " >> $buffer + if [ -n "$hypervisor" ]; then + echo -n "$hypervisor_image" >> $buffer + if [ -n "$hypervisor_options" ]; then + echo -n " $hypervisor_options" >> $buffer + fi + echo >> $buffer + echo -n "module " >> $buffer + fi + echo -n "$kernel" >> $buffer + if [ -n "$kernel_options" ]; then + echo -n " $kernel_options" >> $buffer + fi + if [ -n "$recovery_desc" ]; then + echo -n " $recovery_suffix" >> $buffer + fi + echo >> $buffer + + if [ -n "$initrd" ]; then + if [ -n "$hypervisor" ]; then + echo -n "module " >> $buffer + else + echo -n "initrd " >> $buffer + fi + echo "$initrd" >> $buffer + fi + + if [ ! -n "$recovery_desc" -a x"$supports_quiet" = x"true" ]; then + echo "quiet" >> $buffer + fi + + if test x"$savedefault" = x"true" ; then + echo "savedefault" >> $buffer + fi + echo >> $buffer +} + +convert_kopt_to_uuid() +{ + local kopt; kopt=$1 + + convert=false + root=$(echo "$kopt" | sed 's/.*root=//;s/ .*//') + case "$root" in + UUID=*|LABEL=*) + ;; + /dev/disk/*) + ;; + /dev/mapper/*) + ;; + /dev/evms/[hs]d[a-z][0-9]*) + convert=: + ;; + /dev/evms/*) + ;; + /dev/md[0-9]*) + ;; + /dev/*) + convert=: + ;; + esac + if $convert; then + if [ -L "$DEV" ] && readlink "$DEV" | grep -q "^/dev/mapper/" + then + : + elif [ -b "$root" ]; then + uuid=$(/sbin/vol_id -u "$root" || true) + if [ -n "$uuid" ]; then + kopt=$(echo "$kopt" | sed "s/\(.*root=\)[^ ]*/\1UUID=$uuid/") + fi + fi + fi + + echo "$kopt" +} + +## write out the kernel entries +output_kernel_list() { + counter=0 + + # Xen entries first. + for kern in $xenKernels ; do + if test ! x"$howmany" = x"all" ; then + if [ $counter -gt $howmany ] ; then + break + fi + fi + + kernelName=$(basename $kern) + kernelVersion=$(echo $kernelName | sed -e 's/vmlinuz//') + + initrdName=$(FindInitrdName "/boot" "$kernelVersion") + initrd="" + + kernel=$kernel_dir/$kernelName + if [ -n "$initrdName" ] ; then + initrd=$kernel_dir/$initrdName + fi + + kernelVersion=$(echo $kernelVersion | sed -e 's/^-//') + currentOpt=$(get_kernel_opt $kernelVersion) + + hypervisorVersions=$(FindXenHypervisorVersions "$kernelVersion") + + found= + for hypervisorVersion in $hypervisorVersions; do + hypervisor="$kernel_dir/xen-$hypervisorVersion.gz" + if [ -e "$hypervisor" ]; then + found=1 + + echo "Found Xen hypervisor $hypervisorVersion, kernel: $kernel" >&2 + + write_kernel_entry "$kernelVersion" '' '' "$grub_root_device" \ + "$kernel" "$currentOpt $xenkopt" '' "$initrd" "$savedefault" '' \ + Xen "$hypervisor" "$hypervisorVersion" "$xenhopt" + counter=$(($counter + 1)) + fi + done + + if [ -z $found ]; then + for hypervisor in $hypervisors; do + hypVersion=`basename "$hypervisor" .gz | sed s%xen-%%` + + echo "Found Xen hypervisor $hypVersion, kernel: $kernel" >&2 + + write_kernel_entry "$kernelVersion" '' '' "$grub_root_device" \ + "$kernel" "$currentOpt $xenkopt" '' "$initrd" "$savedefault" '' \ + Xen "$kernel_dir/$hypervisor" "$hypVersion" "$xenhopt" + counter=$(($counter + 1)) + done + fi + done + + for kern in $sortedKernels ; do + counter=$(($counter + 1)) + if test ! x"$howmany" = x"all" ; then + if [ $counter -gt $howmany ] ; then + break + fi + fi + kernelName=$(basename $kern) + kernelVersion=$(echo $kernelName | sed -e 's/vmlinuz//') + initrdName=$(FindInitrdName "/boot" "$kernelVersion") + initrd="" + + kernel=$kernel_dir/$kernelName + if [ -n "$initrdName" ] ; then + initrd=$kernel_dir/$initrdName + fi + + echo "Found kernel: $kernel" >&2 + + if [ "$kernelName" = "vmlinuz" ]; then + if [ -L "/boot/$kernelName" ]; then + kernelVersion=`readlink -f "/boot/$kernelName"` + kernelVersion=$(echo $kernelVersion | sed -e 's/.*vmlinuz-//') + kernelVersion="$kernelVersion Default" + else + kernelVersion="Default" + fi + fi + if [ "$kernelName" = "vmlinuz.old" ]; then + if [ -L "/boot/$kernelName" ]; then + kernelVersion=`readlink -f "/boot/$kernelName"` + kernelVersion=$(echo $kernelVersion | sed -e 's/.*vmlinuz-//') + kernelVersion="$kernelVersion Previous" + else + kernelVersion="Previous" + fi + fi + kernelVersion=$(echo $kernelVersion | sed -e 's/^-//') + + currentOpt=$(get_kernel_opt $kernelVersion) + + do_lockold=$lockold + # do not lockold for the first entry + [ $counter -eq 1 ] && do_lockold=false + + write_kernel_entry "$kernelVersion" "" "" "$grub_root_device" "$kernel" \ + "$currentOpt $defoptions" "" "$initrd" "$savedefault" "$do_lockold" + + # insert the alternative boot options + if test ! x"$alternative" = x"false" ; then + # for each altoptions line do this stuff + sed -ne 's/# altoptions=\(.*\)/\1/p' $buffer | while read line; do + descr=$(echo $line | sed -ne 's/\(([^)]*)\)[[:space:]]\(.*\)/\1/p') + suffix=$(echo $line | sed -ne 's/\(([^)]*)\)[[:space:]]\(.*\)/\2/p') + + test x"$lockalternative" = x"true" && do_lockold=false + write_kernel_entry "$kernelVersion" "$descr" "$lockalternative" \ + "$grub_root_device" "$kernel" "$currentOpt" "$suffix" "$initrd" \ + "false" "$do_lockold" + done + fi + + if [ "$crashdump" = "1" ] ; then + test x"$lockalternative" = x"true" && do_lockold=false + write_kernel_entry "$kernelVersion" "(crashdump mode)" "$lockalternative" \ + "$grub_root_device" "$kernel" "$currentOpt" "crashkernel=64M@16M" "$initrd" \ + "false" "$do_lockold" + fi + done + + if test -f $grub2name ; then + echo "Found GRUB 2: $grub2name" >&2 + cat >> $buffer << EOF +title Chainload into GRUB 2 +root $grub_root_device +kernel $grub2name +EOF + if test x"$savedefault" = x"true" ; then + echo "savedefault" >> $buffer + fi + echo >> $buffer + fi + + memtest86names="memtest86 memtest86+" + + if test ! x"$memtest86" = x"false" ; then + for name in $memtest86names ; do + if test -f "/boot/$name.bin" ; then + kernelVersion="$name" + kernel="$kernel_dir/$name.bin" + currentOpt= + initrd= + + echo "Found kernel: $kernel" >&2 + + write_kernel_entry "$kernelVersion" "" "" "$grub_root_device" \ + "$kernel" "$currentOpt" "" "$initrd" "false" "" + fi + done + fi + + echo $end >> $buffer +} + +ucf_update_kernels() { + local target; target="$1" + local buffer; buffer="$2" + + sed -ni -e"/$endopt/,/$end/p" "$buffer" + + if [ "x$initialconfig" = "x" ]; then + sed -n -e"/$endopt/,/$end/p" < $menu > $ucf_menu_file + else + cat $buffer > $ucf_menu_file + fi + + # should be replaced by db_x_loadtemplate + debconf-loadtemplate grub /var/lib/dpkg/info/grub.templates + + ucf --debconf-ok \ + --debconf-template grub/update_grub_changeprompt_threeway \ + --three-way "$buffer" $ucf_menu_file + rm "$buffer" + + # now re-merge the ucf results with the target file + sed -i -e "/^$endopt/,/^$end/ { + /^$endopt/r $ucf_menu_file + d + } + " $target + + rm -f $ucf_menu_file ${ucf_menu_file}.ucf-old +} + + +echo -n "Testing for an existing GRUB $menu_file_basename file ... " >&2 + +# Test if our menu file exists +if [ -f "$menu_file" ] ; then + menu="$menu_file" + rm -f $newtemplate + unset newtemplate + echo "found: $menu_file" >&2 + cp -f "$menu_file" "$menu_file~" +else + # if not ask user if they want us to create one + initialconfig=1 + menu="$menu_file" + echo >&2 + echo >&2 + echo -n "Could not find $menu_file file. " >&2 + if [ "-y" = "$command_line_arguments" ] ; then + echo >&2 + echo "Generating $menu_file" >&2 + answer=y + else + echo -n "Would you like $menu_file generated for you? " >&2 + echo -n "(y/N) " >&2 + read answer + fi + + case "$answer" in + y* | Y*) + cat "$newtemplate" > $menu_file + rm -f $newtemplate + unset newtemplate + ;; + *) + abort "Not creating $menu_file as you wish" + ;; + esac +fi + +# Extract the crashdump var +crashdump=$(GetMenuOpt "crashdump" "$crashdump") + +# Extract the kernel options to use +kopt=$(GetMenuOpt "kopt" "$kopt") + +# Update the root device to mount-by-UUID +kopt=$(convert_kopt_to_uuid "$kopt") + +# Extract options for specific kernels +opts="$(ExtractMenuOpts "\(kopt_[[:alnum:]_]\+\)")" +test -z "$opts" || eval "$opts" +CustomKopts=$(GetMenuOpts "\(kopt_[[:alnum:]_]\+\)" | \ + grep -v "^# kopt_2_6=" || true) + +# Set the kernel 2.6 option only for fresh install (but convert it to +# mount-by-UUID on upgrade) +test -z "$kopt_2_6" && test -z "$(GetMenuOpt "kopt" "")" && \ + kopt_2_6="$default_kopt" +test -n "$kopt_2_6" && kopt_2_6=$(convert_kopt_to_uuid "$kopt_2_6") + +# Extract the grub root +grub_root_device=$(GetMenuOpt "groot" "$grub_root_device") + +# Extract the old recovery value +alternative=$(GetMenuOpt "recovery" "$alternative") + +# Extract the alternative value +alternative=$(GetMenuOpt "alternative" "$alternative") + +# Extract the lockalternative value +lockalternative=$(GetMenuOpt "lockalternative" "$lockalternative") + +# Extract the additional default options +# Check nonaltoptions too for compatibility with Ubuntu <= 5.10 +defoptions=$(GetMenuOpt "nonaltoptions" "$defoptions") +defoptions=$(GetMenuOpt "defoptions" "$defoptions") + +# Extract the lockold value +lockold=$(GetMenuOpt "lockold" "$lockold") + +# Extract Xen hypervisor options +xenhopt=$(GetMenuOpt "xenhopt" "$xenhopt") + +# Extract Xen Linux kernel options +xenkopt=$(GetMenuOpt "xenkopt" "$xenkopt") + +# Extract the howmany value +howmany=$(GetMenuOpt "howmany" "$howmany") + +# Extract the memtest86 value +memtest86=$(GetMenuOpt "memtest86" "$memtest86") + + +# Extract the updatedefaultentry option +updatedefaultentry=$(GetMenuOpt "updatedefaultentry" "$updatedefaultentry") + +# If "default saved" is in use, set the default to true +grep -q "^default.*saved" $menu && savedefault=true +# Extract the savedefault option +savedefault=$(GetMenuOpt "savedefault" "$savedefault") + +# Generate the menu options we want to insert +buffer=$(tempfile) +echo $start >> $buffer +echo "## lines between the AUTOMAGIC KERNELS LIST markers will be modified" >> $buffer +echo "## by the debian update-grub script except for the default options below" >> $buffer +echo >> $buffer +echo "## DO NOT UNCOMMENT THEM, Just edit them to your needs" >> $buffer +echo >> $buffer +echo "## ## Start Default Options ##" >> $buffer + +echo "## default kernel options" >> $buffer +echo "## default kernel options for automagic boot options" >> $buffer +echo "## If you want special options for specific kernels use kopt_x_y_z" >> $buffer +echo "## where x.y.z is kernel version. Minor versions can be omitted." >> $buffer +echo "## e.g. kopt=root=/dev/hda1 ro" >> $buffer +echo "## kopt_2_6_8=root=/dev/hdc1 ro" >> $buffer +echo "## kopt_2_6_8_2_686=root=/dev/hdc2 ro" >> $buffer +echo "# kopt=$kopt" >> $buffer +if [ -n "$kopt_2_6" ] && [ "$kopt" != "$kopt_2_6" ]; then + echo "# kopt_2_6=$kopt_2_6" >> $buffer +fi +if [ -n "$CustomKopts" ] ; then + echo "$CustomKopts" >> $buffer +fi +echo >> $buffer + +echo "## Setup crashdump menu entries" >> $buffer +echo "## e.g. crashdump=1" >> $buffer +echo "# crashdump=$crashdump" >> $buffer +echo >> $buffer + +echo "## default grub root device" >> $buffer +echo "## e.g. groot=(hd0,0)" >> $buffer +echo "# groot=$grub_root_device" >> $buffer +echo >> $buffer + +echo "## should update-grub create alternative automagic boot options" >> $buffer +echo "## e.g. alternative=true" >> $buffer +echo "## alternative=false" >> $buffer +echo "# alternative=$alternative" >> $buffer +echo >> $buffer + +echo "## should update-grub lock alternative automagic boot options" >> $buffer +echo "## e.g. lockalternative=true" >> $buffer +echo "## lockalternative=false" >> $buffer +echo "# lockalternative=$lockalternative" >> $buffer +echo >> $buffer + +echo "## additional options to use with the default boot option, but not with the" >> $buffer +echo "## alternatives" >> $buffer +echo "## e.g. defoptions=vga=791 resume=/dev/hda5" >> $buffer +echo "# defoptions=$defoptions" >> $buffer +echo >> $buffer + +echo "## should update-grub lock old automagic boot options" >> $buffer +echo "## e.g. lockold=false" >> $buffer +echo "## lockold=true" >> $buffer +echo "# lockold=$lockold" >> $buffer +echo >> $buffer + +echo "## Xen hypervisor options to use with the default Xen boot option" >> $buffer +echo "# xenhopt=$xenhopt" >> $buffer +echo >> $buffer + +echo "## Xen Linux kernel options to use with the default Xen boot option" >> $buffer +echo "# xenkopt=$xenkopt" >> $buffer +echo >> $buffer + +echo "## altoption boot targets option" >> $buffer +echo "## multiple altoptions lines are allowed" >> $buffer +echo "## e.g. altoptions=(extra menu suffix) extra boot options" >> $buffer +echo "## altoptions=(recovery) single" >> $buffer + +if ! grep -q "^# altoptions" $menu ; then + echo "# altoptions=$altoptions" >> $buffer +else + grep "^# altoptions" $menu >> $buffer +fi +echo >> $buffer + +echo "## controls how many kernels should be put into the $menu_file_basename" >> $buffer +echo "## only counts the first occurence of a kernel, not the" >> $buffer +echo "## alternative kernel options" >> $buffer +echo "## e.g. howmany=all" >> $buffer +echo "## howmany=7" >> $buffer +echo "# howmany=$howmany" >> $buffer +echo >> $buffer + + +echo "## should update-grub create memtest86 boot option" >> $buffer +echo "## e.g. memtest86=true" >> $buffer +echo "## memtest86=false" >> $buffer +echo "# memtest86=$memtest86" >> $buffer +echo >> $buffer + +echo "## should update-grub adjust the value of the default booted system" >> $buffer +echo "## can be true or false" >> $buffer +echo "# updatedefaultentry=$updatedefaultentry" >> $buffer +echo >> $buffer + +echo "## should update-grub add savedefault to the default options" >> $buffer +echo "## can be true or false" >> $buffer +echo "# savedefault=$savedefault" >> $buffer +echo >> $buffer + +echo "## ## End Default Options ##" >> $buffer +echo >> $buffer + +echo -n "Searching for splash image ... " >&2 +current_splash=`grep '^splashimage=' ${menu_file} || true` +splashimage_path="splashimage=${grub_root_device}${grub_dir##${boot_device:+/boot}}/splash.xpm.gz" +if [ `sed -e "/^$start/,/^$end/d" $menu_file | grep -c '^splashimage='` != "0" ] ; then + #checks for splashscreen defined outside the autoupdated part + splashimage=$(grep '^splashimage=' ${menu_file}) + echo "found: ${splashimage##*=}" >&2 + echo >&2 +elif [ -f "${grub_dir}/splash.xpm.gz" ] && [ "$current_splash" = "" ]; then + echo "found: /boot/grub/splash.xpm.gz" >&2 + echo "$splashimage_path" >> $buffer + echo >> $buffer +elif [ -f "${grub_dir}/splash.xpm.gz" ] && [ "$current_splash" = "$splashimage_path" ]; then + echo "found: /boot/grub/splash.xpm.gz" >&2 + echo "$splashimage_path" >> $buffer + echo >> $buffer +elif [ "$current_splash" != "" ] && [ "$current_splash" != "$splashimage_path" ]; then + echo "found but preserving previous setting: $(grep '^splashimage=' ${menu_file})" >&2 + echo "$current_splash" >> $buffer + echo >> $buffer +else + echo "none found, skipping ..." >&2 +fi + + +hypervisors="" +for hyp in /boot/xen-*.gz; do + if [ ! -h "$hyp" ] && [ -f "$hyp" ]; then + hypervisors="$hypervisors `basename "$hyp"`" + fi +done + +# figure out where grub looks for the kernels at boot time +kernel_dir=/boot +if [ -n "$boot_device" ] ; then + kernel_dir= +fi + + +# We need a static path to use for the ucf registration; since we're not +# using the full menu.lst file (maybe we should, just copying it around? +# C.f. discussion with Manoj), create a directory in a fixed location +# even though we're not treating the file in that location as +# persistent. +mkdir -p /var/run/grub + +# The first time ucf sees the file, we can only assume any difference +# between the magic comments and the kernel options is a result of local +# mods, so this will result in a ucf prompt for anyone whose first +# invocation of update-grub is as a result of updating the magic comments. +if ! ucfq grub | grep -q $ucf_menu_file; then + otherbuffer=$(tempfile) + cat $buffer > $otherbuffer + + sortedKernels=`sed -n -e " + /$endopt/,/$end/ { + s/^kernel[[:space:]]\+\([^[:space:]]\+\).*/\1/p + }" < $menu | grep -vE "memtest86|$grub2name|xen" | uniq` + xenKernels=`sed -n -e " + /$endopt/,/$end/ { + s/^module[[:space:]]\+\([^[:space:]]*vmlinuz[^[:space:]]\+\).*/\1/p + }" < $menu | uniq` + + savebuffer="$buffer" + buffer="$otherbuffer" + output_kernel_list + buffer="$savebuffer" + + ucf_update_kernels "$menu" "$otherbuffer" + + # all done, now register it + ucfr grub $ucf_menu_file +fi + + +xenKernels="" +for ver in `grep -l CONFIG_XEN_PRIVILEGED_GUEST=y /boot/config* | sed -e s%/boot/config-%%`; do + # ver is a kernel version + kern="/boot/vmlinuz-$ver" + if [ -r $kern ] ; then + newerKernels="" + for i in $xenKernels ; do + res=$(CompareVersions "$kern" "$i") + if [ "$kern" != "" ] && [ "$res" -gt 0 ] ; then + newerKernels="$newerKernels $kern $i" + kern="" + else + newerKernels="$newerKernels $i" + fi + done + if [ "$kern" != "" ] ; then + newerKernels="$newerKernels $kern" + fi + xenKernels="$newerKernels" + fi +done + +in_domU= +if [ -e /proc/xen/capabilities ] && ! grep -q "control_d" /proc/xen/capabilities; then + in_domU=1 +fi + +sortedKernels="" +for kern in $(/bin/ls -1vr /boot | grep -v "dpkg-*" | grep "^vmlinuz-") ; do + if `echo "$xenKernels" | grep -q "$kern "` || `echo "$kern" | grep -q "xen"`; then + is_xen=1 + else + is_xen= + fi + + if [ ! "$in_domU" ] && [ "$is_xen" ]; then + # skip xen kernels + continue + elif [ "$in_domU" ] && ! [ "$is_xen" ]; then + # skip non-xen kernels + continue + fi + kern="/boot/$kern" + newerKernels="" + for i in $sortedKernels ; do + res=$(CompareVersions "$kern" "$i") + if [ "$kern" != "" ] && [ "$res" -gt 0 ] ; then + newerKernels="$newerKernels $kern $i" + kern="" + else + newerKernels="$newerKernels $i" + fi + done + if [ "$kern" != "" ] ; then + newerKernels="$newerKernels $kern" + fi + sortedKernels="$newerKernels" +done + +if test -f "/boot/vmlinuz.old" ; then + sortedKernels="/boot/vmlinuz.old $sortedKernels" +fi +if test -f "/boot/vmlinuz" ; then + sortedKernels="/boot/vmlinuz $sortedKernels" +fi + +#Finding the value the default line +use_grub_set_default="false" +if test "$updatedefaultentry" = "true" ; then + defaultEntryNumber=$(sed -ne 's/^[[:blank:]]*default[[:blank:]]*\(.*\).*/\1/p' $menu) + + if [ "$defaultEntryNumber" = "saved" ] ; then + defaultEntryNumber=$(sed 'q' "$grub_dir/default") + use_grub_set_default="true" + fi + + if test -n "$defaultEntryNumber"; then + defaultEntryNumberPlusOne=$(expr $defaultEntryNumber \+ 1); + defaultEntry=$(grep "^[[:blank:]]*title" $menu | sed -ne "${defaultEntryNumberPlusOne}p" | sed -ne ";s/^[[:blank:]]*title[[:blank:]]*//p") + defaultEntry=$(echo $defaultEntry | sed -e "s/[[:blank:]]*$//") # don't trust trailing blanks + else + notChangeDefault="yes" + fi +else + notChangeDefault="yes" +fi + +output_kernel_list + +otherbuffer=$(tempfile) +cat $buffer > $otherbuffer + +ucf_update_kernels "$buffer" "$otherbuffer" + +echo -n "Updating $menu ... " >&2 +# Insert the new options into the menu +if ! grep -q "^$start" $menu ; then + cat $buffer >> $menu + rm -f $buffer +else + umask 077 + sed -e "/^$start/,/^$end/{ + /^$start/r $buffer + d + } + " $menu > $menu.new + cat $menu.new > $menu + rm -f $buffer $menu.new +fi + +# Function to update the default value +set_default_value() { + if [ "$use_grub_set_default" = "true" ] ; then + grub-set-default $1 + else + value="$1" + newmenu=$(tempfile) + sed -e "s/^[[:blank:]]*default[[:blank:]]*[[:digit:]]*\(.*\)/default ${value}\1/;b" $menu > $newmenu + cat $newmenu > $menu + rm -f $newmenu + unset newmenu + fi +} + +#Updating the default number +if test -z "$notChangeDefault"; then + newDefaultNumberPlusOne=$(grep "^[[:blank:]]*title[[:blank:]]*" $menu | grep -n "${defaultEntry}" | cut -f1 -d ":" | sed -ne "1p") + if test -z "$newDefaultNumberPlusOne"; then + echo "Previous default entry removed, resetting to 0">&2 + set_default_value "0" + elif test -z "$defaultEntry"; then + echo "Value of default value matches no entry, resetting to 0" >&2 + set_default_value "0" + else + if test "$newDefaultNumberPlusOne" = "1"; then + newDefaultNumber="0" + else + newDefaultNumber=$(expr $newDefaultNumberPlusOne - 1) + fi + echo "Updating the default booting kernel">&2 + set_default_value "$newDefaultNumber" + fi +fi + +echo "done" >&2 +echo >&2 --- grub-0.97.orig/debian/grub-install.wrapper +++ grub-0.97/debian/grub-install.wrapper @@ -0,0 +1,14 @@ +#!/bin/sh +# +# Wrapper to warn user about kernel-img.conf move +# + +if [ -x /usr/sbin/grub-install ]; then + if [ "$0" = "/sbin/grub-install" ]; then + echo "You shouldn't call /sbin/grub-install. Please call /usr/sbin/grub-install instead!" >&2 + echo >&2 + fi + exec /usr/sbin/grub-install "$@" +else + echo "Your /usr is broken; please fix it before calling this wrapper!" >&2 +fi --- grub-0.97.orig/debian/grub.examples +++ grub-0.97/debian/grub.examples @@ -0,0 +1 @@ +docs/menu.lst --- grub-0.97.orig/debian/grub.docs +++ grub-0.97/debian/grub.docs @@ -0,0 +1,6 @@ +AUTHORS +BUGS +NEWS +README +THANKS +TODO --- grub-0.97.orig/debian/grub.postinst +++ grub-0.97/debian/grub.postinst @@ -0,0 +1,9 @@ +#!/bin/sh + +if [ "$1" = "configure" ]; then + if dpkg --compare-versions "$2" lt-nl "0.97-29ubuntu6"; then + update-grub + fi +fi + +#DEBHELPER# --- grub-0.97.orig/debian/update-grub.8 +++ grub-0.97/debian/update-grub.8 @@ -0,0 +1,110 @@ +.\" Please adjust this date whenever revising the manpage. +.\" +.\" Some roff macros, for reference: +.\" .nh disable hyphenation +.\" .hy enable hyphenation +.\" .ad l left justify +.\" .ad b justify to both left and right margins +.\" .nf disable filling +.\" .fi enable filling +.\" .br insert line break +.\" .sp insert n+1 empty lines +.\" for manpage-specific macros, see man(7) +.TH "update-grub" "8" "June 18, 2001" "Jason Thomas" +.SH "NAME" +update\-grub \- program to generate GRUB's menu.lst file +.SH "SYNOPSIS" +.B update\-grub [-y] +.SH "OPTIONS" +.TP +\fB-y\fR +Assume 'yes' on all questions. +.SH "DESCRIPTION" +.B \fBupdate\-grub\fR +is a program used to generate the \fImenu.lst\fR file used by the grub bootloader. +It works by looking in \fI/boot\fR for all files which start with "\fIvmlinuz\-\fR". They will be treated as kernels, and grub menu entries will be created for each. It will also create the initial \fImenu.lst\fR if none exists, after prompting the user. +It will also add initrd lines for ramdisk images found with the same version as kernels found. e.g. /boot/vmlinuz-2.4.5 and /boot/initrd-2.4.5 will cause a line of "initrd=/boot/initrd-2.4.5 or similar to be added for the kernel entry in the menu.lst. + +After \fBupdate\-grub\fR has been run for the first time, the user is required to edit the generated \fBmenu.lst\fR. The user must set the two options \fBupdate\-grub\fR uses. Then re\-run the \fBupdate\-grub\fR script to update the \fImenu.lst\fR file using the default's that have been set. + +These are the options passed to the linux kernel: +.br +# kopt=root=/dev/hda1 ro +.br +Everything after "kopt=" is passed to the kernel as parameters. See bootparam(7) for more information. + +This is the grub device from which grub loads the kernel: +.br +# groot=(hd0,1) +.br +(hd0,1) is a partition in grub notation. See grub(8) for more information. + +This option controls if grub should create the alternative boot options in the menu entries +.br +# alternative=true +.br +# alternative=false + +This option controls if grub should lock the alternative boot options see grub(8) for more information. +.br +# lockalternative=true +.br +# lockalternative=false + +This option controls if grub should lock the old kernels. +.br +# lockold=true +.br +# lockold=false + +This options controls what is used for the alternative boot options, multiple altoptions lines are allowed. +.br +# altoptions=(some description) some kernel command line options +.br +# altoptions=(recovery option) single +.br +The description is placed in '()' and the kernel command line options follow that. +.br +# updatedefault=true +.bar +# updatedefault=false + +This option controls if grub should update the default entry to keep +booting the same kernel even if a new one is installed. + + +The \fBupdate\-grub\fR script can be ran automagically from the \fI/etc/kernel\-img.conf\fR file by adding the following lines: + +postinst_hook = update\-grub +.br +postrm_hook = update\-grub +.br +do_bootloader = no + +For further information related to \fI/etc/kernel\-img.conf\fR, see the manpage kernel\-img.conf(5). +.SH "SEE ALSO" +.BR grub (8), +.BR grub\-install (8), +.BR kernel\-img.conf (5) +(contained in the +.B kernel-package +package), +.BR bootparam (7). +.PP +The full documentation for +.B grub +is maintained as a Texinfo manual in the +.B grub-doc +package. If the +.B info +and +.B grub +programs are properly installed at your site, the command +.IP +.B info grub +.PP +should give you access to the complete manual. +.SH "AUTHOR" +This manual page was written by Jason Thomas , +for the Debian GNU/Linux system (but may be used by others). +.\" vim:syn=nroff --- grub-0.97.orig/debian/grub-set-default.1 +++ grub-0.97/debian/grub-set-default.1 @@ -0,0 +1,35 @@ +.\" In .TH, FOO should be all caps, SECTION should be 1-8, maybe w/ subsection +.\" other parms are allowed: see man(7), man(1) +.\" +.\" This template provided by Tom Christiansen . +.\" +.TH GRUB-SET-DEFAULT 1 "November 2006" +.SH NAME +grub-set-default \- Set the default boot entry for GRUB +.SH SYNOPSIS +.PP +.B grub-set-default +[\fIOPTION\fR] +entry +.SH DESCRIPTION +Set the default boot entry for GRUB. +.TP +\fB\-h, \-\-help +print this message and exit +.TP +\fB\-v, \-\-version\fR +print the version information and exit +.TP +\fB\-\-root-directory=DIR\fR +Use the directory DIR instead of the root directory +.TP +ENTRY is a number or the special keyword `default\'. +.SH "REPORTING BUGS" +Report bugs to +.SH "SEE ALSO" +.\" Always quote multiple words for .SH +.BR grub (8), +.BR update-grub (8). +.SH "AUTHOR" +This manual page was written by Patrick Schoenfeld , +for the Debian project (but may be used by others). --- grub-0.97.orig/debian/grub.dirs +++ grub-0.97/debian/grub.dirs @@ -0,0 +1,2 @@ +sbin/ +usr/share/bug/grub --- grub-0.97.orig/debian/grub.manpages +++ grub-0.97/debian/grub.manpages @@ -0,0 +1,3 @@ +debian/update-grub.8 +debian/grub-reboot.8 +debian/grub-set-default.1 --- grub-0.97.orig/debian/control +++ grub-0.97/debian/control @@ -0,0 +1,39 @@ +Source: grub +Section: admin +Priority: optional +XSBC-Original-Maintainer: Grub Maintainers +Maintainer: Ubuntu Kernel Team +Uploaders: Jason Thomas , Otavio Salvador , Robert Millan +Build-Depends: debhelper (>= 4.0.0), automake1.9, autoconf, autotools-dev, texinfo, libncurses5-dev | libncurses-dev, libc6-dev-i386 [amd64 kfreebsd-amd64], gcc-4.2-multilib [amd64 kfreebsd-amd64], po-debconf +Build-Depends-Indep: texi2html +Standards-Version: 3.7.2.1 +XS-Vcs-Bzr: https://code.launchpad.net/~ubuntu-core-dev/grub/ubuntu + +Package: grub +Architecture: i386 kfreebsd-i386 hurd-i386 amd64 kfreebsd-amd64 lpia +Depends: ${shlibs:Depends}, volumeid, ucf (>= 3.004-0ubuntu2), debconf-utils +Suggests: grub-doc, mdadm +Provides: linux-boot-loader +Description: GRand Unified Bootloader + GRUB is a GPLed bootloader intended to unify bootloading across x86 + operating systems. In addition to loading the Linux kernel, + it implements the Multiboot standard, which allows for flexible loading + of multiple boot images (needed for modular kernels such as the GNU Hurd). + +Package: grub-disk +Architecture: all +Suggests: grub-doc +Depends: grub-rescue-pc +Description: GRUB bootable disk image (dummy package) + This is a dummy transitional package to handle upgrades. It can be + safely removed. + +Package: grub-doc +Section: doc +Suggests: doc-base +Architecture: all +Description: Documentation for GRand Unified Bootloader + GRUB is a GPLed bootloader intended to unify bootloading across x86 + operating systems. In addition to loading the Linux kernel, + it implements the Multiboot standard, which allows for flexible loading + of multiple boot images (needed for modular kernels such as the GNU Hurd). --- grub-0.97.orig/debian/grub-doc.doc-base.grub +++ grub-0.97/debian/grub-doc.doc-base.grub @@ -0,0 +1,14 @@ +Document: grub +Title: Grub Manual +Author: OKUJI Yoshinori +Abstract: This is the documentation of GNU GRUB, the GRand Unified Bootloader, + a flexible and powerful boot loader program for PCs. +Section: admin + +Format: HTML +Index: /usr/share/doc/grub-doc/html/grub.html +Files: /usr/share/doc/grub-doc/html/grub_*.html + +Format: info +Index: /usr/share/info/grub.info.gz +Files: /usr/share/info/grub.info.gz --- grub-0.97.orig/debian/grub.postrm +++ grub-0.97/debian/grub.postrm @@ -0,0 +1,12 @@ +#!/bin/sh + +if [ "$1" = purge ]; then + if [ -x "`which ucf 2>/dev/null`" ]; then + ucf --purge /var/run/grub/menu.lst + fi + if [ -x "`which ucfr 2>/dev/null`" ]; then + ucfr --purge grub /var/run/grub/menu.lst + fi +fi + +#DEBHELPER# --- grub-0.97.orig/debian/grub-doc.dirs +++ grub-0.97/debian/grub-doc.dirs @@ -0,0 +1,2 @@ +usr/share/doc/grub-doc/html +usr/share/bug/grub-doc --- grub-0.97.orig/debian/grub-floppy +++ grub-0.97/debian/grub-floppy @@ -0,0 +1,6 @@ +#!/bin/bash -e +cat << EOF +This program is broken, unsupported upstream, and has been deprecated in favour +of grub-mkrescue (grub-pc package). +EOF +exit 0