--- grub2-1.97~beta3.orig/debian/update-grub
+++ grub2-1.97~beta3/debian/update-grub
@@ -0,0 +1,2 @@
+#!/bin/sh -e
+exec grub-mkconfig -o /boot/grub/grub.cfg "$@"
--- grub2-1.97~beta3.orig/debian/presubj
+++ grub2-1.97~beta3/debian/presubj
@@ -0,0 +1,23 @@
+
+MAKE SURE YOU ARE RUNNING THE LATEST VERSION
+
+On i386-pc, the grub package never updates the installed version of GRUB
+automatically (the first time, it may hook itself in GRUB Legacy's menu,
+but that's all).
+
+Because of this, you need to make sure you're running the LATEST VERSION of
+GRUB before you report a bug.  Use grub-install to update it, and then check
+if the bug still applies.  Debugging problems we already fixed makes us waste
+valuable time, so please try to avoid it.
+
+IMPORTANT NOTE WHEN SUBMITING PATCHES
+
+Like many other FSF projects, GRUB upstream has specific requisites for
+accepting patches with regard to copyright assignment.  If you're going to
+submit a patch, it is likely that it will only be accepted in upstream if you're
+willing to submit your paperwork as well.
+
+Because of this, we want to avoid diverging from upstream by adding patches to
+the debian package unless we know the copyright issues can be sorted out.  We
+encourage you to submit your work to upstream directly by sending a mail to the
+GRUB maintainers <grub-devel@gnu.org>.
--- grub2-1.97~beta3.orig/debian/grub2.install
+++ grub2-1.97~beta3/debian/grub2.install
@@ -0,0 +1,2 @@
+debian/presubj		usr/share/bug/grub2
+debian/script		usr/share/bug/grub2
--- grub2-1.97~beta3.orig/debian/grub-pc.install.in
+++ grub2-1.97~beta3/debian/grub-pc.install.in
@@ -0,0 +1,3 @@
+debian/legacy/update-grub	usr/lib/grub-legacy
+debian/legacy/grub-set-default	usr/lib/grub-legacy
+debian/legacy/upgrade-from-grub-legacy	usr/sbin
--- grub2-1.97~beta3.orig/debian/grub-firmware-qemu.dirs
+++ grub2-1.97~beta3/debian/grub-firmware-qemu.dirs
@@ -0,0 +1 @@
+usr/share/qemu
--- grub2-1.97~beta3.orig/debian/changelog
+++ grub2-1.97~beta3/debian/changelog
@@ -0,0 +1,1705 @@
+grub2 (1.97~beta3-1~bpo50+1) lenny-backports; urgency=low
+
+  * lenny backport.
+    - control (Build-Depends): Do not require gcc-4.4.
+    - rules (CC): Set to `gcc' instead of `gcc-4.4'.
+
+ -- Robert Millan <rmh.debian@aybabtu.com>  Sun, 01 Nov 2009 22:19:15 +0000
+
+grub2 (1.97~beta3-1) unstable; urgency=high
+
+  * New upstream beta release.
+    - Make it more clear how to use /etc/grub.d/40_custom. (Closes: #545153)
+    - fix a serious memory corruption in the graphical subsystem.
+      (Closes: #545364, #544155, #544639, #544822, LP: #424503)
+    - patches/003_grub_probe_segfault.diff: Remove (merged).
+
+  * Change the watch file so upstream beta releases are recognized.
+  * Include /etc/default/grub in bug reports.
+  * Recommend os-prober (>= 1.32). (Closes: #491872)
+  * Change the gcc-multilib [sparc] build dependency to gcc-4.4-multilib
+    [sparc].
+  * patches/907_grub.cfg_400.diff: New patch to make grub.cfg again mode
+    444 if it does not contain a password line.
+  * Use `su' in the bug reporting script to read grub.cfg in case the user
+    is not allowed to read it.
+  * Readd grub-pc/kopt-extracted template.
+
+  [ Updated translations ]
+  * Brazilian Portuguese (pt_BR.po) by Flamarion Jorge.
+  * Japanese (ja.po) by Hideki Yamane. (Closes: #545331)
+  * Spanish (es.po) by Francisco Javier Cuadrado. (Closes: #545566)
+  * Italian (it.po) by Luca Monducci. (Closes: #546035)
+
+ -- Felix Zielcke <fzielcke@z-51.de>  Sat, 12 Sep 2009 15:28:20 +0200
+
+grub2 (1.97~beta2-2) unstable; urgency=low
+
+  [ Updated translations ]
+  * Dutch (nl.po) by Paul Gevers. (Closes: #545050)
+
+  [ Felix Zielcke ]
+  * Move GRUB Legacy's grub-set-default to /usr/lib/grub-legacy in
+    preparation for GRUB 2's grub-set-default.
+  * Remove password lines in bug script.
+
+  [ Robert Millan ]
+  * Do not conflict with `grub' dummy package (this prevented upgrades).
+  * patches/003_grub_probe_segfault.diff: Disable file test codepath, which
+    wasn't normally used before.
+
+ -- Felix Zielcke <fzielcke@z-51.de>  Sat, 05 Sep 2009 00:27:22 +0200
+
+grub2 (1.97~beta2-1) unstable; urgency=low
+
+  * New upstream beta release.
+    - Fix loading of FreeBSD modules. (Closes: #544305)
+
+  [ Updated translations ]
+  * French (fr.po) by Christian Perrier. (Closes: #544320)
+  * Czech (cs.po) by Miroslav Kure. (Closes: #544327)
+  * Belarusian (be.po) by Hleb Rubanau.
+  * Arabic (ar.po) by Ossama M. Khayat.
+  * Catalan (ca.po) by Juan Andrés Gimeno Crespo.
+  * Russian (ru.po) by Yuri Kozlov. (Closes: #544730)
+  * Swedish (sv.po) by Martin Ågren. (Closes: #544759)
+  * Brazilian Portuguese (pt_BR.po) by Flamarion Jorge. (Closes: #544810)
+  * German (de.po) by Helge Kreutzmann. (Closes: #544912)
+
+  [ Robert Millan ]
+  * Build with GCC 4.4.
+
+ -- Robert Millan <rmh.debian@aybabtu.com>  Fri, 04 Sep 2009 14:40:20 +0200
+
+grub2 (1.97~beta1-1) unstable; urgency=low
+
+  * New upstream beta release.
+
+  [ Updated translations ]
+  * German (de.po) by Helge Kreutzmann. (Closes: #544261)
+  * Asturian (ast.po) by Marcos.
+  * Georgian (ka.po) by Aiet Kolkhi.
+
+  [ Robert Millan ]
+  * Merge config, templates, postinst, postrm, dirs and install files
+    into a single source.
+  * Disable Linux-specific strings on GNU/kFreeBSD.  Enable translations
+    in grub2/linux_cmdline_default.  Add grub2/kfreebsd_* strings (still
+    unused).
+
+ -- Felix Zielcke <fzielcke@z-51.de>  Sun, 30 Aug 2009 18:01:40 +0200
+
+grub2 (1.96+20090829-1) unstable; urgency=low
+
+  * New SVN snapshot.
+    - Fix filesystem mapping on GNU/kFreeBSD.  (Closes: #543950)
+
+  * New grub-extras SVN snapshot.
+    - Add 915resolution support to the GMA500 (poulsbo) graphics chipset.
+      Thanks to Pedro Bulach Gapski. (Closes: #543917)
+
+  * Use `cp -p' to copy /usr/share/grub/default/grub to the temporary
+    file to preverse permissions.
+  * Remove also efiemu files from /boot/grub on purge if requested.
+  * Check that GRUB_CMDLINE_LINUX and GRUB_CMDLINUX_LINUX_DEFAULT is at
+    the start of line in *.postinst.
+  * Don't check that $GRUB_CMDLINE_LINUX{,DEFAULT} are non empty strings
+    in *.config.
+  * Add empty GRUB_CMDLINE_LINUX to /usr/share/grub/default/grub.
+  * Factorise the editing of the temporary file. Thanks to Martin F
+    Krafft.
+  * Read in /etc/default/grub in *.config files.
+
+  [ Updated translations ]
+  * French (fr.po) by Christian Perrier. (Closes: #544023)
+  * Russian (ru.po) by Yuri Kozlov. (Closes: #544077)
+  * Italian (it.po) by Luca Monducci. (Closes: #544200)
+
+ -- Felix Zielcke <fzielcke@z-51.de>  Sat, 29 Aug 2009 17:01:17 +0200
+
+grub2 (1.96+20090826-3) unstable; urgency=low
+
+  * Add missing quotes in grub-pc.config and *.postinst.
+
+ -- Felix Zielcke <fzielcke@z-51.de>  Wed, 26 Aug 2009 19:14:23 +0200
+
+grub2 (1.96+20090826-2) unstable; urgency=low
+
+  * Really use the correct templates in grub-pc.config. ARGS.
+
+ -- Felix Zielcke <fzielcke@z-51.de>  Wed, 26 Aug 2009 14:10:41 +0200
+
+grub2 (1.96+20090826-1) unstable; urgency=low
+
+  * New SVN snapshot.
+
+  * Use the right templates in grub-pc.config. (Closes: #543615)
+
+ -- Felix Zielcke <fzielcke@z-51.de>  Wed, 26 Aug 2009 11:00:36 +0200
+
+grub2 (1.96+20090825-1) unstable; urgency=low
+
+  * New SVN snapshot.
+    - Enable gfxterm only if there's a suitable video backend and don't
+      print an error if not. (Closes: #520846)
+
+  [ Felix Zielcke ]
+  * Copy unicode.pf2 instead of ascii.pf2 to /boot/grub in grub-pc
+    postinst (Closes: #542314).
+  * Update Standards version to 3.8.3.
+  * Use DEB_HOST_ARCH_CPU for the generation of the lintian overrides.
+  * Fix calling the grub-pc/postrm_purge_boot_grub template in
+    grub-pc.postinst.
+  * Handle GRUB_CMDLINE_LINUX and GRUB_CMDLINE_LINUX_DEFAULT via
+    debconf. Thanks to Martin F. Krafft and Colin Watson for idea and
+    hints.
+  * Use ucfr --force when /etc/default/grub is registered to a grub-* package.
+  * Use #!/bin/sh in *.config and fix a small bashism in grub-pc.config.
+
+  [ Robert Millan ]
+  * patches/907_terminal_output_workaround.diff: Remove.  It seems that
+    it wasn't really necessary.
+  * grub-pc.postinst: Avoid printing an error if /etc/kernel-img.conf
+    doesn't exist, because it is misleading.  We simply refrain from
+    fixing it and move along.
+  * grub-pc.postinst: Don't schedule generation of grub.cfg via "grub-install"
+    code path unless we actually run grub-install.
+  * grub-pc.postinst: Only copy unicode.pf2 and moreblue-orbit-grub.png when
+    /boot/grub/grub.cfg is scheduled to be generated.
+  * legacy/upgrade-from-grub-legacy: Reset grub-pc/install_devices.
+    Thanks Colin Watson.  (Closes: #541230)
+
+ -- Felix Zielcke <fzielcke@z-51.de>  Tue, 25 Aug 2009 21:45:24 +0200
+
+grub2 (1.96+20090808-1) unstable; urgency=low
+
+  * New SVN snapshot.
+    - Fix XFS with inode size different then 256. (Closes: #528761)
+    - Add support for multiple LVM metadata areas. (LP: #408580)
+    - patches/008_dac_palette_width.diff: Remove. (merged)
+    - Prefer unicode over ascii font. (LP: #352034)
+
+  [ Felix Zielcke ]
+  * Fix the generation of the lintian override for efiemu64.o.
+  * Remove the Conflicts dmsetup.
+  * Use ?= for setting DEB_HOST_ARCH.
+  * Document GRUB_DISABLE_LINUX_RECOVERY in /etc/default/grub.
+    (Closes: #476536 LP: #190207)
+  * Add docs/grub.cfg to examples.
+  * patches/01_uuids_and_lvm_dont_play_along_nicely.diff: Updated to
+    also disable UUIDs on LVM over RAID.
+  * Add a debconf prompt to remove all grub2 files from /boot/grub on
+    purge. (Closes: #527068, #470400)
+  * Move the Suggests: os-prober from grub-pc to grub-common. 
+  * patches/901_dpkg_version_comparison.diff: Updated.
+  * Update the Replaces on grub-common for the other packages to (<<
+    1.96+20080831-1). (Closes: #540492)
+
+  [ Robert Millan ]
+  * Reorganize grub-pc.{config,postinst} logic.  The idea being that if there's
+    no trace of GRUB Legacy, the grub-pc/install_devices template will be
+    shown even if this is the first install.
+  * When setting grub-pc/install_devices, obtain input dynamically from
+    grub-mkdevicemap (rather than devices.map). (Closes: #535525)
+  * Add a note to grub-pc/install_devices template that it's also possible
+    to install GRUB to a partition boot record.
+  * patches/002_grub.d_freebsd.in.diff: New patch.  Reimplement
+    10_freebsd.in to handle multiple kernel versions & acpi.ko.
+
+ -- Robert Millan <rmh.debian@aybabtu.com>  Mon, 10 Aug 2009 18:49:52 +0200
+
+grub2 (1.96+20090725-1) unstable; urgency=high
+
+  * New SVN snapshot.
+    - Don't add drivemap call with Windows Vista/7. It breaks Win 7.
+      (LP: #402154)
+
+  [ Felix Zielcke ]
+  * Don't build grub-efi-amd64 on hurd-i386.
+  * Change DEB_BUILD_ARCH to DEB_HOST_ARCH in the check for sparc.
+  * Don't add the lintian override for kernel.img for sparc and grub-pc.
+  * Add a lintian override for binary-from-other-architecture for
+    grub-efi-amd64 and grub-pc on i386.
+  * Use wildcards in the lintian overrides.
+  * Add a Conflicts/Replaces for all packages except grub-common.
+    (Closes: #538177)
+
+  [ Robert Millan ]
+  * 008_dac_palette_width.diff: New patch.  Fix blank screen when booting
+    Linux with vga= parameter set to a packed color mode (<= 8-bit).
+    (Closes: #535026)
+  * Set urgency=high because #535026 affects 1.96+20090709-1 which is in
+    testing now.
+  * patches/907_terminal_output_workaround.diff: Work around recent regression
+    with terminal_output command (not critical, just breaks gfxterm).
+
+ -- Robert Millan <rmh.debian@aybabtu.com>  Sat, 25 Jul 2009 19:00:53 +0200
+
+grub2 (1.96+20090721-4) unstable; urgency=low
+
+  * Place grub-ofpathname only in grub-common. (Closes: #537999)
+
+ -- Felix Zielcke <fzielcke@z-51.de>  Wed, 22 Jul 2009 13:38:24 +0200
+
+grub2 (1.96+20090721-3) unstable; urgency=low
+
+  * Don't strip kernel.img on sparc.
+  * Suggest efibootmgr on grub-efi-{amd64,ia32}.
+  * Pass --disable-grub-fstest to configure. (Closes: #537897)
+
+ -- Felix Zielcke <fzielcke@z-51.de>  Tue, 21 Jul 2009 21:46:01 +0200
+
+grub2 (1.96+20090721-2) unstable; urgency=low
+
+  * Add back Conflicts/Replaces grub.
+
+ -- Felix Zielcke <fzielcke@z-51.de>  Tue, 21 Jul 2009 11:24:45 +0200
+
+grub2 (1.96+20090721-1) unstable; urgency=low
+
+  * New SVN snapshot.
+
+  * Change License of my update-grub(8) and update-grub2(8) manpages to
+    GPL3+ to match new copyright file.
+  * Merge from Ubuntu: Don't build grub-efi-amd64 on lpia.
+  * Don't pass `--enable-efiemu' to configure. On kfreebsd-i386 it won't
+    compile and it should be now auto detected if it's compilable.
+    (Closes: #536783)
+  * Don't build grub-efi-amd64 on kfreebsd-i386. It lacks 64bit compiler
+    support.
+  * Rename the lintian override for kernel.elf to kernel.img.
+  * Strip kernel.img not kernel.elf, but not in the case of grub-pc.
+  * Rename the Conflicts/Replaces grub to grub-legacy. (Closes: #537824)
+
+ -- Felix Zielcke <fzielcke@z-51.de>  Tue, 21 Jul 2009 10:50:20 +0200
+
+grub2 (1.96+20090709-1) unstable; urgency=low
+
+  * New SVN snapshot.
+
+  * control (Build-Depends): Add gcc-multilib [sparc].
+  * copyright: Rewrite using DEP-5 format.
+  * Merge grub-extras into the package, and integrate it with GRUB's
+    build system.
+    - patches/906_grub_extras.diff
+    - rules
+    - copyright
+
+ -- Robert Millan <rmh.debian@aybabtu.com>  Thu, 09 Jul 2009 00:26:49 +0200
+
+grub2 (1.96+20090702-1) unstable; urgency=low
+
+  * New SVN snapshot.
+  * rules: Remove duplicated files in sparc64-ieee1275 port.
+  * rules: Comment out -DGRUB_ASSUME_LINUX_HAS_FB_SUPPORT=1 setting.  We'll
+    re-evaluate using it when it's more mature.  (Closes: #535026).
+
+ -- Robert Millan <rmh.debian@aybabtu.com>  Thu, 02 Jul 2009 13:23:51 +0200
+
+grub2 (1.96+20090629-1) unstable; urgency=low
+
+  * New SVN snapshot.
+    - Misc fixes in Linux loader.
+
+  * control (grub-firmware-qemu): Make it buildable only on i386/amd64.
+  * control: Add sparc (grub-ieee1275), remove remnants of ppc64.
+  * rules: Include all modules in grub-firmware-qemu build.
+
+ -- Robert Millan <rmh.debian@aybabtu.com>  Mon, 29 Jun 2009 19:22:37 +0200
+
+grub2 (1.96+20090628-1) unstable; urgency=low
+
+  * New SVN snapshot.
+  * Re-enable QEMU port.
+
+ -- Robert Millan <rmh.debian@aybabtu.com>  Sun, 28 Jun 2009 01:11:10 +0200
+
+grub2 (1.96+20090627-2) unstable; urgency=low
+
+  * Disable QEMU port untill it goes through NEW.
+  * Upload to unstable.
+
+ -- Robert Millan <rmh.debian@aybabtu.com>  Sat, 27 Jun 2009 18:40:17 +0200
+
+grub2 (1.96+20090627-1) experimental; urgency=low
+
+  * New SVN snapshot.
+    - Fix parsing of --output in grub-mkconfig. (Closes: #532956)
+
+  [ Felix Zielcke ]
+  * Use ucfr --force in grub-ieee1275.postinst in case we're upgrading
+    from previous version. It registered /etc/default/grub wrongly with
+    package iee1275.
+  * Drop the build dependency on libc6-dev-i386.
+  * Remove ppc64 from the Architectures. It's totally dead.
+  * Add a note to /etc/default/grub that update-grub needs to be run to
+    update grub.cfg. (Closes: #533026)
+  * Fix the svn-snapshot rule.
+  * Update Standards version to 3.8.2. No changes needed.
+
+  [ Robert Millan ]
+  * legacy/upgrade-from-grub-legacy: Invoke grub-pc.postinst directly rather
+    than dpkg-reconfigure.  Since we pretend we're upgrading, it will DTRT.
+  * Add grub-firmware-qemu package.
+    - patches/008_qemu.diff: QEMU port (patch from upstream).
+    - control (grub-firmware-qemu): New package.
+    - rules: Add grub-firmware-qemu targets.
+    - debian/grub-firmware-qemu.dirs
+    - debian/grub-firmware-qemu.install
+  * patches/906_revert_to_linux16.diff: Remove, now that gfxpayload is
+    supported.
+
+ -- Robert Millan <rmh.debian@aybabtu.com>  Sat, 27 Jun 2009 00:46:23 +0200
+
+grub2 (1.96+20090611-1) experimental; urgency=low
+
+  * New SVN snapshot.
+
+  * Append .diff to patches/01_uuids_and_lvm_dont_play_along_nicely so
+    it gets really applied.
+  * Drop completely the build dependency on gcc-multilib.
+  * Instead of arborting in the preinst if /etc/kernel-img.conf still
+    contains /sbin/update-grub, change the file with sed. Policy allows
+    thisi, because it's not a conffile, according to Colin Watson.
+  * Change /etc/default/grub to an ucf managed file instead of dpkg
+    conffile.
+
+ -- Felix Zielcke <fzielcke@z-51.de>  Fri, 12 Jun 2009 11:46:24 +0200
+
+grub2 (1.96+20090609-1) experimental; urgency=low
+
+  * New SVN snapshot.
+    - Fix variable parsing inside strings. (Closes: #486180)
+    - Add `true' command. (Closes: #530736)
+
+  [ Robert Millan ]
+  * Split grub-efi in grub-efi-ia32 and grub-efi-amd64, both available
+    on i386 and amd64.  (Closes: #524756)
+  * Add kopensolaris-i386 to arch list.
+
+  [ Felix Zielcke ]
+  * Add a NEWS entry about the grub-efi split. 
+  * Drop the build dependency on gcc-multilib for all *i386.
+  * Change upgrade-from-grub-legacy to use `dpkg-reconfigure grub-pc' to
+    install grub2 into MBR.
+
+  [ New translations ]
+  * Catalan (ca.po) by Jordi Mallach.
+
+  [ Updated translations ]
+  * Spanish (es.po) by Francisco Javier Cuadrado. (Closes: #532407)
+
+ -- Jordi Mallach <jordi@debian.org>  Tue, 09 Jun 2009 19:21:15 +0200
+
+grub2 (1.96+20090603-1) unstable; urgency=low
+
+  * New SVN snapshot.
+
+  * Abort the install of grub-pc if /etc/kernel-img.conf still contains
+    /sbin/update-grub (Closes: #500631).
+
+ -- Felix Zielcke <fzielcke@z-51.de>  Wed, 03 Jun 2009 20:01:11 +0200
+
+grub2 (1.96+20090602-1) unstable; urgency=low
+
+  * New SVN snapshot.
+
+  [ Felix Zielcke ]
+  * Skip floopies in the grub-install debconf prompt in grub-pc postinst.
+    Patch by Fabian Greffrath. (Closes: #530848)
+
+  [ Robert Millan ]
+  * Change Vcs-Browser field to viewsvn.
+
+  [ Felix Zielcke ]
+  * Change Vcs-Svn field to point to the trunk. (Closes: #531391)
+  * patches/01_uuids_and_lvm_dont_play_along_nicely: New patch.
+    On Debian root=UUID= with lvm still doestn't work so disable it.
+    (Closes: #530357)
+  * Remove Otavio Salvador from Uploaders with his permission.
+  * add grub-pc.preinst
+
+ -- Felix Zielcke <fzielcke@z-51.de>  Wed, 03 Jun 2009 14:42:11 +0200
+
+grub2 (1.96+20090523-1) unstable; urgency=low
+
+  * New SVN snapshot.
+    - Add drivemap command, similar to grub-legacy's map command.
+      (Closes: 503630)
+    - Export GRUB_TERMINAL_INPUT in grub-mkconfig. (Closes: #526741)
+
+  [ Robert Millan ]
+  * rules: Set GRUB_ASSUME_LINUX_HAS_FB_SUPPORT=1 in CFLAGS.
+  * patches/905_setup_force.diff: Relax blocklist warnings.
+  * patches/906_revert_to_linux16.diff: Keep using linux16 for now.
+
+  [ Felix Zielcke ]
+  * patches/07_core_in_fs.diff: Updated.
+  * Remove /etc/grub.d/10_hurd on non-Hurd systems in the grub-common
+    preinst. Likewise for 10_freebsd for non kFreebsd and 10_linux on
+    kFreebsd and Hurd. (Closes: #523777)
+
+ -- Felix Zielcke <fzielcke@z-51.de>  Sat, 23 May 2009 20:05:10 +0200
+
+grub2 (1.96+20090504-1) experimental; urgency=low
+
+  * New SVN snapshot.
+    - Add support for parttool command, which can be used to hide partitions.
+      (Closes: #505905)
+    - Fix a segfault with LVM on RAID. (Closes: #520637)
+    - Add support for char devices on (k)FreeBSD. (Closes: #521292)
+    - patches/08_powerpc-ieee1275_build_fix.patch: Remove (merged).
+
+  [ Updated translations ]
+  * Basque (eu.po) by Piarres Beobide. (Closes: #522457)
+  * German (de.po) by Helge Kreutzmann. (Closes: #522815)
+
+  [ Robert Millan ]
+  * Update my email address.
+  * Remove 04_uuids_and_abstraction_dont_play_along_nicely.diff now that
+    bugs #435983 and #455746 in mdadm and dmsetup have been fixed.
+
+  [ Felix Zielcke ]
+  * Place new grub-dumpbios in grub-common.
+  * Add lpia to the archictectures to reduce the ubuntu delta.
+  * Add a manpage for the update-grub and update-grub2 stubs, written by
+    me. (Closes: #523876)
+  * Suggest genisoimage on grub-pc and grub-ieee1275, because grub-mkrescue
+    needs it to create a cd image. (Closes: #525845)
+  * Add a dependency on $(AUTOGEN_FILES) for the configure/grub-common target,
+    this is needed now that upstream removed the autogenerated files from SVN.
+  * Add `--enable-efiemu to' `./configure' flags.
+  * Add a build dependency on gcc-multilib for i386.
+  * Drop alternate build dependency on gcc-4.1 (<< 4.1.2).
+
+ -- Felix Zielcke <fzielcke@z-51.de>  Mon, 04 May 2009 21:01:22 +0200
+
+grub2 (1.96+20090402-1) experimental; urgency=low
+
+  * New SVN snapshot.
+    - Fix regression in disk/raid.c.  (Closes: #521897, #514338)
+    - Fix handling of filename string lengths in HFS.
+      (Really closes: #516458).
+  * Add myself to Uploaders.
+  * Add patch 08_powerpc-ieee1275_build_fix.patch to fix powerpc-ieee1275
+    builds which were lacking header files for kernel_elf_HEADERS. Thanks
+    Vladimir Serbinenko.
+
+ -- Jordi Mallach <jordi@debian.org>  Fri, 03 Apr 2009 20:58:37 +0200
+
+grub2 (1.96+20090401-1) experimental; urgency=low
+
+  [ Felix Zielcke ]
+  * New SVN snapshot.
+    - Pass grub's gfxterm mode to Linux kernel. (Closes: #519506)
+    - Fix ext4 extents on powerpc. (Closes: #520286)
+
+  [ Robert Millan ]
+  * Remove grub-of transitional package (Lenny had grub-ieee1275 already).
+  * Fix kopt parsing in grub-pc.config. Thanks Marcus Obst. (Closes: #514837)
+  * Add debconf template to automatically run grub-install during upgrades
+    (prior user confirmation).  (Closes: #514705)
+
+ -- Robert Millan <rmh@aybabtu.com>  Wed, 01 Apr 2009 01:19:45 +0200
+
+grub2 (1.96+20090317-1) unstable; urgency=low
+
+  * New SVN snapshot.
+    - Fix loading of files with underscore in HFS. (Closes: #516458)
+
+  * Update Standards version to 3.8.1. No changes needed.
+
+  [ Updated translations ]
+  * Brazilian Portuguese (pt_BR.po) by Flamarion Jorge. (Closes: #519417)
+
+ -- Felix Zielcke <fzielcke@z-51.de>  Tue, 17 Mar 2009 14:42:10 +0100
+
+grub2 (1.96+20090309-1) unstable; urgency=low
+
+  * New SVN snapshot.
+
+ -- Felix Zielcke <fzielcke@z-51.de>  Mon, 09 Mar 2009 10:03:13 +0100
+
+grub2 (1.96+20090307-1) unstable; urgency=low
+
+  * New SVN snapshot.
+    - Add support for /dev/md/dNNpNN mdraid devices. (Closes: #509960)
+    - Add new PF2 fontengine. (Closes: #510344)
+    - Avoid mounting ext2 partitions with backward-incompatible features.
+      (Closes: #502333)
+    - Try to avoid false positives with FAT. (Closes: #514263)
+
+  [ Felix Zielcke ]
+  * Remove build-dependency on unifont package and add one for bf-utf-source
+    package and libfreetype6-dev
+  * grub-pc.postinst: Copy new ascii.pf2 instead of old ascii.pff to /boot/grub.
+  * Add `--enable-grub-mkfont' to configure flags.
+  * Put new grub-mkfont in grub-common package.
+  * Add a dependency for ${misc:Depends} to all packages to make lintian a bit
+    more happy.
+  * Detect when grub-setup leaves core.img in filesystem, and include that
+    info in bug report templates.
+    - debian/patches/07_core_in_fs.diff
+    - debian/script
+  * Add myself to Uploads and add `DM-Upload-Allowed: yes' tag.
+
+  [ Updated translations ]
+  * Asturian (ast.po) by Marcos Alvarez Costales. (Closes: #511144)
+  * Traditional Chinese (zh_TW.po) by Tetralet. (Closes: #513918)
+  * Belarusian (be.po) by Pavel Piatruk. (Closes: #516243)
+
+ -- Felix Zielcke <fzielcke@z-51.de>  Sat, 07 Mar 2009 11:54:43 +0100
+
+grub2 (1.96+20081201-1) experimental; urgency=low
+
+  * New SVN snapshot.
+
+ -- Robert Millan <rmh@aybabtu.com>  Mon,  1 Dec 2008 00:07:31 +0100
+
+grub2 (1.96+20081120-1) experimental; urgency=low
+
+  * New SVN snapshot.
+
+  * Update to new debian theme.
+    - grub-pc.postinst: Switch to moreblue-orbit-grub.png.
+    - grub.d/05_debian_theme: Likewise.
+  * grub.d/05_debian_theme:
+      - Update to use new grub-mkconfig_lib instead of the deprecated
+        update-grub_lib.
+      - Update to check if `GRUB_TERMINAL_OUTPUT' is `gfxterm' instead of
+        `GRUB_TERMINAL'.
+
+   [ Updated translations ]
+  * Romanien (ro.po) by Eddy Petrișor. (Closes: #506039)
+
+ -- Felix Zielcke <fzielcke@z-51.de>  Thu, 20 Nov 2008 20:25:56 +0100
+
+grub2 (1.96+20081108-1) experimental; urgency=low
+
+  * New SVN snapshot.
+    - Add support for /dev/md/N style mdraid devices. (Closes: #475585)
+    - Handle LVM dash escaping. (Closes: #464215)
+    - Use case insensitive match in NTFS. (Closes: #497889)
+    - Use hd%d drive names in grub-mkdevicemap for all architectures.
+      (Closes: #465365)
+    - Handle LVM circular metadata. (Closes: #462835, #502953)
+    - Fix NULL dereference and failure paths in LVM.  Thanks Guillem Jover.
+      (Closes: #500482)
+    - Provides GRUB header files (only in grub-common).
+
+  [ Updated translations ]
+  * Dutch (nl.po) by Paul Gevers. (Closes: #500514)
+  * French (fr.po) by Christian Perrier. (Closes: #503708)
+  * Georgian (ka.po) by Aiet Kolkhi. (Closes: #503715)
+  * Czech (cs.po) by Miroslav Kure. (Closes: #503809)
+  * German (de.po) by Helge Kreutzmann. (Closes: #503841)
+  * Japanese (ja.po) by Hideki Yamane. (Closes: #503869)
+  * Italian (it.po) by Luca Monducci. (Closes: #504076)
+  * Swedish (sv.po) by Martin Ågren. (Closes: #504207)
+  * Arabic (ar.po) by Ossama Khayat. (Closes: #504254)
+  * Portuguese (pt.po) by Miguel Figueiredo. (Closes: #504280)
+  * Russian (ru.po) by Yuri Kozlov. (Closes: #504324)
+  * Finnish (fi.po) by Esko Arajärvi. (Closes: #504310)
+  * Basque (eu.po) by Piarres Beobide. (Closes: #504466)
+  * Dutch (nl.po) by Paul Gevers. (Closes: #504683)
+
+  [ Felix Zielcke ]
+  * patches/01_grub_legacy_0_based_partitions.diff: Rename to
+  * patches/903_grub_legacy_0_based_partitions.diff: this and adapt for
+    s/biosdisk.c/hostdisk.c/ rename upstream.
+  * patches/03_disable_floppies.diff
+    patches/904_disable_floppies.diff: Likewise.
+  * update-grub has been renamed to grub-mkconfig, so provide a stub for
+    compatibility.
+  * Make grub-pc/linux_cmdline debconf template translatable. (Closes: #503478)
+  * Remove ro.po and ta.po. They don't contain a single translated
+    message.
+
+  [ Robert Millan ]
+  * control: Make grub-common dependency = ${binary:Version}.
+  * default/grub: Set GRUB_CMDLINE_LINUX=quiet to syncronize with
+    default D-I settings.
+
+ -- Robert Millan <rmh@aybabtu.com>  Sat,  8 Nov 2008 13:54:10 +0100
+
+grub2 (1.96+20080831-1) experimental; urgency=low
+
+  * New SVN snapshot.
+   - patches/00_fix_double_prefix.diff: Remove (merged). (Closes: #487565)
+   - patches/00_getline.diff: Remove (merged). (Closes: #493289)
+   - Handle errors in RAID/LVM scan routine (rather than letting the upper
+     layer cope with them).  (Closes: #494501, #495049)
+   - patches/901_linux_coreboot.diff: Remove (replaced).
+   - Add support for GFXMODE variable (Closes: #493106)
+   - Skips /dev/.* in grub-probe.  (Closes: #486624)
+   - RAID code has various fixes. (Closes: #496573)
+   - Buffered file read is now used to read the background image faster.
+     (Closes: #490584)
+
+  * We are already using LZMA, because upstream includes it's own lzma encoder,
+    so drop completely the liblzo handling in control and rules files.
+
+  [ Felix Zielcke ]
+  * Remove the 1.95 partition numbering transition debconf warning
+    from grub2 package and removed it from all languages (*.po).
+    (Closes: #493744)
+  * Add a comment for the new GFXMODE in default/grub.
+  * debian/rules:
+      - Remove 2 ./configure options which it didn't understand.
+      - New grub-mkelfimage belongs to grub-common.
+  * debian/control:
+      - Change debhelper compat level to 7 and build depend on it >= 7.
+      - Remove ${misc:Depend} dependency on all packages except grub-pc which is
+        the only one using debconf.
+      - Replace deprecated ${Source-Version} with ${source:Version} for <<
+        dependency and with ${build:Version} for = ones.
+      - Remove versioned dependency of Build-Depends patchutils and cdbs,
+        because etch has newer versions then the one used.
+      - Remove dpkg-dev completely from Build-Depends because it's
+        build-essentail and a non versioned dependency results in a lintian error.
+      - Remove Conflict/Replaces pupa, it has been removed from Debian 2004.
+      - Change build-dependency of unifont-bin to unifont (>= 1:5.1.20080820),
+        it's the new package containing unifont.hex and that version to avoid
+        licensing problems (Closes: #496061)
+      - Remove Jason Thomas from Uploaders with his permission.
+  * Preserve arguments in update-grub2 stub. (Closes: #496610)
+
+  [ Updated translations ]
+  * Japanese (ja.po) by Hideki Yamane (Closes: #493347)
+
+  [ Robert Millan ]
+  * Move a few files to grub-common and remove them from the arch-
+    specific packages.
+  * patches/02_old_linux_version_comparison.diff: Replace with ...
+  * patches/901_dpkg_version_comparison.diff: ... this.
+    Use dpkg --compare-versions in update-grub. (Closes: #494158)
+  * patches/03_disable_floppies.diff: Free .drive struct member when skipping
+    floppy drives.  (Closes: #496040)
+  * patches/902_boot_blocklist_hack.diff: Support separate /boot when using
+    blocklists.  (Closes: #496820, #489287, #494589)
+
+ -- Robert Millan <rmh@aybabtu.com>  Sun, 31 Aug 2008 18:40:09 +0200
+
+grub2 (1.96+20080730-1) experimental; urgency=low
+
+  * New SVN snapshot.
+    - patches/00_fix_overflow.diff: Remove (merged).
+    - patches/00_uuid_boot.diff: Remove (merged).
+    - patches/00_raid_duped_disks.diff: Remove (merged).
+    - patches/00_xfs.diff: Remove (merged).
+    - patches/00_strengthen_apple_partmap_check.diff: Remove (merged).
+    - patches/00_skip_dev_dm.diff: Remove (merged).
+
+  * patches/901_linux_coreboot.diff: Implements Linux load on Coreboot
+    (patch from Coresystems).
+
+  * grub-linuxbios -> grub-coreboot rename again.
+
+ -- Robert Millan <rmh@aybabtu.com>  Wed, 30 Jul 2008 22:12:07 +0200
+
+grub2 (1.96+20080724-4) unstable; urgency=high
+
+  * patches/00_fix_overflow.diff: fix overflow with a big grub.cfg.
+    (Closes: #473543)
+
+ -- Felix Zielcke <fzielcke@z-51.de>  Tue, 29 Jul 2008 17:10:59 +0200
+
+grub2 (1.96+20080724-3) unstable; urgency=low
+
+  [ Felix Zielcke ]
+  * changed dependency for debconf to also support debconf-2.0. (Closes: #492543)
+  * patches/00_xfs.diff: Fix "out of partition" error with XFS.
+    (Closes: #436943)
+
+  [ Robert Millan ]
+  * patches/00_raid_duped_disks.diff: Do not abort when two RAID disks with
+    the same number are found.  (Closes: #492656)
+  * patches/00_strengthen_apple_partmap_check.diff: Be more strict when probing
+    for Apple partition maps (this prevents false positives on i386-pc
+    installs).  (Closes: #475718)
+
+ -- Robert Millan <rmh@aybabtu.com>  Tue, 29 Jul 2008 00:48:01 +0200
+
+grub2 (1.96+20080724-2) unstable; urgency=high
+
+  [ Felix Zielcke ]
+  * fixed lintian override for kernel.elf
+  * debian/rules: changed cvs targets to use svn
+
+  [ Robert Millan ]
+  * patches/00_skip_dev_dm.diff: Skip /dev/dm-[0-9] devices also (implicitly)
+    for RAID.  (Closes: #491977)
+  * patches/00_uuid_boot.diff: Fix cross-disk installs by using UUIDs.
+    (Closes: #492204)
+
+ -- Robert Millan <rmh@aybabtu.com>  Sat, 26 Jul 2008 01:06:07 +0200
+
+grub2 (1.96+20080724-1) unstable; urgency=high
+
+  * New SVN snapshot.
+    - Support for ext4dev extents.
+    - patches/00_speed_up_font_load.diff: Remove (merged).
+
+  [ Felix Zielcke ]
+  * upgrade-from-grub-legacy now calls update-grub if grub.cfg doestn't exist
+    and prints a big warning if it failed.
+  * Update Standards version to 3.8.0. No changes need.
+  * Added Build-Dep for po-debconf and a lintian override, to make it happy.
+
+  [ Updated translations ]
+  * Swedish (sv.po) by Martin Ågren (Closes: #492056)
+
+  [ Robert Millan ]
+  * Revert r844.  grub-coreboot is stuck on NEW, and it was too early
+    for branching.
+
+ -- Robert Millan <rmh@aybabtu.com>  Thu, 24 Jul 2008 13:27:53 +0200
+
+grub2 (1.96+20080717-1) experimental; urgency=low
+
+  * New SVN snapshot.
+    - Provides LZMA support (not yet used in the package).
+    - Fix grub-mkrescue manpage generation.  (Closes: #489440)
+
+  * Rename grub-linuxbios to grub-coreboot (and leave a dummy grub-linuxbios
+    package to handle upgrades).
+
+  [ Updated translations ]
+  * Spanish (es.po) by Maria Germana Oliveira Blazetic  (Closes: #489877)
+  * Portuguese (pt.po) by Ricardo Silva  (Closes: #489807)
+
+ -- Robert Millan <rmh@aybabtu.com>  Sat, 12 Jul 2008 17:47:09 +0200
+
+grub2 (1.96+20080704-2) unstable; urgency=high
+
+  * patches/02_old_linux_version_comparison.diff: Set interpreter to /bin/bash.
+    (Closes: #489426, #489446)
+
+ -- Robert Millan <rmh@aybabtu.com>  Mon,  7 Jul 2008 15:17:58 +0200
+
+grub2 (1.96+20080704-1) unstable; urgency=high
+
+  * New SVN snapshot.
+  * default/grub: Add commented example to disable graphical terminal.
+  * Use substvars to support linking with liblzo1.
+  * Bring 03_disable_floppies.diff to pre-r805 state.  (Closes: #488375)
+  * patches/02_old_linux_version_comparison.diff: New patch.  Steal version
+    comparison code from GRUB Legacy's update-grub.  (Closes: #464086, #489133)
+  * patches/00_speed_up_font_load.diff: New patch.  Generate font files with
+    only the needed characters.  (Closes: #476479, #477083)
+
+ -- Robert Millan <rmh@aybabtu.com>  Fri,  4 Jul 2008 21:39:07 +0200
+
+grub2 (1.96+20080626-1) unstable; urgency=high
+
+  * New CVS snapshot.
+    - Avoids passing UUID to Linux when not using initrd.  (Closes: #484228)
+    - patches/04_uuids_and_abstraction_dont_play_along_nicely.diff: Resync.
+
+ -- Robert Millan <rmh@aybabtu.com>  Thu, 26 Jun 2008 16:43:48 +0200
+
+grub2 (1.96+20080621-1) unstable; urgency=high
+
+  * Urgency set to "high" because of #482688.
+  * New CVS snapshot.
+    - Fix module load hook in prepare_grub_to_access_device().
+      (Closes: #486804)
+    - Call prepare_grub_to_access_device() before accessing devices, never
+      afterwards.  (Closes: #487198)
+  * grub.d/05_debian_theme: Prefer /boot/grub over /usr for image
+    loading, since chances are it's less LVMed.
+
+ -- Robert Millan <rmh@aybabtu.com>  Sat, 21 Jun 2008 15:52:48 +0200
+
+grub2 (1.96+20080617-1) unstable; urgency=low
+
+  * New CVS snapshot.
+    - Supports IDA block devices.  (Closes: #483858)
+    - Fixes some problems in ext2/ext3.  (Closes: #485068, #485065)
+    - Uses EUID instead of UID in update-grub.  (Closes: #486043, #486039,
+      #486040, #486041).
+    - Fixes incomplete I2O device support.  Thanks Sven Mueller.
+      (Closes: #486505)
+    - Fixes recent regressions in fs/ext2.c.  (Closes: #485279)
+    - Only use UUIDs when requested device is not the same as the one
+      providing /boot.  (Closes: #486119)
+    - patches/02_libgcc_powerpc_hack.diff: Remove.  Probably not needed
+      anymore.
+    - patches/04_uuids_and_abstraction_dont_play_along_nicely.diff: Update.
+  * patches/06_olpc_prefix_hack.diff: Hardcode prefix to (sd,1) on OLPC.
+  * Refurbish 03_disable_floppy_support_in_util_biosdisk.diff into
+    03_disable_floppies.diff.
+
+ -- Robert Millan <rmh@aybabtu.com>  Tue, 17 Jun 2008 01:07:52 +0200
+
+grub2 (1.96+20080601-2) unstable; urgency=low
+
+  * 04_run_grub_mkdevicemap_when_grub_probe_fails.diff: Remove.  Argueably
+    makes grub-probe unreliable and is quite annoying.
+  * 04_uuids_and_abstraction_dont_play_along_nicely.diff: New patch.  Disable
+    UUID parameter to Linux when LVM or dmRAID is in use.  (Closes: #484228)
+    This is a workaround for bug #484297 in udev.
+
+ -- Robert Millan <rmh@aybabtu.com>  Tue,  3 Jun 2008 16:29:53 +0200
+
+grub2 (1.96+20080601-1) unstable; urgency=low
+
+  * New CVS snapshot.
+    - patches/06_backward_compat_in_uuid_support.diff: Merged.
+    - Fixes NULL pointer dereference in biosdisk.c.  (Closes: #483895, #483900)
+    - Extends UUID support for XFS and ReiserFS.
+
+ -- Robert Millan <rmh@aybabtu.com>  Sun,  1 Jun 2008 15:44:08 +0200
+
+grub2 (1.96+20080531-1) unstable; urgency=low
+
+  * New CVS snapshot.
+    - Work around BIOS bug affecting keyboard on macbooks.  (Closes: #482860)
+    - Adjust grub.d/05_debian_theme to use the new UUID-compatible API.
+    - default/grub: Add commented GRUB_DISABLE_LINUX_UUID variable.
+    - patches/06_backward_compat_in_uuid_support.diff: New.  Make update-grub
+      generate code that is compatible with older GRUB installs.
+    - util/biosdisk.c no longer complains about duplicated device.map entries.
+      (Closes: #481236)
+
+  [ Updated translations ]
+  * Galician (gl.po) by Jacobo Tarrio  (Closes: #480977)
+
+ -- Robert Millan <rmh@aybabtu.com>  Sat, 31 May 2008 00:02:54 +0200
+
+grub2 (1.96+20080512-1) unstable; urgency=low
+
+  * New CVS snapshot.
+    - Adds support for default-only Linux cmdline options.  (Closes: #460843)
+    - Supports Xen virtual block devices.  (Closes: #456777)
+    - Supports Virtio block devices.  (Closes: #479056)
+    - Supports CCISS block devices.  (Closes: #479735)
+    - Fixes handling of more LVM abnormal conditions.  (Closes: #474343,
+      #474931, #477175)
+
+  * Switch to liblzo2 now that it's GPLv3-compatible.  (Closes: #466375)
+  * grub-pc.postinst: Escape \ and / in cmdline sed invokation.
+    (Closes: #479279)
+
+  [ Updated translations ]
+  * Italian (it.po) by Luca Monducci  (Closes: #480740)
+
+ -- Robert Millan <rmh@aybabtu.com>  Mon, 12 May 2008 17:46:38 +0200
+
+grub2 (1.96+20080429-1) unstable; urgency=high
+
+  * New CVS snapshot.
+    - Includes sample grub.cfg file; we use it for grub-rescue-pc.
+      (Closes: #478324)
+  * grub-common: Upgrade Replaces to << 1.96+20080426-3.  (Closes: #478224,
+    #478353, #478144)
+
+  [ Updated translations ]
+  * French (fr.po) by Christian Perrier  (Closes: #471291)
+
+ -- Robert Millan <rmh@aybabtu.com>  Tue, 29 Apr 2008 13:27:52 +0200
+
+grub2 (1.96+20080426-1) unstable; urgency=high
+
+  * New CVS snapshot.
+    - Fixes syntax error when setting GRUB_PRELOAD_MODULES.  (Closes: #476517)
+  * Move os-prober to Suggests, to avoid trouble with #476184.
+    (Closes: #476684)
+  * patches/04_run_grub_mkdevicemap_when_grub_probe_fails.diff: New patch,
+    does what its name says.  (Closes: #467127)
+    - Also move grub-mkdevicemap from grub-pc to grub-common, so that GRUB
+      Legacy can use it.
+
+  [ Updated translations ]
+  * Basque (eu.po) by Piarres Beobide  (Closes: #476708)
+
+ -- Robert Millan <rmh@aybabtu.com>  Sat, 26 Apr 2008 20:06:55 +0200
+
+grub2 (1.96+20080413-1) unstable; urgency=high
+
+  * New CVS snapshot.
+    - Provides 30_os-prober update-grub add-on.  Thanks Fabian Greffrath.
+      (Closes: #461442)
+    - Improves robustness when handling LVM.
+      (Closes: #474931, #474343)
+  * patches/03_disable_floppy_support_in_util_biosdisk.diff: New.  Does
+    what its name says.  (Closes: #475177)
+
+ -- Robert Millan <rmh@aybabtu.com>  Sun, 13 Apr 2008 13:53:28 +0200
+
+grub2 (1.96+20080408-1) unstable; urgency=low
+
+  * New CVS snapshot.
+    - grub-probe skips non-existant devices when processing device.map.
+    (Closes: #473209)
+  * control: Fix syntax error.
+
+  [ Updated translations ]
+  * Finnish (fi.po) by Esko Arajärvi (Closes: #468641)
+
+ -- Robert Millan <rmh@aybabtu.com>  Tue,  8 Apr 2008 15:45:25 +0200
+
+grub2 (1.96+20080228-1) unstable; urgency=low
+
+  * New CVS snapshot.
+  * Split grub-probe into grub-common package.  Make all flavours depend on it.
+    (Closes: #241972)
+  * Suggest multiboot-doc.
+  * patches/01_grub_legacy_0_based_partitions.diff: New patch.  Add a hack that
+    tells grub-probe you want 0-based partition count
+    (GRUB_LEGACY_0_BASED_PARTITIONS variable)
+  * Stop depending on lsb-release (too heavy! we don't need python in base).
+    Instead of assuming it's there, try calling it and otherwise just echo
+    Debian.
+
+ -- Robert Millan <rmh@aybabtu.com>  Thu, 28 Feb 2008 16:43:40 +0100
+
+grub2 (1.96+20080219-3) unstable; urgency=low
+
+  * default/grub: Use lsb_release to support Debian derivatives.
+    (Closes: #466561)
+  * grub.d/05_debian_theme: Only setup background image when a reader for it
+    is present in /boot/grub.  (Closes: #467111)
+
+  [ Updated translations ]
+  * Russian (ru.po) by Yuri Kozlov (Closes: #467181)
+
+ -- Robert Millan <rmh@aybabtu.com>  Sun, 24 Feb 2008 15:39:50 +0100
+
+grub2 (1.96+20080219-2) unstable; urgency=high
+
+  * grub-pc.postinst: Create /boot/grub if it doesn't exist.
+
+ -- Robert Millan <rmh@aybabtu.com>  Wed, 20 Feb 2008 07:15:14 +0100
+
+grub2 (1.96+20080219-1) unstable; urgency=high
+
+  * New CVS snapshot.
+    - Improves GPT support, allowing it to work without blocklists.
+
+ -- Robert Millan <rmh@aybabtu.com>  Tue, 19 Feb 2008 15:05:10 +0100
+
+grub2 (1.96+20080216-1) unstable; urgency=high
+
+  * New CVS snapshot.
+    - Fixes offset calculation issue when installing on GPT (urgency set
+      to high because of this).
+  * Fix Vcs-Browser tag.  Thanks James.  (Closes: #465697)
+  * Only process grub-pc/linux_cmdline if /boot/grub/menu.lst exists.
+    (Closes: #465708)
+
+  [ Updated translations ]
+  * French (fr.po) by Christian Perrier  (Closes: #465706)
+
+ -- Robert Millan <rmh@aybabtu.com>  Sat, 16 Feb 2008 23:30:55 +0100
+
+grub2 (1.96+20080213-1) unstable; urgency=low
+
+  * New CVS snapshot.
+    - Failure to read one device in a RAID-1 array no longer causes boot
+      to fail (so long as there's a member that works).  (Closes: #426341)
+  * script: For /proc/mounts, only report lines that start with /dev/.
+  * Add new upgrade-from-grub-legacy script for the user to complete the upgrade
+    process from GRUB Legacy, and advertise it prominently in menu.lst.
+    (Closes: #464912)
+  * Add a hack to support gfxterm / background_image on systems where /usr
+    isn't accessible.  (Closes: #464911, #463144)
+    - grub-pc.postinst
+    - grub.d/05_debian_theme
+  * Fix a pair of spelling mistakes in debconf.  (Closes: #465296)
+  * Migrate kopt from menu.lst.  (Closes: #461164, #464918)
+
+  [ Updated translations ]
+  * Portuguese (pt.po) by Ricardo Silva (Closes: #465137)
+  * German (de.po) by Helge Kreutzmann (Closes: #465295)
+
+ -- Robert Millan <rmh@aybabtu.com>  Wed, 13 Feb 2008 16:37:13 +0100
+
+grub2 (1.96+20080210-1) unstable; urgency=high
+
+  * New CVS snapshot.
+    - Errors that cause GRUB to enter rescue mode are displayed now.
+      (Closes: #425149)
+    - Build LVM/RAID modules into a few commands that were missing them
+      (notably, grub-setup).  (Closes: #465033)
+  * Fix license violation (incompatibility between GRUB and LZO2).
+    (Closes: #465056)
+    - Urgency set to high.
+    - control: Move liblzo2-dev from Build-Depends to Build-Conflicts
+      (leaving liblzo-dev as the only option).
+
+ -- Robert Millan <rmh@aybabtu.com>  Sun, 10 Feb 2008 17:09:15 +0100
+
+grub2 (1.96+20080209-1) unstable; urgency=low
+
+  * New CVS snapshot.
+    - Fix a root device setting issue in grub-setup.  (Closes: #463391)
+    - Fix partmap detection under LVM/RAID.
+    - Add scripting commands that would allow user to implement hiddenmenu-like
+      functionality (http://grub.enbug.org/Hiddenmenu).
+    - Provide manpages for grub-setup, grub-emu, grub-mkimage and others.
+      (Closes: #333516, #372890)
+  * Fix a pair of spelling errors in debconf templates.  Thanks Christian
+    Perrier.  (Closes: #464133)
+  * Run debconf-updatepo.  (Closes: #463918)
+  * Lower base-files versioned dependency to >= 4.0.1~bpo40+1.
+
+ -- Robert Millan <rmh@aybabtu.com>  Sat,  9 Feb 2008 13:43:49 +0100
+
+grub2 (1.96+20080203-1) unstable; urgency=low
+
+  * New CVS snapshot (and release, but we skipped that ;-))
+    - patches/01_regparm.diff: Delete.
+    - Improved XFS support.
+    - util/grub.d/00_header.in: Add runtime error detection (for gfxterm).
+    - Fixes problem when chainloading to Vista.
+  * Fix po-debconf errors.  Thanks Thomas Huriaux.  (Closes: #402972)
+  * grub.d/05_debian_theme:
+    - Add runtime error detection.
+    - Detect/Enable PNG background when it is present.
+  * control (grub-ieee1275): Remove versioned dependency on powerpc-ibm-utils.
+
+ -- Robert Millan <rmh@aybabtu.com>  Sun,  3 Feb 2008 19:31:23 +0100
+
+grub2 (1.95+20080201-1) unstable; urgency=low
+
+  * New CVS snapshot.
+  * presubj: Improve notice.
+  * patches/01_regparm.diff: Fix CPU context corruption affecting fs/xfs.c.
+    (Closes: #463081, #419766, #462159)
+  * patches/02_libgcc_powerpc_hack.diff: Fix FTBFS on powerpc. (Closes: #457491)
+  * patches/disable_xfs.diff: Actually remove this time...
+
+ -- Robert Millan <rmh@aybabtu.com>  Fri,  1 Feb 2008 17:06:00 +0100
+
+grub2 (1.95+20080128-1) unstable; urgency=low
+
+  * New CVS snapshot.
+    - Fixes bogus CLAIM problems on Apple firmware.  (Closes: #449135, #422729)
+    - grub-probe performs sanity checks to make sure our filesystem drivers
+      are usable.  (Closes: #462449)
+    - patches/disable_ata.diff: Remove.  ATA module isn't auto-loaded in
+      rescue floppies now.
+    - patches/disable_xfs.diff: Remove.  See above (about grub-probe).
+  * Bring back grub-emu; it can help a lot with debugging feedback.
+    - control
+    - rules
+
+ -- Robert Millan <rmh@aybabtu.com>  Mon, 28 Jan 2008 00:01:11 +0100
+
+grub2 (1.95+20080116-2) unstable; urgency=low
+
+  * grub.d/05_debian_theme: Enable swirlish beauty.
+  * rules: Obtain debian/legacy/update-grub dynamicaly from GRUB Legacy svn.
+
+ -- Robert Millan <rmh@aybabtu.com>  Sat, 19 Jan 2008 13:16:18 +0100
+
+grub2 (1.95+20080116-1) unstable; urgency=low
+
+  * New CVS snapshot.
+    - update-grub ignores stale *.dpkg-* files.  (Closes: #422708, #424223)
+    - LVM/RAID now working properly (except when it affects /boot).
+      (Closes: #425666)
+    - Fixes flickery in timeout message.  (Closes: #437275)
+  * grub-pc.postinst: Use `--no-floppy' whenever possible.  Die, floppies,
+    die!
+  * Resync with latest version of GRUB Legacy's update-grub.  This time,
+    using the $LET_US_TRY_GRUB_2 hack to reuse the same script both for
+    addition of core.img and its removal.
+  * grub-*.install: Add update-grub2 stub.  Packages providing /etc/grub.d/
+    scripts should invoke update-grub2 in both postinst and postrm (whenever
+    it is found, of course).
+  * control: Reorganize a bit, including a complete rewrite of the
+    package descriptions.
+  * control (grub-ieee1275): Enable for i386/amd64.
+
+ -- Robert Millan <rmh@aybabtu.com>  Wed, 16 Jan 2008 15:00:54 +0100
+
+grub2 (1.95+20080107-1) unstable; urgency=low
+
+  * New CVS snapshot.
+    - Supports ReiserFS.  (Closes: #430742)
+    - patches/disable_ata.diff: Resync.
+
+ -- Robert Millan <rmh@aybabtu.com>  Mon,  7 Jan 2008 12:46:39 +0100
+
+grub2 (1.95+20080105-2) unstable; urgency=low
+
+  * grub-pc.postinst: Fix covered assumption that menu.lst exists.
+    (Closes: #459247)
+  * copyright: Fix copyright/license reference.
+
+ -- Robert Millan <rmh@aybabtu.com>  Sun,  6 Jan 2008 18:02:28 +0100
+
+grub2 (1.95+20080105-1) unstable; urgency=low
+
+  * New CVS snapshot.
+    - Fixes install on non-devfs systems with devfs-style paths (ouch).
+      (Closes: #450709).
+    - Fixes boot of "Linux" zImages (including memtest86+).  (Closes: #436113).
+    - Corrects usage message in grub-setup.  (Closes: #458600).
+    - patches/menu_color.diff: Remove.  Made obsolete by `menu_color_normal'
+      and `menu_color_highlight' variables.  Add/install grub.d/05_debian_theme
+      to make use of them.
+  * Reestructure grub-pc.postinst.  Notably:
+    - Do not touch menu.lst unless user has confirmed it (via debconf).
+      (Closes: #459247)
+    - When we do, keep a backup in /boot/grub/menu.lst_backup_by_grub2_postinst.
+
+ -- Robert Millan <rmh@aybabtu.com>  Sat,  5 Jan 2008 17:55:37 +0100
+
+grub2 (1.95+20080101-1) unstable; urgency=low
+
+  * New CVS snapshot.
+    - patches/disable_xfs.diff: Rewrite in a way that won't collide with
+      upstream changes so often.
+    - unifont.hex now processed by upstream.
+      - rules: Disable build of unifont.pff.
+      - *.install: Remove build/unifont.pff line.
+    - patches/menu_color.diff: Change menu color to our traditional blue theme.
+  * Support new dpkg fields (Homepage, Vcs-Svn, Vcs-Browser).
+  * patches/disable_ata.diff: Prevent ATA module from being built on i386-pc.
+
+ -- Robert Millan <rmh@aybabtu.com>  Tue,  1 Jan 2008 19:45:30 +0100
+
+grub2 (1.95+20071101-1) unstable; urgency=low
+
+  * New CVS snapshot.
+    - patches/linuxbios.diff: Remove (supported in upstream now).
+
+ -- Robert Millan <rmh@aybabtu.com>  Thu,  1 Nov 2007 13:18:51 +0100
+
+grub2 (1.95+20071004-2) unstable; urgency=low
+
+  * Rename debian/grub-of.* to debian/grub-ieee1275.*.
+  * Add debian/grub-linuxbios.{postinst,dirs,install}.
+  * rules: Fix/Overrride lintian warnings (unstripped-binary-or-object).
+  * Remove grub-linuxbios.postinst.
+
+ -- Robert Millan <rmh@aybabtu.com>  Wed, 10 Oct 2007 23:56:35 +0200
+
+grub2 (1.95+20071004-1) unstable; urgency=low
+
+  * New CVS snapshot.
+  * Add grub-linuxbios package.
+    - patches/linuxbios.diff
+    - control
+    - rules
+  * Rename grub-of to grub-ieee1275 to match with upstream conventions.
+    - control
+    - rules
+
+ -- Robert Millan <rmh@aybabtu.com>  Thu,  4 Oct 2007 14:42:30 +0200
+
+grub2 (1.95+20070829-1) unstable; urgency=low
+
+  * New CVS snapshot.
+    - Includes fix for parallel builds.
+  * rules: Append -j flag to $(MAKE) to take advantage of >1 processors.
+  * Add reference to /usr/share/common-licenses.
+    - debian/copyright
+    - debian/control (all packages): Add base-files (>= 4.0.1) dependency.
+
+ -- Robert Millan <rmh@debian.org>  Sat,  1 Sep 2007 19:00:22 +0200
+
+grub2 (1.95+20070828-2) unstable; urgency=low
+
+  * control (grub-of): Make depends on powerpc-ibm-utils versioned as
+    >= 1.0.6 (older versions don't have -a flag).
+
+ -- Robert Millan <rmh@debian.org>  Tue, 28 Aug 2007 23:32:32 +0200
+
+grub2 (1.95+20070828-1) unstable; urgency=low
+
+  * New CVS snapshot.
+    - Adds ntfs support.
+    - Fixes a pair of issues indirectly breaking grub-probe on powerpc.
+      (Closes: #431488)
+    - patches/disable_xfs.diff: Resync.
+    - copyright: License upgraded to GPLv3.
+  * control (grub-of Depends): Add powerpc-utils (for nvsetenv) and bc.
+
+ -- Robert Millan <rmh@debian.org>  Tue, 28 Aug 2007 21:24:14 +0200
+
+grub2 (1.95+20070626-1) unstable; urgency=low
+
+  * New CVS snapshot.
+    - More fixes to cope with unreadable /.  (Closes: #427289)
+    - update-grub supports multiple terminals.
+  * control (Build-Depends): Add genisoimage.
+  * patches/partmap_fallback.diff: Remove.  It didn't archieve anything as
+    it also needs support for proper identification of raid / lvm (this is
+    being worked on).
+  * patches/disable_xfs.diff: Disable xfs in grub-probe.
+  * grub-rescue-pc.README.Debian: New.  Explain how to use the rescue
+    images.
+
+ -- Robert Millan <rmh@debian.org>  Tue, 26 Jun 2007 08:39:14 +0200
+
+grub2 (1.95+20070614-1) unstable; urgency=low
+
+  * New CVS snapshot.
+    - update-grub is tollerant to unreadable / (as long as /boot is
+    accessible). (Closes: #427289)
+  * grub-pc.postinst: Generate new grub.cfg when menu.lst exists.
+  * New package grub-rescue-pc.
+    - control: Add it.
+    - README.Debian.in: Remove obsolete documentation.
+    - rules: Build rescue images using grub-mkrescue.
+    - grub-rescue-pc.dirs: Prepare their directory.
+    - grub-rescue-pc.install: Install them.
+  * legacy/update-grub: Fix core.img detection on separate /boot.
+
+ -- Robert Millan <rmh@debian.org>  Thu, 14 Jun 2007 08:17:21 +0200
+
+grub2 (1.95+20070604-1) unstable; urgency=low
+
+  * New CVS snapshot.
+    - patches/grub_probe_for_everyone.diff: Remove (merged).
+    - update-grub exports user-defined GRUB_CMDLINE_LINUX.  (Closes: #425453)
+    - Fix those nasty powerpc bugs.  (Closes: #422729)
+
+ -- Robert Millan <rmh@aybabtu.com>  Mon,  4 Jun 2007 21:30:55 +0200
+
+grub2 (1.95+20070520-1) unstable; urgency=low
+
+  * New CVS snapshot.
+    - LVM / RAID fixes.  (Closes: #423648, #381150)
+    - Fix memory management bug.  (Closes: #423409)
+    - patches/efi.diff: Remove (merged).
+    - patches/grub_probe_for_everyone.diff: Use the new paths for
+      util/grub-probe.c, util/biosdisk.c, util/getroot.c.  Enable
+      grub-mkdevicemap.  (Closes: #424985)
+  * legacy/update-grub: Get rid of all grub-set-default calls.  (Closes: #425054)
+  * grub-{pc,efi,of}.postinst: Only run update-grub if grub.cfg already exists.
+  * grub-pc.postinst: Only run GRUB Legacy compat stuff if menu.lst is found.
+  * patches/partmap_fallback.diff: New.  Implement fallback "pc gpt" for partmap
+    detection failures.  (Closes: #423022)
+  * control: Update XS-Vcs-* fields.  Thanks Sam Morris <sam@robots.org.uk>.
+    (Closes: #425146)
+  * grub-{pc,efi,of}.{dirs,postinst}: Move unifont.pff to /usr/share/grub.
+
+ -- Robert Millan <rmh@aybabtu.com>  Sun, 20 May 2007 11:13:03 +0200
+
+grub2 (1.95+20070515-1) unstable; urgency=low
+
+  * New CVS snapshot.
+    - Fix assumptions about /, /boot and /boot/grub being the same device.
+    (Closes: #423268, #422459)
+    - Proper sorting of Linux images.  (Closes: #422580)
+    - update-grub lets /etc/default/grub override its variables now.
+    (Closes: #423649)
+    - update-grub mentions /etc/default/grub in the grub.cfg header.
+    (Closes: #423651)
+    - update-grub sets 800x600x16 as the default gfxmode.  (Closes: #422794)
+    - update-grub runs grub-mkdevicemap before attempting to use grub-probe
+    (part of #423217)
+
+  [ Otavio Salvador ]
+  * Add support to DEB_BUILD_OPTIONS=noopt. Thanks to Sam Morris
+    <sam@robots.org.uk> for the patch. (Closes: #423005)
+  * Add Robert Millan as uploader.
+  * Change build-dependency from liblzo-dev to liblzo2-dev. (Closes: #423358)
+
+  [ Robert Millan ]
+  * grub-pc.postinst:
+    - Remove /boot/grub/device.map before running grub-install.
+      (Closes: #422851)
+    - Always run update-grub after grub-install. (part of #423217)
+    - Use grub-mkdevicemap instead of removing device.map, since update-grub
+      needs it but grub-install is not run unconditionaly.
+    - Redirect grub-install invocation to /dev/null, since it can mislead
+      users into thinking that MBR was overwritten.  (part of #423217)
+  * default/grub: Stop exporting the variables (update-grub does that now).
+  * Misc EFI fixes, including new grub-install.
+    - patches/efi.diff: New.
+    - patches/grub_probe_for_everyone.diff: Move some bits to efi.diff.
+    - grub-efi.install: Stop installing dummy grub-install.
+    - grub-install: Remove.
+  * grub-pc.postinst: Avoid generating core.img when menu.lst is not present,
+    to avoid duplicated work (this is specialy important for d-i).  (part of
+    #423217).
+  * See multiple references above.  (Closes: #423217)
+  * grub-{pc,efi,of}.{dirs,install}: Install presubj in the right directory
+    to make it work again (oops).
+  * Add reportbug script to gather debugging information.  (Closes: #423218)
+    - script: New.
+    - grub-{pc,efi,of}.install: Install it.
+  * Install the reportbug scripts for grub2 too, since users might still use
+    it for bugfiling.
+    - grub2.dirs
+    - grub2.install
+  * Fix some lintian warnings.
+    - control (grub2): Depend on debconf.
+    - README.Debian.in: Fix mispell.
+    - grub2.templates: Remove extra dot.
+
+ -- Robert Millan <rmh@aybabtu.com>  Tue, 15 May 2007 22:08:53 +0200
+
+grub2 (1.95+20070507-1) unstable; urgency=low
+
+  [ Robert Millan ]
+  * New CVS snapshot.
+    - patches/build_neq_src.diff: Remove (merged).
+  * Fix debhelper files to ensure each package gets the right thing.
+  * Enable gfxterm/unifont support.
+  * On grub-pc, if there's no core.img setup, create one (but do not
+    risk writing to MBR).
+  * On grub-pc, if menu.lst is found, regenerate it to include our
+    core.img.
+
+  [ Otavio Salvador ]
+  * Move debian/update-grub to debian/legacy/update-grub otherwise the
+    source gets messy.
+
+ -- Otavio Salvador <otavio@ossystems.com.br>  Mon, 07 May 2007 18:48:14 -0300
+
+grub2 (1.95+20070505.1-3) unstable; urgency=low
+
+  * Split postinst into grub2.postinst (with the transition warning) and
+    postinst.in, with update-grub invocation for grub-{pc,efi,of}.
+    - postinst.in
+    - grub2.postinst
+    - rules
+
+ -- Robert Millan <rmh@aybabtu.com>  Sun,  6 May 2007 01:20:04 +0200
+
+grub2 (1.95+20070505.1-2) unstable; urgency=low
+
+  * Add EFI build of GRUB.
+  - control: Restructure to provide 3 packages: grub-pc (x86),
+    grub-efi (x86) and grub-of (powerpc).
+  - rules: Handle a separate build for each package.
+  - patches/build_neq_src.diff: Fix builddir == srcdir assumptions.
+  - patches/grub_probe_for_everyone.diff: New (superceds
+    powerpc_probe.diff).  Enable grub-probe on powerpc and i386-efi.
+  - grub-install: Dummy informational grub-install for EFI.
+  - grub-efi.install: Installs it.
+
+ -- Robert Millan <rmh@aybabtu.com>  Sun,  6 May 2007 00:23:56 +0200
+
+grub2 (1.95+20070505.1-1) unstable; urgency=low
+
+  * New CVS snapshot.
+  * patches/powerpc_probe.diff: Add partmap/gpt.c to grub-probe.
+  * control (Architecture): Temporarily disable powerpc.  Sorry, but runtime
+    is currently broken and we don't have the hardware to debug it.  Will be
+    re-enabled in next upload.
+
+ -- Robert Millan <rmh@aybabtu.com>  Sat,  5 May 2007 21:52:49 +0200
+
+grub2 (1.95+20070505-1) unstable; urgency=low
+
+  * New CVS snapshot.
+    - Improved grub.cfg parser.  (Closes: #381215)
+    - patches/fix-grub-install.diff: Remove (merged).
+    - control (Build-Depends): Remove libncurses5-dev (no longer needed).
+    - provides update-grub2.  (Closes: #419151)
+    - Supports GPT in PC/BIOS systems.  (Closes: #409073)
+  * control (Build-Depends): Add gcc-multilib to fix FTBFS.
+  * control (Description): Make it less scary, and more informative.
+  * postinst: Run update-grub to ensure the latest improvements always are
+    applied.
+  * patches/powerpc_probe.diff: Attempt at making grub-probe build/install
+    on powerpc (and hopefuly update-grub).
+
+ -- Robert Millan <rmh@aybabtu.com>  Sat,  5 May 2007 01:49:07 +0200
+
+grub2 (1.95-5) unstable; urgency=low
+
+  * Fix FTBFS on kFreeBSD. Thanks to Aurelien Jarno <aurel32@debian.org>
+    by providing the patch. Closes: #416408
+
+ -- Otavio Salvador <otavio@ossystems.com.br>  Fri, 30 Mar 2007 19:20:48 -0300
+
+grub2 (1.95-4) unstable; urgency=low
+
+  * Fix powerpc grub-install binary path. Closes: #402838
+
+ -- Otavio Salvador <otavio@ossystems.com.br>  Thu, 22 Mar 2007 23:45:56 -0300
+
+grub2 (1.95-3) unstable; urgency=low
+
+  [ Christian Perrier ]
+  * Switch to po-debconf for debconf templates. Closes: #402972
+  * Depend on ${misc:Depends} and not "debconf" to allow cdebconf to be used
+  * Debconf translations:
+    - French
+    - Czech. Closes: #413327
+    - Galician. Closes: #413323
+    - Swedish. Closes: #413325
+    - Portuguese. Closes: #413332
+    - German. Closes: #413365
+    - Tamil. Closes: #413478
+    - Russian. Closes: #413542
+    - Italian. Closes: #413904
+    - Romanian. Closes: #414443
+
+ -- Otavio Salvador <otavio@ossystems.com.br>  Tue, 20 Mar 2007 23:46:38 -0300
+
+grub2 (1.95-2) unstable; urgency=low
+
+  [ Robert Millan ]
+  * update-grub: Fix for Xen hypervisor entries, thanks Aaron Schrab.
+    (Closes: #394706)
+  * Transition to new numbering scheme for partitions. (Closes: #395019)
+    - update-grub: Don't substract 1 when converting partition device names to
+      grub drives.
+    - Add debconf warning explaining the situation.
+  * Rewrite Architecture line back to hardcoded list :(.  (Closes: #398060)
+
+ -- Otavio Salvador <otavio@debian.org>  Mon, 11 Dec 2006 05:08:41 -0200
+
+grub2 (1.95-1) unstable; urgency=low
+
+  * New upstream release.
+    - patches/03_revert_partition_numbering.diff: Delete (obsoleted).
+
+ -- Robert Millan <rmh@aybabtu.com>  Sat, 14 Oct 2006 21:19:21 +0200
+
+grub2 (1.94+20061003-1) unstable; urgency=high
+
+  * New CVS snapshot.
+
+  [ Otavio Salvador ]
+  * Change debhelper compatibility mode to 5:
+    - debian/compat: setted to 5;
+  * control (Build-Depends): Add lib32ncurses5-dev for ppc64.
+    Closes: #389873
+  * Set urgency=high since it's experimental stuff and tagged likewise. It
+    also solved a serious bug on PowerPC that leave users with a black
+    screen.
+
+  [ Robert Millan ]
+  * control (Depends):  Add powerpc-ibm-utils for powerpc/ppc64.
+    (Closes: #372186)
+
+ -- Otavio Salvador <otavio@debian.org>  Tue,  3 Oct 2006 16:49:32 -0300
+
+grub2 (1.94+20060926-1) unstable; urgency=high
+
+  * New CVS snapshot.
+    - Command-line editting fix (Closes: #381214).
+    - Fixes runtime breakage on amd64 (not in BTS).
+    - Delete a few patches (merged).
+
+  [ Robert Millan ]
+  * Set urgency=high.  Might seem like a rush, but it can't possibly be worse than
+    1.94-5 (broken on systems that use udev, broken on amd64...).
+  * Pure ppc64 support.
+    - control (Architecture): Add any-ppc64.
+    - control (Build-Depends): Add libc6-dev-powerpc [ppc64].
+  * rules: Remove moddep.lst install command (no longer needed).
+  * patches/03_revert_partition_numbering.diff:  New.  Revert a commit that
+    broke grub-probefs.
+  * Add bug template to encourage sending upstream stuff directly to
+    upstream.
+    - presubj: New.
+
+  [ Otavio Salvador ]
+  * Add XS-X-Vcs-Svn on control file and point it to our current svn
+    repository.
+  * Add cvs-snapshot to rules.
+
+ -- Otavio Salvador <otavio@debian.org>  Tue, 26 Sep 2006 16:14:36 -0300
+
+grub2 (1.94-6) unstable; urgency=low
+
+  [ Robert Millan ]
+  * update-grub:  Set interpreter to /bin/bash to cope with non-POSIX
+    extensions.  (mentioned in #361929)
+  * patches/03_avoid_recursing_into_dot_static.diff:  New.  Avoid recursing into
+    dotdirs (e.g. ".static").
+  * patches/04_mkdevicemap_dont_assume_floppies.diff:  New.  Don't assume
+    /dev/fd0 exists when generating device.map.
+
+ -- Otavio Salvador <otavio@debian.org>  Thu, 14 Sep 2006 16:07:30 -0300
+
+grub2 (1.94-5) unstable; urgency=low
+
+  [ Robert Millan ]
+  * control (Build-Depends): s/any-amd64/amd64 kfreebsd-amd64/g (this seems to
+    confuse buildds).
+  * 02_not_remove_menu_lst.patch: New patch.  Skip menu.lst removal in
+    grub-install.  (Closes: #372934)
+
+ -- Otavio Salvador <otavio@debian.org>  Sun, 20 Aug 2006 12:02:13 -0300
+
+grub2 (1.94-4) unstable; urgency=low
+
+  [ Otavio Salvador ]
+  * 01_fix_amd64_building.patch: dropped since it now supports amd64
+    native building.
+  * Remove convert_kernel26 usage since it's not necessary anymore and due
+    initramfs-tools changes it's bug too.
+  
+  [ Robert Millan ]
+  * Fork update-grub from grub legacy, and tweak a few commands in output to
+    make it work for grub2.
+  * Update README.Debian.in with more recent (and easier) install instructions.
+  * Add grub to Conflicts/Replaces.  Too many commands with the same name,
+    even if they don't use the same path yet (but will likely do in the
+    future, see #361929).
+  * Get rid of control.in, which I introduced in 0.6+20040805-1 and turned out
+    to be an endless source of problems (and forbidden by policy as well).
+  * Fix FTBFS on amd64. Really closes: #372548.
+
+ -- Otavio Salvador <otavio@debian.org>  Fri, 18 Aug 2006 15:38:25 -0300
+
+grub2 (1.94-3) unstable; urgency=low
+
+  * Fix FTBFS in amd64. Closes: 372548
+
+ -- Otavio Salvador <otavio@debian.org>  Sat, 10 Jun 2006 19:57:01 -0300
+
+grub2 (1.94-2) unstable; urgency=low
+
+  * Update grub images paths in README.Debian
+  * 01_fix_grub-install.patch: add to fix a problem with PowerPC
+    installation. Refs: #371069
+  * Fix FTBFS in amd64. Closes: #370803
+
+ -- Otavio Salvador <otavio@debian.org>  Fri,  9 Jun 2006 09:29:40 -0300
+
+grub2 (1.94-1) unstable; urgency=low
+
+  * New upstream release.
+    - Fix powerpc building. Closes: #370259
+    - 01_fix_grub-install.patch: merged upstream.
+    - Moved modules to /usr/lib/grub since they are architecture 
+      dependent.
+  * Leave CDBS set debhelper compatibility level.
+  * Allow amd64 build to happen. Closes: #364956
+  * Enforce building in 32bits while running in x86_64 machines.
+  * Update Standards version to 3.7.2. No changes need.
+
+ -- Otavio Salvador <otavio@debian.org>  Mon,  5 Jun 2006 12:49:09 -0300
+
+grub2 (1.93-1) unstable; urgency=low
+
+  * New upstream release.
+    - Added support to PowerPC. Closes: #357853
+    - 01_fix_grub-install.patch: rediff.
+  * Update Standards version to 3.6.2. No changes need.
+  * Start to use new dpkg architecture definition. Closes: #360134
+
+ -- Otavio Salvador <otavio@debian.org>  Sat,  1 Apr 2006 10:07:17 -0300
+
+grub2 (1.92-2) unstable; urgency=low
+
+  * Add bison on build-depends field. Closes: #346178
+  * Add more fixes in 01_fix_grub-install.patch. Closes: #346177
+
+ -- Otavio Salvador <otavio@debian.org>  Fri,  6 Jan 2006 09:48:08 -0200
+
+grub2 (1.92-1) unstable; urgency=low
+
+  * New upstream release.
+    - Add support for GPT partition table format.
+    - Add a new command "play" to play an audio file on PC.
+    - Add support for Linux/ADFS partition table format.
+    - Add support for BASH-like scripting.
+    - Add support for Apple HFS+ filesystems.
+  * 01_fix_grub-install.patch: Added. Fix grub-install to use
+    /bin/grub-mkimage instead of /sbin/grub-mkimage. Closes: #338824
+  * Do not use CDBS tarball mode anymore. Closes: #344272  
+  
+ -- Otavio Salvador <otavio@debian.org>  Thu,  5 Jan 2006 15:20:40 -0200
+
+grub2 (1.91-0) unstable; urgency=low
+
+  * New upstream release. Closes: #331211
+  * debian/watch: added.
+  * debian/control.in, debian/control: Add libncurses5-dev in
+    Build-Depends. Closes: #304638
+  * Remove Robert Millan as uploader;
+  * Add myself as uploader;
+
+ -- Otavio Salvador <otavio@debian.org>  Sat, 12 Nov 2005 16:35:18 -0200
+
+grub2 (0.6+20050203-2) unstable; urgency=low
+
+  * Disable for powerpc.  Reportedly it fails to boot.
+
+ -- Robert Millan <rmh@debian.org>  Fri,  4 Feb 2005 01:52:09 +0100
+
+grub2 (0.6+20050203-1) unstable; urgency=low
+
+  * New upstream snapshot.
+  * Install moddep.lst properly in a cpu-independant way. (Closes: #264115)
+  * Use cdbs debian/control autogeneration.
+    - Set DEB_AUTO_UPDATE_DEBIAN_CONTROL = yes.
+    - Move control to control.in.
+    - Add a @cdbs@ tag and replace Architecture with Cpu/System.
+  * control.in (Build-Depends):  Add ruby.
+
+ -- Robert Millan <rmh@debian.org>  Thu,  3 Feb 2005 22:33:39 +0100
+
+grub2 (0.6+20040805-1) unstable; urgency=low
+
+  * New upstream snapshot.
+  * Uploading to unstable so that powerpc users can be blessed by GRUB too.
+  * Use type-handling to generate dpkg arch list.
+    - control.in
+    - rules
+
+ -- Robert Millan <rmh@debian.org>  Thu,  5 Aug 2004 20:50:16 +0200
+
+grub2 (0.6+20040502-1) experimental; urgency=low
+
+  * New upstream snapshot.
+    - Fix FTBFS on powerpc.
+
+ -- Robert Millan <rmh@debian.org>  Sun,  2 May 2004 18:16:29 +0200
+
+grub2 (0.6+20040429-1) experimental; urgency=low
+
+  * New upstream snapshot.
+    - control (Architecture): Add powerpc.
+
+ -- Robert Millan <rmh@debian.org>  Thu, 29 Apr 2004 20:41:31 +0200
+
+grub2 (0.6+20031125-1) experimental; urgency=low
+
+  * New upstream snapshot.
+    - patches/multiboot.diff: Nuked.
+    - install,docs: Update directory name.
+  * control (Maintainer): Set to pkg-grub-devel mailing list.
+  * control (Uploaders): Add myself.
+  * control (Architecture): Add freebsd-i386 and netbsd-i386.
+
+ -- Robert Millan <rmh@debian.org>  Tue, 25 Nov 2003 23:48:18 +0100
+
+grub2 (0.6+20031114-1) experimental; urgency=low
+
+  * New upstream snapshot.
+    - README.Debian: s/fat/ext2/g (We now have ext2fs support).
+  * Add multiboot support, thanks to Jeroen Dekkers for his patch.
+    - patches/multiboot.diff: New.
+    - control (Architecture): Add hurd-i386 (which needed multiboot).
+  * Rename package to grub2 (to follow upstream tendency).
+    - control: Ditto.
+    - README.Debian: Likewise.
+  * Switch to tarball mode.
+    - rules: Ditto.
+    - docs: Prefix paths in order to workaround dh_installdocs bug.
+    - install: Likewise, but not because of bug (should be in rules, actualy).
+  * Fix FTBFS. (Closes: #213868)
+    - control (Build-Depends): Add autoconf.
+    - control (Build-Conflicts): Add autoconf2.13.
+
+ -- Robert Millan <rmh@debian.org>  Fri, 14 Nov 2003 13:16:12 +0100
+
+pupa (0.6+20031008-1) experimental; urgency=low
+
+  * New upstream snapshot.
+  * Uploading to experimental.
+  * debian/control: Add Jason Thomas to Uploaders.
+
+ -- Robert Millan <rmh@debian.org>  Wed,  8 Oct 2003 13:22:50 +0000
+
+pupa (0.6+20030915-1) unstable; urgency=low
+
+  * Initial Release. (Closes: #211030)
+
+ -- Robert Millan <rmh@debian.org>  Mon, 15 Sep 2003 14:58:42 +0000
--- grub2-1.97~beta3.orig/debian/install.in
+++ grub2-1.97~beta3/debian/install.in
@@ -0,0 +1,6 @@
+debian/presubj			usr/share/bug/@PACKAGE@
+debian/script			usr/share/bug/@PACKAGE@
+debian/default			usr/share/grub
+debian/grub.d			etc
+debian/update-grub2		usr/sbin
+debian/update-grub		usr/sbin
--- grub2-1.97~beta3.orig/debian/grub-pc.prerm
+++ grub2-1.97~beta3/debian/grub-pc.prerm
@@ -0,0 +1,27 @@
+#!/bin/bash -e
+
+case "$1" in
+  remove|deconfigure)
+    . /usr/share/debconf/confmodule
+    db_get grub-pc/chainload_from_menu.lst
+    if $RET && test -e /boot/grub/menu.lst ; then
+      echo "Saving menu.lst backup in /boot/grub/menu.lst_backup_by_grub2_prerm" >&2
+      cp /boot/grub/menu.lst{,_backup_by_grub2_prerm}
+      echo "Running update-grub Legacy to remove our core.img in it" >&2
+      /usr/lib/grub-legacy/update-grub 2>&1 | sed -e "s/^/    /g" >&2
+    fi
+  ;;
+  failed-upgrade|upgrade)
+  ;;
+  *)
+    echo "prerm called with unknown argument \`$1'" >&2
+    exit 1
+  ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
--- grub2-1.97~beta3.orig/debian/config.in
+++ grub2-1.97~beta3/debian/config.in
@@ -0,0 +1,47 @@
+#!/bin/sh -e
+
+case `dpkg --print-architecture` in
+  kfreebsd-*)
+    # No migration from GRUB Legacy, no Linux cmdline
+    exit 0
+  ;;
+esac
+
+. /usr/share/debconf/confmodule
+
+priority=high
+
+case @PACKAGE@ in
+  grub-pc)
+    if test -e /boot/grub/stage2 && test -e /boot/grub/menu.lst && ! test -e /boot/grub/core.img ; then
+
+      db_input high grub-pc/chainload_from_menu.lst || true
+
+      db_get grub-pc/kopt_extracted || true
+      # this check ensures we only do this once
+      if [ "$RET" = "false" ] ; then
+        kopt=`sed -ne "s/^# kopt=//p" /boot/grub/menu.lst | tr -s " " "\n" | grep -vx "\(ro\|root=[^ ]*\)"` || true
+        db_set grub2/linux_cmdline "${kopt}" || true
+        db_set grub-pc/kopt_extracted true || true
+        if [ "${kopt}" = "" ] ; then
+          # something smells bad.  give user a chance to correct it.
+          priority=high
+        else
+          # if we got something from menu.lst, it must be correct?
+          priority=medium
+        fi
+      fi
+    fi
+  ;;
+esac
+
+if test -e /etc/default/grub ; then
+  . /etc/default/grub
+
+  db_set grub2/linux_cmdline "$GRUB_CMDLINE_LINUX"
+  db_set grub2/linux_cmdline_default "$GRUB_CMDLINE_LINUX_DEFAULT"
+fi
+
+db_input ${priority} grub2/linux_cmdline || true
+db_input ${priority} grub2/linux_cmdline_default || true
+db_go
--- grub2-1.97~beta3.orig/debian/NEWS
+++ grub2-1.97~beta3/debian/NEWS
@@ -0,0 +1,12 @@
+grub2 (1.96+20090609-1) experimental; urgency=low
+
+  Before this version, grub-efi was 32bit on i386 and 64bit on amd64.
+  However, EFI can be 32bit even if you have a 64bit CPU, like in the
+  first MacBook models with Core 2 Duo released in late 2006.  Thus,
+  grub-efi has been split into grub-efi-amd64 and grub-efi-ia32 which are
+  available on both amd64 and i386.
+  
+  If you've experienced problems trying to load grub.efi, please try
+  again using the package that doesn't match your CPU's architecture.
+
+ -- Felix Zielcke <fzielcke@z-51.de>  Tue, 09 Jun 2009 19:21:15 +0200
--- grub2-1.97~beta3.orig/debian/grub-rescue-pc.dirs
+++ grub2-1.97~beta3/debian/grub-rescue-pc.dirs
@@ -0,0 +1 @@
+usr/lib/grub-rescue
--- grub2-1.97~beta3.orig/debian/postrm.in
+++ grub2-1.97~beta3/debian/postrm.in
@@ -0,0 +1,45 @@
+#!/bin/bash -e
+
+case "$1" in
+  purge)
+    rm -f /etc/default/grub
+
+    if which ucf >/dev/null ; then
+	ucf --purge /etc/default/grub
+    fi
+    if which ucfr >/dev/null ; then
+	ucfr --purge @PACKAGE@ /etc/default/grub
+    fi
+
+    case @PACKAGE@ in
+      grub-pc)
+        # debconf could have been purged
+        if [ -e /usr/share/debconf/confmodule ] ; then
+          . /usr/share/debconf/confmodule
+        fi
+
+        db_input high grub-pc/postrm_purge_boot_grub || true
+        db_go || true
+        db_get grub-pc/purge_boot_grub || true
+        if [ "$RET" = "true" ] ; then
+          rm -f /boot/grub/{grub.cfg,ascii.pf2,unicode.pf2,moreblue-orbit-grub.png,*.mod,*.lst,*.img,efiemu32.o,efiemu64.o} || true
+          rmdir --ignore-fail-on-non-empty /boot/grub || true
+        fi
+      ;;
+    esac
+
+  ;;
+  remove|upgrade|failed-upgrade|abort-upgrade|abort-install)
+  ;;
+  *)
+    echo "postrm called with unknown argument \`$1'" >&2
+    exit 1
+  ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
--- grub2-1.97~beta3.orig/debian/update-grub2
+++ grub2-1.97~beta3/debian/update-grub2
@@ -0,0 +1,2 @@
+#!/bin/sh -e
+exec update-grub "$@"
--- grub2-1.97~beta3.orig/debian/templates.in
+++ grub2-1.97~beta3/debian/templates.in
@@ -0,0 +1,29 @@
+Template: grub2/linux_cmdline
+Type: string
+_Description: Linux command line:
+ The following Linux command line was extracted from /etc/default/grub or the
+ `kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is correct,
+ and modify it if necessary.
+
+Template: grub2/linux_cmdline_default
+Type: string
+Default: quiet
+_Description: Linux default command line:
+ The following string will be used as Linux parameters for the default menu
+ entry but not for the recovery mode.
+
+# still unused
+Template: grub2/kfreebsd_cmdline
+Type: string
+_Description: kFreeBSD command line:
+ The following kFreeBSD command line was extracted from /etc/default/grub or the
+ `kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is correct,
+ and modify it if necessary.
+
+# still unused
+Template: grub2/kfreebsd_cmdline_default
+Type: string
+Default: quiet
+_Description: kFreeBSD default command line:
+ The following string will be used as kFreeBSD parameters for the default menu
+ entry but not for the recovery mode.
--- grub2-1.97~beta3.orig/debian/postinst.in
+++ grub2-1.97~beta3/debian/postinst.in
@@ -0,0 +1,120 @@
+#!/bin/bash -e
+
+merge_debconf_into_conf()
+{
+  local tmpfile; tmpfile="$1"
+  local setting; setting="$2"
+  local template; template="$3"
+
+  db_get "$template"
+  local value; value="$(echo "$RET" | sed -e 's,[$`"\@],\\&,g')"
+  if grep -q "^${setting}=" "$tmpfile"; then
+    sed -i -re "s@^(${setting}=).*@\1\"${value}\"@" "$tmpfile"
+  else
+    echo >> "$tmpfile"
+    echo "${setting}=\"${value}\"" >> "$tmpfile"
+  fi
+}
+
+case "$1" in
+  configure)
+    . /usr/share/debconf/confmodule
+
+    case @PACKAGE@ in
+      grub-pc)
+
+        if grep -q "[= ]/sbin/update-grub" /etc/kernel-img.conf 2> /dev/null ; then
+          echo -e "\n/etc/kernel-img.conf still contains /sbin/update-grub in the hooks." >&2
+          echo -e "Running sed over it to remove the /sbin/ prefix.\n" >&2
+          sed -i /etc/kernel-img.conf -e "s,\(.*\)  */sbin/update-grub$,\1 update-grub,g"
+        fi
+        mkdir -p /boot/grub
+
+        if test -e /boot/grub/device.map && ! test -e /boot/grub/core.img ; then
+          # Looks like your device.map was generated by GRUB Legacy, which
+          # used to generate broken device.map (see #422851).  Avoid the risk
+          # by regenerating it.
+          grub-mkdevicemap --no-floppy
+        fi
+      ;;
+    esac
+
+    tmp_default_grub="$(mktemp "/tmp/grub.XXXXXXXXXX")"
+    trap "rm -f ${tmp_default_grub}" EXIT
+    cp -p /usr/share/grub/default/grub ${tmp_default_grub}
+
+    merge_debconf_into_conf "$tmp_default_grub" GRUB_CMDLINE_LINUX grub2/linux_cmdline
+    merge_debconf_into_conf "$tmp_default_grub" GRUB_CMDLINE_LINUX_DEFAULT grub2/linux_cmdline_default
+
+    ucf --three-way --debconf-ok --sum-file=/usr/share/grub/default/grub.md5sum ${tmp_default_grub} /etc/default/grub
+    package="$(ucfq --with-colons /etc/default/grub | cut -d : -f 2)"
+    if echo $package | grep -q "^grub-" ; then
+      ucfr --force @PACKAGE@ /etc/default/grub
+    else
+      ucfr @PACKAGE@ /etc/default/grub
+    fi
+
+    case @PACKAGE@ in
+      grub-pc)
+
+        if test -e /boot/grub/stage2 && test -e /boot/grub/menu.lst && ! test -e /boot/grub/core.img ; then
+          db_get grub-pc/chainload_from_menu.lst
+          if $RET ; then
+            # Create core.img (but do not risk writing to MBR).
+            echo "Generating core.img" >&2
+            grub-install --no-floppy --grub-setup=/bin/true "(hd0)" > /dev/null
+
+            # Update menu.lst to reflect that:
+            # - core.img is present now
+            # - core.img has to be the first option
+            echo "Saving menu.lst backup in /boot/grub/menu.lst_backup_by_grub2_postinst" >&2
+            cp /boot/grub/menu.lst{,_backup_by_grub2_postinst}
+            echo "Running update-grub Legacy to hook our core.img in it" >&2
+            LET_US_TRY_GRUB_2=true /usr/lib/grub-legacy/update-grub 2>&1 | sed -e "s/^/    /g" >&2
+            # We just hooked GRUB 2 in menu.lst; then also generate grub.cfg.
+            touch /boot/grub/grub.cfg
+          fi
+        else
+          db_subst grub-pc/install_devices CHOICES `grub-mkdevicemap -m - | sed -e "/^(fd[0-9]\+)/d;s,.*\t,,g" | tr '\n' ',' | sed -e 's/,$//g;s/,/, /g'`
+          db_input high grub-pc/install_devices || true
+          db_go
+          db_get grub-pc/install_devices
+          for i in `echo $RET | sed -e 's/,/ /g'` ; do
+            if grub-install --no-floppy $i ; then
+              # We just installed GRUB 2; then also generate grub.cfg.
+              touch /boot/grub/grub.cfg
+            fi
+          done
+        fi
+
+        # /boot/grub/ has more chances of being accessible by GRUB
+        if test -e /boot/grub/grub.cfg ; then
+          for i in /usr/share/grub/unicode.pf2 /usr/share/images/desktop-base/moreblue-orbit-grub.png ; do
+            if test -e $i ; then
+              cp $i /boot/grub/
+            fi
+          done
+        fi
+
+      ;;
+    esac
+
+    # If grub.cfg has been generated, update it.
+    if test -e /boot/grub/grub.cfg ; then
+      update-grub
+    fi
+  ;;
+  abort-upgrade|abort-remove|abort-deconfigure)
+  ;;
+  *)
+    echo "postinst called with unknown argument \`$1'" >&2
+    exit 1
+  ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
--- grub2-1.97~beta3.orig/debian/control
+++ grub2-1.97~beta3/debian/control
@@ -0,0 +1,187 @@
+Source: grub2
+Section: admin
+Priority: extra
+Maintainer: GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>
+Uploaders: Robert Millan <rmh.debian.grub@aybabtu.com>, Felix Zielcke <fzielcke@z-51.de>, Jordi Mallach <jordi@debian.org>
+DM-Upload-Allowed: yes
+Build-Depends: cdbs,
+ debhelper (>= 7),
+ patchutils,
+ autoconf,
+ ruby,
+ bison,
+ po-debconf,
+ help2man,
+ gcc-multilib [sparc],
+ libncurses5-dev,
+ genisoimage [i386 kfreebsd-i386 hurd-i386 kopensolaris-i386 amd64 kfreebsd-amd64 lpia],
+ bf-utf-source,
+ libfreetype6-dev,
+Build-Conflicts: autoconf2.13 
+Standards-Version: 3.8.3
+Homepage: http://www.gnu.org/software/grub/grub-2.en.html
+Vcs-Svn: svn://svn.debian.org/svn/pkg-grub/grub2/trunk/
+Vcs-Browser: http://svn.debian.org/viewsvn/pkg-grub/grub2/
+
+
+Package: grub2
+Architecture: i386 kfreebsd-i386 hurd-i386 kopensolaris-i386 amd64 kfreebsd-amd64 lpia powerpc sparc
+Depends: grub-pc [i386 kfreebsd-i386 hurd-i386 kopensolaris-i386 amd64 kfreebsd-amd64 lpia] | grub-ieee1275 [powerpc sparc], ${misc:Depends}
+Description: GRand Unified Bootloader, version 2 (dummy package)
+ This is a dummy transitional package to handle GRUB 2 upgrades.  It can be
+ safely removed.
+
+Package: grub-linuxbios
+Architecture: i386 kfreebsd-i386 hurd-i386 kopensolaris-i386 amd64 kfreebsd-amd64 lpia
+Depends: grub-coreboot (= ${binary:Version}), ${misc:Depends}
+Description: GRand Unified Bootloader, version 2 (dummy package)
+ This is a dummy transitional package that depends on grub-coreboot.
+
+Package: grub-efi
+Architecture: i386 kfreebsd-i386 hurd-i386 kopensolaris-i386 amd64 kfreebsd-amd64 lpia
+Depends: ${misc:Depends}, grub-efi-ia32 [i386 kfreebsd-i386 hurd-i386 kopensolaris-i386 lpia], grub-efi-amd64 [amd64 kfreebsd-amd64]
+Description: GRand Unified Bootloader, version 2 (dummy package)
+ This is a dummy transitional package that depends on either grub-efi-ia32 or
+ grub-efi-amd64, depending on the architecture.
+
+
+Package: grub-common
+Architecture: i386 kfreebsd-i386 hurd-i386 kopensolaris-i386 amd64 kfreebsd-amd64 lpia powerpc sparc
+Depends: ${shlibs:Depends}, base-files (>= 4.0.1~), ${misc:Depends}
+Replaces: grub-pc (<< 1.96+20080831-1), grub-ieee1275 (<< 1.96+20080831-1), grub-efi (<< 1.96+20080831-1), grub-coreboot (<< 1.96+20080831-1), grub-linuxbios (<< 1.96+20080831-1)
+Recommends: os-prober (>= 1.32)
+Suggests: multiboot-doc [i386 kfreebsd-i386 hurd-i386 kopensolaris-i386 amd64 kfreebsd-amd64 lpia]
+# See bugs #435983 and #455746
+Conflicts: mdadm (<< 2.6.7-2)
+Description: GRand Unified Bootloader, version 2 (common files)
+ This package contains common files shared by the distinct flavours of GRUB.
+
+Package: grub-pc
+Architecture: i386 kfreebsd-i386 hurd-i386 kopensolaris-i386 amd64 kfreebsd-amd64 lpia
+Depends: ${shlibs:Depends}, ${misc:Depends}, grub-common (= ${binary:Version}), ucf
+Replaces: grub, grub-legacy, grub2 (<< ${source:Version}), grub-common (= ${binary:Version}), grub-efi-amd64, grub-efi-ia32, grub-coreboot, grub-ieee1275
+Conflicts: grub-legacy, desktop-base (= 4.0.5), grub-efi-amd64, grub-efi-ia32, grub-coreboot, grub-ieee1275
+Suggests: desktop-base (>= 4.0.6), genisoimage
+Description: GRand Unified Bootloader, version 2 (PC/BIOS version)
+ GRUB is a portable, powerful bootloader.  This version of GRUB is based on a
+ cleaner design than its predecessors, and provides the following new features:
+ .
+  - Scripting in grub.cfg using BASH-like syntax.
+  - Support for modern partition maps such as GPT.
+  - Modular generation of grub.cfg via update-grub.  Packages providing GRUB
+    add-ons can plug in their own script rules and trigger updates by invoking
+    update-grub2.
+  - VESA-based graphical mode with background image support and complete 24-bit
+    color set.
+  - Support for extended charsets.  Users can write UTF-8 text to their menu
+    entries.
+ .
+ This package contains a version of GRUB that has been built for use with
+ traditional PC/BIOS architecture.
+
+Package: grub-rescue-pc
+Architecture: i386 kfreebsd-i386 hurd-i386 kopensolaris-i386 amd64 kfreebsd-amd64 lpia
+Depends: base-files (>= 4.0.1~), ${misc:Depends}
+Description: GRUB bootable rescue images, version 2 (PC/BIOS version)
+ This package contains two GRUB rescue images that have been built for use with
+ traditional PC/BIOS architecture:
+ .
+  - grub-rescue-floppy.img: floppy image.
+  - grub-rescue-cdrom.iso: El Torito CDROM image.
+
+Package: grub-coreboot
+Architecture: i386 kfreebsd-i386 hurd-i386 kopensolaris-i386 amd64 kfreebsd-amd64
+Depends: ${shlibs:Depends}, grub-common (= ${binary:Version}), ${misc:Depends}, ucf
+Replaces: grub-legacy, grub2 (<< ${source:Version}), grub-common (<= 1.96+20080413-1), grub-efi-amd64, grub-efi-ia32, grub-pc, grub-ieee1275
+Conflicts: grub-legacy, grub-efi-amd64, grub-efi-ia32, grub-pc, grub-ieee1275
+Suggests: os-prober
+Description: GRand Unified Bootloader, version 2 (Coreboot version)
+ GRUB is a portable, powerful bootloader.  This version of GRUB is based on a
+ cleaner design than its predecessors, and provides the following new features:
+ .
+  - Scripting in grub.cfg using BASH-like syntax.
+  - Support for modern partition maps such as GPT.
+  - Modular generation of grub.cfg via update-grub.  Packages providing GRUB
+    add-ons can plug in their own script rules and trigger updates by invoking
+    update-grub2.
+ .
+ This package contains a version of GRUB that has been built for use with
+ platforms running the Coreboot firmware.
+
+Package: grub-efi-ia32
+Architecture: i386 kfreebsd-i386 hurd-i386 kopensolaris-i386 amd64 kfreebsd-amd64 lpia
+Depends: ${shlibs:Depends}, grub-common (= ${binary:Version}), ${misc:Depends}, ucf
+Replaces: grub, grub-legacy, grub2 (<< ${source:Version}), grub-common (<= 1.96+20080413-1), grub-efi, grub-efi-amd64, grub-pc, grub-coreboot, grub-ieee1275
+Conflicts: grub-legacy, grub-efi-amd64, grub-pc, grub-coreboot, grub-ieee1275
+Suggests: os-prober, efibootmgr
+Description: GRand Unified Bootloader, version 2 (EFI-IA32 version)
+ GRUB is a portable, powerful bootloader.  This version of GRUB is based on a
+ cleaner design than its predecessors, and provides the following new features:
+ .
+  - Scripting in grub.cfg using BASH-like syntax.
+  - Support for modern partition maps such as GPT.
+  - Modular generation of grub.cfg via update-grub.  Packages providing GRUB
+    add-ons can plug in their own script rules and trigger updates by invoking
+    update-grub2.
+ .
+ This package contains a version of GRUB that has been built for use with
+ EFI-IA32 architecture, such as the one provided by Intel Macs (that is, unless
+ a BIOS interface has been activated).
+
+Package: grub-efi-amd64
+Architecture: i386 kopensolaris-i386 amd64 kfreebsd-amd64
+Depends: ${shlibs:Depends}, grub-common (= ${binary:Version}), ${misc:Depends}, ucf
+Replaces: grub, grub-legacy, grub2 (<< ${source:Version}), grub-common (<= 1.96+20080413-1), grub-pc, grub-efi-ia32, grub-coreboot, grub-ieee1275
+Conflicts: grub, grub-legacy, grub-efi-ia32, grub-coreboot, grub-ieee1275
+Suggests: os-prober, efibootmgr
+Description: GRand Unified Bootloader, version 2 (EFI-AMD64 version)
+ GRUB is a portable, powerful bootloader.  This version of GRUB is based on a
+ cleaner design than its predecessors, and provides the following new features:
+ .
+  - Scripting in grub.cfg using BASH-like syntax.
+  - Support for modern partition maps such as GPT.
+  - Modular generation of grub.cfg via update-grub.  Packages providing GRUB
+    add-ons can plug in their own script rules and trigger updates by invoking
+    update-grub2.
+ .
+ This package contains a version of GRUB that has been built for use with
+ EFI-AMD64 architecture, such as the one provided by Intel Macs (that is, unless
+ a BIOS interface has been activated).
+
+Package: grub-ieee1275
+Architecture: i386 kfreebsd-i386 hurd-i386 kopensolaris-i386 amd64 kfreebsd-amd64 lpia powerpc sparc
+Depends: ${shlibs:Depends}, grub-common (= ${binary:Version}),
+ powerpc-ibm-utils [powerpc], powerpc-utils [powerpc], bc [powerpc], ${misc:Depends}, ucf
+Replaces: grub-legacy, grub2 (<< ${source:Version}), grub-common (<= 1.96+20080413-1), grub-efi-amd64, grub-efi-ia32, grub-coreboot, grub-pc
+Conflicts: grub-legacy, grub-efi-amd64, grub-efi-ia32, grub-coreboot, grub-pc
+Suggests: os-prober, genisoimage
+Description: GRand Unified Bootloader, version 2 (Open Firmware version)
+ GRUB is a portable, powerful bootloader.  This version of GRUB is based on a
+ cleaner design than its predecessors, and provides the following new features:
+ .
+  - Scripting in grub.cfg using BASH-like syntax.
+  - Support for modern partition maps such as GPT.
+  - Modular generation of grub.cfg via update-grub.  Packages providing GRUB
+    add-ons can plug in their own script rules and trigger updates by invoking
+    update-grub2.
+ .
+ This package contains a version of GRUB that has been built for use with
+ Open Firmware implementations.
+
+Package: grub-firmware-qemu
+Architecture: i386 kfreebsd-i386 hurd-i386 kopensolaris-i386 amd64 kfreebsd-amd64 lpia
+Depends: base-files (>= 4.0.1~), ${misc:Depends}
+Recommends: qemu
+Enhances: qemu
+Description: GRUB firmware image for QEMU
+ This package contains a binary of GRUB that has been built for use as
+ firmware for QEMU.  It can be used as a replacement for the standard
+ PC BIOS provided by the bochsbios package (bios.bin).
+ .
+ In order to make QEMU use this firmware, simply add `-bios grub.bin' when
+ invoking it.
+ .
+ This package behaves in the same way as GRUB for coreboot, but doesn't
+ contain any code from coreboot itself, and is only suitable for QEMU. If
+ you want to install GRUB as firmware on real hardware, you need to use the
+ grub-coreboot package, and manually combine that with coreboot.
--- grub2-1.97~beta3.orig/debian/script
+++ grub2-1.97~beta3/debian/script
@@ -0,0 +1,30 @@
+#!/bin/bash -e
+
+if test -e /boot/grub/setup_left_core_image_in_filesystem ; then
+  echo -e "\n*********************** WARNING grub-setup left core.img in filesystem" >&3
+fi
+
+for i in /proc/mounts ; do
+  if test -e $i ; then
+    echo -e "\n*********************** BEGIN $i" >&3
+    grep ^/dev/ $i >&3
+    echo "*********************** END $i" >&3
+  fi
+done
+
+for i in /boot/grub/{device.map,grub.cfg} ; do
+  if ! test -e $i ; then
+    continue
+  fi
+  echo -e "\n*********************** BEGIN $i" >&3
+  if test -r $i ; then
+    sed $i -e "s/.*password.*/### PASSWORD LINE REMOVED ###/g" >&3
+  else 
+    echo "$i is not readable by you. Please enter your root password."
+    echo "Any password line in it gets removed."
+    su root -c "sed $i -e 's/.*password.*/### PASSWORD LINE REMOVED ###/g'" >&3
+  fi
+  echo "*********************** END $i" >&3
+done
+
+exit 0
--- grub2-1.97~beta3.orig/debian/grub-pc.templates.in
+++ grub2-1.97~beta3/debian/grub-pc.templates.in
@@ -0,0 +1,55 @@
+
+# This file is concatenated.  Do not delete the newline above.
+
+Template: grub-pc/chainload_from_menu.lst
+Type: boolean
+Default: true
+_Description: Chainload from menu.lst?
+ GRUB upgrade scripts have detected a GRUB Legacy setup in /boot/grub.
+ .
+ In order to replace the Legacy version of GRUB in your system, it is
+ recommended that /boot/grub/menu.lst is adjusted to chainload GRUB 2
+ from your existing GRUB Legacy setup.  This step may be automaticaly
+ performed now.
+ .
+ It's recommended that you accept chainloading GRUB 2 from menu.lst, and
+ verify that your new GRUB 2 setup is functional for you, before you install
+ it directly to your MBR (Master Boot Record).
+ .
+ In either case, whenever you want GRUB 2 to be loaded directly from MBR,
+ you can do so by issuing (as root) the following command:
+ .
+ upgrade-from-grub-legacy
+
+Template: grub-pc/install_devices
+Type: multiselect
+Choices: ${CHOICES}
+# Intentionally not marked for translations yet; will do after a review period
+Description: GRUB install devices:
+ The grub-pc package is being upgraded.  This menu allows you to select which
+ devices you'd like grub-install to be automatically run for, if any.
+ .
+ It is recommended that you do this in most situations, to prevent the installed
+ GRUB from getting out of sync with other components such as grub.cfg or with
+ newer Linux images it will have to load.
+ .
+ If you're unsure which drive is designated as boot drive by your BIOS, it is
+ often a good idea to install GRUB to all of them.
+ .
+ Note: It is possible to install GRUB to partition boot records as well.
+ However, this forces GRUB to use the blocklist mechanism, which makes it
+ less reliable, and therefore is not recommended.
+
+Template: grub-pc/postrm_purge_boot_grub
+Type: boolean
+Default: false
+# This should get reviewed before it can be translated
+Description: Remove GRUB 2 from /boot/grub?
+ Do you want to have all GRUB 2 files removed from /boot/grub?
+ .
+ Your system would be then unbootable if you don't install another bootloader.
+
+Template: grub-pc/kopt_extracted
+Type: boolean
+Default: false
+Description: for internal use
--- grub2-1.97~beta3.orig/debian/dirs.in
+++ grub2-1.97~beta3/debian/dirs.in
@@ -0,0 +1,4 @@
+usr/bin
+usr/sbin
+usr/share/grub
+usr/share/bug/@PACKAGE@
--- grub2-1.97~beta3.orig/debian/grub-firmware-qemu.install
+++ grub2-1.97~beta3/debian/grub-firmware-qemu.install
@@ -0,0 +1 @@
+build/grub-firmware-qemu/grub.bin	usr/share/qemu
--- grub2-1.97~beta3.orig/debian/grub-rescue-pc.README.Debian
+++ grub2-1.97~beta3/debian/grub-rescue-pc.README.Debian
@@ -0,0 +1,16 @@
+grub-rescue-pc
+~~~~~~~~~~~~~~
+
+How to test the images with qemu:
+
+  qemu -fda /usr/lib/grub-rescue/grub-rescue-floppy.img
+
+  qemu -cdrom /usr/lib/grub-rescue/grub-rescue-cdrom.iso
+
+How to write the images to bootable media:
+
+  sudo dd if=/usr/lib/grub-rescue/grub-rescue-floppy.img of=/dev/fd0 bs=32k
+
+  sudo wodim /usr/lib/grub-rescue/grub-rescue-cdrom.iso
+  # or just use your favourite CD burning program
+
--- grub2-1.97~beta3.orig/debian/examples.in
+++ grub2-1.97~beta3/debian/examples.in
@@ -0,0 +1 @@
+docs/grub.cfg
--- grub2-1.97~beta3.orig/debian/watch
+++ grub2-1.97~beta3/debian/watch
@@ -0,0 +1,2 @@
+version=3
+ftp://alpha.gnu.org/gnu/grub/grub-([a-z0-9.~]+).tar.gz debian uupdate
--- grub2-1.97~beta3.orig/debian/grub2.dirs
+++ grub2-1.97~beta3/debian/grub2.dirs
@@ -0,0 +1 @@
+usr/share/bug/grub2
--- grub2-1.97~beta3.orig/debian/grub-common.preinst
+++ grub2-1.97~beta3/debian/grub-common.preinst
@@ -0,0 +1,31 @@
+#!/bin/bash -e
+
+case "$1" in
+  install|upgrade)
+
+    if [ -n "$2" ] && dpkg --compare-versions $2 lt 1.96+20090521-1 ; then
+	if [ -f /etc/grub.d/10_hurd ] && [[ `dpkg --print-architecture` != hurd-* ]] ; then
+	  rm /etc/grub.d/10_hurd
+	fi
+	if [ -f /etc/grub.d/10_freebsd ] && [[ `dpkg --print-architecture` != kfreebsd-* ]] ; then
+	   rm /etc/grub.d/10_freebsd
+	fi
+	if [ -f /etc/grub.d/10_linux ] && ( [[ `dpkg --print-architecture` = hurd-* ]] || [[ `dpkg --print-architecture` = kfreebsd-* ]] ) ; then
+	   rm /etc/grub.d/10_linux
+	fi
+    fi
+  ;;
+  abort-upgrade)
+  ;;
+  *)
+    echo "postinst called with unknown argument \`$1'" >&2
+    exit 1
+  ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
--- grub2-1.97~beta3.orig/debian/compat
+++ grub2-1.97~beta3/debian/compat
@@ -0,0 +1 @@
+7
--- grub2-1.97~beta3.orig/debian/grub-rescue-pc.install
+++ grub2-1.97~beta3/debian/grub-rescue-pc.install
@@ -0,0 +1,2 @@
+build/grub-rescue-pc/grub-rescue-floppy.img	usr/lib/grub-rescue
+build/grub-rescue-pc/grub-rescue-cdrom.iso	usr/lib/grub-rescue
--- grub2-1.97~beta3.orig/debian/rules
+++ grub2-1.97~beta3/debian/rules
@@ -0,0 +1,170 @@
+#!/usr/bin/make -f
+
+SHELL		:= bash
+package		:= grub2
+
+DEB_HOST_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU 2>/dev/null)
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/rules/simple-patchsys.mk
+
+CFLAGS := -g -Wall
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -O0
+else
+	CFLAGS += -O2
+endif
+
+CC := gcc
+
+CONFIGURE = CC=$(CC) \
+	$(CURDIR)/configure --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --includedir="\$${prefix}/include" \
+	--mandir="\$${prefix}/share/man" --infodir="\$${prefix}/share/info" --sysconfdir=/etc --localstatedir=/var \
+	--libexecdir="\$${prefix}/lib/$(package)" --srcdir=$(CURDIR) \
+	--enable-grub-emu --enable-grub-mkfont --disable-grub-fstest 
+
+AUTOGEN_FILES = configure config.h.in conf/*.mk
+AUTOGEN_DEB_FILES = docs examples manpages config templates postinst postrm dirs install
+
+$(AUTOGEN_FILES): autogen.sh configure.ac conf/*.rmk
+	./autogen.sh
+
+configure/grub-pc configure/grub-ieee1275 configure/grub-coreboot:: $(AUTOGEN_FILES)
+	mkdir -p $(subst configure/,build/,$@)
+	cd $(subst configure/,build/,$@) && $(CONFIGURE) --with-platform=$(subst configure/grub-,,$@)
+
+# This name scheme leaves room for things like ia64 or amd32 someday
+configure/grub-efi-ia32:: $(AUTOGEN_FILES)
+	mkdir -p $(subst configure/,build/,$@)
+	cd $(subst configure/,build/,$@) && $(CONFIGURE) --with-platform=efi --target=i386-pe --program-prefix=""
+configure/grub-efi-amd64:: $(AUTOGEN_FILES)
+	mkdir -p $(subst configure/,build/,$@)
+	cd $(subst configure/,build/,$@) && $(CONFIGURE) --with-platform=efi --target=amd64-pe --program-prefix=""
+
+configure/grub-firmware-qemu:: $(AUTOGEN_FILES)
+	mkdir -p $(subst configure/,build/,$@)
+	cd $(subst configure/,build/,$@) && $(CONFIGURE) --with-platform=qemu
+
+configure/grub-common:: $(AUTOGEN_FILES)
+	mkdir -p $(subst configure/,build/,$@)
+	cd build/grub-common && $(CONFIGURE)
+
+build/grub-common build/grub-pc build/grub-efi-ia32 build/grub-efi-amd64 build/grub-ieee1275 build/grub-coreboot::
+	$(MAKE) -C $@
+
+build/grub-rescue-pc:: build/grub-pc
+	mkdir -p $@
+	mkdir -p $@/rescue-disk/boot/grub
+	cp docs/grub.cfg $@/rescue-disk/boot/grub/
+	$(CURDIR)/build/grub-pc/grub-mkrescue \
+		--pkglibdir=$(CURDIR)/build/grub-pc \
+		--grub-mkimage=$(CURDIR)/build/grub-pc/grub-mkimage \
+		--overlay=$@/rescue-disk/ \
+		--image-type=floppy \
+		$(CURDIR)/$@/grub-rescue-floppy.img
+	$(CURDIR)/build/grub-pc/grub-mkrescue \
+		--pkglibdir=$(CURDIR)/build/grub-pc \
+		--grub-mkimage=$(CURDIR)/build/grub-pc/grub-mkimage \
+		--overlay=$@/rescue-disk/ \
+		--image-type=cdrom \
+		$(CURDIR)/$@/grub-rescue-cdrom.iso
+
+build/grub-firmware-qemu::
+	$(MAKE) -C $@
+	grub_dir=`mktemp -d` ; \
+	grub_memdisk=`mktemp` ; \
+	mkdir -p $${grub_dir}/boot/grub ; \
+	cp debian/grub-firmware-qemu_grub.cfg $${grub_dir}/boot/grub/grub.cfg ; \
+	tar -cf - -C $${grub_dir} boot > $${grub_memdisk} ; \
+	$(CURDIR)/$@/grub-mkimage \
+		-d $(CURDIR)/$@ \
+		$(CURDIR)/$@/*.mod \
+		-m $${grub_memdisk} \
+		-o $(CURDIR)/$@/grub.bin
+
+install/grub-pc install/grub-efi-ia32 install/grub-efi-amd64 install/grub-ieee1275 install/grub-coreboot::
+	$(MAKE) -C $(subst install/,build/,$@) install DESTDIR=$(CURDIR)/debian/$(subst install/,,$@)/
+
+	# shipped with grub-common
+	rm -rf $(CURDIR)/debian/$(subst install/,,$@)/etc/grub.d
+	rm -f $(CURDIR)/debian/$(subst install/,,$@)/usr/{sbin,share/man/man8}/{grub-dumpbios,grub-probe,grub-emu,grub-mkconfig,grub-mkdevicemap,grub-ofpathname}{,.8}
+	rm -f $(CURDIR)/debian/$(subst install/,,$@)/usr/{bin,share/man/man1}/{grub-mkelfimage,grub-mkfont,grub-editenv}{,.1}
+	rm -f $(CURDIR)/debian/$(subst install/,,$@)/usr/lib/grub/{grub-mkconfig_lib,update-grub_lib}
+	rm -rf $(CURDIR)/debian/$(subst install/,,$@)/usr/share/grub/
+	rm -rf $(CURDIR)/debian/$(subst install/,,$@)/usr/include
+
+	for i in $(AUTOGEN_DEB_FILES) ; do \
+		sed debian/$$i.in \
+			-e "s/@PACKAGE@/$(subst install/,,$@)/g" \
+			> debian/$(subst install/,,$@).$$i ; \
+	done
+
+	# grub-pc is a bit special.  It includes a few overlays for autogen files.
+	if [ "$@" = "install/grub-pc" ] ; then \
+		for i in templates install dirs ; do \
+			cat debian/grub-pc.$$i.in >> debian/grub-pc.$$i ; \
+		done ; \
+	fi
+
+	if [ "$@" != "install/grub-pc" ] && [ "$(DEB_HOST_ARCH_CPU)" != "sparc" ] ; then \
+		i=$(CURDIR)/debian/$(subst install/,,$@)/usr/lib/grub/*/kernel.img ; if test -e $$i ; then strip -s $$i ; fi \
+	fi
+
+	mkdir -p $(CURDIR)/debian/$(subst install/,,$@)/usr/share/lintian/overrides
+	echo "$(subst install/,,$@): unstripped-binary-or-object *.mod" \
+		>> $(CURDIR)/debian/$(subst install/,,$@)/usr/share/lintian/overrides/$(subst install/,,$@)
+	if [ "$@" != "install/grub-pc" ] && [ "$(DEB_HOST_ARCH_CPU)" != "sparc" ] ; then \
+		cd $(CURDIR)/debian/$(subst install/,,$@) && find ./usr/lib/grub -name kernel.img \
+			| sed -e "s%.*%$(subst install/,,$@): statically-linked-binary &%g" \
+		>> $(CURDIR)/debian/$(subst install/,,$@)/usr/share/lintian/overrides/$(subst install/,,$@) ; \
+	fi
+	if [ "$@" = "install/grub-efi-amd64" ] && [ "$(DEB_HOST_ARCH_CPU)" = "i386" ] ; then \
+		echo "$(subst install/,,$@): binary-from-other-architecture *.mod" \
+			>> $(CURDIR)/debian/$(subst install/,,$@)/usr/share/lintian/overrides/$(subst install/,,$@) ; \
+	fi
+	if [ "$@" = "install/grub-pc" ] && [ "$(DEB_HOST_ARCH_CPU)" = "i386" ] ; then \
+		echo "$(subst install/,,$@): binary-from-other-architecture *efiemu64.o" \
+			>> $(CURDIR)/debian/$(subst install/,,$@)/usr/share/lintian/overrides/$(subst install/,,$@) ; \
+	fi
+
+install/grub-common::
+	$(MAKE) -C $(subst install/,build/,$@) install DESTDIR=$(CURDIR)/debian/$(subst install/,,$@)/
+	rm -rf $(CURDIR)/debian/$(subst install/,,$@)/usr/lib/grub/{i386,powerpc,sparc64}-*
+	rm -f $(CURDIR)/debian/$(subst install/,,$@)/usr/{sbin,share/man/man8}/{update-grub,grub-install,grub-setup}{,.8}
+	rm -f $(CURDIR)/debian/$(subst install/,,$@)/usr/{bin,share/man/man1}/grub-{mkimage,mkrescue}{,.1}
+
+clean:: debian/legacy/update-grub debian/grub-extras
+	chmod +x debian/{script,grub.d/*,legacy/*}
+	for i in $(AUTOGEN_DEB_FILES) ; do \
+		rm -f debian/grub-{pc,efi-*,ieee1275,coreboot}.$$i ; \
+	done
+	-rm -rf build
+
+	# make sure PO files are always up-to-date
+	debconf-updatepo
+
+debian/legacy/update-grub:
+	@echo "Missing $@.  Try: \"svn cat svn://svn.debian.org/pkg-grub/grub/trunk/debian/update-grub > $@\""
+	exit 1
+
+debian/grub-extras:
+	@echo "Missing $@.  Try: \"svn export svn://svn.sv.nongnu.org/grub-extras/trunk $@\""
+	exit 1
+
+# Grab fixes from SVN using our version as reference.
+svn-sync:
+	svn co svn://svn.sv.gnu.org/grub/trunk/grub2 grub2-svn; \
+	UVERSION=$$(dpkg-parsechangelog | grep Version \
+	                                | sed 's,Version: ,,g;s,-[0-9]*$$,,g;s,\.,_,g'); \
+	cd grub2-svn && \
+	svn diff -uN -r release_$$UVERSION -r HEAD > ../debian/patches/00_svn-sync.patch; \
+	cd .. && rm -rf grub2-svn
+
+svn-snapshot:
+	UVERSION=$$(dpkg-parsechangelog | grep Version \
+	                                | sed 's,Version: ,,g;s,-[0-9]*$$,,g'); \
+	svn co svn://svn.sv.gnu.org/grub/trunk/grub2 grub2-$$UVERSION; \
+	tar -czf grub2_$$UVERSION.orig.tar.gz grub2-$$UVERSION; \
+	rm -rf grub2-$$UVERSION; \
+	mv grub2_$$UVERSION.orig.tar.gz ../tarballs/
--- grub2-1.97~beta3.orig/debian/grub-common.dirs
+++ grub2-1.97~beta3/debian/grub-common.dirs
@@ -0,0 +1 @@
+usr/sbin
--- grub2-1.97~beta3.orig/debian/grub-pc.dirs.in
+++ grub2-1.97~beta3/debian/grub-pc.dirs.in
@@ -0,0 +1 @@
+usr/lib/grub-legacy
--- grub2-1.97~beta3.orig/debian/grub-firmware-qemu_grub.cfg
+++ grub2-1.97~beta3/debian/grub-firmware-qemu_grub.cfg
@@ -0,0 +1,37 @@
+set default=0
+set fallback=1
+set timeout=10
+
+menuentry "Search & load /boot/multiboot.img" {
+	search -s -f /boot/multiboot.img
+	if multiboot /boot/multiboot.img ; then
+		boot
+	fi
+	unset timeout
+}
+
+# For separate /boot partition.
+menuentry "Search & load /multiboot.img" {
+	search -s -f /multiboot.img
+	if multiboot /multiboot.img ; then
+		boot
+	fi
+	unset timeout
+}
+
+menuentry "Search & source /boot/grub/grub.cfg" {
+	search -s -f /boot/grub/grub.cfg
+	source /boot/grub/grub.cfg
+	unset timeout
+}
+
+# For separate /boot partition.
+menuentry "Search & source /grub/grub.cfg" {
+	search -s -f /grub/grub.cfg
+	source /grub/grub.cfg
+	unset timeout
+}
+
+menuentry "Reboot" {
+	reboot
+}
--- grub2-1.97~beta3.orig/debian/update-grub.8
+++ grub2-1.97~beta3/debian/update-grub.8
@@ -0,0 +1,14 @@
+.\" Copyright 2009 Felix Zielcke
+.\" Lincensed under GPL3+
+.TH UPDATE-GRUB "8" "April 2009"
+.SH NAME
+update-grub \- stub for grub-mkconfig
+.SH SYNOPSIS
+.B update-grub
+.SH DESCRIPTION
+.B update-grub
+is a stub for running
+.B grub-mkconfig -o /boot/grub/grub.cfg
+to generate a grub2 config file.
+.SH "SEE ALSO"
+.BR grub-mkconfig (8)
--- grub2-1.97~beta3.orig/debian/manpages.in
+++ grub2-1.97~beta3/debian/manpages.in
@@ -0,0 +1,3 @@
+debian/update-grub.8
+debian/update-grub2.8
+
--- grub2-1.97~beta3.orig/debian/docs.in
+++ grub2-1.97~beta3/debian/docs.in
@@ -0,0 +1,3 @@
+build-tree/*/NEWS
+build-tree/*/README
+build-tree/*/TODO
--- grub2-1.97~beta3.orig/debian/copyright
+++ grub2-1.97~beta3/debian/copyright
@@ -0,0 +1,24 @@
+Name: GNU GRUB
+Source: http://www.gnu.org/software/grub/grub-2.en.html
+
+Files: *
+Copyright: 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc
+License: GPL-3+
+
+Files: debian/*
+Copyright: 2003, 2004, 2005, 2006, 2007, 2008, 2009, Robert Millan
+	   2005, 2006, 2007, Otavio Salvador
+	   2008, 2009, Felix Zielcke
+	   2009, Jordi Mallach
+License: GPL-3+
+
+Files: debian/grub-extras/*
+Copyright: Nathan Coulson
+           2003, 2007  Free Software Foundation, Inc
+           2003  NIIBE Yutaka
+License: GPL-3+
+
+License: GPL-3+
+ On Debian systems the full text of the GNU General Public
+ License can be found in the `/usr/share/common-licenses/GPL'
+ file.
--- grub2-1.97~beta3.orig/debian/update-grub2.8
+++ grub2-1.97~beta3/debian/update-grub2.8
@@ -0,0 +1,16 @@
+.\" Copyright 2009 Felix Zielcke
+.\" Lincensed under GPL3+
+.TH UPDATE-GRUB2 "8" "April 2009"
+.SH NAME
+update-grub2 \- stub for update-grub
+.SH SYNOPSIS
+.B update-grub2
+.SH DESCRIPTION
+.B update-grub2
+is a stub for running
+.B update-grub
+which itself is a stub for running
+.B grub-mkconfig -o /boot/grub/grub.cfg
+to generate a grub2 config file.
+.SH "SEE ALSO"
+.BR update-grub (8), grub-mkconfig (8)
--- grub2-1.97~beta3.orig/debian/grub-extras/README
+++ grub2-1.97~beta3/debian/grub-extras/README
@@ -0,0 +1,16 @@
+
+grub-extras is meant to be used as an overlay on grub2 source tree.
+
+Build instructions:
+
+  - Copy grub-extras in a subdirectory of your grub2 checkout.
+    For example, "grub-extras".
+
+  - Adjust autogen.sh to process grub-extras/conf/*.rmk files.
+
+  - Adjust Makefile.in to include the grub-extras/conf/*.mk file
+    corresponding to your architecture.
+    Also export GRUB_EXTRAS variable, it should point to the top
+    level of your grub-extras directory.
+
+  - Build GRUB as usual.
--- grub2-1.97~beta3.orig/debian/grub-extras/COPYING
+++ grub2-1.97~beta3/debian/grub-extras/COPYING
@@ -0,0 +1,674 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    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 3 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, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    <program>  Copyright (C) <year>  <name of author>
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
--- grub2-1.97~beta3.orig/debian/grub-extras/conf/i386-pc.rmk
+++ grub2-1.97~beta3/debian/grub-extras/conf/i386-pc.rmk
@@ -0,0 +1,10 @@
+# -*- makefile -*-
+
+COMMON_CFLAGS += -I$(GRUB_EXTRAS)/include
+
+pkglib_MODULES += 915resolution.mod
+915resolution_mod_SOURCES = $(GRUB_EXTRAS)/commands/i386/915resolution.c
+915resolution_mod_CFLAGS = $(COMMON_CFLAGS)
+915resolution_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
+include $(GRUB_EXTRAS)/conf/common.mk
--- grub2-1.97~beta3.orig/debian/grub-extras/conf/common.rmk
+++ grub2-1.97~beta3/debian/grub-extras/conf/common.rmk
@@ -0,0 +1,15 @@
+# -*- makefile -*-
+
+pkglib_MODULES += zfs.mod
+
+# For zfs.mod.
+zfs_mod_SOURCES = $(GRUB_EXTRAS)/fs/zfs.c $(GRUB_EXTRAS)/fs/zfs_lzjb.c $(GRUB_EXTRAS)/fs/zfs_sha256.c $(GRUB_EXTRAS)/fs/zfs_fletcher.c
+zfs_mod_CFLAGS = $(COMMON_CFLAGS)
+zfs_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
+# For zfsinfo.mod.
+pkglib_MODULES += zfsinfo.mod
+zfsinfo_mod_SOURCES = $(GRUB_EXTRAS)/commands/zfsinfo.c
+zfsinfo_mod_CFLAGS = $(COMMON_CFLAGS)
+zfsinfo_mod_LDFLAGS = $(COMMON_LDFLAGS)
+
--- grub2-1.97~beta3.orig/debian/grub-extras/fs/zfs.c
+++ grub2-1.97~beta3/debian/grub-extras/fs/zfs.c
@@ -0,0 +1,2483 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 1999,2000,2001,2002,2003,2004  Free Software Foundation, Inc.
+ *  Copyright 2008  Sun Microsystems, Inc.
+ *  Copyright (C) 2009  Vladimir Serbinenko <phcoder@gmail.com>
+ *
+ *  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 3 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.
+ */
+/*
+ * The zfs plug-in routines for GRUB are:
+ *
+ * zfs_mount() - locates a valid uberblock of the root pool and reads
+ *		in its MOS at the memory address MOS.
+ *
+ * zfs_open() - locates a plain file object by following the MOS
+ *		and places its dnode at the memory address DNODE.
+ *
+ * zfs_read() - read in the data blocks pointed by the DNODE.
+ *
+ */
+
+#include <grub/err.h>
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/disk.h>
+#include <grub/partition.h>
+#include <grub/dl.h>
+#include <grub/types.h>
+#include <grub/zfs/zfs.h>
+#include <grub/zfs/zio.h>
+#include <grub/zfs/dnode.h>
+#include <grub/zfs/uberblock_impl.h>
+#include <grub/zfs/vdev_impl.h>
+#include <grub/zfs/zio_checksum.h>
+#include <grub/zfs/zap_impl.h>
+#include <grub/zfs/zap_leaf.h>
+#include <grub/zfs/zfs_znode.h>
+#include <grub/zfs/dmu.h>
+#include <grub/zfs/dmu_objset.h>
+#include <grub/zfs/dsl_dir.h>
+#include <grub/zfs/dsl_dataset.h>
+
+#define	ZPOOL_PROP_BOOTFS		"bootfs"
+
+#define MIN(a,b) (((a) < (b)) ? (a) : (b))
+
+/*
+ * For nvlist manipulation. (from nvpair.h)
+ */
+#define	NV_ENCODE_NATIVE	0
+#define	NV_ENCODE_XDR		1
+#define	NV_BIG_ENDIAN	        0
+#define	NV_LITTLE_ENDIAN	1
+#define	DATA_TYPE_UINT64	8
+#define	DATA_TYPE_STRING	9
+#define	DATA_TYPE_NVLIST	19
+#define	DATA_TYPE_NVLIST_ARRAY	20
+
+#ifndef GRUB_UTIL
+static grub_dl_t my_mod;
+#endif
+
+#define	P2PHASE(x, align)		((x) & ((align) - 1))
+#define	DVA_OFFSET_TO_PHYS_SECTOR(offset) \
+	((offset + VDEV_LABEL_START_SIZE) >> SPA_MINBLOCKSHIFT)
+
+/*
+ * FAT ZAP data structures
+ */
+#define	ZFS_CRC64_POLY 0xC96C5795D7870F42ULL	/* ECMA-182, reflected form */
+#define	ZAP_HASH_IDX(hash, n)	(((n) == 0) ? 0 : ((hash) >> (64 - (n))))
+#define	CHAIN_END	0xffff	/* end of the chunk chain */
+
+/*
+ * The amount of space within the chunk available for the array is:
+ * chunk size - space for type (1) - space for next pointer (2)
+ */
+#define	ZAP_LEAF_ARRAY_BYTES (ZAP_LEAF_CHUNKSIZE - 3)
+
+#define	ZAP_LEAF_HASH_SHIFT(bs)	(bs - 5)
+#define	ZAP_LEAF_HASH_NUMENTRIES(bs) (1 << ZAP_LEAF_HASH_SHIFT(bs))
+#define	LEAF_HASH(bs, h) \
+	((ZAP_LEAF_HASH_NUMENTRIES(bs)-1) & \
+	((h) >> (64 - ZAP_LEAF_HASH_SHIFT(bs)-l->l_hdr.lh_prefix_len)))
+
+/*
+ * The amount of space available for chunks is:
+ * block size shift - hash entry size (2) * number of hash
+ * entries - header space (2*chunksize)
+ */
+#define	ZAP_LEAF_NUMCHUNKS(bs) \
+	(((1<<bs) - 2*ZAP_LEAF_HASH_NUMENTRIES(bs)) / \
+	ZAP_LEAF_CHUNKSIZE - 2)
+
+/*
+ * The chunks start immediately after the hash table.  The end of the
+ * hash table is at l_hash + HASH_NUMENTRIES, which we simply cast to a
+ * chunk_t.
+ */
+#define	ZAP_LEAF_CHUNK(l, bs, idx) \
+	((zap_leaf_chunk_t *)(l->l_hash + ZAP_LEAF_HASH_NUMENTRIES(bs)))[idx]
+#define	ZAP_LEAF_ENTRY(l, bs, idx) (&ZAP_LEAF_CHUNK(l, bs, idx).l_entry)
+
+
+/*
+ * Decompression Entry - lzjb
+ */
+#ifndef	NBBY
+#define	NBBY	8
+#endif
+
+extern grub_err_t lzjb_decompress (void *, void *, grub_size_t, grub_size_t);
+
+typedef grub_err_t zfs_decomp_func_t (void *s_start, void *d_start,
+				      grub_size_t s_len, grub_size_t d_len);
+typedef struct decomp_entry
+{
+  char *name;
+  zfs_decomp_func_t *decomp_func;
+} decomp_entry_t;
+
+typedef struct dnode_end
+{
+  dnode_phys_t dn;
+  grub_zfs_endian_t endian;
+} dnode_end_t;
+
+struct grub_zfs_data
+{
+  /* cache for a file block of the currently zfs_open()-ed file */
+  char *file_buf;
+  grub_uint64_t file_start;
+  grub_uint64_t file_end;
+
+  /* cache for a dnode block */
+  dnode_phys_t *dnode_buf;
+  dnode_phys_t *dnode_mdn;
+  grub_uint64_t dnode_start;
+  grub_uint64_t dnode_end;
+  grub_zfs_endian_t dnode_endian;
+
+  uberblock_t current_uberblock;
+  grub_disk_t disk;
+
+  dnode_end_t mos;
+  dnode_end_t mdn;
+  dnode_end_t dnode;
+
+  grub_disk_addr_t vdev_phys_sector;
+};
+
+decomp_entry_t decomp_table[ZIO_COMPRESS_FUNCTIONS] = {
+  {"inherit", 0},		/* ZIO_COMPRESS_INHERIT */
+  {"on", lzjb_decompress},	/* ZIO_COMPRESS_ON */
+  {"off", 0},			/* ZIO_COMPRESS_OFF */
+  {"lzjb", lzjb_decompress},	/* ZIO_COMPRESS_LZJB */
+  {"empty", 0}			/* ZIO_COMPRESS_EMPTY */
+};
+
+static grub_err_t zio_read_data (blkptr_t * bp, grub_zfs_endian_t endian,
+				 void *buf, struct grub_zfs_data *data);
+
+/*
+ * Our own version of log2().  Same thing as highbit()-1.
+ */
+static int
+zfs_log2 (grub_uint64_t num)
+{
+  int i = 0;
+
+  while (num > 1)
+    {
+      i++;
+      num = num >> 1;
+    }
+
+  return (i);
+}
+
+/* Checksum Functions */
+static void
+zio_checksum_off (const void *buf __attribute__ ((unused)),
+		  grub_uint64_t size __attribute__ ((unused)),
+		  grub_zfs_endian_t endian __attribute__ ((unused)),
+		  zio_cksum_t * zcp)
+{
+  ZIO_SET_CHECKSUM (zcp, 0, 0, 0, 0);
+}
+
+/* Checksum Table and Values */
+zio_checksum_info_t zio_checksum_table[ZIO_CHECKSUM_FUNCTIONS] = {
+  {NULL, 0, 0, "inherit"},
+  {NULL, 0, 0, "on"},
+  {zio_checksum_off, 0, 0, "off"},
+  {zio_checksum_SHA256, 1, 1, "label"},
+  {zio_checksum_SHA256, 1, 1, "gang_header"},
+  {fletcher_2, 0, 1, "zilog"},
+  {fletcher_2, 0, 0, "fletcher2"},
+  {fletcher_4, 1, 0, "fletcher4"},
+  {zio_checksum_SHA256, 1, 0, "SHA256"},
+};
+
+/*
+ * zio_checksum_verify: Provides support for checksum verification.
+ *
+ * Fletcher2, Fletcher4, and SHA256 are supported.
+ *
+ */
+static grub_err_t
+zio_checksum_verify (zio_cksum_t zc, grub_uint32_t checksum,
+		     grub_zfs_endian_t endian, char *buf, int size)
+{
+  zio_block_tail_t *zbt = (zio_block_tail_t *) (buf + size) - 1;
+  zio_checksum_info_t *ci = &zio_checksum_table[checksum];
+  zio_cksum_t actual_cksum, expected_cksum;
+
+  if (checksum >= ZIO_CHECKSUM_FUNCTIONS || ci->ci_func == NULL)
+    {
+      grub_dprintf ("zfs", "unknown checksum function %d\n", checksum);
+      return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, 
+			 "unknown checksum function %d", checksum);
+    }
+
+  if (ci->ci_zbt)
+    {
+      expected_cksum = zbt->zbt_cksum;
+      zbt->zbt_cksum = zc;
+      ci->ci_func (buf, size, endian, &actual_cksum);
+      zbt->zbt_cksum = expected_cksum;
+      zc = expected_cksum;
+    }
+  else
+    ci->ci_func (buf, size, endian, &actual_cksum);
+
+  if ((actual_cksum.zc_word[0] != zc.zc_word[0]) 
+      || (actual_cksum.zc_word[1] != zc.zc_word[1]) 
+      || (actual_cksum.zc_word[2] != zc.zc_word[2]) 
+      || (actual_cksum.zc_word[3] != zc.zc_word[3]))
+    {
+      grub_dprintf ("zfs", "checksum %d verification failed\n", checksum);
+      grub_dprintf ("zfs", "actual checksum %16llx %16llx %16llx %16llx\n",
+		    (unsigned long long) actual_cksum.zc_word[0], 
+		    (unsigned long long) actual_cksum.zc_word[1],
+		    (unsigned long long) actual_cksum.zc_word[2], 
+		    (unsigned long long) actual_cksum.zc_word[3]);
+      grub_dprintf ("zfs", "expected checksum %16llx %16llx %16llx %16llx\n",
+		    (unsigned long long) zc.zc_word[0], 
+		    (unsigned long long) zc.zc_word[1],
+		    (unsigned long long) zc.zc_word[2], 
+		    (unsigned long long) zc.zc_word[3]);
+      return grub_error (GRUB_ERR_BAD_FS, "checksum verification failed");
+    }
+
+  return GRUB_ERR_NONE;
+}
+
+/*
+ * vdev_uberblock_compare takes two uberblock structures and returns an integer
+ * indicating the more recent of the two.
+ * 	Return Value = 1 if ub2 is more recent
+ * 	Return Value = -1 if ub1 is more recent
+ * The most recent uberblock is determined using its transaction number and
+ * timestamp.  The uberblock with the highest transaction number is
+ * considered "newer".  If the transaction numbers of the two blocks match, the
+ * timestamps are compared to determine the "newer" of the two.
+ */
+static int
+vdev_uberblock_compare (uberblock_t * ub1, uberblock_t * ub2)
+{
+  grub_zfs_endian_t ub1_endian, ub2_endian;
+  if (grub_zfs_to_cpu64 (ub1->ub_magic, LITTLE_ENDIAN) == UBERBLOCK_MAGIC)
+    ub1_endian = LITTLE_ENDIAN;
+  else
+    ub1_endian = BIG_ENDIAN;
+  if (grub_zfs_to_cpu64 (ub2->ub_magic, LITTLE_ENDIAN) == UBERBLOCK_MAGIC)
+    ub2_endian = LITTLE_ENDIAN;
+  else
+    ub2_endian = BIG_ENDIAN;
+
+  if (grub_zfs_to_cpu64 (ub1->ub_txg, ub1_endian) 
+      < grub_zfs_to_cpu64 (ub2->ub_txg, ub2_endian))
+    return (-1);
+  if (grub_zfs_to_cpu64 (ub1->ub_txg, ub1_endian) 
+      > grub_zfs_to_cpu64 (ub2->ub_txg, ub2_endian))
+    return (1);
+
+  if (grub_zfs_to_cpu64 (ub1->ub_timestamp, ub1_endian) 
+      < grub_zfs_to_cpu64 (ub2->ub_timestamp, ub2_endian))
+    return (-1);
+  if (grub_zfs_to_cpu64 (ub1->ub_timestamp, ub1_endian) 
+      > grub_zfs_to_cpu64 (ub2->ub_timestamp, ub2_endian))
+    return (1);
+
+  return (0);
+}
+
+/*
+ * Three pieces of information are needed to verify an uberblock: the magic
+ * number, the version number, and the checksum.
+ *
+ * Currently Implemented: version number, magic number
+ * Need to Implement: checksum
+ *
+ */
+static grub_err_t
+uberblock_verify (uberblock_phys_t * ub, int offset)
+{
+  uberblock_t *uber = &ub->ubp_uberblock;
+  grub_err_t err;
+  grub_zfs_endian_t endian = UNKNOWN_ENDIAN;
+  zio_cksum_t zc;
+
+  if (grub_zfs_to_cpu64 (uber->ub_magic, LITTLE_ENDIAN) == UBERBLOCK_MAGIC
+      && grub_zfs_to_cpu64 (uber->ub_version, LITTLE_ENDIAN) > 0 
+      && grub_zfs_to_cpu64 (uber->ub_version, LITTLE_ENDIAN) <= SPA_VERSION)
+    endian = LITTLE_ENDIAN;
+
+  if (grub_zfs_to_cpu64 (uber->ub_magic, BIG_ENDIAN) == UBERBLOCK_MAGIC
+      && grub_zfs_to_cpu64 (uber->ub_version, BIG_ENDIAN) > 0 
+      && grub_zfs_to_cpu64 (uber->ub_version, BIG_ENDIAN) <= SPA_VERSION)
+    endian = BIG_ENDIAN;
+
+  if (endian == UNKNOWN_ENDIAN)
+    return grub_error (GRUB_ERR_BAD_FS, "invalid uberblock magic");
+
+  grub_memset (&zc, 0, sizeof (zc));
+
+  zc.zc_word[0] = grub_cpu_to_zfs64 (offset, endian);
+  err = zio_checksum_verify (zc, ZIO_CHECKSUM_LABEL, endian,
+			     (char *) ub, UBERBLOCK_SIZE);
+
+  return err;
+}
+
+/*
+ * Find the best uberblock.
+ * Return:
+ *    Success - Pointer to the best uberblock.
+ *    Failure - NULL
+ */
+static uberblock_phys_t *
+find_bestub (uberblock_phys_t * ub_array, grub_disk_addr_t sector)
+{
+  uberblock_phys_t *ubbest = NULL;
+  int i;
+  grub_disk_addr_t offset;
+  grub_err_t err = GRUB_ERR_NONE;
+
+  for (i = 0; i < (VDEV_UBERBLOCK_RING >> VDEV_UBERBLOCK_SHIFT); i++)
+    {
+      offset = (sector << SPA_MINBLOCKSHIFT) + VDEV_PHYS_SIZE
+	+ (i << VDEV_UBERBLOCK_SHIFT);
+
+      err = uberblock_verify (&ub_array[i], offset);
+      if (err)
+	{
+	  grub_errno = GRUB_ERR_NONE;
+	  continue;
+	}
+      if (ubbest == NULL 
+	  || vdev_uberblock_compare (&(ub_array[i].ubp_uberblock),
+				     &(ubbest->ubp_uberblock)) > 0)
+	ubbest = &ub_array[i];
+    }
+  if (!ubbest)
+    grub_errno = err;
+
+  return (ubbest);
+}
+
+static inline grub_size_t
+get_psize (blkptr_t * bp, grub_zfs_endian_t endian)
+{
+  return ((((grub_zfs_to_cpu64 ((bp)->blk_prop, endian) >> 16) & 0xffff) + 1)
+	  << SPA_MINBLOCKSHIFT);
+}
+
+static grub_uint64_t
+dva_get_offset (dva_t * dva, grub_zfs_endian_t endian)
+{
+  grub_dprintf ("zfs", "dva=%llx, %llx\n", 
+		(unsigned long long) dva->dva_word[0], 
+		(unsigned long long) dva->dva_word[1]);
+  return grub_zfs_to_cpu64 ((dva)->dva_word[1], 
+			    endian) << SPA_MINBLOCKSHIFT;
+}
+
+
+/*
+ * Read a block of data based on the gang block address dva,
+ * and put its data in buf.
+ *
+ */
+static grub_err_t
+zio_read_gang (blkptr_t * bp, grub_zfs_endian_t endian, dva_t * dva, void *buf,
+	       struct grub_zfs_data *data)
+{
+  zio_gbh_phys_t *zio_gb;
+  grub_uint64_t offset, sector;
+  unsigned i;
+  grub_err_t err;
+  zio_cksum_t zc;
+
+  grub_memset (&zc, 0, sizeof (zc));
+
+  zio_gb = grub_malloc (SPA_GANGBLOCKSIZE);
+  if (!zio_gb)
+    return grub_errno;
+  grub_dprintf ("zfs", endian == LITTLE_ENDIAN ? "little-endian gang\n"
+		:"big-endian gang\n");
+  offset = dva_get_offset (dva, endian);
+  sector = DVA_OFFSET_TO_PHYS_SECTOR (offset);
+  grub_dprintf ("zfs", "offset=%llx\n", (unsigned long long) offset);
+
+  /* read in the gang block header */
+  err = grub_disk_read (data->disk, sector, 0, SPA_GANGBLOCKSIZE,
+			(char *) zio_gb);
+  if (err)
+    {
+      grub_free (zio_gb);
+      return err;
+    }
+
+  /* XXX */
+  /* self checksuming the gang block header */
+  ZIO_SET_CHECKSUM (&zc, DVA_GET_VDEV (dva),
+		    dva_get_offset (dva, endian), bp->blk_birth, 0);
+  err = zio_checksum_verify (zc, ZIO_CHECKSUM_GANG_HEADER, endian,
+			     (char *) zio_gb, SPA_GANGBLOCKSIZE);
+  if (err)
+    {
+      grub_free (zio_gb);
+      return err;
+    }
+
+  endian = (grub_zfs_to_cpu64 (bp->blk_prop, endian) >> 63) & 1;
+
+  for (i = 0; i < SPA_GBH_NBLKPTRS; i++)
+    {
+      if (zio_gb->zg_blkptr[i].blk_birth == 0)
+	continue;
+
+      err = zio_read_data (&zio_gb->zg_blkptr[i], endian, buf, data);
+      if (err)
+	{
+	  grub_free (zio_gb);
+	  return err;
+	}
+      buf = (char *) buf + get_psize (&zio_gb->zg_blkptr[i], endian);
+    }
+  grub_free (zio_gb);
+  return GRUB_ERR_NONE;
+}
+
+/*
+ * Read in a block of raw data to buf.
+ */
+static grub_err_t
+zio_read_data (blkptr_t * bp, grub_zfs_endian_t endian, void *buf, 
+	       struct grub_zfs_data *data)
+{
+  int i, psize;
+  grub_err_t err = GRUB_ERR_NONE;
+
+  psize = get_psize (bp, endian);
+
+  /* pick a good dva from the block pointer */
+  for (i = 0; i < SPA_DVAS_PER_BP; i++)
+    {
+      grub_uint64_t offset, sector;
+
+      if (bp->blk_dva[i].dva_word[0] == 0 && bp->blk_dva[i].dva_word[1] == 0)
+	continue;
+
+      if ((grub_zfs_to_cpu64 (bp->blk_dva[i].dva_word[1], endian)>>63) & 1)
+	err = zio_read_gang (bp, endian, &bp->blk_dva[i], buf, data);
+      else
+	{
+	  /* read in a data block */
+	  offset = dva_get_offset (&bp->blk_dva[i], endian);
+	  sector = DVA_OFFSET_TO_PHYS_SECTOR (offset);
+	  err = grub_disk_read (data->disk, sector, 0, psize, buf); 
+	}
+      if (!err)
+	return GRUB_ERR_NONE;
+      grub_errno = GRUB_ERR_NONE;
+    }
+
+  if (!err)
+    err = grub_error (GRUB_ERR_BAD_FS, "couldn't find a valid DVA");
+  grub_errno = err;
+
+  return err;
+}
+
+/*
+ * Read in a block of data, verify its checksum, decompress if needed,
+ * and put the uncompressed data in buf.
+ */
+static grub_err_t
+zio_read (blkptr_t * bp, grub_zfs_endian_t endian, void **buf, 
+	  grub_size_t *size, struct grub_zfs_data *data)
+{
+  grub_size_t lsize, psize;
+  int comp;
+  char *compbuf;
+  grub_err_t err;
+  zio_cksum_t zc = bp->blk_cksum;
+  grub_uint32_t checksum;
+
+  checksum = (grub_zfs_to_cpu64((bp)->blk_prop, endian) >> 40) & 0xff;
+  comp = (grub_zfs_to_cpu64((bp)->blk_prop, endian)>>32) & 0xff;
+  lsize = (BP_IS_HOLE(bp) ? 0 :
+	   (((grub_zfs_to_cpu64 ((bp)->blk_prop, endian) & 0xffff) + 1)
+	    << SPA_MINBLOCKSHIFT));
+  psize = get_psize (bp, endian);
+
+  if (size)
+    *size = lsize;
+
+  if ((unsigned int) comp >= ZIO_COMPRESS_FUNCTIONS ||
+      (comp != ZIO_COMPRESS_OFF && decomp_table[comp].decomp_func == NULL))
+    {
+      grub_dprintf ("zfs", "comp=%d\n", comp);
+      return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+			 "compression algorithm not supported\n");
+    }
+
+  if (comp != ZIO_COMPRESS_OFF)
+    {
+      compbuf = grub_malloc (psize);
+      if (! compbuf)
+	return grub_errno;
+    }
+  else
+    compbuf = *buf = grub_malloc (lsize);
+
+  grub_dprintf ("zfs", "endian = %d\n", endian);
+  err = zio_read_data (bp, endian, compbuf, data);
+  if (err)
+    {
+      grub_free (compbuf);
+      return err;
+    }
+
+  err = zio_checksum_verify (zc, checksum, endian, compbuf, psize);
+  if (err)
+    {
+      grub_dprintf ("zfs", "incorrect checksum\n");
+      grub_free (compbuf);
+      return err;
+    }
+
+  if (comp != ZIO_COMPRESS_OFF)
+    {
+      *buf = grub_malloc (lsize);
+      err = decomp_table[comp].decomp_func (compbuf, *buf, psize, lsize);
+      grub_free (compbuf);
+      if (err)
+	return err;
+    }
+
+  return GRUB_ERR_NONE;
+}
+
+/*
+ * Get the block from a block id.
+ * push the block onto the stack.
+ *
+ */
+static grub_err_t
+dmu_read (dnode_end_t * dn, grub_uint64_t blkid, void **buf, 
+	  grub_zfs_endian_t *endian_out, struct grub_zfs_data *data)
+{
+  int idx, level;
+  blkptr_t *bp_array = dn->dn.dn_blkptr;
+  int epbs = dn->dn.dn_indblkshift - SPA_BLKPTRSHIFT;
+  blkptr_t *bp, *tmpbuf = 0;
+  grub_zfs_endian_t endian;
+  grub_err_t err = GRUB_ERR_NONE;
+
+  bp = grub_malloc (sizeof (blkptr_t));
+  if (!bp)
+    return grub_errno;
+
+  endian = dn->endian;
+  for (level = dn->dn.dn_nlevels - 1; level >= 0; level--)
+    {
+      grub_dprintf ("zfs", "endian = %d\n", endian);
+      idx = (blkid >> (epbs * level)) & ((1 << epbs) - 1);
+      *bp = bp_array[idx];
+      if (bp_array != dn->dn.dn_blkptr)
+	{
+	  grub_free (bp_array);
+	  bp_array = 0;
+	}
+
+      if (BP_IS_HOLE (bp))
+	{
+	  grub_size_t size = grub_zfs_to_cpu16 (dn->dn.dn_datablkszsec, 
+						dn->endian) 
+	    << SPA_MINBLOCKSHIFT;
+	  *buf = grub_malloc (size);
+	  if (*buf)
+	    {
+	      err = grub_errno;
+	      break;
+	    }
+	  grub_memset (*buf, 0, size);
+	  endian = (grub_zfs_to_cpu64 (bp->blk_prop, endian) >> 63) & 1;
+	  break;
+	}
+      if (level == 0)
+	{
+	  grub_dprintf ("zfs", "endian = %d\n", endian);
+	  err = zio_read (bp, endian, buf, 0, data);
+	  endian = (grub_zfs_to_cpu64 (bp->blk_prop, endian) >> 63) & 1;
+	  break;
+	}
+      grub_dprintf ("zfs", "endian = %d\n", endian);
+      err = zio_read (bp, endian, (void **) &tmpbuf, 0, data);
+      endian = (grub_zfs_to_cpu64 (bp->blk_prop, endian) >> 63) & 1;
+      if (err)
+	break;
+      bp_array = tmpbuf;
+    }
+  if (bp_array != dn->dn.dn_blkptr)
+    grub_free (bp_array);
+  if (endian_out)
+    *endian_out = endian;
+
+  grub_free (bp);
+  return err;
+}
+
+/*
+ * mzap_lookup: Looks up property described by "name" and returns the value
+ * in "value".
+ */
+static grub_err_t
+mzap_lookup (mzap_phys_t * zapobj, grub_zfs_endian_t endian,
+	     int objsize, char *name, grub_uint64_t * value)
+{
+  int i, chunks;
+  mzap_ent_phys_t *mzap_ent = zapobj->mz_chunk;
+
+  chunks = objsize / MZAP_ENT_LEN - 1;
+  for (i = 0; i < chunks; i++)
+    {
+      if (grub_strcmp (mzap_ent[i].mze_name, name) == 0)
+	{
+	  *value = grub_zfs_to_cpu64 (mzap_ent[i].mze_value, endian);
+	  return GRUB_ERR_NONE;
+	}
+    }
+
+  return grub_error (GRUB_ERR_FILE_NOT_FOUND, "couldn't find %s", name);
+}
+
+static int
+mzap_iterate (mzap_phys_t * zapobj, grub_zfs_endian_t endian, int objsize, 
+	      int NESTED_FUNC_ATTR (*hook) (const char *name, 
+					    grub_uint64_t val))
+{
+  int i, chunks;
+  mzap_ent_phys_t *mzap_ent = zapobj->mz_chunk;
+
+  chunks = objsize / MZAP_ENT_LEN - 1;
+  for (i = 0; i < chunks; i++)
+    {
+      grub_dprintf ("zfs", "zap: name = %s, value = %llx, cd = %x\n",
+		    mzap_ent[i].mze_name, (long long)mzap_ent[i].mze_value,
+		    (int)mzap_ent[i].mze_cd);
+      if (hook (mzap_ent[i].mze_name, 
+		grub_zfs_to_cpu64 (mzap_ent[i].mze_value, endian)))
+	return 1;
+    }
+
+  return 0;
+}
+
+static grub_uint64_t
+zap_hash (grub_uint64_t salt, const char *name)
+{
+  static grub_uint64_t table[256];
+  const grub_uint8_t *cp;
+  grub_uint8_t c;
+  grub_uint64_t crc = salt;
+
+  if (table[128] == 0)
+    {
+      grub_uint64_t *ct;
+      int i, j;
+      for (i = 0; i < 256; i++)
+	{
+	  for (ct = table + i, *ct = i, j = 8; j > 0; j--)
+	    *ct = (*ct >> 1) ^ (-(*ct & 1) & ZFS_CRC64_POLY);
+	}
+    }
+
+  for (cp = (const grub_uint8_t *) name; (c = *cp) != '\0'; cp++)
+    crc = (crc >> 8) ^ table[(crc ^ c) & 0xFF];
+
+  /*
+   * Only use 28 bits, since we need 4 bits in the cookie for the
+   * collision differentiator.  We MUST use the high bits, since
+   * those are the onces that we first pay attention to when
+   * chosing the bucket.
+   */
+  crc &= ~((1ULL << (64 - ZAP_HASHBITS)) - 1);
+
+  return (crc);
+}
+
+/*
+ * Only to be used on 8-bit arrays.
+ * array_len is actual len in bytes (not encoded le_value_length).
+ * buf is null-terminated.
+ */
+/* XXX */
+static int
+zap_leaf_array_equal (zap_leaf_phys_t * l, grub_zfs_endian_t endian,
+		      int blksft, int chunk, int array_len, const char *buf)
+{
+  int bseen = 0;
+
+  while (bseen < array_len)
+    {
+      struct zap_leaf_array *la = &ZAP_LEAF_CHUNK (l, blksft, chunk).l_array;
+      int toread = MIN (array_len - bseen, ZAP_LEAF_ARRAY_BYTES);
+
+      if (chunk >= ZAP_LEAF_NUMCHUNKS (blksft))
+	return (0);
+
+      if (grub_memcmp (la->la_array, buf + bseen, toread) != 0)
+	break;
+      chunk = grub_zfs_to_cpu16 (la->la_next, endian);
+      bseen += toread;
+    }
+  return (bseen == array_len);
+}
+
+/* XXX */
+static grub_err_t
+zap_leaf_array_get (zap_leaf_phys_t * l, grub_zfs_endian_t endian, int blksft, 
+		    int chunk, int array_len, char *buf)
+{
+  int bseen = 0;
+
+  while (bseen < array_len)
+    {
+      struct zap_leaf_array *la = &ZAP_LEAF_CHUNK (l, blksft, chunk).l_array;
+      int toread = MIN (array_len - bseen, ZAP_LEAF_ARRAY_BYTES);
+
+      if (chunk >= ZAP_LEAF_NUMCHUNKS (blksft))
+	/* Don't use grub_error because this error is to be ignored.  */
+	return GRUB_ERR_BAD_FS;
+
+      grub_memcpy (buf + bseen,la->la_array,  toread);
+      chunk = grub_zfs_to_cpu16 (la->la_next, endian);
+      bseen += toread;
+    }
+  return GRUB_ERR_NONE;
+}
+
+
+/*
+ * Given a zap_leaf_phys_t, walk thru the zap leaf chunks to get the
+ * value for the property "name".
+ *
+ */
+/* XXX */
+static grub_err_t
+zap_leaf_lookup (zap_leaf_phys_t * l, grub_zfs_endian_t endian,
+		 int blksft, grub_uint64_t h,
+		 const char *name, grub_uint64_t * value)
+{
+  grub_uint16_t chunk;
+  struct zap_leaf_entry *le;
+
+  /* Verify if this is a valid leaf block */
+  if (grub_zfs_to_cpu64 (l->l_hdr.lh_block_type, endian) != ZBT_LEAF)
+    return grub_error (GRUB_ERR_BAD_FS, "invalid leaf type");
+  if (grub_zfs_to_cpu32 (l->l_hdr.lh_magic, endian) != ZAP_LEAF_MAGIC)
+    return grub_error (GRUB_ERR_BAD_FS, "invalid leaf magic");
+
+  for (chunk = grub_zfs_to_cpu16 (l->l_hash[LEAF_HASH (blksft, h)], endian);
+       chunk != CHAIN_END; chunk = le->le_next)
+    {
+
+      if (chunk >= ZAP_LEAF_NUMCHUNKS (blksft))
+	return grub_error (GRUB_ERR_BAD_FS, "invalid chunk number");
+
+      le = ZAP_LEAF_ENTRY (l, blksft, chunk);
+
+      /* Verify the chunk entry */
+      if (le->le_type != ZAP_CHUNK_ENTRY)
+	return grub_error (GRUB_ERR_BAD_FS, "invalid chunk entry");
+
+      if (grub_zfs_to_cpu64 (le->le_hash,endian) != h)
+	continue;
+
+      grub_dprintf ("zfs", "fzap: length %d\n", (int) le->le_name_length);
+
+      if (zap_leaf_array_equal (l, endian, blksft, 
+				grub_zfs_to_cpu16 (le->le_name_chunk,endian),
+				grub_zfs_to_cpu16 (le->le_name_length, endian),
+				name))
+	{
+	  struct zap_leaf_array *la;
+	  grub_uint8_t *ip;
+
+	  if (le->le_int_size != 8 || le->le_value_length != 1)
+	    return grub_error (GRUB_ERR_BAD_FS, "invalid leaf chunk entry");
+
+	  /* get the uint64_t property value */
+	  la = &ZAP_LEAF_CHUNK (l, blksft, le->le_value_chunk).l_array;
+	  ip = la->la_array;
+
+	  *value = grub_be_to_cpu64 (*(grub_uint64_t *)la->la_array);
+
+	  return GRUB_ERR_NONE;
+	}
+    }
+
+  return grub_error (GRUB_ERR_FILE_NOT_FOUND, "couldn't find %s", name);
+}
+
+/*
+ * Fat ZAP lookup
+ *
+ */
+/* XXX */
+static grub_err_t
+fzap_lookup (dnode_end_t * zap_dnode, zap_phys_t * zap,
+	     char *name, grub_uint64_t * value, struct grub_zfs_data *data)
+{
+  zap_leaf_phys_t *l;
+  grub_uint64_t hash, idx, blkid;
+  int blksft = zfs_log2 (grub_zfs_to_cpu16 (zap_dnode->dn.dn_datablkszsec, 
+					    zap_dnode->endian) << DNODE_SHIFT);
+  grub_err_t err;
+  grub_zfs_endian_t leafendian;
+
+  /* Verify if this is a fat zap header block */
+  if (zap->zap_magic != (grub_uint64_t) ZAP_MAGIC)
+    return grub_error (GRUB_ERR_BAD_FS, "bad ZAP magic");
+
+  if (zap->zap_salt == 0)
+    return grub_error (GRUB_ERR_BAD_FS, "bad ZAP salt");
+  hash = zap_hash (zap->zap_salt, name);
+
+  /* get block id from index */
+  if (zap->zap_ptrtbl.zt_numblks != 0)
+    return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, 
+		       "external pointer tables not supported");
+  idx = ZAP_HASH_IDX (hash, zap->zap_ptrtbl.zt_shift);
+  blkid = ((grub_uint64_t *) zap)[idx + (1 << (blksft - 3 - 1))];
+
+  /* Get the leaf block */
+  if ((1U << blksft) < sizeof (zap_leaf_phys_t))
+    return grub_error (GRUB_ERR_BAD_FS, "ZAP leaf is too small");
+  err = dmu_read (zap_dnode, blkid, (void **) &l, &leafendian, data);
+  if (err)
+    return err;
+
+  err = zap_leaf_lookup (l, leafendian, blksft, hash, name, value);
+  grub_free (l);
+  return err;
+}
+
+/* XXX */
+static int
+fzap_iterate (dnode_end_t * zap_dnode, zap_phys_t * zap,
+	     int NESTED_FUNC_ATTR (*hook) (const char *name, 
+					   grub_uint64_t val), 
+	     struct grub_zfs_data *data)
+{
+  zap_leaf_phys_t *l;
+  grub_uint64_t idx, blkid;
+  grub_uint16_t chunk;
+  int blksft = zfs_log2 (grub_zfs_to_cpu16 (zap_dnode->dn.dn_datablkszsec, 
+					    zap_dnode->endian) << DNODE_SHIFT);
+  grub_err_t err;
+  grub_zfs_endian_t endian;
+
+  /* Verify if this is a fat zap header block */
+  if (zap->zap_magic != (grub_uint64_t) ZAP_MAGIC)
+    {
+      grub_error (GRUB_ERR_BAD_FS, "bad ZAP magic");
+      return 0;
+    }
+
+  /* get block id from index */
+  if (zap->zap_ptrtbl.zt_numblks != 0)
+    {
+      grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, 
+		  "external pointer tables not supported");
+      return 0;
+    }
+  /* Get the leaf block */
+  if ((1U << blksft) < sizeof (zap_leaf_phys_t))
+    {
+      grub_error (GRUB_ERR_BAD_FS, "ZAP leaf is too small");
+      return 0;
+    }
+  for (idx = 0; idx < zap->zap_ptrtbl.zt_numblks; idx++)
+    {
+      blkid = ((grub_uint64_t *) zap)[idx + (1 << (blksft - 3 - 1))];
+
+      err = dmu_read (zap_dnode, blkid, (void **) &l, &endian, data);
+      if (err)
+	{
+	  grub_errno = GRUB_ERR_NONE;
+	  continue;
+	}
+
+      /* Verify if this is a valid leaf block */
+      if (grub_zfs_to_cpu64 (l->l_hdr.lh_block_type, endian) != ZBT_LEAF)
+	{
+	  grub_free (l);
+	  continue;
+	}
+      if (grub_zfs_to_cpu32 (l->l_hdr.lh_magic, endian) != ZAP_LEAF_MAGIC)
+	{
+	  grub_free (l);
+	  continue;
+	}
+
+      for (chunk = 0; chunk < ZAP_LEAF_NUMCHUNKS (blksft); chunk++)
+	  {
+	    char *buf;
+	    struct zap_leaf_array *la;
+	    struct zap_leaf_entry *le;
+	    grub_uint64_t val;
+	    le = ZAP_LEAF_ENTRY (l, blksft, chunk);
+
+	    /* Verify the chunk entry */
+	    if (le->le_type != ZAP_CHUNK_ENTRY)
+	      continue;
+
+	    buf = grub_malloc (grub_zfs_to_cpu16 (le->le_name_length, endian) 
+			       + 1);
+	    if (zap_leaf_array_get (l, endian, blksft, le->le_name_chunk,
+				    le->le_name_length, buf))
+	      {
+		grub_free (buf);
+		continue;
+	      }
+	    buf[le->le_name_length] = 0;
+
+	    if (le->le_int_size != 8 
+		|| grub_zfs_to_cpu16 (le->le_value_length, endian) != 1)
+	      continue;
+
+	    /* get the uint64_t property value */
+	    la = &ZAP_LEAF_CHUNK (l, blksft, le->le_value_chunk).l_array;
+	    val = grub_be_to_cpu64 (*(grub_uint64_t *)la->la_array);
+	    if (hook (buf, val))
+	      return 1;
+	    grub_free (buf);
+	  }
+    }
+  return 0;
+}
+
+
+/*
+ * Read in the data of a zap object and find the value for a matching
+ * property name.
+ *
+ */
+static grub_err_t
+zap_lookup (dnode_end_t * zap_dnode, char *name, grub_uint64_t * val,
+	    struct grub_zfs_data *data)
+{
+  grub_uint64_t block_type;
+  int size;
+  void *zapbuf;
+  grub_err_t err;
+  grub_zfs_endian_t endian;
+
+  grub_dprintf ("zfs", "looking for '%s'\n", name);
+
+  /* Read in the first block of the zap object data. */
+  size = grub_zfs_to_cpu16 (zap_dnode->dn.dn_datablkszsec, 
+			    zap_dnode->endian) << SPA_MINBLOCKSHIFT;
+  err = dmu_read (zap_dnode, 0, &zapbuf, &endian, data);
+  if (err)
+    return err;
+  block_type = grub_zfs_to_cpu64 (*((grub_uint64_t *) zapbuf), endian);
+
+  grub_dprintf ("zfs", "zap read\n");
+
+  if (block_type == ZBT_MICRO)
+    {
+      grub_dprintf ("zfs", "micro zap\n");
+      err = (mzap_lookup (zapbuf, endian, size, name, val));
+      grub_dprintf ("zfs", "returned %d\n", err);      
+      grub_free (zapbuf);
+      return err;
+    }
+  else if (block_type == ZBT_HEADER)
+    {
+      grub_dprintf ("zfs", "fat zap\n");
+      /* this is a fat zap */
+      err = (fzap_lookup (zap_dnode, zapbuf, name, val, data));
+      grub_dprintf ("zfs", "returned %d\n", err);      
+      grub_free (zapbuf);
+      return err;
+    }
+
+  return grub_error (GRUB_ERR_BAD_FS, "unknown ZAP type");
+}
+
+static int
+zap_iterate (dnode_end_t * zap_dnode, 
+	     int NESTED_FUNC_ATTR (*hook) (const char *name, grub_uint64_t val),
+	     struct grub_zfs_data *data)
+{
+  grub_uint64_t block_type;
+  int size;
+  void *zapbuf;
+  grub_err_t err;
+  int ret;
+  grub_zfs_endian_t endian;
+
+  /* Read in the first block of the zap object data. */
+  size = grub_zfs_to_cpu16 (zap_dnode->dn.dn_datablkszsec, zap_dnode->endian) << SPA_MINBLOCKSHIFT;
+  err = dmu_read (zap_dnode, 0, &zapbuf, &endian, data);
+  if (err)
+    return 0;
+  block_type = grub_zfs_to_cpu64 (*((grub_uint64_t *) zapbuf), endian);
+
+  grub_dprintf ("zfs", "zap read\n");
+
+  if (block_type == ZBT_MICRO)
+    {
+      grub_dprintf ("zfs", "micro zap\n");
+      ret = mzap_iterate (zapbuf, endian, size, hook);
+      grub_free (zapbuf);
+      return ret;
+    }
+  else if (block_type == ZBT_HEADER)
+    {
+      grub_dprintf ("zfs", "fat zap\n");
+      /* this is a fat zap */
+      ret = fzap_iterate (zap_dnode, zapbuf, hook, data);
+      grub_free (zapbuf);
+      return ret;
+    }
+  grub_error (GRUB_ERR_BAD_FS, "unknown ZAP type");
+  return 0;
+}
+
+
+/*
+ * Get the dnode of an object number from the metadnode of an object set.
+ *
+ * Input
+ *	mdn - metadnode to get the object dnode
+ *	objnum - object number for the object dnode
+ *	buf - data buffer that holds the returning dnode
+ */
+static grub_err_t
+dnode_get (dnode_end_t * mdn, grub_uint64_t objnum, grub_uint8_t type,
+	   dnode_end_t * buf, struct grub_zfs_data *data)
+{
+  grub_uint64_t blkid, blksz;	/* the block id this object dnode is in */
+  int epbs;			/* shift of number of dnodes in a block */
+  int idx;			/* index within a block */
+  dnode_phys_t *dnbuf;
+  grub_err_t err;
+  grub_zfs_endian_t endian;
+
+  blksz = grub_zfs_to_cpu16 (mdn->dn.dn_datablkszsec, 
+			     mdn->endian) << SPA_MINBLOCKSHIFT;
+  epbs = zfs_log2 (blksz) - DNODE_SHIFT;
+  blkid = objnum >> epbs;
+  idx = objnum & ((1 << epbs) - 1);
+
+  if (data->dnode_buf != NULL && grub_memcmp (data->dnode_mdn, mdn, 
+					      sizeof (*mdn)) == 0 
+      && objnum >= data->dnode_start && objnum < data->dnode_end)
+    {
+      grub_memmove (&(buf->dn), &(data->dnode_buf)[idx], DNODE_SIZE);
+      buf->endian = data->dnode_endian;
+      if (type && buf->dn.dn_type != type) 
+	return grub_error(GRUB_ERR_BAD_FS, "incorrect dnode type"); 
+      return GRUB_ERR_NONE;
+    }
+
+  grub_dprintf ("zfs", "endian = %d, blkid=%llx\n", mdn->endian, 
+		(unsigned long long) blkid);
+  err = dmu_read (mdn, blkid, (void **) &dnbuf, &endian, data);
+  if (err)
+    return err;
+  grub_dprintf ("zfs", "alive\n");
+
+  grub_free (data->dnode_buf);
+  grub_free (data->dnode_mdn);
+  data->dnode_mdn = grub_malloc (sizeof (*mdn));
+  if (! data->dnode_mdn)
+    {
+      grub_errno = GRUB_ERR_NONE;
+      data->dnode_buf = 0;
+    }
+  else
+    {
+      grub_memcpy (data->dnode_mdn, mdn, sizeof (*mdn));
+      data->dnode_buf = dnbuf;
+      data->dnode_start = blkid << epbs;
+      data->dnode_end = (blkid + 1) << epbs;
+      data->dnode_endian = endian;
+    }
+
+  grub_memmove (&(buf->dn), &dnbuf[idx], DNODE_SIZE);
+  buf->endian = endian;
+  if (type && buf->dn.dn_type != type) 
+    return grub_error(GRUB_ERR_BAD_FS, "incorrect dnode type"); 
+
+  return GRUB_ERR_NONE;
+}
+
+/*
+ * Get the file dnode for a given file name where mdn is the meta dnode
+ * for this ZFS object set. When found, place the file dnode in dn.
+ * The 'path' argument will be mangled.
+ *
+ */
+static grub_err_t
+dnode_get_path (dnode_end_t * mdn, const char *path_in, dnode_end_t * dn,
+		struct grub_zfs_data *data)
+{
+  grub_uint64_t objnum, version;
+  char *cname, ch;
+  grub_err_t err = GRUB_ERR_NONE;
+  char *path, *path_buf;
+  struct dnode_chain
+  {
+    struct dnode_chain *next;
+    dnode_end_t dn; 
+  };
+  struct dnode_chain *dnode_path = 0, *dn_new, *root;
+
+  dn_new = grub_malloc (sizeof (*dn_new));
+  if (! dn_new)
+    return grub_errno;
+  dn_new->next = 0;
+  dnode_path = root = dn_new;
+
+  err = dnode_get (mdn, MASTER_NODE_OBJ, DMU_OT_MASTER_NODE, 
+		   &(dnode_path->dn), data);
+  if (err)
+    {
+      grub_free (dn_new);
+      return err;
+    }
+
+  err = zap_lookup (&(dnode_path->dn), ZPL_VERSION_STR, &version, data);
+  if (err)
+    {
+      grub_free (dn_new);
+      return err;
+    }
+  if (version > ZPL_VERSION)
+    {
+      grub_free (dn_new);
+      return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET, "too new ZPL version");
+    }
+  
+  err = zap_lookup (&(dnode_path->dn), ZFS_ROOT_OBJ, &objnum, data);
+  if (err)
+    {
+      grub_free (dn_new);
+      return err;
+    }
+
+  err = dnode_get (mdn, objnum, 0, &(dnode_path->dn), data);
+  if (err)
+    {
+      grub_free (dn_new);
+      return err;
+    }
+
+  path = path_buf = grub_strdup (path_in);
+  if (!path_buf)
+    {
+      grub_free (dn_new);
+      return grub_errno;
+    }
+  
+  while (1)
+    {
+      /* skip leading slashes */
+      while (*path == '/')
+	path++;
+      if (!*path)
+	break;
+      /* get the next component name */
+      cname = path;
+      while (*path && *path != '/')
+	path++;
+      /* Skip dot.  */
+      if (cname + 1 == path && cname[0] == '.')
+	continue;
+      /* Handle double dot.  */
+      if (cname + 2 == path && cname[0] == '.' && cname[1] == '.')
+	{
+	  if (dn_new->next)
+	    {
+	      dn_new = dnode_path;
+	      dnode_path = dn_new->next;
+	      grub_free (dn_new);
+	    }
+	  else
+	    {
+	      err = grub_error (GRUB_ERR_FILE_NOT_FOUND, 
+				"can't resolve ..");
+	      break;
+	    }
+	  continue;
+	}
+
+      ch = *path;
+      *path = 0;		/* ensure null termination */
+
+      if (dnode_path->dn.dn.dn_type != DMU_OT_DIRECTORY_CONTENTS)
+	{
+	  grub_free (path_buf);
+	  return grub_error (GRUB_ERR_BAD_FILE_TYPE, "not a directory");
+	}
+      err = zap_lookup (&(dnode_path->dn), cname, &objnum, data);
+      if (err)
+	break;
+
+      dn_new = grub_malloc (sizeof (*dn_new));
+      if (! dn_new)
+	{
+	  err = grub_errno;
+	  break;
+	}
+      dn_new->next = dnode_path;
+      dnode_path = dn_new;
+
+      objnum = ZFS_DIRENT_OBJ (objnum);
+      err = dnode_get (mdn, objnum, 0, &(dnode_path->dn), data);
+      if (err)
+	break;
+
+      *path = ch;      
+      if (((grub_zfs_to_cpu64(((znode_phys_t *) &dnode_path->dn.dn.dn_bonus)->zp_mode, dnode_path->dn.endian) >> 12) & 0xf) == 0xa && ch)
+	{
+	  char *oldpath = path, *oldpathbuf = path_buf;
+	  path = path_buf 
+	    = grub_malloc (sizeof (dnode_path->dn.dn.dn_bonus) 
+			   - sizeof (znode_phys_t) + grub_strlen (oldpath) + 1);
+	  if (!path_buf)
+	    {
+	      grub_free (oldpathbuf);
+	      return grub_errno;
+	    }
+	  grub_memcpy (path, 
+		       (char *) &dnode_path->dn.dn.dn_bonus[sizeof (znode_phys_t)],
+		       sizeof (dnode_path->dn.dn.dn_bonus) - sizeof (znode_phys_t));
+	  path [sizeof (dnode_path->dn.dn.dn_bonus) - sizeof (znode_phys_t)] = 0;
+	  grub_memcpy (path + grub_strlen (path), oldpath, 
+		       grub_strlen (oldpath) + 1);
+	  
+	  grub_free (oldpathbuf);
+	  if (path[0] != '/')
+	    {
+	      dn_new = dnode_path;
+	      dnode_path = dn_new->next;
+	      grub_free (dn_new);
+	    }
+	  else while (dnode_path != root)
+	    {
+	      dn_new = dnode_path;
+	      dnode_path = dn_new->next;
+	      grub_free (dn_new);
+	    }
+	}
+    }
+
+  if (!err)
+    grub_memcpy (dn, &(dnode_path->dn), sizeof (*dn));
+
+  while (dnode_path)
+    {
+      dn_new = dnode_path->next;
+      grub_free (dnode_path);
+      dnode_path = dn_new;
+    }
+  grub_free (path_buf);
+  return err;
+}
+
+#if 0
+/*
+ * Get the default 'bootfs' property value from the rootpool.
+ *
+ */
+static grub_err_t
+get_default_bootfsobj (dnode_phys_t * mosmdn, grub_uint64_t * obj,
+		       struct grub_zfs_data *data)
+{
+  grub_uint64_t objnum = 0;
+  dnode_phys_t *dn;
+  if (!dn)
+    return grub_errno;
+
+  if ((grub_errno = dnode_get (mosmdn, DMU_POOL_DIRECTORY_OBJECT,
+			       DMU_OT_OBJECT_DIRECTORY, dn, data)))
+    {
+      grub_free (dn);
+      return (grub_errno);
+    }
+
+  /*
+   * find the object number for 'pool_props', and get the dnode
+   * of the 'pool_props'.
+   */
+  if (zap_lookup (dn, DMU_POOL_PROPS, &objnum, data))
+    {
+      grub_free (dn);
+      return (GRUB_ERR_BAD_FS);
+    }
+  if ((grub_errno = dnode_get (mosmdn, objnum, DMU_OT_POOL_PROPS, dn, data)))
+    {
+      grub_free (dn);
+      return (grub_errno);
+    }
+  if (zap_lookup (dn, ZPOOL_PROP_BOOTFS, &objnum, data))
+    {
+      grub_free (dn);
+      return (GRUB_ERR_BAD_FS);
+    }
+
+  if (!objnum)
+    {
+      grub_free (dn);
+      return (GRUB_ERR_BAD_FS);
+    }
+
+  *obj = objnum;
+  return (0);
+}
+#endif
+/*
+ * Given a MOS metadnode, get the metadnode of a given filesystem name (fsname),
+ * e.g. pool/rootfs, or a given object number (obj), e.g. the object number
+ * of pool/rootfs.
+ *
+ * If no fsname and no obj are given, return the DSL_DIR metadnode.
+ * If fsname is given, return its metadnode and its matching object number.
+ * If only obj is given, return the metadnode for this object number.
+ *
+ */
+static grub_err_t
+get_filesystem_dnode (dnode_end_t * mosmdn, char *fsname,
+		      dnode_end_t * mdn, struct grub_zfs_data *data)
+{
+  grub_uint64_t objnum;
+  grub_err_t err;
+
+  grub_dprintf ("zfs", "endian = %d\n", mosmdn->endian);
+
+  err = dnode_get (mosmdn, DMU_POOL_DIRECTORY_OBJECT, 
+		   DMU_OT_OBJECT_DIRECTORY, mdn, data);
+  if (err)
+    return err;
+
+  grub_dprintf ("zfs", "alive\n");
+
+  err = zap_lookup (mdn, DMU_POOL_ROOT_DATASET, &objnum, data);
+  if (err)
+    return err;
+
+  grub_dprintf ("zfs", "alive\n");
+
+  err = dnode_get (mosmdn, objnum, DMU_OT_DSL_DIR, mdn, data);
+  if (err)
+    return err;
+
+  grub_dprintf ("zfs", "alive\n");
+
+  while (*fsname)
+    {
+      grub_uint64_t childobj;
+      char *cname, ch;
+ 
+      while (*fsname == '/')
+	fsname++;
+
+      if (! *fsname || *fsname == '@')
+	break;
+
+      cname = fsname;
+      while (*fsname && !grub_isspace (*fsname) && *fsname != '/')
+	fsname++;
+      ch = *fsname;
+      *fsname = 0;
+
+      childobj = grub_zfs_to_cpu64(((dsl_dir_phys_t *) &(mdn->dn.dn_bonus))->dd_child_dir_zapobj, mdn->endian);
+      err = dnode_get (mosmdn, childobj,
+		       DMU_OT_DSL_DIR_CHILD_MAP, mdn, data);
+      if (err)
+	return err;
+
+      err = zap_lookup (mdn, cname, &objnum, data);
+      if (err)
+	return err;
+
+      err = dnode_get (mosmdn, objnum, DMU_OT_DSL_DIR, mdn, data);
+      if (err)
+	return err;
+
+      *fsname = ch;
+    }
+  return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+make_mdn (dnode_end_t * mdn, struct grub_zfs_data *data)
+{
+  objset_phys_t *osp;
+  blkptr_t *bp;
+  grub_size_t ospsize;
+  grub_err_t err;
+
+  grub_dprintf ("zfs", "endian = %d\n", mdn->endian);
+
+  bp = &((dsl_dataset_phys_t *) &(mdn->dn.dn_bonus))->ds_bp;
+  err = zio_read (bp, mdn->endian, (void **) &osp, &ospsize, data);
+  if (err)
+    return err;
+  if (ospsize < sizeof (objset_phys_t))
+    {
+      grub_free (osp);
+      return grub_error (GRUB_ERR_BAD_FS, "too small osp");
+    }
+
+  mdn->endian = (grub_zfs_to_cpu64 (bp->blk_prop, mdn->endian)>>63) & 1;
+  grub_memmove ((char *) &(mdn->dn), (char *) &osp->os_meta_dnode, DNODE_SIZE);
+  grub_free (osp);
+  return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+dnode_get_fullpath (const char *fullpath, dnode_end_t * mdn,
+		    grub_uint64_t *mdnobj, dnode_end_t * dn, int *isfs,
+		    struct grub_zfs_data *data)
+{
+  char *fsname, *snapname;
+  const char *ptr_at, *filename;
+  grub_uint64_t headobj;
+  grub_err_t err;
+
+  ptr_at = grub_strchr (fullpath, '@');
+  if (! ptr_at)
+    {
+      *isfs = 1;
+      filename = 0;
+      snapname = 0;
+      fsname = grub_strdup (fullpath);
+    }
+  else
+    {
+      const char *ptr_slash = grub_strchr (ptr_at, '/');
+
+      *isfs = 0;
+      fsname = grub_malloc (ptr_at - fullpath + 1);
+      if (!fsname)
+	return grub_errno;
+      grub_memcpy (fsname, fullpath, ptr_at - fullpath);
+      fsname[ptr_at - fullpath] = 0;
+      if (ptr_at[1] && ptr_at[1] != '/')
+	{
+	  snapname = grub_malloc (ptr_slash - ptr_at);
+	  if (!snapname)
+	    {
+	      grub_free (fsname);
+	      return grub_errno;
+	    }
+	  grub_memcpy (snapname, ptr_at + 1, ptr_slash - ptr_at - 1);
+	  snapname[ptr_slash - ptr_at - 1] = 0;
+	}
+      else
+	snapname = 0;
+      if (ptr_slash)
+	filename = ptr_slash;
+      else
+	filename = "/";
+      grub_dprintf ("zfs", "fsname = '%s' snapname='%s' filename = '%s'\n", 
+		    fsname, snapname, filename);
+    }
+  grub_dprintf ("zfs", "alive\n");
+  err = get_filesystem_dnode (&(data->mos), fsname, dn, data);
+  if (err)
+    {
+      grub_free (fsname);
+      grub_free (snapname);
+      return err;
+    }
+
+  grub_dprintf ("zfs", "alive\n");
+
+  headobj = grub_zfs_to_cpu64 (((dsl_dir_phys_t *) &(dn->dn.dn_bonus))->dd_head_dataset_obj, dn->endian);
+
+  grub_dprintf ("zfs", "endian = %d\n", mdn->endian);
+
+  err = dnode_get (&(data->mos), headobj, DMU_OT_DSL_DATASET, mdn, data);
+  if (err)
+    {
+      grub_free (fsname);
+      grub_free (snapname);
+      return err;
+    }
+  grub_dprintf ("zfs", "endian = %d\n", mdn->endian);
+
+  if (snapname)
+    {
+      grub_uint64_t snapobj;
+
+      snapobj = grub_zfs_to_cpu64 (((dsl_dataset_phys_t *) &(mdn->dn.dn_bonus))->ds_snapnames_zapobj, mdn->endian);
+
+      err = dnode_get (&(data->mos), snapobj, 
+		       DMU_OT_DSL_DS_SNAP_MAP, mdn, data);
+      if (!err)
+	err = zap_lookup (mdn, snapname, &headobj, data);
+      if (!err)
+	err = dnode_get (&(data->mos), headobj, DMU_OT_DSL_DATASET, mdn, data);
+      if (err)
+	{
+	  grub_free (fsname);
+	  grub_free (snapname);
+	  return err;
+	}
+    }
+
+  if (mdnobj)
+    *mdnobj = headobj;
+
+  make_mdn (mdn, data);
+  
+  grub_dprintf ("zfs", "endian = %d\n", mdn->endian);
+
+  if (*isfs)
+    {
+      grub_free (fsname);
+      grub_free (snapname);      
+      return GRUB_ERR_NONE;
+    }
+  err = dnode_get_path (mdn, filename, dn, data);
+  grub_free (fsname);
+  grub_free (snapname);
+  return err;
+}
+
+/*
+ * For a given XDR packed nvlist, verify the first 4 bytes and move on.
+ *
+ * An XDR packed nvlist is encoded as (comments from nvs_xdr_create) :
+ *
+ *      encoding method/host endian     (4 bytes)
+ *      nvl_version                     (4 bytes)
+ *      nvl_nvflag                      (4 bytes)
+ *	encoded nvpairs:
+ *		encoded size of the nvpair      (4 bytes)
+ *		decoded size of the nvpair      (4 bytes)
+ *		name string size                (4 bytes)
+ *		name string data                (sizeof(NV_ALIGN4(string))
+ *		data type                       (4 bytes)
+ *		# of elements in the nvpair     (4 bytes)
+ *		data
+ *      2 zero's for the last nvpair
+ *		(end of the entire list)	(8 bytes)
+ *
+ */
+
+static int
+nvlist_find_value (char *nvlist, char *name, int valtype, char **val,
+		   grub_size_t *size_out, grub_size_t *nelm_out)
+{
+  int name_len, type, encode_size;
+  char *nvpair, *nvp_name;
+
+  /* Verify if the 1st and 2nd byte in the nvlist are valid. */
+  /* NOTE: independently of what endianness header announces all 
+     subsequent values are big-endian.  */
+  if (nvlist[0] != NV_ENCODE_XDR || (nvlist[1] != NV_LITTLE_ENDIAN 
+				     && nvlist[1] != NV_BIG_ENDIAN))
+    {
+      grub_dprintf ("zfs", "incorrect nvlist header\n");
+      grub_error (GRUB_ERR_BAD_FS, "incorrect nvlist");
+      return 0;
+    }
+
+  /* skip the header, nvl_version, and nvl_nvflag */
+  nvlist = nvlist + 4 * 3;
+  /*
+   * Loop thru the nvpair list
+   * The XDR representation of an integer is in big-endian byte order.
+   */
+  while ((encode_size = grub_be_to_cpu32 (*(grub_uint32_t *) nvlist)))
+    {
+      int nelm;
+
+      nvpair = nvlist + 4 * 2;	/* skip the encode/decode size */
+
+      name_len = grub_be_to_cpu32 (*(grub_uint32_t *) nvpair);
+      nvpair += 4;
+
+      nvp_name = nvpair;
+      nvpair = nvpair + ((name_len + 3) & ~3);	/* align */
+
+      type = grub_be_to_cpu32 (*(grub_uint32_t *) nvpair);
+      nvpair += 4;
+
+      nelm = grub_be_to_cpu32 (*(grub_uint32_t *) nvpair);
+      if (nelm < 1)
+	return grub_error (GRUB_ERR_BAD_FS, "empty nvpair");
+
+      nvpair += 4;
+
+      if ((grub_strncmp (nvp_name, name, name_len) == 0) && type == valtype)
+	{
+	  *val = nvpair;
+	  *size_out = encode_size;
+	  if (nelm_out)
+	    *nelm_out = nelm;
+	  return 1;
+	}
+
+      nvlist += encode_size;	/* goto the next nvpair */
+    }
+  return 0;
+}
+
+int
+grub_zfs_nvlist_lookup_uint64 (char *nvlist, char *name, grub_uint64_t * out)
+{
+  char *nvpair;
+  grub_size_t size;
+  int found;
+
+  found = nvlist_find_value (nvlist, name, DATA_TYPE_UINT64, &nvpair, &size, 0);
+  if (!found)
+    return 0;
+  if (size < sizeof (grub_uint64_t))
+    {
+      grub_error (GRUB_ERR_BAD_FS, "invalid uint64");
+      return 0;
+    }
+
+  *out = grub_be_to_cpu64 (*(grub_uint64_t *) nvpair);
+  return 1;
+}
+
+char *
+grub_zfs_nvlist_lookup_string (char *nvlist, char *name)
+{
+  char *nvpair;
+  char *ret;
+  grub_size_t slen;
+  grub_size_t size;
+  int found;
+
+  found = nvlist_find_value (nvlist, name, DATA_TYPE_STRING, &nvpair, &size, 0);
+  if (!found)
+    return 0;
+  if (size < 4)
+    {
+      grub_error (GRUB_ERR_BAD_FS, "invalid string");
+      return 0;
+    }
+  slen = grub_be_to_cpu32 (*(grub_uint32_t *) nvpair);
+  if (slen > size - 4)
+    slen = size - 4;
+  ret = grub_malloc (slen + 1);
+  if (!ret)
+    return 0;
+  grub_memcpy (ret, nvpair + 4, slen);
+  ret[slen] = 0;
+  return ret;
+}
+
+char *
+grub_zfs_nvlist_lookup_nvlist (char *nvlist, char *name)
+{
+  char *nvpair;
+  char *ret;
+  grub_size_t size;
+  int found;
+
+  found = nvlist_find_value (nvlist, name, DATA_TYPE_NVLIST, &nvpair,
+			     &size, 0);
+  if (!found)
+    return 0;
+  ret = grub_zalloc (size + 3 * sizeof (grub_uint32_t));
+  if (!ret)
+    return 0;
+  grub_memcpy (ret, nvlist, sizeof (grub_uint32_t));
+
+  grub_memcpy (ret + sizeof (grub_uint32_t), nvpair, size);
+  return ret;
+}
+
+int
+grub_zfs_nvlist_lookup_nvlist_array_get_nelm (char *nvlist, char *name)
+{
+  char *nvpair;
+  grub_size_t nelm, size;
+  int found;
+
+  found = nvlist_find_value (nvlist, name, DATA_TYPE_NVLIST, &nvpair,
+			     &size, &nelm);
+  if (! found)
+    return -1;
+  return nelm;
+}
+
+char *
+grub_zfs_nvlist_lookup_nvlist_array (char *nvlist, char *name,
+				     grub_size_t index)
+{
+  char *nvpair, *nvpairptr;
+  int found;
+  char *ret;
+  grub_size_t size;
+  unsigned i;
+  grub_size_t nelm;
+
+  found = nvlist_find_value (nvlist, name, DATA_TYPE_NVLIST, &nvpair,
+			     &size, &nelm);
+  if (!found)
+    return 0;
+  if (index >= nelm)
+    {
+      grub_error (GRUB_ERR_OUT_OF_RANGE, "trying to lookup past nvlist array");
+      return 0;
+    }
+
+  nvpairptr = nvpair;
+
+  for (i = 0; i < index; i++)
+    {
+      grub_uint32_t encode_size;
+
+      /* skip the header, nvl_version, and nvl_nvflag */
+      nvpairptr = nvpairptr + 4 * 2;
+
+      while (nvpairptr < nvpair + size
+	     && (encode_size = grub_be_to_cpu32 (*(grub_uint32_t *) nvpairptr)))
+	nvlist += encode_size;	/* goto the next nvpair */
+
+      nvlist = nvlist + 4 * 2;	/* skip the ending 2 zeros - 8 bytes */
+    }
+
+  if (nvpairptr >= nvpair + size
+      || nvpairptr + grub_be_to_cpu32 (*(grub_uint32_t *) (nvpairptr + 4 * 2))
+      >= nvpair + size)
+    {
+      grub_error (GRUB_ERR_BAD_FS, "incorrect nvlist array");
+      return 0;
+    }
+
+  ret = grub_zalloc (grub_be_to_cpu32 (*(grub_uint32_t *) (nvpairptr + 4 * 2))
+		     + 3 * sizeof (grub_uint32_t));
+  if (!ret)
+    return 0;
+  grub_memcpy (ret, nvlist, sizeof (grub_uint32_t));
+
+  grub_memcpy (ret + sizeof (grub_uint32_t), nvpairptr, size);
+  return ret;
+}
+
+static grub_err_t
+zfs_fetch_nvlist (struct grub_zfs_data * data, char **nvlist)
+{
+  grub_err_t err;
+
+  *nvlist = grub_malloc (VDEV_PHYS_SIZE);
+  /* Read in the vdev name-value pair list (112K). */
+  err = grub_disk_read (data->disk, data->vdev_phys_sector, 0,
+			VDEV_PHYS_SIZE, *nvlist);
+  if (err)
+    {
+      grub_free (*nvlist);
+      *nvlist = 0;
+      return err;
+    }
+  return GRUB_ERR_NONE;
+}
+
+/*
+ * Check the disk label information and retrieve needed vdev name-value pairs.
+ *
+ */
+static grub_err_t
+check_pool_label (struct grub_zfs_data *data)
+{
+  grub_uint64_t pool_state, txg = 0;
+  char *nvlist;
+#if 0
+  char *nv;
+#endif
+  grub_uint64_t diskguid;
+  grub_uint64_t version;
+  int found;
+  grub_err_t err;
+
+  err = zfs_fetch_nvlist (data, &nvlist);
+  if (err)
+    return err;
+
+  grub_dprintf ("zfs", "check 2 passed\n");
+
+  found = grub_zfs_nvlist_lookup_uint64 (nvlist, ZPOOL_CONFIG_POOL_STATE,
+					 &pool_state);
+  if (! found)
+    {
+      grub_free (nvlist);
+      if (! grub_errno)
+	grub_error (GRUB_ERR_BAD_FS, ZPOOL_CONFIG_POOL_STATE " not found");
+      return grub_errno;
+    }
+  grub_dprintf ("zfs", "check 3 passed\n");
+
+  if (pool_state == POOL_STATE_DESTROYED)
+    {
+      grub_free (nvlist);
+      return grub_error (GRUB_ERR_BAD_FS, "zpool is marked as destroyed");
+    }
+  grub_dprintf ("zfs", "check 4 passed\n");
+
+  found = grub_zfs_nvlist_lookup_uint64 (nvlist, ZPOOL_CONFIG_POOL_TXG, &txg);
+  if (!found)
+    {
+      grub_free (nvlist);
+      if (! grub_errno)
+	grub_error (GRUB_ERR_BAD_FS, ZPOOL_CONFIG_POOL_TXG " not found");
+      return grub_errno;
+    }
+  grub_dprintf ("zfs", "check 6 passed\n");
+
+  /* not an active device */
+  if (txg == 0)
+    {
+      grub_free (nvlist);
+      return grub_error (GRUB_ERR_BAD_FS, "zpool isn't active");
+    }
+  grub_dprintf ("zfs", "check 7 passed\n");
+
+  found = grub_zfs_nvlist_lookup_uint64 (nvlist, ZPOOL_CONFIG_VERSION,
+					 &version);
+  if (! found)
+    {
+      grub_free (nvlist);
+      if (! grub_errno)
+	grub_error (GRUB_ERR_BAD_FS, ZPOOL_CONFIG_VERSION " not found");
+      return grub_errno;
+    }
+  grub_dprintf ("zfs", "check 8 passed\n");
+
+  if (version > SPA_VERSION)
+    {
+      grub_free (nvlist);
+      return grub_error (GRUB_ERR_NOT_IMPLEMENTED_YET,
+			 "too new version %llu > %llu",
+			 (unsigned long long) version,
+			 (unsigned long long) SPA_VERSION);
+    }
+  grub_dprintf ("zfs", "check 9 passed\n");
+#if 0
+  if (nvlist_lookup_value (nvlist, ZPOOL_CONFIG_VDEV_TREE, &nv,
+			   DATA_TYPE_NVLIST, NULL))
+    {
+      grub_free (vdev);
+      return (GRUB_ERR_BAD_FS);
+    }
+  grub_dprintf ("zfs", "check 10 passed\n");
+#endif
+
+  found = grub_zfs_nvlist_lookup_uint64 (nvlist, ZPOOL_CONFIG_GUID, &diskguid);
+  if (! found)
+    {
+      grub_free (nvlist);
+      if (! grub_errno)
+	grub_error (GRUB_ERR_BAD_FS, ZPOOL_CONFIG_GUID " not found");
+      return grub_errno;
+    }
+  grub_dprintf ("zfs", "check 11 passed\n");
+
+  grub_free (nvlist);
+
+  return GRUB_ERR_NONE;
+}
+
+static void
+zfs_unmount (struct grub_zfs_data *data)
+{
+  grub_free (data->dnode_buf);
+  grub_free (data->dnode_mdn);
+  grub_free (data->file_buf);
+  grub_free (data);
+}
+
+/*
+ * zfs_mount() locates a valid uberblock of the root pool and read in its MOS
+ * to the memory address MOS.
+ *
+ */
+static struct grub_zfs_data *
+zfs_mount (grub_device_t dev)
+{
+  struct grub_zfs_data *data = 0;
+  int label = 0;
+  uberblock_phys_t *ub_array, *ubbest = NULL;
+  vdev_boot_header_t *bh;
+  objset_phys_t *osp = 0;
+  grub_size_t ospsize;
+  grub_err_t err;
+  int vdevnum;
+
+  if (! dev->disk)
+    {
+      grub_error (GRUB_ERR_BAD_DEVICE, "not a disk");
+      return 0;
+    }
+
+  data = grub_malloc (sizeof (*data));
+  if (!data)
+    return 0;
+  grub_memset (data, 0, sizeof (*data));
+#if 0
+  /* if it's our first time here, zero the best uberblock out */
+  if (data->best_drive == 0 && data->best_part == 0 && find_best_root)
+    grub_memset (&current_uberblock, 0, sizeof (uberblock_t));
+#endif
+
+  data->disk = dev->disk;
+
+  ub_array = grub_malloc (VDEV_UBERBLOCK_RING);
+  if (!ub_array)
+    {
+      zfs_unmount (data);
+      return 0;
+    }
+
+  bh = grub_malloc (VDEV_BOOT_HEADER_SIZE);
+  if (!bh)
+    {
+      zfs_unmount (data);
+      grub_free (ub_array);
+      return 0;
+    }
+
+  vdevnum = VDEV_LABELS;
+
+  /* Don't check back labels on CDROM.  */
+  if (! data->disk->partition
+      && data->disk->dev->id == GRUB_DISK_DEVICE_BIOSDISK_ID
+      && data->disk->id >= 0xc0)
+    vdevnum = VDEV_LABELS / 2;
+
+  for (label = 0; ubbest == NULL && label < vdevnum; label++)
+    {
+      grub_zfs_endian_t ub_endian = UNKNOWN_ENDIAN;
+      grub_dprintf ("zfs", "label %d\n", label);
+
+      data->vdev_phys_sector
+	= label * (sizeof (vdev_label_t) >> SPA_MINBLOCKSHIFT)
+	+ ((VDEV_SKIP_SIZE + VDEV_BOOT_HEADER_SIZE) >> SPA_MINBLOCKSHIFT)
+	+ (label < VDEV_LABELS / 2 ? 0 : grub_disk_get_size (dev->disk)
+	   - VDEV_LABELS * (sizeof (vdev_label_t) >> SPA_MINBLOCKSHIFT));
+
+      /* Read in the uberblock ring (128K). */
+      err = grub_disk_read (data->disk, data->vdev_phys_sector
+			    + (VDEV_PHYS_SIZE >> SPA_MINBLOCKSHIFT),
+			    0, VDEV_UBERBLOCK_RING, (char *) ub_array);
+      if (err)
+	{
+	  grub_errno = GRUB_ERR_NONE;
+	  continue;
+	}
+      grub_dprintf ("zfs", "label ok %d\n", label);
+
+      ubbest = find_bestub (ub_array, data->vdev_phys_sector);
+      if (!ubbest)
+	{
+	  grub_dprintf ("zfs", "No uberblock found\n");
+	  grub_errno = GRUB_ERR_NONE;
+	  continue;
+	}
+      ub_endian = (grub_zfs_to_cpu64 (ubbest->ubp_uberblock.ub_magic, 
+				     LITTLE_ENDIAN) == UBERBLOCK_MAGIC 
+		   ? LITTLE_ENDIAN : BIG_ENDIAN);
+      err = zio_read (&ubbest->ubp_uberblock.ub_rootbp, 
+		      ub_endian,
+		      (void **) &osp, &ospsize, data);
+      if (err)
+	{
+	  grub_dprintf ("zfs", "couldn't zio_read\n"); 
+	  grub_errno = GRUB_ERR_NONE;
+	  continue;
+	}
+
+      if (ospsize < sizeof (objset_phys_t))
+	{
+	  grub_dprintf ("zfs", "osp too small\n"); 
+	  grub_free (osp);
+	  continue;
+	}
+      grub_dprintf ("zfs", "ubbest %p\n", ubbest);
+
+      err = check_pool_label (data);
+      if (err)
+	{
+	  grub_errno = GRUB_ERR_NONE;
+	  continue;
+	}
+#if 0
+      if (find_best_root &&
+	  vdev_uberblock_compare (&ubbest->ubp_uberblock,
+				  &(current_uberblock)) <= 0)
+	continue;
+#endif
+      /* Got the MOS. Save it at the memory addr MOS. */
+      grub_memmove (&(data->mos.dn), &osp->os_meta_dnode, DNODE_SIZE);
+      data->mos.endian = (grub_zfs_to_cpu64 (ubbest->ubp_uberblock.ub_rootbp.blk_prop, ub_endian) >> 63) & 1;
+      grub_memmove (&(data->current_uberblock),
+		    &ubbest->ubp_uberblock, sizeof (uberblock_t));
+      grub_free (ub_array);
+      grub_free (bh);
+      grub_free (osp);
+      return data;  
+    }
+  grub_error (GRUB_ERR_BAD_FS, "couldn't find a valid label");
+  zfs_unmount (data);
+  grub_free (ub_array);
+  grub_free (bh);
+  grub_free (osp);
+
+  return 0;
+}
+
+grub_err_t
+grub_zfs_fetch_nvlist (grub_device_t dev, char **nvlist)
+{
+  struct grub_zfs_data *zfs;
+  grub_err_t err;
+
+  zfs = zfs_mount (dev);
+  if (!zfs)
+    return grub_errno;
+  err = zfs_fetch_nvlist (zfs, nvlist);
+  zfs_unmount (zfs);
+  return err;
+}
+
+static grub_err_t 
+zfs_label (grub_device_t device, char **label)
+{
+  char *nvlist;
+  grub_err_t err;
+  struct grub_zfs_data *data;
+
+  data = zfs_mount (device);
+  if (! data)
+    return grub_errno;
+
+  err = zfs_fetch_nvlist (data, &nvlist);
+  if (err)      
+    {
+      zfs_unmount (data);
+      return err;
+    }
+
+  *label = grub_zfs_nvlist_lookup_string (nvlist, ZPOOL_CONFIG_POOL_NAME);
+  grub_free (nvlist);
+  zfs_unmount (data);
+  return grub_errno;
+}
+
+static grub_err_t 
+zfs_uuid (grub_device_t device, char **uuid)
+{
+  char *nvlist;
+  int found;
+  struct grub_zfs_data *data;
+  grub_uint64_t guid;
+  grub_err_t err;
+
+  *uuid = 0;
+
+  data = zfs_mount (device);
+  if (! data)
+    return grub_errno;
+
+  err = zfs_fetch_nvlist (data, &nvlist);
+  if (err)
+    {
+      zfs_unmount (data);
+      return err;
+    }
+
+  found = grub_zfs_nvlist_lookup_uint64 (nvlist, ZPOOL_CONFIG_POOL_GUID, &guid);
+  if (! found)
+    return grub_errno;
+  grub_free (nvlist);
+  *uuid = grub_malloc (16 + sizeof ('\0'));
+  if (! *uuid)
+    return grub_errno;
+  grub_sprintf (*uuid, "%016llx", (long long unsigned) guid);
+  zfs_unmount (data);
+  return GRUB_ERR_NONE;
+}
+
+/*
+ * zfs_open() locates a file in the rootpool by following the
+ * MOS and places the dnode of the file in the memory address DNODE.
+ */
+static grub_err_t
+grub_zfs_open (struct grub_file *file, const char *fsfilename)
+{
+  struct grub_zfs_data *data;
+  grub_err_t err;
+  int isfs;
+
+  data = zfs_mount (file->device);
+  if (! data)
+    return grub_errno;
+
+  err = dnode_get_fullpath (fsfilename, &(data->mdn), 0,
+			    &(data->dnode), &isfs, data);
+  if (err)
+    {
+      zfs_unmount (data);
+      return err;
+    }
+
+  if (isfs)
+    {
+      zfs_unmount (data);
+      return grub_error (GRUB_ERR_FILE_NOT_FOUND, "Missing @ or / separator");
+    }
+
+  /* We found the dnode for this file. Verify if it is a plain file. */
+  if (data->dnode.dn.dn_type != DMU_OT_PLAIN_FILE_CONTENTS) 
+    {
+      zfs_unmount (data);
+      return grub_error (GRUB_ERR_BAD_FILE_TYPE, "not a file");
+    }
+
+  /* get the file size and set the file position to 0 */
+  file->data = data;
+  file->offset = 0;
+  file->size = grub_zfs_to_cpu64 (((znode_phys_t *) &(data->dnode.dn.dn_bonus))->zp_size, data->dnode.endian);
+
+#ifndef GRUB_UTIL
+  grub_dl_ref (my_mod);
+#endif
+
+  return GRUB_ERR_NONE;
+}
+
+static grub_ssize_t
+grub_zfs_read (grub_file_t file, char *buf, grub_size_t len)
+{
+  struct grub_zfs_data *data = (struct grub_zfs_data *) file->data;
+  int blksz, movesize;
+  grub_size_t length;
+  grub_size_t read;
+  grub_err_t err;
+
+  if (data->file_buf == NULL)
+    {
+      data->file_buf = grub_malloc (SPA_MAXBLOCKSIZE);
+      if (!data->file_buf)
+	return -1;
+      data->file_start = data->file_end = 0;
+    }
+
+  /*
+   * If offset is in memory, move it into the buffer provided and return.
+   */
+  if (file->offset >= data->file_start
+      && file->offset + len <= data->file_end)
+    {
+      grub_memmove (buf, data->file_buf + file->offset - data->file_start,
+		    len);
+      return len;
+    }
+
+  blksz = grub_zfs_to_cpu16 (data->dnode.dn.dn_datablkszsec, 
+			     data->dnode.endian) << SPA_MINBLOCKSHIFT;
+
+  /*
+   * Entire Dnode is too big to fit into the space available.  We
+   * will need to read it in chunks.  This could be optimized to
+   * read in as large a chunk as there is space available, but for
+   * now, this only reads in one data block at a time.
+   */
+  length = len;
+  read = 0;
+  while (length)
+    {
+      /*
+       * Find requested blkid and the offset within that block.
+       */
+      grub_uint64_t blkid = grub_divmod64 (file->offset + read, blksz, 0);
+      grub_free (data->file_buf);
+      data->file_buf = 0;
+
+      err = dmu_read (&(data->dnode), blkid, (void **) &(data->file_buf),
+		      0, data);
+      if (err)
+	return -1;
+
+      data->file_start = blkid * blksz;
+      data->file_end = data->file_start + blksz;
+
+      movesize = MIN (length, data->file_end - (int) file->offset - read);
+
+      grub_memmove (buf, data->file_buf + file->offset + read
+		    - data->file_start, movesize);
+      buf += movesize;
+      length -= movesize;
+      read += movesize;
+    }
+
+  return len;
+}
+
+static grub_err_t
+grub_zfs_close (grub_file_t file)
+{
+  zfs_unmount ((struct grub_zfs_data *) file->data);
+
+#ifndef GRUB_UTIL
+  grub_dl_unref (my_mod);
+#endif
+
+  return GRUB_ERR_NONE;
+}
+
+grub_err_t
+grub_zfs_getmdnobj (grub_device_t dev, const char *fsfilename,
+		    grub_uint64_t *mdnobj)
+{
+  struct grub_zfs_data *data;
+  grub_err_t err;
+  int isfs;
+
+  data = zfs_mount (dev);
+  if (! data)
+    return grub_errno;
+
+  err = dnode_get_fullpath (fsfilename, &(data->mdn), mdnobj,
+			    &(data->dnode), &isfs, data);
+  zfs_unmount (data);
+  return err;
+}
+
+static void
+fill_fs_info (struct grub_dirhook_info *info,
+	      dnode_end_t mdn, struct grub_zfs_data *data)
+{
+  grub_err_t err;
+  dnode_end_t dn;
+  grub_uint64_t objnum;
+  grub_uint64_t headobj;
+  
+  grub_memset (info, 0, sizeof (*info));
+    
+  info->dir = 1;
+  
+  if (mdn.dn.dn_type == DMU_OT_DSL_DIR)
+    {
+      headobj = grub_zfs_to_cpu64 (((dsl_dir_phys_t *) &(mdn.dn.dn_bonus))->dd_head_dataset_obj, mdn.endian);
+
+      err = dnode_get (&(data->mos), headobj, DMU_OT_DSL_DATASET, &mdn, data);
+      if (err)
+	{
+	  grub_dprintf ("zfs", "failed here\n");
+	  return;
+	}
+    }
+  make_mdn (&mdn, data);
+  err = dnode_get (&mdn, MASTER_NODE_OBJ, DMU_OT_MASTER_NODE, 
+		   &dn, data);
+  if (err)
+    {
+      grub_dprintf ("zfs", "failed here\n");
+      return;
+    }
+  
+  err = zap_lookup (&dn, ZFS_ROOT_OBJ, &objnum, data);
+  if (err)
+    {
+      grub_dprintf ("zfs", "failed here\n");
+      return;
+    }
+  
+  err = dnode_get (&mdn, objnum, 0, &dn, data);
+  if (err)
+    {
+      grub_dprintf ("zfs", "failed here\n");
+      return;
+    }
+  
+  info->mtimeset = 1;
+  info->mtime = grub_zfs_to_cpu64 (((znode_phys_t *) &dn.dn.dn_bonus)->zp_mtime[0], dn.endian);
+  return;
+}
+
+static grub_err_t
+grub_zfs_dir (grub_device_t device, const char *path,
+	      int (*hook) (const char *, const struct grub_dirhook_info *))
+{
+  struct grub_zfs_data *data;
+  grub_err_t err;
+  int isfs;
+  auto int NESTED_FUNC_ATTR iterate_zap (const char *name, grub_uint64_t val);
+  auto int NESTED_FUNC_ATTR iterate_zap_fs (const char *name, 
+					    grub_uint64_t val);
+  auto int NESTED_FUNC_ATTR iterate_zap_snap (const char *name, 
+					      grub_uint64_t val);
+
+  int NESTED_FUNC_ATTR iterate_zap (const char *name, grub_uint64_t val)
+  {
+    struct grub_dirhook_info info;
+    dnode_end_t dn;
+    grub_memset (&info, 0, sizeof (info));
+
+    dnode_get (&(data->mdn), val, 0, &dn, data);
+    info.mtimeset = 1;
+    info.mtime = grub_zfs_to_cpu64 (((znode_phys_t *) &dn.dn.dn_bonus)->zp_mtime[0], dn.endian);
+    info.dir = (dn.dn.dn_type == DMU_OT_DIRECTORY_CONTENTS);
+    grub_dprintf ("zfs", "type=%d, name=%s\n", 
+		  (int)dn.dn.dn_type, (char *)name);
+    return hook (name, &info);
+  }
+
+  int NESTED_FUNC_ATTR iterate_zap_fs (const char *name, grub_uint64_t val)
+  {
+    struct grub_dirhook_info info;
+    dnode_end_t mdn;
+    err = dnode_get (&(data->mos), val, 0, &mdn, data);
+    if (err)
+      return 0;
+    if (mdn.dn.dn_type != DMU_OT_DSL_DIR)
+      return 0;
+
+    fill_fs_info (&info, mdn, data);
+    return hook (name, &info);
+  }
+  int NESTED_FUNC_ATTR iterate_zap_snap (const char *name, grub_uint64_t val)
+  {
+    struct grub_dirhook_info info;
+    char *name2;
+    int ret;
+    dnode_end_t mdn;
+
+    err = dnode_get (&(data->mos), val, 0, &mdn, data);
+    if (err)
+      return 0;
+
+    if (mdn.dn.dn_type != DMU_OT_DSL_DATASET)
+      return 0;
+
+    fill_fs_info (&info, mdn, data);
+
+    name2 = grub_malloc (grub_strlen (name) + 2);
+    name2[0] = '@';
+    grub_memcpy (name2 + 1, name, grub_strlen (name) + 1);
+    ret = hook (name2, &info);
+    grub_free (name2);
+    return ret;
+  }
+
+  data = zfs_mount (device);
+  if (! data)
+    return grub_errno;
+  err = dnode_get_fullpath (path, &(data->mdn), 0, &(data->dnode), &isfs, data);
+  if (err)
+    {
+      zfs_unmount (data);
+      return err;
+    }
+  if (isfs)
+    {
+      grub_uint64_t childobj, headobj; 
+      grub_uint64_t snapobj;
+      dnode_end_t dn;
+      struct grub_dirhook_info info;
+
+      fill_fs_info (&info, data->dnode, data);
+      hook ("@", &info);
+      
+      childobj = grub_zfs_to_cpu64 (((dsl_dir_phys_t *) &(data->dnode.dn.dn_bonus))->dd_child_dir_zapobj, data->dnode.endian);
+      headobj = grub_zfs_to_cpu64 (((dsl_dir_phys_t *) &(data->dnode.dn.dn_bonus))->dd_head_dataset_obj, data->dnode.endian);
+      err = dnode_get (&(data->mos), childobj,
+		       DMU_OT_DSL_DIR_CHILD_MAP, &dn, data);
+      if (err)
+	{
+	  zfs_unmount (data);
+	  return err;
+	}
+
+      zap_iterate (&dn, iterate_zap_fs, data);
+      
+      err = dnode_get (&(data->mos), headobj, DMU_OT_DSL_DATASET, &dn, data);
+      if (err)
+	{
+	  zfs_unmount (data);
+	  return err;
+	}
+
+      snapobj = grub_zfs_to_cpu64 (((dsl_dataset_phys_t *) &dn.dn.dn_bonus)->ds_snapnames_zapobj, dn.endian);
+
+      err = dnode_get (&(data->mos), snapobj,
+		       DMU_OT_DSL_DS_SNAP_MAP, &dn, data);
+      if (err)
+	{
+	  zfs_unmount (data);
+	  return err;
+	}
+
+      zap_iterate (&dn, iterate_zap_snap, data);
+    }
+  else
+    {
+      if (data->dnode.dn.dn_type != DMU_OT_DIRECTORY_CONTENTS)
+	{
+	  zfs_unmount (data);
+	  return grub_error (GRUB_ERR_BAD_FILE_TYPE, "not a directory");
+	}
+      zap_iterate (&(data->dnode), iterate_zap, data);
+    }
+  zfs_unmount (data);
+  return grub_errno;
+}
+
+static struct grub_fs grub_zfs_fs = {
+  .name = "zfs",
+  .dir = grub_zfs_dir,
+  .open = grub_zfs_open,
+  .read = grub_zfs_read,
+  .close = grub_zfs_close,
+  .label = zfs_label,
+  .uuid = zfs_uuid,
+  .mtime = 0,
+  .next = 0
+};
+
+GRUB_MOD_INIT (zfs)
+{
+  grub_fs_register (&grub_zfs_fs);
+#ifndef GRUB_UTIL
+  my_mod = mod;
+#endif
+}
+
+GRUB_MOD_FINI (zfs)
+{
+  grub_fs_unregister (&grub_zfs_fs);
+}
--- grub2-1.97~beta3.orig/debian/grub-extras/fs/zfs_fletcher.c
+++ grub2-1.97~beta3/debian/grub-extras/fs/zfs_fletcher.c
@@ -0,0 +1,86 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 1999,2000,2001,2002,2003,2004  Free Software Foundation, Inc.
+ *  Copyright 2007 Sun Microsystems, Inc.
+ *  Copyright (C) 2009  Vladimir Serbinenko <phcoder@gmail.com>
+ *
+ *  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 3 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.
+ */
+
+#include <grub/err.h>
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/disk.h>
+#include <grub/dl.h>
+#include <grub/types.h>
+#include <grub/zfs/zfs.h>
+#include <grub/zfs/zio.h>
+#include <grub/zfs/dnode.h>
+#include <grub/zfs/uberblock_impl.h>
+#include <grub/zfs/vdev_impl.h>
+#include <grub/zfs/zio_checksum.h>
+#include <grub/zfs/zap_impl.h>
+#include <grub/zfs/zap_leaf.h>
+#include <grub/zfs/zfs_znode.h>
+#include <grub/zfs/dmu.h>
+#include <grub/zfs/dmu_objset.h>
+#include <grub/zfs/dsl_dir.h>
+#include <grub/zfs/dsl_dataset.h>
+
+void
+fletcher_2(const void *buf, grub_uint64_t size, grub_zfs_endian_t endian, 
+	   zio_cksum_t *zcp)
+{
+  const grub_uint64_t *ip = buf;
+  const grub_uint64_t *ipend = ip + (size / sizeof (grub_uint64_t));
+  grub_uint64_t a0, b0, a1, b1;
+  
+  for (a0 = b0 = a1 = b1 = 0; ip < ipend; ip += 2) 
+    {
+      a0 += grub_zfs_to_cpu64 (ip[0], endian);
+      a1 += grub_zfs_to_cpu64 (ip[1], endian);
+      b0 += a0;
+      b1 += a1;
+    }
+
+  zcp->zc_word[0] = grub_cpu_to_zfs64 (a0, endian);
+  zcp->zc_word[1] = grub_cpu_to_zfs64 (a1, endian);
+  zcp->zc_word[2] = grub_cpu_to_zfs64 (b0, endian);
+  zcp->zc_word[3] = grub_cpu_to_zfs64 (b1, endian);
+}
+
+void
+fletcher_4 (const void *buf, grub_uint64_t size, grub_zfs_endian_t endian, 
+	    zio_cksum_t *zcp)
+{
+  const grub_uint32_t *ip = buf;
+  const grub_uint32_t *ipend = ip + (size / sizeof (grub_uint32_t));
+  grub_uint64_t a, b, c, d;
+  
+  for (a = b = c = d = 0; ip < ipend; ip++) 
+    {
+      a += grub_zfs_to_cpu32 (ip[0], endian);;
+      b += a;
+      c += b;
+      d += c;
+    }
+
+  zcp->zc_word[0] = grub_cpu_to_zfs64 (a, endian);
+  zcp->zc_word[1] = grub_cpu_to_zfs64 (b, endian);
+  zcp->zc_word[2] = grub_cpu_to_zfs64 (c, endian);
+  zcp->zc_word[3] = grub_cpu_to_zfs64 (d, endian);
+}
+
--- grub2-1.97~beta3.orig/debian/grub-extras/fs/zfs_sha256.c
+++ grub2-1.97~beta3/debian/grub-extras/fs/zfs_sha256.c
@@ -0,0 +1,145 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 1999,2000,2001,2002,2003,2004  Free Software Foundation, Inc.
+ *  Copyright 2007 Sun Microsystems, Inc.
+ *  Copyright (C) 2009  Vladimir Serbinenko <phcoder@gmail.com>
+ *
+ *  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 3 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.
+ */
+
+#include <grub/err.h>
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/disk.h>
+#include <grub/dl.h>
+#include <grub/types.h>
+#include <grub/zfs/zfs.h>
+#include <grub/zfs/zio.h>
+#include <grub/zfs/dnode.h>
+#include <grub/zfs/uberblock_impl.h>
+#include <grub/zfs/vdev_impl.h>
+#include <grub/zfs/zio_checksum.h>
+#include <grub/zfs/zap_impl.h>
+#include <grub/zfs/zap_leaf.h>
+#include <grub/zfs/zfs_znode.h>
+#include <grub/zfs/dmu.h>
+#include <grub/zfs/dmu_objset.h>
+#include <grub/zfs/dsl_dir.h>
+#include <grub/zfs/dsl_dataset.h>
+
+/*
+ * SHA-256 checksum, as specified in FIPS 180-2, available at:
+ * http://csrc.nist.gov/cryptval
+ *
+ * This is a very compact implementation of SHA-256.
+ * It is designed to be simple and portable, not to be fast.
+ */
+
+/*
+ * The literal definitions according to FIPS180-2 would be:
+ *
+ * 	Ch(x, y, z)     (((x) & (y)) ^ ((~(x)) & (z)))
+ * 	Maj(x, y, z)    (((x) & (y)) | ((x) & (z)) | ((y) & (z)))
+ *
+ * We use logical equivalents which require one less op.
+ */
+#define	Ch(x, y, z)	((z) ^ ((x) & ((y) ^ (z))))
+#define	Maj(x, y, z)	(((x) & (y)) ^ ((z) & ((x) ^ (y))))
+#define	Rot32(x, s)	(((x) >> s) | ((x) << (32 - s)))
+#define	SIGMA0(x)	(Rot32(x, 2) ^ Rot32(x, 13) ^ Rot32(x, 22))
+#define	SIGMA1(x)	(Rot32(x, 6) ^ Rot32(x, 11) ^ Rot32(x, 25))
+#define	sigma0(x)	(Rot32(x, 7) ^ Rot32(x, 18) ^ ((x) >> 3))
+#define	sigma1(x)	(Rot32(x, 17) ^ Rot32(x, 19) ^ ((x) >> 10))
+
+static const grub_uint32_t SHA256_K[64] = {
+	0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
+	0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
+	0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
+	0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174,
+	0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc,
+	0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da,
+	0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7,
+	0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967,
+	0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13,
+	0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85,
+	0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3,
+	0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070,
+	0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5,
+	0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3,
+	0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208,
+	0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2
+};
+
+static void
+SHA256Transform(grub_uint32_t *H, const grub_uint8_t *cp)
+{
+	grub_uint32_t a, b, c, d, e, f, g, h, t, T1, T2, W[64];
+
+	for (t = 0; t < 16; t++, cp += 4)
+		W[t] = (cp[0] << 24) | (cp[1] << 16) | (cp[2] << 8) | cp[3];
+
+	for (t = 16; t < 64; t++)
+		W[t] = sigma1(W[t - 2]) + W[t - 7] +
+		    sigma0(W[t - 15]) + W[t - 16];
+
+	a = H[0]; b = H[1]; c = H[2]; d = H[3];
+	e = H[4]; f = H[5]; g = H[6]; h = H[7];
+
+	for (t = 0; t < 64; t++) {
+		T1 = h + SIGMA1(e) + Ch(e, f, g) + SHA256_K[t] + W[t];
+		T2 = SIGMA0(a) + Maj(a, b, c);
+		h = g; g = f; f = e; e = d + T1;
+		d = c; c = b; b = a; a = T1 + T2;
+	}
+
+	H[0] += a; H[1] += b; H[2] += c; H[3] += d;
+	H[4] += e; H[5] += f; H[6] += g; H[7] += h;
+}
+
+void
+zio_checksum_SHA256(const void *buf, grub_uint64_t size,
+		    grub_zfs_endian_t endian, zio_cksum_t *zcp)
+{
+  grub_uint32_t H[8] = { 0x6a09e667, 0xbb67ae85, 0x3c6ef372, 0xa54ff53a,
+			 0x510e527f, 0x9b05688c, 0x1f83d9ab, 0x5be0cd19 };
+  grub_uint8_t pad[128];
+  unsigned padsize = size & 63;
+  unsigned i;
+  
+  for (i = 0; i < size - padsize; i += 64)
+    SHA256Transform(H, (grub_uint8_t *)buf + i);
+  
+  for (i = 0; i < padsize; i++)
+    pad[i] = ((grub_uint8_t *)buf)[i];
+  
+  for (pad[padsize++] = 0x80; (padsize & 63) != 56; padsize++)
+    pad[padsize] = 0;
+  
+  for (i = 0; i < 8; i++)
+    pad[padsize++] = (size << 3) >> (56 - 8 * i);
+  
+  for (i = 0; i < padsize; i += 64)
+    SHA256Transform(H, pad + i);
+  
+  zcp->zc_word[0] = grub_cpu_to_zfs64 ((grub_uint64_t)H[0] << 32 | H[1], 
+				       endian);
+  zcp->zc_word[1] = grub_cpu_to_zfs64 ((grub_uint64_t)H[2] << 32 | H[3],
+				       endian);
+  zcp->zc_word[2] = grub_cpu_to_zfs64 ((grub_uint64_t)H[4] << 32 | H[5],
+				       endian);
+  zcp->zc_word[3] = grub_cpu_to_zfs64 ((grub_uint64_t)H[6] << 32 | H[7],
+				       endian);
+}
--- grub2-1.97~beta3.orig/debian/grub-extras/fs/zfs_lzjb.c
+++ grub2-1.97~beta3/debian/grub-extras/fs/zfs_lzjb.c
@@ -0,0 +1,95 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 1999,2000,2001,2002,2003,2004  Free Software Foundation, Inc.
+ *  Copyright 2007 Sun Microsystems, Inc.
+ *  Copyright (C) 2009  Vladimir Serbinenko <phcoder@gmail.com>
+ *
+ *  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 3 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.
+ */
+
+#include <grub/err.h>
+#include <grub/file.h>
+#include <grub/mm.h>
+#include <grub/misc.h>
+#include <grub/disk.h>
+#include <grub/dl.h>
+#include <grub/types.h>
+#include <grub/zfs/zfs.h>
+#include <grub/zfs/zio.h>
+#include <grub/zfs/dnode.h>
+#include <grub/zfs/uberblock_impl.h>
+#include <grub/zfs/vdev_impl.h>
+#include <grub/zfs/zio_checksum.h>
+#include <grub/zfs/zap_impl.h>
+#include <grub/zfs/zap_leaf.h>
+#include <grub/zfs/zfs_znode.h>
+#include <grub/zfs/dmu.h>
+#include <grub/zfs/dmu_objset.h>
+#include <grub/zfs/dsl_dir.h>
+#include <grub/zfs/dsl_dataset.h>
+
+#define	MATCH_BITS	6
+#define	MATCH_MIN	3
+#define	OFFSET_MASK	((1 << (16 - MATCH_BITS)) - 1)
+
+/*
+ * Decompression Entry - lzjb
+ */
+#ifndef	NBBY
+#define	NBBY	8
+#endif
+
+grub_err_t
+lzjb_decompress (void *s_start, void *d_start, grub_size_t s_len,
+		 grub_size_t d_len);
+
+grub_err_t
+lzjb_decompress (void *s_start, void *d_start, grub_size_t s_len,
+		 grub_size_t d_len)
+{
+  grub_uint8_t *src = s_start;
+  grub_uint8_t *dst = d_start;
+  grub_uint8_t *d_end = (grub_uint8_t *) d_start + d_len;
+  grub_uint8_t *s_end = (grub_uint8_t *) s_start + s_len;
+  grub_uint8_t *cpy, copymap = 0;
+  int copymask = 1 << (NBBY - 1);
+
+  while (dst < d_end && src < s_end)
+    {
+      if ((copymask <<= 1) == (1 << NBBY))
+	{
+	  copymask = 1;
+	  copymap = *src++;
+	}
+      if (src >= s_end)
+	return grub_error (GRUB_ERR_BAD_FS, "lzjb decompression failed");
+      if (copymap & copymask)
+	{
+	  int mlen = (src[0] >> (NBBY - MATCH_BITS)) + MATCH_MIN;
+	  int offset = ((src[0] << NBBY) | src[1]) & OFFSET_MASK;
+	  src += 2;
+	  cpy = dst - offset;
+	  if (src > s_end || cpy < (grub_uint8_t *) d_start)
+	    return grub_error (GRUB_ERR_BAD_FS, "lzjb decompression failed");
+	  while (--mlen >= 0 && dst < d_end)
+	    *dst++ = *cpy++;
+	}
+      else
+	*dst++ = *src++;
+    }
+  if (dst < d_end)
+    return grub_error (GRUB_ERR_BAD_FS, "lzjb decompression failed");
+  return GRUB_ERR_NONE;
+}
--- grub2-1.97~beta3.orig/debian/grub-extras/commands/zfsinfo.c
+++ grub2-1.97~beta3/debian/grub-extras/commands/zfsinfo.c
@@ -0,0 +1,420 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 1999,2000,2001,2002,2003,2004  Free Software Foundation, Inc.
+ *  Copyright 2008  Sun Microsystems, Inc.
+ *  Copyright (C) 2009  Vladimir Serbinenko <phcoder@gmail.com>
+ *
+ *  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 3 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.
+ */
+
+#include <grub/zfs/zfs.h>
+#include <grub/device.h>
+#include <grub/file.h>
+#include <grub/command.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/dl.h>
+#include <grub/env.h>
+
+static inline void
+print_tabs (int n)
+{
+  int i;
+
+  for (i = 0; i < n; i++)
+    grub_printf (" ");
+}
+
+static grub_err_t
+print_state (char *nvlist, int tab)
+{
+  grub_uint64_t ival;
+  int isok = 1;
+
+  print_tabs (tab);
+  grub_printf ("State: ");
+
+  if (grub_zfs_nvlist_lookup_uint64 (nvlist, ZPOOL_CONFIG_REMOVED, &ival))
+    {
+      grub_printf ("removed ");
+      isok = 0;
+    }
+
+  if (grub_zfs_nvlist_lookup_uint64 (nvlist, ZPOOL_CONFIG_FAULTED, &ival))
+    {
+      grub_printf ("faulted ");
+      isok = 0;
+    }
+
+  if (grub_zfs_nvlist_lookup_uint64 (nvlist, ZPOOL_CONFIG_OFFLINE, &ival))
+    {
+      grub_printf ("offline ");
+      isok = 0;
+    }
+
+  if (grub_zfs_nvlist_lookup_uint64 (nvlist, ZPOOL_CONFIG_FAULTED, &ival))
+    grub_printf ("degraded ");
+
+  if (isok)
+    grub_printf ("online");
+  grub_printf ("\n");
+
+  return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+print_vdev_info (char *nvlist, int tab)
+{
+  char *type = 0;
+
+  type = grub_zfs_nvlist_lookup_string (nvlist, ZPOOL_CONFIG_TYPE);
+
+  if (!type)
+    {
+      print_tabs (tab);
+      grub_printf ("Incorrect VDEV: no type available\n");
+      return grub_errno;
+    }
+
+  if (grub_strcmp (type, VDEV_TYPE_DISK) == 0)
+    {
+      char *bootpath = 0;
+      char *path = 0;
+      char *devid = 0;
+
+      print_tabs (tab);
+      grub_printf ("Leaf VDEV\n");
+
+      print_state (nvlist, tab);
+
+      bootpath =
+	grub_zfs_nvlist_lookup_string (nvlist, ZPOOL_CONFIG_PHYS_PATH);
+      print_tabs (tab);
+      if (!bootpath)
+	grub_printf ("Bootpath: unavailable\n");
+      else
+	grub_printf ("Bootpath: %s\n", bootpath);
+
+      path = grub_zfs_nvlist_lookup_string (nvlist, "path");
+      print_tabs (tab);
+      if (!path)
+	grub_printf ("Path: unavailable\n");
+      else
+	grub_printf ("Path: %s\n", path);
+
+      devid = grub_zfs_nvlist_lookup_string (nvlist, ZPOOL_CONFIG_DEVID);
+      print_tabs (tab);
+      if (!devid)
+	grub_printf ("Devid: unavailable\n");
+      else
+	grub_printf ("Devid: %s\n", devid);
+      grub_free (bootpath);
+      grub_free (devid);
+      grub_free (path);
+      return GRUB_ERR_NONE;
+    }
+
+  if (grub_strcmp (type, VDEV_TYPE_MIRROR) == 0)
+    {
+      int nelm, i;
+
+      nelm = grub_zfs_nvlist_lookup_nvlist_array_get_nelm
+	(nvlist, ZPOOL_CONFIG_CHILDREN);
+
+      print_tabs (tab);
+      if (nelm <= 0)
+	{
+	  grub_printf ("Incorrect mirror VDEV\n");
+	  return GRUB_ERR_NONE;
+	}
+      grub_printf ("Mirror VDEV with %d children\n", nelm);
+      print_state (nvlist, tab);
+
+      for (i = 0; i < nelm; i++)
+	{
+	  char *child;
+
+	  child = grub_zfs_nvlist_lookup_nvlist_array
+	    (nvlist, ZPOOL_CONFIG_CHILDREN, i);
+
+	  print_tabs (tab);
+	  if (!child)
+	    {
+	      grub_printf ("Mirror VDEV element %d isn't correct\n", i);
+	      continue;
+	    }
+
+	  grub_printf ("Mirror VDEV element %d:\n", i);
+	  print_vdev_info (child, tab + 1);
+
+	  grub_free (child);
+	}
+    }
+
+  print_tabs (tab);
+  grub_printf ("Unknown VDEV type: %s\n", type);
+
+  return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+get_bootpath (char *nvlist, char **bootpath, char **devid)
+{
+  char *type = 0;
+
+  type = grub_zfs_nvlist_lookup_string (nvlist, ZPOOL_CONFIG_TYPE);
+
+  if (!type)
+    return grub_errno;
+
+  if (grub_strcmp (type, VDEV_TYPE_DISK) == 0)
+    {
+      *bootpath = grub_zfs_nvlist_lookup_string (nvlist,
+						 ZPOOL_CONFIG_PHYS_PATH);
+      *devid = grub_zfs_nvlist_lookup_string (nvlist, ZPOOL_CONFIG_DEVID);
+      if (!*bootpath || !*devid)
+	{
+	  grub_free (*bootpath);
+	  grub_free (*devid);
+	  *bootpath = 0;
+	  *devid = 0;
+	}
+      return GRUB_ERR_NONE;
+    }
+
+  if (grub_strcmp (type, VDEV_TYPE_MIRROR) == 0)
+    {
+      int nelm, i;
+
+      nelm = grub_zfs_nvlist_lookup_nvlist_array_get_nelm
+	(nvlist, ZPOOL_CONFIG_CHILDREN);
+
+      for (i = 0; i < nelm; i++)
+	{
+	  char *child;
+
+	  child = grub_zfs_nvlist_lookup_nvlist_array (nvlist,
+						       ZPOOL_CONFIG_CHILDREN,
+						       i);
+
+	  get_bootpath (child, bootpath, devid);
+
+	  grub_free (child);
+
+	  if (*bootpath && *devid)
+	    return GRUB_ERR_NONE;
+	}
+    }
+
+  return GRUB_ERR_NONE;
+}
+
+static char *poolstates[] = {
+  [POOL_STATE_ACTIVE] = "active",
+  [POOL_STATE_EXPORTED] = "exported",
+  [POOL_STATE_DESTROYED] = "destroyed",
+  [POOL_STATE_SPARE] = "reserved for hot spare",
+  [POOL_STATE_L2CACHE] = "level 2 ARC device",
+  [POOL_STATE_UNINITIALIZED] = "uninitialized",
+  [POOL_STATE_UNAVAIL] = "unavailable",
+  [POOL_STATE_POTENTIALLY_ACTIVE] = "potentially active"
+};
+
+static grub_err_t
+grub_cmd_zfsinfo (grub_command_t cmd __attribute__ ((unused)), int argc,
+		  char **args)
+{
+  grub_device_t dev;
+  char *devname;
+  grub_err_t err;
+  char *nvlist = 0;
+  char *nv = 0;
+  char *poolname;
+  grub_uint64_t guid;
+  grub_uint64_t pool_state;
+  int found;
+
+  if (argc < 1)
+    return grub_error (GRUB_ERR_BAD_ARGUMENT, "device name required");
+
+  if (args[0][0] == '(' && args[0][grub_strlen (args[0]) - 1] == ')')
+    {
+      devname = grub_strdup (args[0] + 1);
+      if (devname)
+	devname[grub_strlen (devname) - 1] = 0;
+    }
+  else
+    devname = grub_strdup (args[0]);
+  if (!devname)
+    return grub_errno;
+
+  dev = grub_device_open (devname);
+  grub_free (devname);
+  if (!dev)
+    return grub_errno;
+
+  err = grub_zfs_fetch_nvlist (dev, &nvlist);
+
+  grub_device_close (dev);
+
+  if (err)
+    return err;
+
+  poolname = grub_zfs_nvlist_lookup_string (nvlist, ZPOOL_CONFIG_POOL_NAME);
+  if (!poolname)
+    grub_printf ("Pool name: unavailable\n");
+  else
+    grub_printf ("Pool name: %s\n", poolname);
+
+  found =
+    grub_zfs_nvlist_lookup_uint64 (nvlist, ZPOOL_CONFIG_POOL_GUID, &guid);
+  if (!found)
+    grub_printf ("Pool GUID: unavailable\n");
+  else
+    grub_printf ("Pool GUID: %016llx\n", (long long unsigned) guid);
+
+  found = grub_zfs_nvlist_lookup_uint64 (nvlist, ZPOOL_CONFIG_POOL_STATE,
+					 &pool_state);
+  if (!found)
+    grub_printf ("Unable to retrieve pool state\n");
+  else if (pool_state >= ARRAY_SIZE (poolstates))
+    grub_printf ("Unrecognized pool state\n");
+  else
+    grub_printf ("Pool state: %s\n", poolstates[pool_state]);
+
+  nv = grub_zfs_nvlist_lookup_nvlist (nvlist, ZPOOL_CONFIG_VDEV_TREE);
+
+  if (!nv)
+    grub_printf ("No vdev tree available\n");
+  else
+    print_vdev_info (nv, 1);
+
+  grub_free (nv);
+  grub_free (nvlist);
+
+  return GRUB_ERR_NONE;
+}
+
+static grub_err_t
+grub_cmd_zfs_bootfs (grub_command_t cmd __attribute__ ((unused)), int argc,
+		     char **args)
+{
+  grub_device_t dev;
+  char *devname;
+  grub_err_t err;
+  char *nvlist = 0;
+  char *nv = 0;
+  char *bootpath = 0, *devid = 0;
+  char *fsname;
+  char *bootfs;
+  char *poolname;
+  grub_uint64_t mdnobj;
+
+  if (argc < 1)
+    return grub_error (GRUB_ERR_BAD_ARGUMENT, "filesystem name required");
+
+  devname = grub_file_get_device_name (args[0]);
+  if (grub_errno)
+    return grub_errno;
+
+  dev = grub_device_open (devname);
+  grub_free (devname);
+  if (!dev)
+    return grub_errno;
+
+  err = grub_zfs_fetch_nvlist (dev, &nvlist);
+
+  fsname = grub_strchr (args[0], ')');
+  if (fsname)
+    fsname++;
+  else
+    fsname = args[0];
+
+  if (!err)
+    err = grub_zfs_getmdnobj (dev, fsname, &mdnobj);
+
+  grub_device_close (dev);
+
+  if (err)
+    return err;
+
+  poolname = grub_zfs_nvlist_lookup_string (nvlist, ZPOOL_CONFIG_POOL_NAME);
+  if (!poolname)
+    {
+      if (!grub_errno)
+	grub_error (GRUB_ERR_BAD_FS, "No poolname found");
+      return grub_errno;
+    }
+
+  nv = grub_zfs_nvlist_lookup_nvlist (nvlist, ZPOOL_CONFIG_VDEV_TREE);
+
+  if (nv)
+    get_bootpath (nv, &bootpath, &devid);
+
+  grub_free (nv);
+  grub_free (nvlist);
+
+  if (bootpath && devid)
+    {
+      bootfs = grub_malloc
+	(sizeof ("zfs-bootfs=/XXXXXXXXXXXXXXXXXXXXXXXX bootpath= diskdevid=")
+	 + grub_strlen (bootpath) + grub_strlen (devid)
+	 + grub_strlen (poolname));
+      if (!bootfs)
+	return grub_errno;
+      grub_sprintf (bootfs, "zfs-bootfs=%s/%llu bootpath=%s diskdevid=%s",
+		    poolname, (unsigned long long) mdnobj, bootpath, devid);
+    }
+  else
+    {
+      bootfs = grub_malloc
+	(sizeof ("zfs-bootfs=/XXXXXXXXXXXXXXXXXXXXXXXX")
+	 + grub_strlen (poolname));
+      if (!bootfs)
+	return grub_errno;
+      grub_sprintf (bootfs, "zfs-bootfs=%s/%llu",
+		    poolname, (unsigned long long) mdnobj);
+    }
+  if (argc >= 2)
+    grub_env_set (args[1], bootfs);
+  else
+    grub_printf ("%s\n", bootfs);
+
+  grub_free (bootfs);
+  grub_free (poolname);
+  grub_free (bootpath);
+  grub_free (devid);
+
+  return GRUB_ERR_NONE;
+}
+
+
+static grub_command_t cmd_info, cmd_bootfs;
+
+GRUB_MOD_INIT (zfsinfo)
+{
+  cmd_info = grub_register_command ("zfsinfo", grub_cmd_zfsinfo,
+				    "zfsinfo DEVICE",
+				    "Print ZFS info about DEVICE.");
+  cmd_bootfs = grub_register_command ("zfs-bootfs", grub_cmd_zfs_bootfs,
+				      "zfs-bootfs FILESYSTEM [VARIABLE]",
+				      "Print ZFS-BOOTFSOBJ or set it to VARIABLE");
+}
+
+GRUB_MOD_FINI (zfsinfo)
+{
+  grub_unregister_command (cmd_info);
+  grub_unregister_command (cmd_bootfs);
+}
--- grub2-1.97~beta3.orig/debian/grub-extras/commands/i386/915resolution.c
+++ grub2-1.97~beta3/debian/grub-extras/commands/i386/915resolution.c
@@ -0,0 +1,970 @@
+/* 915resolution - Utility to change vbemodes on the intel
+ * integrated video chipset */
+
+/*
+ * Based on Nathan Coulson's http://nathancoulson.com/proj/eee/grub-1.96-915resolution-0.5.2-3.patch
+ * Oct 10, 2008, Released as 915
+ * Oct 10, 2008, Updated to include support for 945GM thanks to Scot Doyle
+ */
+
+/* Copied from 915 resolution created by steve tomjenovic
+ * 915 resolution was in the public domain.
+ * 
+ * All I have done, was make the above program run within 
+ * the grub2 environment.  
+ *
+ * Some of the checks are still commented, as I did not find
+ * easy replacement for memmem.
+ *
+ * Slightly edited by Nathan Coulson (conathan@gmail.com)
+ */
+
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 2003,2007  Free Software Foundation, Inc.
+ *  Copyright (C) 2003  NIIBE Yutaka <gniibe@m17n.org>
+ *
+ *  GRUB is free software: you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation, either version 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  GRUB is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with GRUB.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+
+/* 915 resolution by steve tomljenovic
+ *
+ * This was tested only on Sony VGN-FS550.  Use at your own risk
+ *
+ * This code is based on the techniques used in :
+ *
+ *   - 855patch.  Many thanks to Christian Zietz (czietz gmx net)
+ *     for demonstrating how to shadow the VBIOS into system RAM
+ *     and then modify it.
+ *
+ *   - 1280patch by Andrew Tipton (andrewtipton null li).
+ *
+ *   - 855resolution by Alain Poirier
+ *
+ * This source code is into the public domain.
+ */
+
+#include <grub/types.h>
+#include <grub/misc.h>
+#include <grub/mm.h>
+#include <grub/err.h>
+#include <grub/dl.h>
+#include <grub/normal.h>
+#include <grub/i386/io.h>
+
+#define printf					grub_printf
+#define malloc					grub_malloc
+#define free					grub_free
+#define strcmp					grub_strcmp
+#define fprintf(stream,template,args...)	grub_printf(template, ## args)
+#define strtol(x,y,z)				grub_strtoul(x,y,z)
+#define atoi(x)					grub_strtoul(x,NULL,10)
+#define assert(x)				0 /* FIXME */
+#define memset					grub_memset
+#define outl		grub_outl
+#define outb		grub_outb
+#define inl		grub_inl
+#define inb		grub_inb
+
+#define NEW(a) ((a *)(malloc(sizeof(a))))
+#define FREE(a) (free(a))
+
+#define VBIOS_START         0xc0000
+#define VBIOS_SIZE          0x10000
+
+#define VBIOS_FILE    "/dev/mem"
+
+#define FALSE 0
+#define TRUE 1
+
+#define MODE_TABLE_OFFSET_845G 617
+
+#define VERSION "0.5.3"
+
+#define ATI_SIGNATURE1 "ATI MOBILITY RADEON"
+#define ATI_SIGNATURE2 "ATI Technologies Inc"
+#define NVIDIA_SIGNATURE "NVIDIA Corp"
+#define INTEL_SIGNATURE "Intel Corp"
+
+typedef unsigned char * address;
+typedef unsigned char byte;
+typedef unsigned short word;
+typedef unsigned char boolean;
+typedef unsigned int cardinal;
+
+typedef enum {
+    CT_UNKWN, CT_830, CT_845G, CT_855GM, CT_865G, CT_915G, CT_915GM, CT_945G, CT_945GM, CT_945GME,
+    CT_946GZ, CT_G965, CT_Q965, CT_965GM, CT_G33, CT_Q33, CT_Q35, CT_500GMA
+} chipset_type;
+
+char * chipset_type_names[] = {
+    "UNKNOWN", "830",  "845G", "855GM", "865G", "915G", "915GM", "945G", "945GM", "945GME",
+    "946GZ",   "G965", "Q965", "965GM", "G33", "Q33", "Q35", "500GMA"
+};
+
+typedef enum {
+    BT_UNKWN, BT_1, BT_2, BT_3
+} bios_type;
+
+char * bios_type_names[] = {"UNKNOWN", "TYPE 1", "TYPE 2", "TYPE 3"};
+
+int freqs[] = { 60, 75, 85 };
+
+typedef struct {
+    byte mode;
+    byte bits_per_pixel;
+    word resolution;
+    byte unknown;
+} __attribute__((packed)) vbios_mode;
+
+typedef struct {
+    byte unknow1[2];
+    byte x1;
+    byte x_total;
+    byte x2;
+    byte y1;
+    byte y_total;
+    byte y2;
+} __attribute__((packed)) vbios_resolution_type1;
+
+typedef struct {
+    unsigned long clock;
+
+    word x1;
+    word htotal;
+    word x2;
+    word hblank;
+    word hsyncstart;
+    word hsyncend;
+
+    word y1;
+    word vtotal;
+    word y2;
+    word vblank;
+    word vsyncstart;
+    word vsyncend;
+} __attribute__((packed)) vbios_modeline_type2;
+
+typedef struct {
+    byte xchars;
+    byte ychars;
+    byte unknown[4];
+
+    vbios_modeline_type2 modelines[];
+} __attribute__((packed)) vbios_resolution_type2;
+
+typedef struct {
+    unsigned long clock;
+
+    word x1;
+    word htotal;
+    word x2;
+    word hblank;
+    word hsyncstart;
+    word hsyncend;
+
+    word y1;
+    word vtotal;
+    word y2;
+    word vblank;
+    word vsyncstart;
+    word vsyncend;
+
+    word timing_h;
+    word timing_v;
+
+    byte unknown[6];
+} __attribute__((packed)) vbios_modeline_type3;
+
+typedef struct {
+    unsigned char unknown[6];
+
+    vbios_modeline_type3 modelines[];
+} __attribute__((packed)) vbios_resolution_type3;
+
+
+typedef struct {
+    cardinal chipset_id;
+    chipset_type chipset;
+    bios_type bios;
+    
+    int bios_fd;
+    address bios_ptr;
+
+    vbios_mode * mode_table;
+    cardinal mode_table_size;
+
+    byte b1, b2;
+
+    boolean unlocked;
+} vbios_map;
+
+
+cardinal get_chipset_id(void) {
+    outl(0x80000000, 0xcf8);
+    return inl(0xcfc);
+}
+
+chipset_type get_chipset(cardinal id) {
+    chipset_type type;
+    
+    switch (id) {
+    case 0x35758086:
+        type = CT_830;
+        break;
+
+    case 0x25608086:
+        type = CT_845G;
+        break;
+        
+    case 0x35808086:
+        type = CT_855GM;
+        break;
+        
+    case 0x25708086:
+        type = CT_865G;
+        break;
+
+    case 0x25808086:
+	type = CT_915G;
+	break;
+
+    case 0x25908086:
+        type = CT_915GM;
+        break;
+
+    case 0x27708086:
+        type = CT_945G;
+        break;
+
+    case 0x27a08086:
+        type = CT_945GM;
+        break;
+
+    case 0x27ac8086:
+        type = CT_945GME;
+        break;
+
+    case 0x29708086:
+        type = CT_946GZ;
+        break;
+
+    case 0x29a08086:
+	type = CT_G965;
+	break;
+
+    case 0x29908086:
+        type = CT_Q965;
+        break;
+
+    case 0x2a008086:
+        type = CT_965GM;
+        break;
+
+    case 0x29c08086:
+        type = CT_G33;
+        break;
+
+    case 0x29b08086:
+        type = CT_Q35;
+        break;
+
+    case 0x29d08086:
+        type = CT_Q33;
+        break;
+
+    case 0x81008086:
+      type = CT_500GMA;
+      break;
+
+    default:
+        type = CT_UNKWN;
+        break;
+    }
+
+    return type;
+}
+
+
+vbios_resolution_type1 * map_type1_resolution(vbios_map * map, word res) {
+    vbios_resolution_type1 * ptr = ((vbios_resolution_type1*)(map->bios_ptr + res)); 
+    return ptr;
+}
+
+vbios_resolution_type2 * map_type2_resolution(vbios_map * map, word res) {
+    vbios_resolution_type2 * ptr = ((vbios_resolution_type2*)(map->bios_ptr + res)); 
+    return ptr;
+}
+
+vbios_resolution_type3 * map_type3_resolution(vbios_map * map, word res) {
+    vbios_resolution_type3 * ptr = ((vbios_resolution_type3*)(map->bios_ptr + res)); 
+    return ptr;
+}
+
+
+boolean detect_bios_type(vbios_map * map, boolean modeline, int entry_size) {
+    int i;
+    short int r1, r2;
+    
+    r1 = r2 = 32000;
+
+    for (i=0; i < map->mode_table_size; i++) {
+        if (map->mode_table[i].resolution <= r1) {
+            r1 = map->mode_table[i].resolution;
+    	}
+        else {
+            if (map->mode_table[i].resolution <= r2) {
+            	r2 = map->mode_table[i].resolution;
+            }
+    	}
+
+        /*printf("r1 = %d  r2 = %d\n", r1, r2);*/
+    }
+
+    return (r2-r1-6) % entry_size == 0;
+}
+
+
+void close_vbios(vbios_map * map);
+
+
+vbios_map * open_vbios(chipset_type forced_chipset) {
+    vbios_map * map = NEW(vbios_map);
+    memset (map, 0, sizeof(vbios_map));
+
+    /*
+     * Determine chipset
+     */
+
+    if (forced_chipset == CT_UNKWN) {
+        map->chipset_id = get_chipset_id();
+
+        map->chipset = get_chipset(map->chipset_id);
+    }
+    else if (forced_chipset != CT_UNKWN) {
+        map->chipset = forced_chipset;
+    }
+    else {
+        map->chipset = CT_915GM;
+    }
+    
+    /*
+     *  Map the video bios to memory
+     */
+
+    map->bios_ptr=(char*)VBIOS_START;
+
+#if 0
+    /*
+     * check if we have ATI Radeon
+     */
+    
+    if (memmem(map->bios_ptr, VBIOS_SIZE, ATI_SIGNATURE1, strlen(ATI_SIGNATURE1)) ||
+        memmem(map->bios_ptr, VBIOS_SIZE, ATI_SIGNATURE2, strlen(ATI_SIGNATURE2)) ) {
+        fprintf(stderr, "ATI chipset detected.  915resolution only works with Intel 800/900 series graphic chipsets.\n");
+        close(map->bios_fd);
+        exit(2);
+    }
+
+    /*
+     * check if we have NVIDIA
+     */
+    
+    if (memmem(map->bios_ptr, VBIOS_SIZE, NVIDIA_SIGNATURE, strlen(NVIDIA_SIGNATURE))) {
+        fprintf(stderr, "NVIDIA chipset detected.  915resolution only works with Intel 800/900 series graphic chipsets.\n");
+        close(map->bios_fd);
+        exit(2);
+    }
+
+    /*
+     * check if we have Intel
+     */
+    
+    if (map->chipset == CT_UNKWN && memmem(map->bios_ptr, VBIOS_SIZE, INTEL_SIGNATURE, strlen(INTEL_SIGNATURE))) {
+        fprintf(stderr, "Intel chipset detected.  However, 915resolution was unable to determine the chipset type.\n");
+
+        fprintf(stderr, "Chipset Id: %x\n", map->chipset_id);
+
+        fprintf(stderr, "Please report this problem to stomljen@yahoo.com\n");
+        
+        close_vbios(map);
+        exit(2);
+    }
+#endif
+
+    /*
+     * check for others
+     */
+
+    if (map->chipset == CT_UNKWN) {
+        fprintf(stderr, "Unknown chipset type and unrecognized bios.\n");
+        fprintf(stderr, "915resolution only works with Intel 800/900 series graphic chipsets.\n");
+
+        fprintf(stderr, "Chipset Id: %x\n", map->chipset_id);
+        close_vbios(map);
+        return 0;
+    }
+
+    /*
+     * Figure out where the mode table is 
+     */
+    
+    {
+        address p = map->bios_ptr + 16;
+        address limit = map->bios_ptr + VBIOS_SIZE - (3 * sizeof(vbios_mode));
+        
+        while (p < limit && map->mode_table == 0) {
+            vbios_mode * mode_ptr = (vbios_mode *) p;
+            
+            if (((mode_ptr[0].mode & 0xf0) == 0x30) && ((mode_ptr[1].mode & 0xf0) == 0x30) &&
+                ((mode_ptr[2].mode & 0xf0) == 0x30) && ((mode_ptr[3].mode & 0xf0) == 0x30)) {
+
+                map->mode_table = mode_ptr;
+            }
+            
+            p++;
+        }
+
+        if (map->mode_table == 0) {
+            fprintf(stderr, "Unable to locate the mode table.\n");
+            fprintf(stderr, "Please run the program 'dump_bios' as root and\n");
+            fprintf(stderr, "email the file 'vbios.dmp' to stomljen@yahoo.com.\n");
+            
+            fprintf(stderr, "Chipset: %s\n", chipset_type_names[map->chipset]);
+            close_vbios(map);
+            return 0;
+        }
+    }
+
+    /*
+     * Determine size of mode table
+     */
+    
+    {
+        vbios_mode * mode_ptr = map->mode_table;
+        
+        while (mode_ptr->mode != 0xff) {
+            map->mode_table_size++;
+            mode_ptr++;
+        }
+    }
+
+    /*
+     * Figure out what type of bios we have
+     *  order of detection is important
+     */
+
+    if (detect_bios_type(map, TRUE, sizeof(vbios_modeline_type3))) {
+        map->bios = BT_3;
+    }
+    else if (detect_bios_type(map, TRUE, sizeof(vbios_modeline_type2))) {
+        map->bios = BT_2;
+    }
+    else if (detect_bios_type(map, FALSE, sizeof(vbios_resolution_type1))) {
+        map->bios = BT_1;
+    }
+    else {
+        fprintf(stderr, "Unable to determine bios type.\n");
+        fprintf(stderr, "Please run the program 'dump_bios' as root and\n");
+        fprintf(stderr, "email the file 'vbios.dmp' to stomljen@yahoo.com.\n");
+
+        fprintf(stderr, "Chipset: %s\n", chipset_type_names[map->chipset]);
+        fprintf(stderr, "Mode Table Offset: $C0000 + $%x\n", ((cardinal)map->mode_table) - ((cardinal)map->bios_ptr));
+        fprintf(stderr, "Mode Table Entries: %u\n", map->mode_table_size);
+        return 0;
+    }
+
+    return map;
+}
+
+void close_vbios(vbios_map * map) {
+    assert(!map->unlocked);
+
+    FREE(map);
+}
+
+void unlock_vbios(vbios_map * map) {
+
+    assert(!map->unlocked);
+        
+    map->unlocked = TRUE;
+    
+    switch (map->chipset) {
+    case CT_UNKWN:
+        break;
+    case CT_830:
+    case CT_855GM:
+        outl(0x8000005a, 0xcf8);
+        map->b1 = inb(0xcfe);
+        
+        outl(0x8000005a, 0xcf8);
+        outb(0x33, 0xcfe);
+        break;
+    case CT_845G:
+    case CT_865G:
+    case CT_915G:
+    case CT_915GM:
+    case CT_945G:
+    case CT_945GM:
+    case CT_946GZ:
+    case CT_G965:
+    case CT_Q965:
+    case CT_965GM:
+    case CT_G33:
+    case CT_Q35:
+    case CT_Q33:
+    case CT_500GMA:
+        outl(0x80000090, 0xcf8);
+        map->b1 = inb(0xcfd);
+        map->b2 = inb(0xcfe);
+        
+        outl(0x80000090, 0xcf8);
+        outb(0x33, 0xcfd);
+        outb(0x33, 0xcfe);
+        break;
+    }
+
+#if DEBUG
+    {
+        cardinal t = inl(0xcfc);
+        printf("unlock PAM: (0x%08x)\n", t);
+    }
+#endif
+}
+
+void relock_vbios(vbios_map * map) {
+
+    assert(map->unlocked);
+    map->unlocked = FALSE;
+    
+    switch (map->chipset) {
+    case CT_UNKWN:
+        break;
+    case CT_830:
+    case CT_855GM:
+        outl(0x8000005a, 0xcf8);
+        outb(map->b1, 0xcfe);
+        break;
+    case CT_845G:
+    case CT_865G:
+    case CT_915G:
+    case CT_915GM:
+    case CT_945G:
+    case CT_945GM:
+    case CT_945GME:
+    case CT_946GZ:
+    case CT_G965:
+    case CT_Q965:
+    case CT_965GM:
+    case CT_G33:
+    case CT_Q35:
+    case CT_Q33:
+    case CT_500GMA:
+        outl(0x80000090, 0xcf8);
+        outb(map->b1, 0xcfd);
+        outb(map->b2, 0xcfe);
+        break;
+    }
+
+#if DEBUG
+    {
+        cardinal t = inl(0xcfc);
+        printf("relock PAM: (0x%08x)\n", t);
+    }
+#endif
+}
+
+
+void list_modes(vbios_map *map, cardinal raw) {
+    cardinal i, x, y;
+
+    for (i=0; i < map->mode_table_size; i++) {
+        switch(map->bios) {
+        case BT_1:
+            {
+                vbios_resolution_type1 * res = map_type1_resolution(map, map->mode_table[i].resolution);
+                
+                x = ((((cardinal) res->x2) & 0xf0) << 4) | res->x1;
+                y = ((((cardinal) res->y2) & 0xf0) << 4) | res->y1;
+                
+                if (x != 0 && y != 0) {
+                    printf("Mode %02x : %dx%d, %d bits/pixel\n", map->mode_table[i].mode, x, y, map->mode_table[i].bits_per_pixel);
+                }
+
+		if (raw)
+		{
+                    printf("Mode %02x (raw) :\n\t%02x %02x\n\t%02x\n\t%02x\n\t%02x\n\t%02x\n\t%02x\n\t%02x\n", map->mode_table[i].mode, res->unknow1[0],res->unknow1[1], res->x1,res->x_total,res->x2,res->y1,res->y_total,res->y2);
+		}
+
+            }
+            break;
+        case BT_2:
+            {
+                vbios_resolution_type2 * res = map_type2_resolution(map, map->mode_table[i].resolution);
+                
+                x = res->modelines[0].x1+1;
+                y = res->modelines[0].y1+1;
+
+                if (x != 0 && y != 0) {
+                    printf("Mode %02x : %dx%d, %d bits/pixel\n", map->mode_table[i].mode, x, y, map->mode_table[i].bits_per_pixel);
+                }
+            }
+            break;
+        case BT_3:
+            {
+                vbios_resolution_type3 * res = map_type3_resolution(map, map->mode_table[i].resolution);
+                
+                x = res->modelines[0].x1+1;
+                y = res->modelines[0].y1+1;
+                
+                if (x != 0 && y != 0) {
+                    printf("Mode %02x : %dx%d, %d bits/pixel\n", map->mode_table[i].mode, x, y, map->mode_table[i].bits_per_pixel);
+                }
+            }
+            break;
+        case BT_UNKWN:
+            break;
+        }
+    }
+}
+
+static void gtf_timings(int x, int y, int freq,
+        unsigned long *clock,
+        word *hsyncstart, word *hsyncend, word *hblank,
+        word *vsyncstart, word *vsyncend, word *vblank)
+{
+    int hbl, vbl, vfreq;
+
+    vbl = y + (y+1)/(20000.0/(11*freq) - 1) + 1.5;
+    vfreq = vbl * freq;
+    hbl = 16 * (int)(x * (30.0 - 300000.0 / vfreq) /
+            (70.0 + 300000.0 / vfreq) / 16.0 + 0.5);
+
+    *vsyncstart = y;
+    *vsyncend = y + 3;
+    *vblank = vbl - 1;
+    *hsyncstart = x + hbl / 2 - (x + hbl + 50) / 100 * 8 - 1;
+    *hsyncend = x + hbl / 2 - 1;
+    *hblank = x + hbl - 1;
+    *clock = (x + hbl) * vfreq / 1000;
+}
+
+void set_mode(vbios_map * map, cardinal mode, cardinal x, cardinal y, cardinal bp, cardinal htotal, cardinal vtotal) {
+    int xprev, yprev;
+    cardinal i, j;
+
+    for (i=0; i < map->mode_table_size; i++) {
+        if (map->mode_table[i].mode == mode) {
+            switch(map->bios) {
+            case BT_1:
+                {
+                    vbios_resolution_type1 * res = map_type1_resolution(map, map->mode_table[i].resolution);
+                    
+                    if (bp) {
+                        map->mode_table[i].bits_per_pixel = bp;
+                    }
+                    
+                    res->x2 = (htotal?(((htotal-x) >> 8) & 0x0f) : (res->x2 & 0x0f)) | ((x >> 4) & 0xf0);
+                    res->x1 = (x & 0xff);
+                    
+                    res->y2 = (vtotal?(((vtotal-y) >> 8) & 0x0f) : (res->y2 & 0x0f)) | ((y >> 4) & 0xf0);
+                    res->y1 = (y & 0xff);
+		    if (htotal)
+			res->x_total = ((htotal-x) & 0xff);
+
+		    if (vtotal)
+			res->y_total = ((vtotal-y) & 0xff);
+                }
+                break;
+            case BT_2:
+                {
+                    vbios_resolution_type2 * res = map_type2_resolution(map, map->mode_table[i].resolution);
+
+                    res->xchars = x / 8;
+                    res->ychars = y / 16 - 1;
+                    xprev = res->modelines[0].x1;
+                    yprev = res->modelines[0].y1;
+
+                    for(j=0; j < 3; j++) {
+                        vbios_modeline_type2 * modeline = &res->modelines[j];
+                        
+                        if (modeline->x1 == xprev && modeline->y1 == yprev) {
+                            modeline->x1 = modeline->x2 = x-1;
+                            modeline->y1 = modeline->y2 = y-1;
+
+                            gtf_timings(x, y, freqs[j], &modeline->clock,
+                                    &modeline->hsyncstart, &modeline->hsyncend,
+                                    &modeline->hblank, &modeline->vsyncstart,
+                                    &modeline->vsyncend, &modeline->vblank);
+
+                            if (htotal)
+                                modeline->htotal = htotal;
+                            else
+                                modeline->htotal = modeline->hblank;
+
+                            if (vtotal)
+                                modeline->vtotal = vtotal;
+                            else
+                                modeline->vtotal = modeline->vblank;
+                        }
+                    }
+                }
+                break;
+            case BT_3:
+                {
+                    vbios_resolution_type3 * res = map_type3_resolution(map, map->mode_table[i].resolution);
+                    
+                    xprev = res->modelines[0].x1;
+                    yprev = res->modelines[0].y1;
+
+                    for (j=0; j < 3; j++) {
+                        vbios_modeline_type3 * modeline = &res->modelines[j];
+                        
+                        if (modeline->x1 == xprev && modeline->y1 == yprev) {
+                            modeline->x1 = modeline->x2 = x-1;
+                            modeline->y1 = modeline->y2 = y-1;
+                            
+                            gtf_timings(x, y, freqs[j], &modeline->clock,
+                                    &modeline->hsyncstart, &modeline->hsyncend,
+                                    &modeline->hblank, &modeline->vsyncstart,
+                                    &modeline->vsyncend, &modeline->vblank);
+                            if (htotal)
+                                modeline->htotal = htotal;
+                            else
+                                modeline->htotal = modeline->hblank;
+                            if (vtotal)
+                                modeline->vtotal = vtotal;
+                            else
+                                modeline->vtotal = modeline->vblank;
+
+                            modeline->timing_h   = y-1;
+                            modeline->timing_v   = x-1;
+                        }
+                    }
+                }
+                break;
+            case BT_UNKWN:
+                break;
+            }
+        }
+    }
+}   
+
+void display_map_info(vbios_map * map) {
+    printf("Chipset: %s\n", chipset_type_names[map->chipset]);
+    printf("BIOS: %s\n", bios_type_names[map->bios]);
+
+    printf("Mode Table Offset: $C0000 + $%x\n", ((cardinal)map->mode_table) - ((cardinal)map->bios_ptr));
+    printf("Mode Table Entries: %u\n", map->mode_table_size);
+}
+
+
+int parse_args(int argc, char *argv[], chipset_type *forced_chipset, cardinal *list, cardinal *mode, cardinal *x, cardinal *y, cardinal *bp, cardinal *raw, cardinal *htotal, cardinal *vtotal) {
+    cardinal index = 0;
+
+    *list = *mode = *x = *y = *raw = *htotal = *vtotal = 0;
+
+    *forced_chipset = CT_UNKWN;
+    
+
+    if ((argc > index) && !strcmp(argv[index], "-c")) {
+        index++;
+
+        if(argc<=index) {
+            return 0;
+        }
+        
+        if (!strcmp(argv[index], "845")) {
+            *forced_chipset = CT_845G;
+        }
+        else if (!strcmp(argv[index], "855")) {
+            *forced_chipset = CT_855GM;
+        }
+        else if (!strcmp(argv[index], "865")) {
+            *forced_chipset = CT_865G;
+        }
+        else if (!strcmp(argv[index], "915G")) {
+            *forced_chipset = CT_915G;
+        }
+        else if (!strcmp(argv[index], "915GM")) {
+            *forced_chipset = CT_915GM;
+        }
+        else if (!strcmp(argv[index], "945G")) {
+            *forced_chipset = CT_945G;
+        }
+        else if (!strcmp(argv[index], "945GM")) {
+            *forced_chipset = CT_945GM;
+        }
+        else if (!strcmp(argv[index], "945GME")) {
+            *forced_chipset = CT_945GME;
+        }
+        else if (!strcmp(argv[index], "946GZ")) {
+            *forced_chipset = CT_946GZ;
+        }
+        else if (!strcmp(argv[index], "G965")) {
+            *forced_chipset = CT_G965;
+        }
+        else if (!strcmp(argv[index], "Q965")) {
+            *forced_chipset = CT_Q965;
+        }
+        else if (!strcmp(argv[index], "965GM")) {
+            *forced_chipset = CT_965GM;
+        }
+        else if (!strcmp(argv[index], "G33")) {
+            *forced_chipset = CT_G33;
+        }
+        else if (!strcmp(argv[index], "Q35")) {
+            *forced_chipset = CT_Q35;
+        }
+        else if (!strcmp(argv[index], "Q33")) {
+            *forced_chipset = CT_Q33;
+        }
+	else if (!strcmp(argv[index], "500GMA")) {
+	    *forced_chipset = CT_500GMA;
+	}
+        else {
+            *forced_chipset = CT_UNKWN;
+        }
+        
+        index++;
+        
+        if (argc<=index) {
+            return 0;
+        }
+    }
+
+    if ((argc > index) && !strcmp(argv[index], "-l")) {
+        *list = 1;
+        index++;
+
+        if(argc<=index) {
+            return 0;
+        }
+    }
+    
+    if ((argc > index) && !strcmp(argv[index], "-r")) {
+        *raw = 1;
+        index++;
+
+        if(argc<=index) {
+            return 0;
+        }
+    }
+    
+    if (argc-index < 3 || argc-index > 6) {
+        return -1;
+    }
+
+    *mode = (cardinal) strtol(argv[index], NULL, 16);
+    *x = (cardinal)atoi(argv[index+1]);
+    *y = (cardinal)atoi(argv[index+2]);
+
+
+    if (argc-index > 3) {
+        *bp = (cardinal)atoi(argv[index+3]);
+    }
+    else {
+        *bp = 0;
+    }
+    
+    if (argc-index > 4) {
+        *htotal = (cardinal)atoi(argv[index+4]);
+    }
+    else {
+        *htotal = 0;
+    }
+
+    if (argc-index > 5) {
+        *vtotal = (cardinal)atoi(argv[index+5]);
+    }
+    else {
+        *vtotal = 0;
+    }
+    
+    return 0;
+}
+
+static void usage() {
+    printf("Usage: 915resolution [-c chipset] [-l] [mode X Y] [bits/pixel] [htotal] [vtotal]\n");
+    printf("  Set the resolution to XxY for a video mode\n");
+    printf("  Bits per pixel are optional.  htotal/vtotal settings are additionally optional.\n");
+    printf("  Options:\n");
+    printf("    -c force chipset type (THIS IS USED FOR DEBUG PURPOSES)\n");
+    printf("    -l display the modes found in the video BIOS\n");
+    printf("    -r display the modes found in the video BIOS in raw mode (THIS IS USED FOR DEBUG PURPOSES)\n");
+}
+
+int main (int argc, char *argv[])
+{
+    vbios_map * map;
+    cardinal list, mode, x, y, bp, raw, htotal, vtotal;
+    chipset_type forced_chipset;
+    
+    printf("Intel 800/900 Series VBIOS Hack : version %s\n\n", VERSION);
+
+    if (parse_args(argc, argv, &forced_chipset, &list, &mode, &x, &y, &bp, &raw, &htotal, &vtotal) == -1) {
+        usage();
+        return 2;
+    }
+
+    map = open_vbios(forced_chipset);
+    display_map_info(map);
+
+    printf("\n");
+
+    if (list) {
+        list_modes(map, raw);
+    }
+
+    if (mode!=0 && x!=0 && y!=0) {
+          unlock_vbios(map);
+
+        set_mode(map, mode, x, y, bp, htotal, vtotal);
+
+          relock_vbios(map);
+        
+        printf("Patch mode %02x to resolution %dx%d complete\n", mode, x, y);
+        
+        if (list) {
+            list_modes(map, raw);
+        }
+    }
+
+    close_vbios(map);
+    
+    return 0;
+}
+
+
+
+
+
+static grub_err_t
+grub_cmd_915resolution (struct grub_arg_list *state __attribute__ ((unused)), int argc, char *argv[])
+{
+  return main (argc, argv);
+}
+
+GRUB_MOD_INIT(915resolution)
+{
+  (void)mod;			/* To stop warning. */
+  grub_register_extcmd ("915resolution", grub_cmd_915resolution, GRUB_COMMAND_FLAG_BOTH,
+			 "915resolution", "Intel VBE editor", 0);
+}
+
+GRUB_MOD_FINI(915resolution)
+{
+  grub_unregister_command ("915resolution");
+}
--- grub2-1.97~beta3.orig/debian/grub-extras/include/grub/zfs/spa.h
+++ grub2-1.97~beta3/debian/grub-extras/include/grub/zfs/spa.h
@@ -0,0 +1,281 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 1999,2000,2001,2002,2003,2004  Free Software Foundation, Inc.
+ *  Copyright 2007 Sun Microsystems, Inc.
+ *  Copyright (C) 2009  Vladimir Serbinenko <phcoder@gmail.com>
+ *
+ *  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 3 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 GRUB_ZFS_SPA_HEADER
+#define	GRUB_ZFS_SPA_HEADER 1
+
+typedef enum grub_zfs_endian
+  {
+    UNKNOWN_ENDIAN = -2,
+    LITTLE_ENDIAN = -1,
+    BIG_ENDIAN = 0
+  } grub_zfs_endian_t;
+
+#define grub_zfs_to_cpu16(x,a) (((a) == BIG_ENDIAN) ? grub_be_to_cpu16(x) \
+				: grub_le_to_cpu16(x))
+#define grub_cpu_to_zfs16(x,a) (((a) == BIG_ENDIAN) ? grub_cpu_to_be16(x) \
+				: grub_cpu_to_le16(x))
+
+#define grub_zfs_to_cpu32(x,a) (((a) == BIG_ENDIAN) ? grub_be_to_cpu32(x) \
+				: grub_le_to_cpu32(x))
+#define grub_cpu_to_zfs32(x,a) (((a) == BIG_ENDIAN) ? grub_cpu_to_be32(x) \
+				: grub_cpu_to_le32(x))
+
+#define grub_zfs_to_cpu64(x,a) (((a) == BIG_ENDIAN) ? grub_be_to_cpu64(x) \
+				: grub_le_to_cpu64(x))
+#define grub_cpu_to_zfs64(x,a) (((a) == BIG_ENDIAN) ? grub_cpu_to_be64(x) \
+				: grub_cpu_to_le64(x))
+
+/*
+ * General-purpose 32-bit and 64-bit bitfield encodings.
+ */
+#define	BF32_DECODE(x, low, len)	P2PHASE((x) >> (low), 1U << (len))
+#define	BF64_DECODE(x, low, len)	P2PHASE((x) >> (low), 1ULL << (len))
+#define	BF32_ENCODE(x, low, len)	(P2PHASE((x), 1U << (len)) << (low))
+#define	BF64_ENCODE(x, low, len)	(P2PHASE((x), 1ULL << (len)) << (low))
+
+#define	BF32_GET(x, low, len)		BF32_DECODE(x, low, len)
+#define	BF64_GET(x, low, len)		BF64_DECODE(x, low, len)
+
+#define	BF32_SET(x, low, len, val)	\
+	((x) ^= BF32_ENCODE((x >> low) ^ (val), low, len))
+#define	BF64_SET(x, low, len, val)	\
+	((x) ^= BF64_ENCODE((x >> low) ^ (val), low, len))
+
+#define	BF32_GET_SB(x, low, len, shift, bias)	\
+	((BF32_GET(x, low, len) + (bias)) << (shift))
+#define	BF64_GET_SB(x, low, len, shift, bias)	\
+	((BF64_GET(x, low, len) + (bias)) << (shift))
+
+#define	BF32_SET_SB(x, low, len, shift, bias, val)	\
+	BF32_SET(x, low, len, ((val) >> (shift)) - (bias))
+#define	BF64_SET_SB(x, low, len, shift, bias, val)	\
+	BF64_SET(x, low, len, ((val) >> (shift)) - (bias))
+
+/*
+ * We currently support nine block sizes, from 512 bytes to 128K.
+ * We could go higher, but the benefits are near-zero and the cost
+ * of COWing a giant block to modify one byte would become excessive.
+ */
+#define	SPA_MINBLOCKSHIFT	9
+#define	SPA_MAXBLOCKSHIFT	17
+#define	SPA_MINBLOCKSIZE	(1ULL << SPA_MINBLOCKSHIFT)
+#define	SPA_MAXBLOCKSIZE	(1ULL << SPA_MAXBLOCKSHIFT)
+
+#define	SPA_BLOCKSIZES		(SPA_MAXBLOCKSHIFT - SPA_MINBLOCKSHIFT + 1)
+
+/*
+ * The DVA size encodings for LSIZE and PSIZE support blocks up to 32MB.
+ * The ASIZE encoding should be at least 64 times larger (6 more bits)
+ * to support up to 4-way RAID-Z mirror mode with worst-case gang block
+ * overhead, three DVAs per bp, plus one more bit in case we do anything
+ * else that expands the ASIZE.
+ */
+#define	SPA_LSIZEBITS		16	/* LSIZE up to 32M (2^16 * 512)	*/
+#define	SPA_PSIZEBITS		16	/* PSIZE up to 32M (2^16 * 512)	*/
+#define	SPA_ASIZEBITS		24	/* ASIZE up to 64 times larger	*/
+
+/*
+ * All SPA data is represented by 128-bit data virtual addresses (DVAs).
+ * The members of the dva_t should be considered opaque outside the SPA.
+ */
+typedef struct dva {
+	grub_uint64_t	dva_word[2];
+} dva_t;
+
+/*
+ * Each block has a 256-bit checksum -- strong enough for cryptographic hashes.
+ */
+typedef struct zio_cksum {
+	grub_uint64_t	zc_word[4];
+} zio_cksum_t;
+
+/*
+ * Each block is described by its DVAs, time of birth, checksum, etc.
+ * The word-by-word, bit-by-bit layout of the blkptr is as follows:
+ *
+ *	64	56	48	40	32	24	16	8	0
+ *	+-------+-------+-------+-------+-------+-------+-------+-------+
+ * 0	|		vdev1		| GRID  |	  ASIZE		|
+ *	+-------+-------+-------+-------+-------+-------+-------+-------+
+ * 1	|G|			 offset1				|
+ *	+-------+-------+-------+-------+-------+-------+-------+-------+
+ * 2	|		vdev2		| GRID  |	  ASIZE		|
+ *	+-------+-------+-------+-------+-------+-------+-------+-------+
+ * 3	|G|			 offset2				|
+ *	+-------+-------+-------+-------+-------+-------+-------+-------+
+ * 4	|		vdev3		| GRID  |	  ASIZE		|
+ *	+-------+-------+-------+-------+-------+-------+-------+-------+
+ * 5	|G|			 offset3				|
+ *	+-------+-------+-------+-------+-------+-------+-------+-------+
+ * 6	|E| lvl | type	| cksum | comp	|     PSIZE	|     LSIZE	|
+ *	+-------+-------+-------+-------+-------+-------+-------+-------+
+ * 7	|			padding					|
+ *	+-------+-------+-------+-------+-------+-------+-------+-------+
+ * 8	|			padding					|
+ *	+-------+-------+-------+-------+-------+-------+-------+-------+
+ * 9	|			padding					|
+ *	+-------+-------+-------+-------+-------+-------+-------+-------+
+ * a	|			birth txg				|
+ *	+-------+-------+-------+-------+-------+-------+-------+-------+
+ * b	|			fill count				|
+ *	+-------+-------+-------+-------+-------+-------+-------+-------+
+ * c	|			checksum[0]				|
+ *	+-------+-------+-------+-------+-------+-------+-------+-------+
+ * d	|			checksum[1]				|
+ *	+-------+-------+-------+-------+-------+-------+-------+-------+
+ * e	|			checksum[2]				|
+ *	+-------+-------+-------+-------+-------+-------+-------+-------+
+ * f	|			checksum[3]				|
+ *	+-------+-------+-------+-------+-------+-------+-------+-------+
+ *
+ * Legend:
+ *
+ * vdev		virtual device ID
+ * offset	offset into virtual device
+ * LSIZE	logical size
+ * PSIZE	physical size (after compression)
+ * ASIZE	allocated size (including RAID-Z parity and gang block headers)
+ * GRID		RAID-Z layout information (reserved for future use)
+ * cksum	checksum function
+ * comp		compression function
+ * G		gang block indicator
+ * E		endianness
+ * type		DMU object type
+ * lvl		level of indirection
+ * birth txg	transaction group in which the block was born
+ * fill count	number of non-zero blocks under this bp
+ * checksum[4]	256-bit checksum of the data this bp describes
+ */
+typedef struct blkptr {
+	dva_t		blk_dva[3];	/* 128-bit Data Virtual Address	*/
+	grub_uint64_t	blk_prop;	/* size, compression, type, etc	*/
+	grub_uint64_t	blk_pad[3];	/* Extra space for the future	*/
+	grub_uint64_t	blk_birth;	/* transaction group at birth	*/
+	grub_uint64_t	blk_fill;	/* fill count			*/
+	zio_cksum_t	blk_cksum;	/* 256-bit checksum		*/
+} blkptr_t;
+
+#define	SPA_BLKPTRSHIFT	7		/* blkptr_t is 128 bytes	*/
+#define	SPA_DVAS_PER_BP	3		/* Number of DVAs in a bp	*/
+
+/*
+ * Macros to get and set fields in a bp or DVA.
+ */
+#define	DVA_GET_ASIZE(dva)	\
+	BF64_GET_SB((dva)->dva_word[0], 0, 24, SPA_MINBLOCKSHIFT, 0)
+#define	DVA_SET_ASIZE(dva, x)	\
+	BF64_SET_SB((dva)->dva_word[0], 0, 24, SPA_MINBLOCKSHIFT, 0, x)
+
+#define	DVA_GET_GRID(dva)	BF64_GET((dva)->dva_word[0], 24, 8)
+#define	DVA_SET_GRID(dva, x)	BF64_SET((dva)->dva_word[0], 24, 8, x)
+
+#define	DVA_GET_VDEV(dva)	BF64_GET((dva)->dva_word[0], 32, 32)
+#define	DVA_SET_VDEV(dva, x)	BF64_SET((dva)->dva_word[0], 32, 32, x)
+
+#define	DVA_GET_GANG(dva)	BF64_GET((dva)->dva_word[1], 63, 1)
+#define	DVA_SET_GANG(dva, x)	BF64_SET((dva)->dva_word[1], 63, 1, x)
+
+#define	BP_GET_LSIZE(bp)	\
+	(BP_IS_HOLE(bp) ? 0 : \
+	BF64_GET_SB((bp)->blk_prop, 0, 16, SPA_MINBLOCKSHIFT, 1))
+#define	BP_SET_LSIZE(bp, x)	\
+	BF64_SET_SB((bp)->blk_prop, 0, 16, SPA_MINBLOCKSHIFT, 1, x)
+
+#define	BP_GET_COMPRESS(bp)	BF64_GET((bp)->blk_prop, 32, 8)
+#define	BP_SET_COMPRESS(bp, x)	BF64_SET((bp)->blk_prop, 32, 8, x)
+
+#define	BP_GET_CHECKSUM(bp)	BF64_GET((bp)->blk_prop, 40, 8)
+#define	BP_SET_CHECKSUM(bp, x)	BF64_SET((bp)->blk_prop, 40, 8, x)
+
+#define	BP_GET_TYPE(bp)		BF64_GET((bp)->blk_prop, 48, 8)
+#define	BP_SET_TYPE(bp, x)	BF64_SET((bp)->blk_prop, 48, 8, x)
+
+#define	BP_GET_LEVEL(bp)	BF64_GET((bp)->blk_prop, 56, 5)
+#define	BP_SET_LEVEL(bp, x)	BF64_SET((bp)->blk_prop, 56, 5, x)
+
+#define	BP_GET_BYTEORDER(bp)	(0 - BF64_GET((bp)->blk_prop, 63, 1))
+#define	BP_SET_BYTEORDER(bp, x)	BF64_SET((bp)->blk_prop, 63, 1, x)
+
+#define	BP_GET_ASIZE(bp)	\
+	(DVA_GET_ASIZE(&(bp)->blk_dva[0]) + DVA_GET_ASIZE(&(bp)->blk_dva[1]) + \
+		DVA_GET_ASIZE(&(bp)->blk_dva[2]))
+
+#define	BP_GET_UCSIZE(bp) \
+	((BP_GET_LEVEL(bp) > 0 || dmu_ot[BP_GET_TYPE(bp)].ot_metadata) ? \
+	BP_GET_PSIZE(bp) : BP_GET_LSIZE(bp));
+
+#define	BP_GET_NDVAS(bp)	\
+	(!!DVA_GET_ASIZE(&(bp)->blk_dva[0]) + \
+	!!DVA_GET_ASIZE(&(bp)->blk_dva[1]) + \
+	!!DVA_GET_ASIZE(&(bp)->blk_dva[2]))
+
+#define	BP_COUNT_GANG(bp)	\
+	(DVA_GET_GANG(&(bp)->blk_dva[0]) + \
+	DVA_GET_GANG(&(bp)->blk_dva[1]) + \
+	DVA_GET_GANG(&(bp)->blk_dva[2]))
+
+#define	DVA_EQUAL(dva1, dva2)	\
+	((dva1)->dva_word[1] == (dva2)->dva_word[1] && \
+	(dva1)->dva_word[0] == (dva2)->dva_word[0])
+
+#define	ZIO_CHECKSUM_EQUAL(zc1, zc2) \
+	(0 == (((zc1).zc_word[0] - (zc2).zc_word[0]) | \
+	((zc1).zc_word[1] - (zc2).zc_word[1]) | \
+	((zc1).zc_word[2] - (zc2).zc_word[2]) | \
+	((zc1).zc_word[3] - (zc2).zc_word[3])))
+
+
+#define	DVA_IS_VALID(dva)	(DVA_GET_ASIZE(dva) != 0)
+
+#define	ZIO_SET_CHECKSUM(zcp, w0, w1, w2, w3)	\
+{						\
+	(zcp)->zc_word[0] = w0;			\
+	(zcp)->zc_word[1] = w1;			\
+	(zcp)->zc_word[2] = w2;			\
+	(zcp)->zc_word[3] = w3;			\
+}
+
+#define	BP_IDENTITY(bp)		(&(bp)->blk_dva[0])
+#define	BP_IS_GANG(bp)		DVA_GET_GANG(BP_IDENTITY(bp))
+#define	BP_IS_HOLE(bp)		((bp)->blk_birth == 0)
+#define	BP_IS_OLDER(bp, txg)	(!BP_IS_HOLE(bp) && (bp)->blk_birth < (txg))
+
+#define	BP_ZERO(bp)				\
+{						\
+	(bp)->blk_dva[0].dva_word[0] = 0;	\
+	(bp)->blk_dva[0].dva_word[1] = 0;	\
+	(bp)->blk_dva[1].dva_word[0] = 0;	\
+	(bp)->blk_dva[1].dva_word[1] = 0;	\
+	(bp)->blk_dva[2].dva_word[0] = 0;	\
+	(bp)->blk_dva[2].dva_word[1] = 0;	\
+	(bp)->blk_prop = 0;			\
+	(bp)->blk_pad[0] = 0;			\
+	(bp)->blk_pad[1] = 0;			\
+	(bp)->blk_pad[2] = 0;			\
+	(bp)->blk_birth = 0;			\
+	(bp)->blk_fill = 0;			\
+	ZIO_SET_CHECKSUM(&(bp)->blk_cksum, 0, 0, 0, 0);	\
+}
+
+#define	BP_SPRINTF_LEN	320
+
+#endif	/* ! GRUB_ZFS_SPA_HEADER */
--- grub2-1.97~beta3.orig/debian/grub-extras/include/grub/zfs/zil.h
+++ grub2-1.97~beta3/debian/grub-extras/include/grub/zfs/zil.h
@@ -0,0 +1,51 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 1999,2000,2001,2002,2003,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
+ *  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.
+ */
+/*
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef	_SYS_ZIL_H
+#define	_SYS_ZIL_H
+
+/*
+ * Intent log format:
+ *
+ * Each objset has its own intent log.  The log header (zil_header_t)
+ * for objset N's intent log is kept in the Nth object of the SPA's
+ * intent_log objset.  The log header points to a chain of log blocks,
+ * each of which contains log records (i.e., transactions) followed by
+ * a log block trailer (zil_trailer_t).  The format of a log record
+ * depends on the record (or transaction) type, but all records begin
+ * with a common structure that defines the type, length, and txg.
+ */
+
+/*
+ * Intent log header - this on disk structure holds fields to manage
+ * the log.  All fields are 64 bit to easily handle cross architectures.
+ */
+typedef struct zil_header {
+	grub_uint64_t zh_claim_txg;   /* txg in which log blocks were claimed */
+	grub_uint64_t zh_replay_seq;  /* highest replayed sequence number */
+	blkptr_t zh_log;	/* log chain */
+	grub_uint64_t zh_claim_seq;	/* highest claimed sequence number */
+	grub_uint64_t zh_pad[5];
+} zil_header_t;
+
+#endif	/* _SYS_ZIL_H */
--- grub2-1.97~beta3.orig/debian/grub-extras/include/grub/zfs/uberblock_impl.h
+++ grub2-1.97~beta3/debian/grub-extras/include/grub/zfs/uberblock_impl.h
@@ -0,0 +1,61 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 1999,2000,2001,2002,2003,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
+ *  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.
+ */
+/*
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef _SYS_UBERBLOCK_IMPL_H
+#define	_SYS_UBERBLOCK_IMPL_H
+
+/*
+ * The uberblock version is incremented whenever an incompatible on-disk
+ * format change is made to the SPA, DMU, or ZAP.
+ *
+ * Note: the first two fields should never be moved.  When a storage pool
+ * is opened, the uberblock must be read off the disk before the version
+ * can be checked.  If the ub_version field is moved, we may not detect
+ * version mismatch.  If the ub_magic field is moved, applications that
+ * expect the magic number in the first word won't work.
+ */
+#define	UBERBLOCK_MAGIC		0x00bab10c		/* oo-ba-bloc!	*/
+#define	UBERBLOCK_SHIFT		10			/* up to 1K	*/
+
+typedef struct uberblock {
+	grub_uint64_t	ub_magic;	/* UBERBLOCK_MAGIC		*/
+	grub_uint64_t	ub_version;	/* ZFS_VERSION			*/
+	grub_uint64_t	ub_txg;		/* txg of last sync		*/
+	grub_uint64_t	ub_guid_sum;	/* sum of all vdev guids	*/
+	grub_uint64_t	ub_timestamp;	/* UTC time of last sync	*/
+	blkptr_t	ub_rootbp;	/* MOS objset_phys_t		*/
+} uberblock_t;
+
+#define	UBERBLOCK_SIZE		(1ULL << UBERBLOCK_SHIFT)
+#define	VDEV_UBERBLOCK_SHIFT	UBERBLOCK_SHIFT
+
+/* XXX Uberblock_phys_t is no longer in the kernel zfs */
+typedef struct uberblock_phys {
+	uberblock_t	ubp_uberblock;
+	char		ubp_pad[UBERBLOCK_SIZE - sizeof (uberblock_t) -
+				sizeof (zio_block_tail_t)];
+	zio_block_tail_t ubp_zbt;
+} uberblock_phys_t;
+
+
+#endif	/* _SYS_UBERBLOCK_IMPL_H */
--- grub2-1.97~beta3.orig/debian/grub-extras/include/grub/zfs/dsl_dir.h
+++ grub2-1.97~beta3/debian/grub-extras/include/grub/zfs/dsl_dir.h
@@ -0,0 +1,49 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 1999,2000,2001,2002,2003,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
+ *  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.
+ */
+/*
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef	_SYS_DSL_DIR_H
+#define	_SYS_DSL_DIR_H
+
+typedef struct dsl_dir_phys {
+	grub_uint64_t dd_creation_time; /* not actually used */
+	grub_uint64_t dd_head_dataset_obj;
+	grub_uint64_t dd_parent_obj;
+	grub_uint64_t dd_clone_parent_obj;
+	grub_uint64_t dd_child_dir_zapobj;
+	/*
+	 * how much space our children are accounting for; for leaf
+	 * datasets, == physical space used by fs + snaps
+	 */
+	grub_uint64_t dd_used_bytes;
+	grub_uint64_t dd_compressed_bytes;
+	grub_uint64_t dd_uncompressed_bytes;
+	/* Administrative quota setting */
+	grub_uint64_t dd_quota;
+	/* Administrative reservation setting */
+	grub_uint64_t dd_reserved;
+	grub_uint64_t dd_props_zapobj;
+	grub_uint64_t dd_deleg_zapobj;	/* dataset permissions */
+	grub_uint64_t dd_pad[20]; /* pad out to 256 bytes for good measure */
+} dsl_dir_phys_t;
+
+#endif /* _SYS_DSL_DIR_H */
--- grub2-1.97~beta3.orig/debian/grub-extras/include/grub/zfs/zfs_acl.h
+++ grub2-1.97~beta3/debian/grub-extras/include/grub/zfs/zfs_acl.h
@@ -0,0 +1,60 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 1999,2000,2001,2002,2003,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
+ *  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.
+ */
+/*
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef	_SYS_FS_ZFS_ACL_H
+#define	_SYS_FS_ZFS_ACL_H
+
+#ifndef _UID_T
+#define	_UID_T
+typedef	unsigned int uid_t;			/* UID type */
+#endif /* _UID_T */
+
+typedef struct zfs_oldace {
+	grub_uint32_t	z_fuid;		/* "who" */
+	grub_uint32_t	z_access_mask;  /* access mask */
+	grub_uint16_t	z_flags;	/* flags, i.e inheritance */
+	grub_uint16_t	z_type;		/* type of entry allow/deny */
+} zfs_oldace_t;
+
+#define	ACE_SLOT_CNT	6
+
+typedef struct zfs_znode_acl_v0 {
+	grub_uint64_t	z_acl_extern_obj;	  /* ext acl pieces */
+	grub_uint32_t	z_acl_count;		  /* Number of ACEs */
+	grub_uint16_t	z_acl_version;		  /* acl version */
+	grub_uint16_t	z_acl_pad;		  /* pad */
+	zfs_oldace_t	z_ace_data[ACE_SLOT_CNT]; /* 6 standard ACEs */
+} zfs_znode_acl_v0_t;
+
+#define	ZFS_ACE_SPACE	(sizeof (zfs_oldace_t) * ACE_SLOT_CNT)
+
+typedef struct zfs_znode_acl {
+	grub_uint64_t	z_acl_extern_obj;	  /* ext acl pieces */
+	grub_uint32_t	z_acl_size;		  /* Number of bytes in ACL */
+	grub_uint16_t	z_acl_version;		  /* acl version */
+	grub_uint16_t	z_acl_count;		  /* ace count */
+	grub_uint8_t	z_ace_data[ZFS_ACE_SPACE]; /* space for embedded ACEs */
+} zfs_znode_acl_t;
+
+
+#endif	/* _SYS_FS_ZFS_ACL_H */
--- grub2-1.97~beta3.orig/debian/grub-extras/include/grub/zfs/dmu_objset.h
+++ grub2-1.97~beta3/debian/grub-extras/include/grub/zfs/dmu_objset.h
@@ -0,0 +1,37 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 1999,2000,2001,2002,2003,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
+ *  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.
+ */
+/*
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef	_SYS_DMU_OBJSET_H
+#define	_SYS_DMU_OBJSET_H
+
+#include <grub/zfs/zil.h>
+
+typedef struct objset_phys {
+	dnode_phys_t os_meta_dnode;
+	zil_header_t os_zil_header;
+	grub_uint64_t os_type;
+	char os_pad[1024 - sizeof (dnode_phys_t) - sizeof (zil_header_t) -
+	    sizeof (grub_uint64_t)];
+} objset_phys_t;
+
+#endif /* _SYS_DMU_OBJSET_H */
--- grub2-1.97~beta3.orig/debian/grub-extras/include/grub/zfs/vdev_impl.h
+++ grub2-1.97~beta3/debian/grub-extras/include/grub/zfs/vdev_impl.h
@@ -0,0 +1,70 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 1999,2000,2001,2002,2003,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
+ *  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.
+ */
+/*
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef _SYS_VDEV_IMPL_H
+#define	_SYS_VDEV_IMPL_H
+
+#define	VDEV_SKIP_SIZE		(8 << 10)
+#define	VDEV_BOOT_HEADER_SIZE	(8 << 10)
+#define	VDEV_PHYS_SIZE		(112 << 10)
+#define	VDEV_UBERBLOCK_RING	(128 << 10)
+
+/* ZFS boot block */
+#define	VDEV_BOOT_MAGIC		0x2f5b007b10cULL
+#define	VDEV_BOOT_VERSION	1		/* version number	*/
+
+typedef struct vdev_boot_header {
+	grub_uint64_t	vb_magic;		/* VDEV_BOOT_MAGIC	*/
+	grub_uint64_t	vb_version;		/* VDEV_BOOT_VERSION	*/
+	grub_uint64_t	vb_offset;		/* start offset	(bytes) */
+	grub_uint64_t	vb_size;		/* size (bytes)		*/
+	char		vb_pad[VDEV_BOOT_HEADER_SIZE - 4 * sizeof (grub_uint64_t)];
+} vdev_boot_header_t;
+
+typedef struct vdev_phys {
+	char		vp_nvlist[VDEV_PHYS_SIZE - sizeof (zio_block_tail_t)];
+	zio_block_tail_t vp_zbt;
+} vdev_phys_t;
+
+typedef struct vdev_label {
+	char		vl_pad[VDEV_SKIP_SIZE];			/*   8K	*/
+	vdev_boot_header_t vl_boot_header;			/*   8K	*/
+	vdev_phys_t	vl_vdev_phys;				/* 112K	*/
+	char		vl_uberblock[VDEV_UBERBLOCK_RING];	/* 128K	*/
+} vdev_label_t;							/* 256K total */
+
+/*
+ * Size and offset of embedded boot loader region on each label.
+ * The total size of the first two labels plus the boot area is 4MB.
+ */
+#define	VDEV_BOOT_OFFSET	(2 * sizeof (vdev_label_t))
+#define	VDEV_BOOT_SIZE		(7ULL << 19)			/* 3.5M	*/
+
+/*
+ * Size of label regions at the start and end of each leaf device.
+ */
+#define	VDEV_LABEL_START_SIZE	(2 * sizeof (vdev_label_t) + VDEV_BOOT_SIZE)
+#define	VDEV_LABEL_END_SIZE	(2 * sizeof (vdev_label_t))
+#define	VDEV_LABELS		4
+
+#endif	/* _SYS_VDEV_IMPL_H */
--- grub2-1.97~beta3.orig/debian/grub-extras/include/grub/zfs/dnode.h
+++ grub2-1.97~beta3/debian/grub-extras/include/grub/zfs/dnode.h
@@ -0,0 +1,78 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 1999,2000,2001,2002,2003,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
+ *  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.
+ */
+/*
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef	_SYS_DNODE_H
+#define	_SYS_DNODE_H
+
+#include <grub/zfs/spa.h>
+
+/*
+ * Fixed constants.
+ */
+#define	DNODE_SHIFT		9	/* 512 bytes */
+#define	DN_MIN_INDBLKSHIFT	10	/* 1k */
+#define	DN_MAX_INDBLKSHIFT	14	/* 16k */
+#define	DNODE_BLOCK_SHIFT	14	/* 16k */
+#define	DNODE_CORE_SIZE		64	/* 64 bytes for dnode sans blkptrs */
+#define	DN_MAX_OBJECT_SHIFT	48	/* 256 trillion (zfs_fid_t limit) */
+#define	DN_MAX_OFFSET_SHIFT	64	/* 2^64 bytes in a dnode */
+
+/*
+ * Derived constants.
+ */
+#define	DNODE_SIZE	(1 << DNODE_SHIFT)
+#define	DN_MAX_NBLKPTR	((DNODE_SIZE - DNODE_CORE_SIZE) >> SPA_BLKPTRSHIFT)
+#define	DN_MAX_BONUSLEN	(DNODE_SIZE - DNODE_CORE_SIZE - (1 << SPA_BLKPTRSHIFT))
+#define	DN_MAX_OBJECT	(1ULL << DN_MAX_OBJECT_SHIFT)
+
+#define	DNODES_PER_BLOCK_SHIFT	(DNODE_BLOCK_SHIFT - DNODE_SHIFT)
+#define	DNODES_PER_BLOCK	(1ULL << DNODES_PER_BLOCK_SHIFT)
+#define	DNODES_PER_LEVEL_SHIFT	(DN_MAX_INDBLKSHIFT - SPA_BLKPTRSHIFT)
+
+#define	DN_BONUS(dnp)	((void*)((dnp)->dn_bonus + \
+	(((dnp)->dn_nblkptr - 1) * sizeof (blkptr_t))))
+
+typedef struct dnode_phys {
+	grub_uint8_t dn_type;		/* dmu_object_type_t */
+	grub_uint8_t dn_indblkshift;		/* ln2(indirect block size) */
+	grub_uint8_t dn_nlevels;		/* 1=dn_blkptr->data blocks */
+	grub_uint8_t dn_nblkptr;		/* length of dn_blkptr */
+	grub_uint8_t dn_bonustype;		/* type of data in bonus buffer */
+	grub_uint8_t	dn_checksum;		/* ZIO_CHECKSUM type */
+	grub_uint8_t	dn_compress;		/* ZIO_COMPRESS type */
+	grub_uint8_t dn_flags;		/* DNODE_FLAG_* */
+	grub_uint16_t dn_datablkszsec;	/* data block size in 512b sectors */
+	grub_uint16_t dn_bonuslen;		/* length of dn_bonus */
+	grub_uint8_t dn_pad2[4];
+
+	/* accounting is protected by dn_dirty_mtx */
+	grub_uint64_t dn_maxblkid;		/* largest allocated block ID */
+	grub_uint64_t dn_used;		/* bytes (or sectors) of disk space */
+
+	grub_uint64_t dn_pad3[4];
+
+	blkptr_t dn_blkptr[1];
+	grub_uint8_t dn_bonus[DN_MAX_BONUSLEN];
+} dnode_phys_t;
+
+#endif	/* _SYS_DNODE_H */
--- grub2-1.97~beta3.orig/debian/grub-extras/include/grub/zfs/zap_leaf.h
+++ grub2-1.97~beta3/debian/grub-extras/include/grub/zfs/zap_leaf.h
@@ -0,0 +1,100 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 1999,2000,2001,2002,2003,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
+ *  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.
+ */
+/*
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef	_SYS_ZAP_LEAF_H
+#define	_SYS_ZAP_LEAF_H
+
+#define	ZAP_LEAF_MAGIC 0x2AB1EAF
+
+/* chunk size = 24 bytes */
+#define	ZAP_LEAF_CHUNKSIZE 24
+
+/*
+ * The amount of space within the chunk available for the array is:
+ * chunk size - space for type (1) - space for next pointer (2)
+ */
+#define	ZAP_LEAF_ARRAY_BYTES (ZAP_LEAF_CHUNKSIZE - 3)
+
+typedef enum zap_chunk_type {
+	ZAP_CHUNK_FREE = 253,
+	ZAP_CHUNK_ENTRY = 252,
+	ZAP_CHUNK_ARRAY = 251,
+	ZAP_CHUNK_TYPE_MAX = 250
+} zap_chunk_type_t;
+
+/*
+ * TAKE NOTE:
+ * If zap_leaf_phys_t is modified, zap_leaf_byteswap() must be modified.
+ */
+typedef struct zap_leaf_phys {
+	struct zap_leaf_header {
+		grub_uint64_t lh_block_type;		/* ZBT_LEAF */
+		grub_uint64_t lh_pad1;
+		grub_uint64_t lh_prefix;		/* hash prefix of this leaf */
+		grub_uint32_t lh_magic;		/* ZAP_LEAF_MAGIC */
+		grub_uint16_t lh_nfree;		/* number free chunks */
+		grub_uint16_t lh_nentries;		/* number of entries */
+		grub_uint16_t lh_prefix_len;		/* num bits used to id this */
+
+/* above is accessable to zap, below is zap_leaf private */
+
+		grub_uint16_t lh_freelist;		/* chunk head of free list */
+		grub_uint8_t lh_pad2[12];
+	} l_hdr; /* 2 24-byte chunks */
+
+	/*
+	 * The header is followed by a hash table with
+	 * ZAP_LEAF_HASH_NUMENTRIES(zap) entries.  The hash table is
+	 * followed by an array of ZAP_LEAF_NUMCHUNKS(zap)
+	 * zap_leaf_chunk structures.  These structures are accessed
+	 * with the ZAP_LEAF_CHUNK() macro.
+	 */
+
+	grub_uint16_t l_hash[1];
+} zap_leaf_phys_t;
+
+typedef union zap_leaf_chunk {
+	struct zap_leaf_entry {
+		grub_uint8_t le_type; 		/* always ZAP_CHUNK_ENTRY */
+		grub_uint8_t le_int_size;		/* size of ints */
+		grub_uint16_t le_next;		/* next entry in hash chain */
+		grub_uint16_t le_name_chunk;		/* first chunk of the name */
+		grub_uint16_t le_name_length;	/* bytes in name, incl null */
+		grub_uint16_t le_value_chunk;	/* first chunk of the value */
+		grub_uint16_t le_value_length;	/* value length in ints */
+		grub_uint32_t le_cd;		/* collision differentiator */
+		grub_uint64_t le_hash;		/* hash value of the name */
+	} l_entry;
+	struct zap_leaf_array {
+		grub_uint8_t la_type;		/* always ZAP_CHUNK_ARRAY */
+		grub_uint8_t la_array[ZAP_LEAF_ARRAY_BYTES];
+		grub_uint16_t la_next;		/* next blk or CHAIN_END */
+	} l_array;
+	struct zap_leaf_free {
+		grub_uint8_t lf_type;		/* always ZAP_CHUNK_FREE */
+		grub_uint8_t lf_pad[ZAP_LEAF_ARRAY_BYTES];
+		grub_uint16_t lf_next;	/* next in free list, or CHAIN_END */
+	} l_free;
+} zap_leaf_chunk_t;
+
+#endif /* _SYS_ZAP_LEAF_H */
--- grub2-1.97~beta3.orig/debian/grub-extras/include/grub/zfs/zfs.h
+++ grub2-1.97~beta3/debian/grub-extras/include/grub/zfs/zfs.h
@@ -0,0 +1,119 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 1999,2000,2001,2002,2003,2004  Free Software Foundation, Inc.
+ *  Copyright 2008  Sun Microsystems, Inc.
+ *  Copyright (C) 2009  Vladimir Serbinenko <phcoder@gmail.com>
+ *
+ *  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 3 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.
+ */
+/*
+ * Use is subject to license terms.
+ */
+
+#ifndef	GRUB_ZFS_HEADER
+#define	GRUB_ZFS_HEADER 1
+
+#include <grub/err.h>
+#include <grub/disk.h>
+
+/*
+ * On-disk version number.
+ */
+#define	SPA_VERSION			14ULL
+
+/*
+ * The following are configuration names used in the nvlist describing a pool's
+ * configuration.
+ */
+#define	ZPOOL_CONFIG_VERSION		"version"
+#define	ZPOOL_CONFIG_POOL_NAME		"name"
+#define	ZPOOL_CONFIG_POOL_STATE		"state"
+#define	ZPOOL_CONFIG_POOL_TXG		"txg"
+#define	ZPOOL_CONFIG_POOL_GUID		"pool_guid"
+#define	ZPOOL_CONFIG_CREATE_TXG		"create_txg"
+#define	ZPOOL_CONFIG_TOP_GUID		"top_guid"
+#define	ZPOOL_CONFIG_VDEV_TREE		"vdev_tree"
+#define	ZPOOL_CONFIG_TYPE		"type"
+#define	ZPOOL_CONFIG_CHILDREN		"children"
+#define	ZPOOL_CONFIG_ID			"id"
+#define	ZPOOL_CONFIG_GUID		"guid"
+#define	ZPOOL_CONFIG_PATH		"path"
+#define	ZPOOL_CONFIG_DEVID		"devid"
+#define	ZPOOL_CONFIG_METASLAB_ARRAY	"metaslab_array"
+#define	ZPOOL_CONFIG_METASLAB_SHIFT	"metaslab_shift"
+#define	ZPOOL_CONFIG_ASHIFT		"ashift"
+#define	ZPOOL_CONFIG_ASIZE		"asize"
+#define	ZPOOL_CONFIG_DTL		"DTL"
+#define	ZPOOL_CONFIG_STATS		"stats"
+#define	ZPOOL_CONFIG_WHOLE_DISK		"whole_disk"
+#define	ZPOOL_CONFIG_ERRCOUNT		"error_count"
+#define	ZPOOL_CONFIG_NOT_PRESENT	"not_present"
+#define	ZPOOL_CONFIG_SPARES		"spares"
+#define	ZPOOL_CONFIG_IS_SPARE		"is_spare"
+#define	ZPOOL_CONFIG_NPARITY		"nparity"
+#define	ZPOOL_CONFIG_PHYS_PATH		"phys_path"
+#define	ZPOOL_CONFIG_L2CACHE		"l2cache"
+/*
+ * The persistent vdev state is stored as separate values rather than a single
+ * 'vdev_state' entry.  This is because a device can be in multiple states, such
+ * as offline and degraded.
+ */
+#define	ZPOOL_CONFIG_OFFLINE		"offline"
+#define	ZPOOL_CONFIG_FAULTED		"faulted"
+#define	ZPOOL_CONFIG_DEGRADED		"degraded"
+#define	ZPOOL_CONFIG_REMOVED		"removed"
+
+#define	VDEV_TYPE_ROOT			"root"
+#define	VDEV_TYPE_MIRROR		"mirror"
+#define	VDEV_TYPE_REPLACING		"replacing"
+#define	VDEV_TYPE_RAIDZ			"raidz"
+#define	VDEV_TYPE_DISK			"disk"
+#define	VDEV_TYPE_FILE			"file"
+#define	VDEV_TYPE_MISSING		"missing"
+#define	VDEV_TYPE_SPARE			"spare"
+#define	VDEV_TYPE_L2CACHE		"l2cache"
+
+/*
+ * pool state.  The following states are written to disk as part of the normal
+ * SPA lifecycle: ACTIVE, EXPORTED, DESTROYED, SPARE, L2CACHE.  The remaining
+ * states are software abstractions used at various levels to communicate pool
+ * state.
+ */
+typedef enum pool_state {
+	POOL_STATE_ACTIVE = 0,		/* In active use		*/
+	POOL_STATE_EXPORTED,		/* Explicitly exported		*/
+	POOL_STATE_DESTROYED,		/* Explicitly destroyed		*/
+	POOL_STATE_SPARE,		/* Reserved for hot spare use	*/
+	POOL_STATE_L2CACHE,		/* Level 2 ARC device		*/
+	POOL_STATE_UNINITIALIZED,	/* Internal spa_t state		*/
+	POOL_STATE_UNAVAIL,		/* Internal libzfs state	*/
+	POOL_STATE_POTENTIALLY_ACTIVE	/* Internal libzfs state	*/
+} pool_state_t;
+
+struct grub_zfs_data;
+
+grub_err_t grub_zfs_fetch_nvlist (grub_device_t dev, char **nvlist);
+grub_err_t grub_zfs_getmdnobj (grub_device_t dev, const char *fsfilename,
+			       grub_uint64_t *mdnobj);
+
+char *grub_zfs_nvlist_lookup_string (char *nvlist, char *name);
+char *grub_zfs_nvlist_lookup_nvlist (char *nvlist, char *name);
+int grub_zfs_nvlist_lookup_uint64 (char *nvlist, char *name,
+				   grub_uint64_t *out);
+char *grub_zfs_nvlist_lookup_nvlist_array (char *nvlist, char *name,
+					   grub_size_t index);
+int grub_zfs_nvlist_lookup_nvlist_array_get_nelm (char *nvlist, char *name);
+
+#endif	/* ! GRUB_ZFS_HEADER */
--- grub2-1.97~beta3.orig/debian/grub-extras/include/grub/zfs/zap_impl.h
+++ grub2-1.97~beta3/debian/grub-extras/include/grub/zfs/zap_impl.h
@@ -0,0 +1,110 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 1999,2000,2001,2002,2003,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
+ *  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.
+ */
+/*
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef	_SYS_ZAP_IMPL_H
+#define	_SYS_ZAP_IMPL_H
+
+#define	ZAP_MAGIC 0x2F52AB2ABULL
+
+#define	ZAP_HASHBITS		28
+#define	MZAP_ENT_LEN		64
+#define	MZAP_NAME_LEN		(MZAP_ENT_LEN - 8 - 4 - 2)
+#define	MZAP_MAX_BLKSHIFT	SPA_MAXBLOCKSHIFT
+#define	MZAP_MAX_BLKSZ		(1 << MZAP_MAX_BLKSHIFT)
+
+typedef struct mzap_ent_phys {
+	grub_uint64_t mze_value;
+	grub_uint32_t mze_cd;
+	grub_uint16_t mze_pad;	/* in case we want to chain them someday */
+	char mze_name[MZAP_NAME_LEN];
+} mzap_ent_phys_t;
+
+typedef struct mzap_phys {
+	grub_uint64_t mz_block_type;	/* ZBT_MICRO */
+	grub_uint64_t mz_salt;
+	grub_uint64_t mz_pad[6];
+	mzap_ent_phys_t mz_chunk[1];
+	/* actually variable size depending on block size */
+} mzap_phys_t;
+
+/*
+ * The (fat) zap is stored in one object. It is an array of
+ * 1<<FZAP_BLOCK_SHIFT byte blocks. The layout looks like one of:
+ *
+ * ptrtbl fits in first block:
+ * 	[zap_phys_t zap_ptrtbl_shift < 6] [zap_leaf_t] ...
+ *
+ * ptrtbl too big for first block:
+ * 	[zap_phys_t zap_ptrtbl_shift >= 6] [zap_leaf_t] [ptrtbl] ...
+ *
+ */
+
+#define	ZBT_LEAF		((1ULL << 63) + 0)
+#define	ZBT_HEADER		((1ULL << 63) + 1)
+#define	ZBT_MICRO		((1ULL << 63) + 3)
+/* any other values are ptrtbl blocks */
+
+/*
+ * the embedded pointer table takes up half a block:
+ * block size / entry size (2^3) / 2
+ */
+#define	ZAP_EMBEDDED_PTRTBL_SHIFT(zap) (FZAP_BLOCK_SHIFT(zap) - 3 - 1)
+
+/*
+ * The embedded pointer table starts half-way through the block.  Since
+ * the pointer table itself is half the block, it starts at (64-bit)
+ * word number (1<<ZAP_EMBEDDED_PTRTBL_SHIFT(zap)).
+ */
+#define	ZAP_EMBEDDED_PTRTBL_ENT(zap, idx) \
+	((grub_uint64_t *)(zap)->zap_f.zap_phys) \
+	[(idx) + (1<<ZAP_EMBEDDED_PTRTBL_SHIFT(zap))]
+
+/*
+ * TAKE NOTE:
+ * If zap_phys_t is modified, zap_byteswap() must be modified.
+ */
+typedef struct zap_phys {
+	grub_uint64_t zap_block_type;	/* ZBT_HEADER */
+	grub_uint64_t zap_magic;		/* ZAP_MAGIC */
+
+	struct zap_table_phys {
+		grub_uint64_t zt_blk;	/* starting block number */
+		grub_uint64_t zt_numblks;	/* number of blocks */
+		grub_uint64_t zt_shift;	/* bits to index it */
+		grub_uint64_t zt_nextblk;	/* next (larger) copy start block */
+		grub_uint64_t zt_blks_copied; /* number source blocks copied */
+	} zap_ptrtbl;
+
+	grub_uint64_t zap_freeblk;		/* the next free block */
+	grub_uint64_t zap_num_leafs;		/* number of leafs */
+	grub_uint64_t zap_num_entries;	/* number of entries */
+	grub_uint64_t zap_salt;		/* salt to stir into hash function */
+	/*
+	 * This structure is followed by padding, and then the embedded
+	 * pointer table.  The embedded pointer table takes up second
+	 * half of the block.  It is accessed using the
+	 * ZAP_EMBEDDED_PTRTBL_ENT() macro.
+	 */
+} zap_phys_t;
+
+#endif /* _SYS_ZAP_IMPL_H */
--- grub2-1.97~beta3.orig/debian/grub-extras/include/grub/zfs/zfs_znode.h
+++ grub2-1.97~beta3/debian/grub-extras/include/grub/zfs/zfs_znode.h
@@ -0,0 +1,70 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 1999,2000,2001,2002,2003,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
+ *  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.
+ */
+/*
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef	_SYS_FS_ZFS_ZNODE_H
+#define	_SYS_FS_ZFS_ZNODE_H
+
+#include <grub/zfs/zfs_acl.h>
+
+#define	MASTER_NODE_OBJ	1
+#define	ZFS_ROOT_OBJ		"ROOT"
+#define	ZPL_VERSION_STR		"VERSION"
+
+#define	ZPL_VERSION		3ULL
+
+#define	ZFS_DIRENT_OBJ(de) BF64_GET(de, 0, 48)
+
+/*
+ * This is the persistent portion of the znode.  It is stored
+ * in the "bonus buffer" of the file.  Short symbolic links
+ * are also stored in the bonus buffer.
+ */
+typedef struct znode_phys {
+	grub_uint64_t zp_atime[2];      /*  0 - last file access time */
+	grub_uint64_t zp_mtime[2];	/* 16 - last file modification time */
+	grub_uint64_t zp_ctime[2];	/* 32 - last file change time */
+	grub_uint64_t zp_crtime[2];	/* 48 - creation time */
+	grub_uint64_t zp_gen;		/* 64 - generation (txg of creation) */
+	grub_uint64_t zp_mode;		/* 72 - file mode bits */
+	grub_uint64_t zp_size;		/* 80 - size of file */
+	grub_uint64_t zp_parent;	/* 88 - directory parent (`..') */
+	grub_uint64_t zp_links;		/* 96 - number of links to file */
+	grub_uint64_t zp_xattr;		/* 104 - DMU object for xattrs */
+	grub_uint64_t zp_rdev;		/* 112 - dev_t for VBLK & VCHR files */
+	grub_uint64_t zp_flags;		/* 120 - persistent flags */
+	grub_uint64_t zp_uid;		/* 128 - file owner */
+	grub_uint64_t zp_gid;		/* 136 - owning group */
+	grub_uint64_t zp_pad[4];	/* 144 - future */
+	zfs_znode_acl_t zp_acl;		/* 176 - 263 ACL */
+	/*
+	 * Data may pad out any remaining bytes in the znode buffer, eg:
+	 *
+	 * |<---------------------- dnode_phys (512) ------------------------>|
+	 * |<-- dnode (192) --->|<----------- "bonus" buffer (320) ---------->|
+	 *			|<---- znode (264) ---->|<---- data (56) ---->|
+	 *
+	 * At present, we only use this space to store symbolic links.
+	 */
+} znode_phys_t;
+
+#endif	/* _SYS_FS_ZFS_ZNODE_H */
--- grub2-1.97~beta3.orig/debian/grub-extras/include/grub/zfs/dmu.h
+++ grub2-1.97~beta3/debian/grub-extras/include/grub/zfs/dmu.h
@@ -0,0 +1,105 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 1999,2000,2001,2002,2003,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
+ *  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.
+ */
+/*
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef	_SYS_DMU_H
+#define	_SYS_DMU_H
+
+/*
+ * This file describes the interface that the DMU provides for its
+ * consumers.
+ *
+ * The DMU also interacts with the SPA.  That interface is described in
+ * dmu_spa.h.
+ */
+typedef enum dmu_object_type {
+	DMU_OT_NONE,
+	/* general: */
+	DMU_OT_OBJECT_DIRECTORY,	/* ZAP */
+	DMU_OT_OBJECT_ARRAY,		/* UINT64 */
+	DMU_OT_PACKED_NVLIST,		/* UINT8 (XDR by nvlist_pack/unpack) */
+	DMU_OT_PACKED_NVLIST_SIZE,	/* UINT64 */
+	DMU_OT_BPLIST,			/* UINT64 */
+	DMU_OT_BPLIST_HDR,		/* UINT64 */
+	/* spa: */
+	DMU_OT_SPACE_MAP_HEADER,	/* UINT64 */
+	DMU_OT_SPACE_MAP,		/* UINT64 */
+	/* zil: */
+	DMU_OT_INTENT_LOG,		/* UINT64 */
+	/* dmu: */
+	DMU_OT_DNODE,			/* DNODE */
+	DMU_OT_OBJSET,			/* OBJSET */
+	/* dsl: */
+	DMU_OT_DSL_DIR,			/* UINT64 */
+	DMU_OT_DSL_DIR_CHILD_MAP,	/* ZAP */
+	DMU_OT_DSL_DS_SNAP_MAP,		/* ZAP */
+	DMU_OT_DSL_PROPS,		/* ZAP */
+	DMU_OT_DSL_DATASET,		/* UINT64 */
+	/* zpl: */
+	DMU_OT_ZNODE,			/* ZNODE */
+	DMU_OT_ACL,			/* ACL */
+	DMU_OT_PLAIN_FILE_CONTENTS,	/* UINT8 */
+	DMU_OT_DIRECTORY_CONTENTS,	/* ZAP */
+	DMU_OT_MASTER_NODE,		/* ZAP */
+	DMU_OT_UNLINKED_SET,		/* ZAP */
+	/* zvol: */
+	DMU_OT_ZVOL,			/* UINT8 */
+	DMU_OT_ZVOL_PROP,		/* ZAP */
+	/* other; for testing only! */
+	DMU_OT_PLAIN_OTHER,		/* UINT8 */
+	DMU_OT_UINT64_OTHER,		/* UINT64 */
+	DMU_OT_ZAP_OTHER,		/* ZAP */
+	/* new object types: */
+	DMU_OT_ERROR_LOG,		/* ZAP */
+	DMU_OT_SPA_HISTORY,		/* UINT8 */
+	DMU_OT_SPA_HISTORY_OFFSETS,	/* spa_his_phys_t */
+	DMU_OT_POOL_PROPS,		/* ZAP */
+
+	DMU_OT_NUMTYPES
+} dmu_object_type_t;
+
+typedef enum dmu_objset_type {
+	DMU_OST_NONE,
+	DMU_OST_META,
+	DMU_OST_ZFS,
+	DMU_OST_ZVOL,
+	DMU_OST_OTHER,			/* For testing only! */
+	DMU_OST_ANY,			/* Be careful! */
+	DMU_OST_NUMTYPES
+} dmu_objset_type_t;
+
+/*
+ * The names of zap entries in the DIRECTORY_OBJECT of the MOS.
+ */
+#define	DMU_POOL_DIRECTORY_OBJECT	1
+#define	DMU_POOL_CONFIG			"config"
+#define	DMU_POOL_ROOT_DATASET		"root_dataset"
+#define	DMU_POOL_SYNC_BPLIST		"sync_bplist"
+#define	DMU_POOL_ERRLOG_SCRUB		"errlog_scrub"
+#define	DMU_POOL_ERRLOG_LAST		"errlog_last"
+#define	DMU_POOL_SPARES			"spares"
+#define	DMU_POOL_DEFLATE		"deflate"
+#define	DMU_POOL_HISTORY		"history"
+#define	DMU_POOL_PROPS			"pool_props"
+#define	DMU_POOL_L2CACHE		"l2cache"
+
+#endif	/* _SYS_DMU_H */
--- grub2-1.97~beta3.orig/debian/grub-extras/include/grub/zfs/zio.h
+++ grub2-1.97~beta3/debian/grub-extras/include/grub/zfs/zio.h
@@ -0,0 +1,83 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 1999,2000,2001,2002,2003,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
+ *  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.
+ */
+/*
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef _ZIO_H
+#define	_ZIO_H
+
+#include <grub/zfs/spa.h>
+
+#define	ZBT_MAGIC	0x210da7ab10c7a11ULL	/* zio data bloc tail */
+
+typedef struct zio_block_tail {
+	grub_uint64_t	zbt_magic;	/* for validation, endianness	*/
+	zio_cksum_t	zbt_cksum;	/* 256-bit checksum		*/
+} zio_block_tail_t;
+
+/*
+ * Gang block headers are self-checksumming and contain an array
+ * of block pointers.
+ */
+#define	SPA_GANGBLOCKSIZE	SPA_MINBLOCKSIZE
+#define	SPA_GBH_NBLKPTRS	((SPA_GANGBLOCKSIZE - \
+	sizeof (zio_block_tail_t)) / sizeof (blkptr_t))
+#define	SPA_GBH_FILLER		((SPA_GANGBLOCKSIZE - \
+	sizeof (zio_block_tail_t) - \
+	(SPA_GBH_NBLKPTRS * sizeof (blkptr_t))) /\
+	sizeof (grub_uint64_t))
+
+#define	ZIO_GET_IOSIZE(zio)	\
+	(BP_IS_GANG((zio)->io_bp) ? \
+	SPA_GANGBLOCKSIZE : BP_GET_PSIZE((zio)->io_bp))
+
+typedef struct zio_gbh {
+	blkptr_t		zg_blkptr[SPA_GBH_NBLKPTRS];
+	grub_uint64_t		zg_filler[SPA_GBH_FILLER];
+	zio_block_tail_t	zg_tail;
+} zio_gbh_phys_t;
+
+enum zio_checksum {
+	ZIO_CHECKSUM_INHERIT = 0,
+	ZIO_CHECKSUM_ON,
+	ZIO_CHECKSUM_OFF,
+	ZIO_CHECKSUM_LABEL,
+	ZIO_CHECKSUM_GANG_HEADER,
+	ZIO_CHECKSUM_ZILOG,
+	ZIO_CHECKSUM_FLETCHER_2,
+	ZIO_CHECKSUM_FLETCHER_4,
+	ZIO_CHECKSUM_SHA256,
+	ZIO_CHECKSUM_FUNCTIONS
+};
+
+#define	ZIO_CHECKSUM_ON_VALUE	ZIO_CHECKSUM_FLETCHER_2
+#define	ZIO_CHECKSUM_DEFAULT	ZIO_CHECKSUM_ON
+
+enum zio_compress {
+	ZIO_COMPRESS_INHERIT = 0,
+	ZIO_COMPRESS_ON,
+	ZIO_COMPRESS_OFF,
+	ZIO_COMPRESS_LZJB,
+	ZIO_COMPRESS_EMPTY,
+	ZIO_COMPRESS_FUNCTIONS
+};
+
+#endif	/* _ZIO_H */
--- grub2-1.97~beta3.orig/debian/grub-extras/include/grub/zfs/dsl_dataset.h
+++ grub2-1.97~beta3/debian/grub-extras/include/grub/zfs/dsl_dataset.h
@@ -0,0 +1,53 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 1999,2000,2001,2002,2003,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
+ *  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.
+ */
+/*
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef	_SYS_DSL_DATASET_H
+#define	_SYS_DSL_DATASET_H
+
+typedef struct dsl_dataset_phys {
+	grub_uint64_t ds_dir_obj;
+	grub_uint64_t ds_prev_snap_obj;
+	grub_uint64_t ds_prev_snap_txg;
+	grub_uint64_t ds_next_snap_obj;
+	grub_uint64_t ds_snapnames_zapobj;	/* zap obj of snaps; ==0 for snaps */
+	grub_uint64_t ds_num_children;	/* clone/snap children; ==0 for head */
+	grub_uint64_t ds_creation_time;	/* seconds since 1970 */
+	grub_uint64_t ds_creation_txg;
+	grub_uint64_t ds_deadlist_obj;
+	grub_uint64_t ds_used_bytes;
+	grub_uint64_t ds_compressed_bytes;
+	grub_uint64_t ds_uncompressed_bytes;
+	grub_uint64_t ds_unique_bytes;	/* only relevant to snapshots */
+	/*
+	 * The ds_fsid_guid is a 56-bit ID that can change to avoid
+	 * collisions.  The ds_guid is a 64-bit ID that will never
+	 * change, so there is a small probability that it will collide.
+	 */
+	grub_uint64_t ds_fsid_guid;
+	grub_uint64_t ds_guid;
+	grub_uint64_t ds_flags;
+	blkptr_t ds_bp;
+	grub_uint64_t ds_pad[8]; /* pad out to 320 bytes for good measure */
+} dsl_dataset_phys_t;
+
+#endif /* _SYS_DSL_DATASET_H */
--- grub2-1.97~beta3.orig/debian/grub-extras/include/grub/zfs/zio_checksum.h
+++ grub2-1.97~beta3/debian/grub-extras/include/grub/zfs/zio_checksum.h
@@ -0,0 +1,50 @@
+/*
+ *  GRUB  --  GRand Unified Bootloader
+ *  Copyright (C) 1999,2000,2001,2002,2003,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
+ *  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.
+ */
+/*
+ * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
+ * Use is subject to license terms.
+ */
+
+#ifndef _SYS_ZIO_CHECKSUM_H
+#define	_SYS_ZIO_CHECKSUM_H
+
+/*
+ * Signature for checksum functions.
+ */
+typedef void zio_checksum_t(const void *data, grub_uint64_t size, 
+			    grub_zfs_endian_t endian, zio_cksum_t *zcp);
+
+/*
+ * Information about each checksum function.
+ */
+typedef struct zio_checksum_info {
+	zio_checksum_t	*ci_func; /* checksum function for each byteorder */
+	int		ci_correctable;	/* number of correctable bits	*/
+	int		ci_zbt;		/* uses zio block tail?	*/
+	char		*ci_name;	/* descriptive name */
+} zio_checksum_info_t;
+
+extern void zio_checksum_SHA256 (const void *, grub_uint64_t,
+				 grub_zfs_endian_t endian, zio_cksum_t *);
+extern void fletcher_2 (const void *, grub_uint64_t, grub_zfs_endian_t endian,
+			zio_cksum_t *);
+extern void fletcher_4 (const void *, grub_uint64_t, grub_zfs_endian_t endian,
+			zio_cksum_t *);
+
+#endif	/* _SYS_ZIO_CHECKSUM_H */
--- grub2-1.97~beta3.orig/debian/grub.d/05_debian_theme
+++ grub2-1.97~beta3/debian/grub.d/05_debian_theme
@@ -0,0 +1,51 @@
+#!/bin/bash -e
+
+source /usr/lib/grub/grub-mkconfig_lib
+
+set_blue_theme()
+{
+  cat << EOF
+set menu_color_normal=cyan/blue
+set menu_color_highlight=white/blue
+EOF
+}
+
+# check for usable backgrounds
+use_bg=false
+if [ "$GRUB_TERMINAL_OUTPUT" = "gfxterm" ] ; then
+  for i in {/boot/grub,/usr/share/images/desktop-base}/moreblue-orbit-grub.{png,tga} ; do
+    if is_path_readable_by_grub $i ; then 
+      bg=$i
+      case ${bg} in
+        *.png)		reader=png ;;
+        *.tga)		reader=tga ;;
+        *.jpg|*.jpeg)	reader=jpeg ;;
+      esac
+      if test -e /boot/grub/${reader}.mod ; then
+        echo "Found Debian background: `basename ${bg}`" >&2
+        use_bg=true
+        break
+      fi
+    fi
+  done
+fi
+
+# set the background if possible
+if ${use_bg} ; then
+  prepare_grub_to_access_device `${grub_probe} --target=device ${bg}`
+  cat << EOF
+insmod ${reader}
+if background_image `make_system_path_relative_to_its_root ${bg}` ; then
+  set color_normal=black/black
+  set color_highlight=magenta/black
+else
+EOF
+fi
+
+# otherwise, set the traditional Debian blue theme
+if ${use_bg} ; then
+  set_blue_theme | sed -e "s/^/  /g"
+  echo "fi"
+else
+  set_blue_theme
+fi
--- grub2-1.97~beta3.orig/debian/po/ast.po
+++ grub2-1.97~beta3/debian/po/ast.po
@@ -0,0 +1,140 @@
+# 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 <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: grub2\n"
+"Report-Msgid-Bugs-To: grub2@packages.debian.org\n"
+"POT-Creation-Date: 2009-08-30 17:54+0200\n"
+"PO-Revision-Date: 2009-08-30 15:50+0100\n"
+"Last-Translator: Marcos <marcos.alvarez.costales@gmail.com>\n"
+"Language-Team: Asturian <softast-xeneral@lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "Chainload from menu.lst?"
+msgstr "¿Cadena de carga dende menu.lst?"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "GRUB upgrade scripts have detected a GRUB Legacy setup in /boot/grub."
+msgstr ""
+"El scripts d'actualización GRUB detectó una configuración GRUB Legacy en /"
+"boot/grub."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In order to replace the Legacy version of GRUB in your system, it is "
+"recommended that /boot/grub/menu.lst is adjusted to chainload GRUB 2 from "
+"your existing GRUB Legacy setup.  This step may be automaticaly performed "
+"now."
+msgstr ""
+"Col fin de camudar la versión Legacy de GRUB nel to sistema, ye recomendable "
+"que /boot/grub/menu.lst seya axustáu a la cadena de carga GRUB 2 dende la to "
+"configuración Legacy GRUB existente. Esti pasu puede ser fechu "
+"automáticamente agora."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"It's recommended that you accept chainloading GRUB 2 from menu.lst, and "
+"verify that your new GRUB 2 setup is functional for you, before you install "
+"it directly to your MBR (Master Boot Record)."
+msgstr ""
+"Ye recomendable que aceptes la cadena de carga GRUB 2 dende'l menu.lst, y "
+"compruebes que la to nueva configuración de GRUB 2 ye funcional pa ti, "
+"anantes de que lo instales directamente nel to MBR (Master Boot Record)."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In either case, whenever you want GRUB 2 to be loaded directly from MBR, you "
+"can do so by issuing (as root) the following command:"
+msgstr ""
+"En cualisquier casu, cuando quieras que GRUB 2 seya cargáu directamente "
+"dende'l MBR, puedes facelo col siguiente comandu (como root):"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "upgrade-from-grub-legacy"
+msgstr "upgrade-from-grub-legacy"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid "Linux command line:"
+msgstr "Linia comandos Linux:"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid ""
+"The following Linux command line was extracted from /etc/default/grub or the "
+"`kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"La siguiente llinia de comandu Linux fue estrayía dende /etc/default/grub o "
+"del parámetru `kopt' nel menú Legacy GRUB menu.lst. Por favor, comprueba que "
+"ye correuto, y modificalo si ye necesario."
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid "Linux default command line:"
+msgstr "Linia comandos por defeutu de Linux:"
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid ""
+"The following string will be used as Linux parameters for the default menu "
+"entry but not for the recovery mode."
+msgstr ""
+"La siguiente cadena será usada como parámetros Linux pa la entrada del menú "
+"por defeutu, pero non pal mou recuperación."
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid "kFreeBSD command line:"
+msgstr "Linia comandos kFreeBSD:"
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid ""
+"The following kFreeBSD command line was extracted from /etc/default/grub or "
+"the `kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"La siguiente llinia de comandu kFreeBSD fue estrayía dende /etc/default/grub "
+"o del parámetru `kopt' nel menú Legacy GRUB menu.lst. Por favor, comprueba "
+"que ye correuto, y modificalo si ye necesario."
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid "kFreeBSD default command line:"
+msgstr "Llínia comandos por defeutu kFreeBSD:"
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid ""
+"The following string will be used as kFreeBSD parameters for the default "
+"menu entry but not for the recovery mode."
+msgstr ""
+"La siguiente cadena será usada cómo parametros kFreeBSD pa la entrada del "
+"menú por defeutu, pero non pal mou recuperación."
--- grub2-1.97~beta3.orig/debian/po/de.po
+++ grub2-1.97~beta3/debian/po/de.po
@@ -0,0 +1,140 @@
+# Translation of grub2 debconf templates to German
+# Copyright (C) Helge Kreutzmann <debian@helgefjell.de>, 2007-2009.
+# This file is distributed under the same license as the grub2 package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: grub2 1.96+20090829-2\n"
+"Report-Msgid-Bugs-To: grub2@packages.debian.org\n"
+"POT-Creation-Date: 2009-08-30 17:54+0200\n"
+"PO-Revision-Date: 2009-08-30 21:42+0200\n"
+"Last-Translator: Helge Kreutzmann <debian@helgefjell.de>\n"
+"Language-Team: de <debian-l10n-german@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "Chainload from menu.lst?"
+msgstr "Chainload (Kettenladen) aus menu.lst?"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "GRUB upgrade scripts have detected a GRUB Legacy setup in /boot/grub."
+msgstr ""
+"Die Upgrade-Skripte von GRUB haben eine GRUB Legacy-Installation in /boot/"
+"grub erkannt."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In order to replace the Legacy version of GRUB in your system, it is "
+"recommended that /boot/grub/menu.lst is adjusted to chainload GRUB 2 from "
+"your existing GRUB Legacy setup.  This step may be automaticaly performed "
+"now."
+msgstr ""
+"Um die Legacy-Version von GRUB auf Ihrem System zu ersetzen, wird empfohlen, "
+"dass /boot/grub/menu.lst angepasst wird, so dass GRUB 2 aus Ihrer "
+"existierenden GRUB Legacy-Einrichtung heraus geladen wird. Dieser Schritt "
+"kann jetzt automatisch vollzogen werden."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"It's recommended that you accept chainloading GRUB 2 from menu.lst, and "
+"verify that your new GRUB 2 setup is functional for you, before you install "
+"it directly to your MBR (Master Boot Record)."
+msgstr ""
+"Es wird empfohlen, dass Sie dem Chainloading von GRUB 2 aus der menu.lst "
+"zustimmen und berprfen, dass die GRUB 2-Installation fr Sie "
+"funktioniert, bevor Sie diese direkt in Ihren MBR (Master Boot Record) "
+"installieren."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In either case, whenever you want GRUB 2 to be loaded directly from MBR, you "
+"can do so by issuing (as root) the following command:"
+msgstr ""
+"Auf jeden Fall knnen Sie den folgenden Befehl (als root) eingeben, wenn Sie "
+"mchten, dass GRUB 2 direkt vom MBR geladen wird:"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "upgrade-from-grub-legacy"
+msgstr "upgrade-from-grub-legacy"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid "Linux command line:"
+msgstr "Linux-Kommandozeile:"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid ""
+"The following Linux command line was extracted from /etc/default/grub or the "
+"`kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"Die folgende Linux-Kommandozeile wurde aus /etc/default/grub oder dem "
+"Parameter kopt in GRUB Legacys menu.lst extrahiert. Bitte berprfen Sie, "
+"ob diese korrekt ist und passen Sie sie falls notwendig an."
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid "Linux default command line:"
+msgstr "Linux Standard-Kommandozeile:"
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid ""
+"The following string will be used as Linux parameters for the default menu "
+"entry but not for the recovery mode."
+msgstr ""
+"Die folgende Zeichenkette wird als Linux-Parameter fr den "
+"Standardmeneintrag, nicht aber fr den Rettungsmodus verwandt."
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid "kFreeBSD command line:"
+msgstr "kFreeBSD-Kommandozeile:"
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid ""
+"The following kFreeBSD command line was extracted from /etc/default/grub or "
+"the `kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"Die folgende kFreeBSD-Kommandozeile wurde aus /etc/default/grub oder dem "
+"Parameter kopt in GRUB Legacys menu.lst extrahiert. Bitte berprfen Sie, "
+"ob diese korrekt ist und passen Sie sie falls notwendig an."
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid "kFreeBSD default command line:"
+msgstr "kFreeBSD Standard-Kommandozeile:"
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid ""
+"The following string will be used as kFreeBSD parameters for the default "
+"menu entry but not for the recovery mode."
+msgstr ""
+"Die folgende Zeichenkette wird als kFreeBSD-Parameter fr den "
+"Standardmeneintrag, nicht aber fr den Rettungsmodus verwandt."
--- grub2-1.97~beta3.orig/debian/po/ro.po
+++ grub2-1.97~beta3/debian/po/ro.po
@@ -0,0 +1,191 @@
+# translation of ro.po to Romanian
+# Romanian translations for grub package
+# Traducerea în limba română pentru pachetul grub.
+# Copyright (C) 2007 THE grub'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the grub package.
+#
+# Eddy Petrișor <eddy.petrisor@gmail.com>, 2007,2008.
+msgid ""
+msgstr ""
+"Project-Id-Version: ro\n"
+"Report-Msgid-Bugs-To: grub2@packages.debian.org\n"
+"POT-Creation-Date: 2009-08-30 17:54+0200\n"
+"PO-Revision-Date: 2008-11-13 10:41+0200\n"
+"Last-Translator: Eddy Petrișor <eddy.petrisor@gmail.com>\n"
+"Language-Team: Romanian <debian-l10n-romanian@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms:  nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < "
+"20)) ? 1 : 2;\n"
+"X-Generator: KBabel 1.11.4\n"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "Chainload from menu.lst?"
+msgstr "Încărcare înlănțuită din menu.lst?"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "GRUB upgrade scripts have detected a GRUB Legacy setup in /boot/grub."
+msgstr ""
+"Scripturile de înnoire ale lui GRUB au detectat în /boot/grub o configurație "
+"pentru vechiul GRUB."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In order to replace the Legacy version of GRUB in your system, it is "
+"recommended that /boot/grub/menu.lst is adjusted to chainload GRUB 2 from "
+"your existing GRUB Legacy setup.  This step may be automaticaly performed "
+"now."
+msgstr ""
+"Pentru a înlocui vechea versiune a lui GRUB, se recomandă modificarea lui /"
+"boot/grub/menu.lst astfel încât GRUB 2 sa fie încărcat prin înlănțuire din "
+"vechea configurare. Acest pas poate fi făcut chiar acum în mod automat."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"It's recommended that you accept chainloading GRUB 2 from menu.lst, and "
+"verify that your new GRUB 2 setup is functional for you, before you install "
+"it directly to your MBR (Master Boot Record)."
+msgstr ""
+"Este recomandat să acceptați înlănțuirea lui GRUB 2 din menu.lst și să "
+"verificați că noua configurație pentru GRUB 2 funcționează, înainte de a o "
+"instala în înregistrarea „Master Boot” (MBR)."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In either case, whenever you want GRUB 2 to be loaded directly from MBR, you "
+"can do so by issuing (as root) the following command:"
+msgstr ""
+"Oricum, atunci când veți dori ca GRUB 2 sa fie încărcat direct din MBR, "
+"puteți rula (ca root) comanda următoare:"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "upgrade-from-grub-legacy"
+msgstr "upgrade-from-grub-legacy"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid "Linux command line:"
+msgstr "Linia de comandă Linux:"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+#, fuzzy
+#| msgid ""
+#| "The following Linux command line was extracted from the `kopt' parameter "
+#| "in GRUB Legacy's menu.lst.  Please verify that it is correct, and modify "
+#| "it if necessary."
+msgid ""
+"The following Linux command line was extracted from /etc/default/grub or the "
+"`kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"Această linie de comandă Linux a fost extrasă din parametrul „kopt” din "
+"fișierul menu.lst al vechiului GRUB. Verificați corectitudinea acesteia și "
+"corectați-o, dacă este nevoie."
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+#, fuzzy
+#| msgid "Linux command line:"
+msgid "Linux default command line:"
+msgstr "Linia de comandă Linux:"
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid ""
+"The following string will be used as Linux parameters for the default menu "
+"entry but not for the recovery mode."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+#, fuzzy
+#| msgid "Linux command line:"
+msgid "kFreeBSD command line:"
+msgstr "Linia de comandă Linux:"
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+#, fuzzy
+#| msgid ""
+#| "The following Linux command line was extracted from the `kopt' parameter "
+#| "in GRUB Legacy's menu.lst.  Please verify that it is correct, and modify "
+#| "it if necessary."
+msgid ""
+"The following kFreeBSD command line was extracted from /etc/default/grub or "
+"the `kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"Această linie de comandă Linux a fost extrasă din parametrul „kopt” din "
+"fișierul menu.lst al vechiului GRUB. Verificați corectitudinea acesteia și "
+"corectați-o, dacă este nevoie."
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+#, fuzzy
+#| msgid "Linux command line:"
+msgid "kFreeBSD default command line:"
+msgstr "Linia de comandă Linux:"
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid ""
+"The following string will be used as kFreeBSD parameters for the default "
+"menu entry but not for the recovery mode."
+msgstr ""
+
+#~ msgid "GRUB 1.95 numbering scheme transition"
+#~ msgstr "Tranziția la schema de numerotare pentru GRUB 1.95"
+
+#~ msgid ""
+#~ "As of version 1.95, GRUB 2 has changed its numbering scheme.  Partitions "
+#~ "are now counted starting from 1 rather than 0.  This is to make it "
+#~ "consistent with device names of Linux and the other kernels used in "
+#~ "Debian.  For example, when using Linux as the kernel, \"(hd0,1)\" refers "
+#~ "to the same partition as the /dev/sda1 device node."
+#~ msgstr ""
+#~ "Începând cu versiunea 1.95, GRUB 2 și-a schimbat schema de numerotare. "
+#~ "Partițiile sunt acum numerotate începând de la 1 (în loc de 0). Acest "
+#~ "lucru este consecvent cu numele de dispozitive ale Linux-ului și a altor "
+#~ "nuclee folosite în Debian. De exemplu, când se folosește nucleul Linux, "
+#~ "„(hd0,1)” se referă la aceiași partiție ca și nodul de dispozitiv /dev/"
+#~ "sda1."
+
+#~ msgid ""
+#~ "Because of this, there's a chance your system becomes unbootable if "
+#~ "update-grub(8) is run before GRUB is updated, generating a grub.cfg file "
+#~ "that your installed GRUB won't yet be able to parse correctly.  To ensure "
+#~ "your system will be able to boot, you have to:"
+#~ msgstr ""
+#~ "De aceea, există riscul ca sistemul să nu mai pornească dacă update-grub"
+#~ "(8) este rulat înainte ca GRUB să fie actualizat, generând astfel un "
+#~ "fișier grub.cfg pe care GRUB-ul instalat nu-l va putea încă analiza "
+#~ "corect. Pentru a vă asigura că sistemul va putea porni, va trebui să:"
+
+#~ msgid ""
+#~ " - Reinstall GRUB (typically, by running grub-install).\n"
+#~ " - Rerun update-grub to generate a new grub.cfg."
+#~ msgstr ""
+#~ " - Reinstalați GRUB (în mod normal, prin rularea lui grub-install).\n"
+#~ " - Rulați din nou update-grub pentru a genera un nou grub.cfg."
--- grub2-1.97~beta3.orig/debian/po/sv.po
+++ grub2-1.97~beta3/debian/po/sv.po
@@ -0,0 +1,143 @@
+# translation of grub2_sv.po to Swedish
+# Swedish translation for grub2.
+# Copyright (C) 2007, 2008, 2009 Free Software Foundation, Inc.
+# This file is distributed under the same license as the grub2 package.
+#
+# Daniel Nylander <po@danielnylander.se>, 2007.
+# Martin Ågren <martin.agren@gmail.com>, 2008, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: grub2_sv\n"
+"Report-Msgid-Bugs-To: grub2@packages.debian.org\n"
+"POT-Creation-Date: 2009-08-30 17:54+0200\n"
+"PO-Revision-Date: 2009-09-02 20:53+0200\n"
+"Last-Translator: Martin Ågren <martin.agren@gmail.com>\n"
+"Language-Team: Swedish <debian-l10n-swedish@lists.debian.org>\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: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "Chainload from menu.lst?"
+msgstr "Kedjeladda från menu.lst?"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "GRUB upgrade scripts have detected a GRUB Legacy setup in /boot/grub."
+msgstr ""
+"GRUB:s uppgraderingsskript har upptäckt en gammal GRUB-inställning i /boot/"
+"grub."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In order to replace the Legacy version of GRUB in your system, it is "
+"recommended that /boot/grub/menu.lst is adjusted to chainload GRUB 2 from "
+"your existing GRUB Legacy setup.  This step may be automaticaly performed "
+"now."
+msgstr ""
+"Om du vill ersätta den gamla versionen av GRUB i systemet, rekommenderas "
+"att /boot/grub/menu.lst justeras till att kedjeladda GRUB 2 från din "
+"existerande, gamla GRUB-inställning.  Detta steg kan nu utföras automatiskt."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"It's recommended that you accept chainloading GRUB 2 from menu.lst, and "
+"verify that your new GRUB 2 setup is functional for you, before you install "
+"it directly to your MBR (Master Boot Record)."
+msgstr ""
+"Det rekommenderas att GRUB 2 kedjeladdas från menu.lst så att det kan "
+"säkerställas att den nya GRUB 2-inställningen fungerar innan den installeras "
+"direkt till huvudstartsektorn."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In either case, whenever you want GRUB 2 to be loaded directly from MBR, you "
+"can do so by issuing (as root) the following command:"
+msgstr ""
+"När GRUB 2 ska laddas direkt från huvudstartsektorn, kan detta åstadkommas "
+"genom att (som root) köra följande kommando:"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "upgrade-from-grub-legacy"
+msgstr "upgrade-from-grub-legacy"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid "Linux command line:"
+msgstr "Kommandorad för Linux:"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid ""
+"The following Linux command line was extracted from /etc/default/grub or the "
+"`kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"Följande Linux-kommandorad hämtades från /etc/default/grub eller 'kopt'-"
+"parametern i gamla GRUB:s menu.lst. Verifiera att den är korrekt och "
+"modifiera den om nödvändigt."
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid "Linux default command line:"
+msgstr "Standardkommandorad för Linux:"
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid ""
+"The following string will be used as Linux parameters for the default menu "
+"entry but not for the recovery mode."
+msgstr ""
+"Följande sträng kommer användas som Linux-parametrar för standardmenyvalet "
+"men inte för återhämtningsläge (eng. recovery)."
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid "kFreeBSD command line:"
+msgstr "Kommandorad för kFreeBSD:"
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid ""
+"The following kFreeBSD command line was extracted from /etc/default/grub or "
+"the `kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"Följande kFreeBSD-kommandorad hämtades från /etc/default/grub eller 'kopt'-"
+"parametern i gamla GRUB:s menu.lst. Verifiera att den är korrekt och "
+"modifiera den om nödvändigt."
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid "kFreeBSD default command line:"
+msgstr "Standardkommandorad för kFreeBSD:"
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid ""
+"The following string will be used as kFreeBSD parameters for the default "
+"menu entry but not for the recovery mode."
+msgstr ""
+"Följande sträng kommer användas som Linux-parametrar för standardmenyvalet "
+"men inte för återhämtningsläge (eng. recovery)."
--- grub2-1.97~beta3.orig/debian/po/pt_BR.po
+++ grub2-1.97~beta3/debian/po/pt_BR.po
@@ -0,0 +1,178 @@
+# grub2 Brazilian Portuguese translation
+# Copyright (C) 2009 THE grub2'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the grub2 package.
+# Flamarion Jorge <jorge.flamarion@gmail.com>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: grub2 1.96\n"
+"Report-Msgid-Bugs-To: grub2@packages.debian.org\n"
+"POT-Creation-Date: 2009-08-30 17:54+0200\n"
+"PO-Revision-Date: 2009-08-30 20:45-0300\n"
+"Last-Translator: Flamarion Jorge <jorge.flamarion@gmail.com>\n"
+"Language-Team: Brazilian Portuguese <debian-l10n-portuguese@lists.debian."
+"org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"pt_BR utf-8\n"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "Chainload from menu.lst?"
+msgstr "Carregar em cadeia a partir do menu.lst?"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "GRUB upgrade scripts have detected a GRUB Legacy setup in /boot/grub."
+msgstr ""
+"Os scripts de atualização do GRUB detectaram uma configuração do GRUB Legado "
+"em /boot/grub."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In order to replace the Legacy version of GRUB in your system, it is "
+"recommended that /boot/grub/menu.lst is adjusted to chainload GRUB 2 from "
+"your existing GRUB Legacy setup.  This step may be automaticaly performed "
+"now."
+msgstr ""
+"A fim de substituir a versão Legada do GRUB no seu sistema, é recomendável "
+"que o /boot/grub/menu.lst seja ajustado para carregar em cadeia o GRUB 2 a "
+"partir da sua configuração existente do GRUB Legado. Este passo pode ser "
+"executado automaticamente agora."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"It's recommended that you accept chainloading GRUB 2 from menu.lst, and "
+"verify that your new GRUB 2 setup is functional for you, before you install "
+"it directly to your MBR (Master Boot Record)."
+msgstr ""
+"É recomendado que você aceite o carregamento em cadeia do GRUB 2 a partir do "
+"menu.lst, e verifique que sua nova configuração do GRUB 2 está funcional "
+"para você, antes de instalá-lo diretamente no seu MBR (\"Master Boot Record"
+"\")."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In either case, whenever you want GRUB 2 to be loaded directly from MBR, you "
+"can do so by issuing (as root) the following command:"
+msgstr ""
+"Em todo caso, sempre que você quiser que o GRUB 2 seja carregado diretamente "
+"do MBR, você pode fazê-lo (como root) através do seguinte comando:"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "upgrade-from-grub-legacy"
+msgstr "upgrade-from-grub-legacy"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid "Linux command line:"
+msgstr "Linha de comando Linux:"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid ""
+"The following Linux command line was extracted from /etc/default/grub or the "
+"`kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"A linha de comando Linux a seguir foi extraída de /etc/default/grub ou do "
+"parâmetro `kopt' do menu.lst do Grub Legado. Por favor, verifique se ela "
+"está correta, e modifique-a se necessário."
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid "Linux default command line:"
+msgstr "Linha de comando padrão Linux:"
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid ""
+"The following string will be used as Linux parameters for the default menu "
+"entry but not for the recovery mode."
+msgstr ""
+"A seguinte string será usada como um parâmetro Linux para a entrada no menu "
+"padrão, mas não para o modo de recuperação."
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid "kFreeBSD command line:"
+msgstr "Linha de comando kFreeBSD:"
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid ""
+"The following kFreeBSD command line was extracted from /etc/default/grub or "
+"the `kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"A linha de comando kFreeBSD a seguir foi extraída de /etc/default/grub ou do "
+"parâmetro `kopt' do menu.lst do Grub Legado. Por favor, verifique se ela "
+"está correta, e modifique-a se necessário."
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid "kFreeBSD default command line:"
+msgstr "Linha de comando padrão kFreeBSD:"
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid ""
+"The following string will be used as kFreeBSD parameters for the default "
+"menu entry but not for the recovery mode."
+msgstr ""
+"A seguinte string será usada como um parâmetro kFreeBSD para a entrada no "
+"menu padrão, mas não para o modo de recuperação."
+
+#~ msgid "GRUB 1.95 numbering scheme transition"
+#~ msgstr "Transição do esquema de numeração do GRUB 1.95"
+
+#~ msgid ""
+#~ "As of version 1.95, GRUB 2 has changed its numbering scheme.  Partitions "
+#~ "are now counted starting from 1 rather than 0.  This is to make it "
+#~ "consistent with device names of Linux and the other kernels used in "
+#~ "Debian.  For example, when using Linux as the kernel, \"(hd0,1)\" refers "
+#~ "to the same partition as the /dev/sda1 device node."
+#~ msgstr ""
+#~ "A partir da versão 1.95, o GRUB 2 mudou seu esquema de numeração. Agora "
+#~ "partições são contadas a partir de 1 em vez de 0. Isto é para torná-lo "
+#~ "consistente com nomes de dispositivos do Linux e de outros kernels usados "
+#~ "no Debian. Por exemplo, quando se usa o Linux como kernel, \"(hd0,1)\" se "
+#~ "refere à mesma partição que o nó de dispositivo /dev/sda1."
+
+#~ msgid ""
+#~ "Because of this, there's a chance your system becomes unbootable if "
+#~ "update-grub(8) is run before GRUB is updated, generating a grub.cfg file "
+#~ "that your installed GRUB won't yet be able to parse correctly.  To ensure "
+#~ "your system will be able to boot, you have to:"
+#~ msgstr ""
+#~ "Por causa disso, existe uma chance de seu sistema tornar-se não "
+#~ "inicializável se o update-grub(8) for executado antes do GRUB ser "
+#~ "atualizado, gerando um arquivo grub.cfg que o GRUB instalado ainda não "
+#~ "será capaz de analisar corretamente. Para garantir que seu sistema será "
+#~ "capaz de inicializar, você tem que:"
+
+#~ msgid ""
+#~ " - Reinstall GRUB (typically, by running grub-install).\n"
+#~ " - Rerun update-grub to generate a new grub.cfg."
+#~ msgstr ""
+#~ " - Reinstalar o GRUB (tipicamente, executando grub-install).\n"
+#~ " - Re-executar update-grub para gerar um novo grub.cfg."
--- grub2-1.97~beta3.orig/debian/po/ru.po
+++ grub2-1.97~beta3/debian/po/ru.po
@@ -0,0 +1,144 @@
+# translation of ru.po to Russian
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Yuri Kozlov <kozlov.y@gmail.com>, 2007, 2008.
+# Yuri Kozlov <yuray@komyakino.ru>, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: grub2 1.96+1.96+20090829-2\n"
+"Report-Msgid-Bugs-To: grub2@packages.debian.org\n"
+"POT-Creation-Date: 2009-08-30 17:54+0200\n"
+"PO-Revision-Date: 2009-08-30 19:10+0400\n"
+"Last-Translator: Yuri Kozlov <yuray@komyakino.ru>\n"
+"Language-Team: Russian <debian-l10n-russian@lists.debian.org>\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: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "Chainload from menu.lst?"
+msgstr "Включить загрузку по цепочке (chainload) в menu.lst?"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "GRUB upgrade scripts have detected a GRUB Legacy setup in /boot/grub."
+msgstr ""
+"Сценарии обновления обнаружили установку GRUB предыдущего поколения в /boot/"
+"grub."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In order to replace the Legacy version of GRUB in your system, it is "
+"recommended that /boot/grub/menu.lst is adjusted to chainload GRUB 2 from "
+"your existing GRUB Legacy setup.  This step may be automaticaly performed "
+"now."
+msgstr ""
+"Чтобы заменить в системе версию GRUB предыдущего поколения, рекомендуется "
+"исправить /boot/grub/menu.lst так, чтобы GRUB 2 загружался по цепочке из "
+"существующей установки GRUB предыдущего поколения. Это может быть сделано "
+"автоматически прямо сейчас."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"It's recommended that you accept chainloading GRUB 2 from menu.lst, and "
+"verify that your new GRUB 2 setup is functional for you, before you install "
+"it directly to your MBR (Master Boot Record)."
+msgstr ""
+"Рекомендуется ответить утвердительно и проверить, что новая настройка GRUB 2 "
+"работает так как нужно, перед тем как устанавливать её непосредственно в MBR "
+"(главную загрузочную запись)."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In either case, whenever you want GRUB 2 to be loaded directly from MBR, you "
+"can do so by issuing (as root) the following command:"
+msgstr ""
+"В любом случае, если вы хотите, чтобы GRUB 2 загружался непосредственно из "
+"MBR, выполните следующую команду (имея права суперпользователя):"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "upgrade-from-grub-legacy"
+msgstr "upgrade-from-grub-legacy"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid "Linux command line:"
+msgstr "Строка команд Linux:"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid ""
+"The following Linux command line was extracted from /etc/default/grub or the "
+"`kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"Представленная ниже строка команд Linux была извлечена из /etc/default/grub "
+"или параметра `kopt' старого файла GRUB menu.lst. Проверьте, что всё "
+"правильно, или измените её, если требуется."
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid "Linux default command line:"
+msgstr "Строка команд Linux по умолчанию:"
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid ""
+"The following string will be used as Linux parameters for the default menu "
+"entry but not for the recovery mode."
+msgstr ""
+"Данная строка будет использоваться в качестве параметров Linux в меню в "
+"записи по умолчанию, кроме режима восстановления."
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid "kFreeBSD command line:"
+msgstr "Строка команд kFreeBSD:"
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid ""
+"The following kFreeBSD command line was extracted from /etc/default/grub or "
+"the `kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"Представленная ниже строка команд kFreeBSD была извлечена из /etc/default/"
+"grub или параметра `kopt' старого файла GRUB menu.lst. Проверьте, что всё "
+"правильно, или измените её, если требуется."
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid "kFreeBSD default command line:"
+msgstr "Строка команд kFreeBSD по умолчанию:"
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid ""
+"The following string will be used as kFreeBSD parameters for the default "
+"menu entry but not for the recovery mode."
+msgstr ""
+"Данная строка будет использоваться в качестве параметров kFreeBSD в меню в "
+"записи по умолчанию, кроме режима восстановления."
--- grub2-1.97~beta3.orig/debian/po/fr.po
+++ grub2-1.97~beta3/debian/po/fr.po
@@ -0,0 +1,144 @@
+# translation of fr.po to French
+# Translation of grub2 debconf templates to French
+# Copyright (C) 2008 Christian Perrier <bubulle@debian.org>
+# This file is distributed under the same license as the grub2 package.
+#
+# Christian Perrier <bubulle@debian.org>, 2007, 2008, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: fr\n"
+"Report-Msgid-Bugs-To: grub2@packages.debian.org\n"
+"POT-Creation-Date: 2009-08-30 17:54+0200\n"
+"PO-Revision-Date: 2009-08-30 15:58+0200\n"
+"Last-Translator: Christian Perrier <bubulle@debian.org>\n"
+"Language-Team: French <debian-l10n-french@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Lokalize 1.0\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "Chainload from menu.lst?"
+msgstr "Faut-il enchaîner le chargement depuis menu.lst ?"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "GRUB upgrade scripts have detected a GRUB Legacy setup in /boot/grub."
+msgstr "Une installation standard de GRUB a été détectée dans /boot/grub."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In order to replace the Legacy version of GRUB in your system, it is "
+"recommended that /boot/grub/menu.lst is adjusted to chainload GRUB 2 from "
+"your existing GRUB Legacy setup.  This step may be automaticaly performed "
+"now."
+msgstr ""
+"Afin de remplacer cette installation, il est recommandé de modifier /boot/"
+"grub/menu.lst pour enchaîner le chargement de GRUB 2 depuis l'installation "
+"standard de GRUB (« chainload »). Veuillez choisir si vous souhaitez "
+"effectuer cette modification."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"It's recommended that you accept chainloading GRUB 2 from menu.lst, and "
+"verify that your new GRUB 2 setup is functional for you, before you install "
+"it directly to your MBR (Master Boot Record)."
+msgstr ""
+"Il est recommandé de choisir cette option pour pouvoir confirmer le bon "
+"fonctionnement de GRUB 2 avant de l'installer directement sur le secteur "
+"d'amorçage (MBR : « Master Boot Record »)."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In either case, whenever you want GRUB 2 to be loaded directly from MBR, you "
+"can do so by issuing (as root) the following command:"
+msgstr ""
+"Dans tous les cas, pour charger GRUB 2 directement depuis le secteur "
+"d'amorçage, vous devrez utiliser la commande suivante avec les privilèges du "
+"superutilisateur :"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "upgrade-from-grub-legacy"
+msgstr "upgrade-from-grub-legacy"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid "Linux command line:"
+msgstr "Ligne de commande de Linux :"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid ""
+"The following Linux command line was extracted from /etc/default/grub or the "
+"`kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"La ligne de commande de Linux suivante a été récupérée via le fichier /etc/"
+"default/grub ou le paramètre « kopt » du fichier menu.lst utilisé par la "
+"version originelle de GRUB. Veuillez contrôler qu'elle est correcte et la "
+"modifier si nécessaire."
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid "Linux default command line:"
+msgstr "Ligne de commande par défaut de Linux :"
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid ""
+"The following string will be used as Linux parameters for the default menu "
+"entry but not for the recovery mode."
+msgstr ""
+"Les paramètres indiqués seront utilisés pour le noyau Linux de l'entrée de "
+"menu par défaut mais pas pour le mode de secours."
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid "kFreeBSD command line:"
+msgstr "Ligne de commande de kFreeBSD :"
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid ""
+"The following kFreeBSD command line was extracted from /etc/default/grub or "
+"the `kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"La ligne de commande de kFreeBSD suivante a été récupérée via le fichier /"
+"etc/default/grub ou le paramètre « kopt » du fichier menu.lst utilisé par la "
+"version originelle de GRUB. Veuillez contrôler qu'elle est correcte et la "
+"modifier si nécessaire."
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid "kFreeBSD default command line:"
+msgstr "Ligne de commande par défaut de kFreeBSD :"
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid ""
+"The following string will be used as kFreeBSD parameters for the default "
+"menu entry but not for the recovery mode."
+msgstr ""
+"Les paramètres indiqués seront utilisés pour le noyau kFreeBSD de l'entrée "
+"de menu par défaut mais pas pour le mode de secours."
--- grub2-1.97~beta3.orig/debian/po/fi.po
+++ grub2-1.97~beta3/debian/po/fi.po
@@ -0,0 +1,146 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: grub2\n"
+"Report-Msgid-Bugs-To: grub2@packages.debian.org\n"
+"POT-Creation-Date: 2009-08-30 17:54+0200\n"
+"PO-Revision-Date: 2008-11-02 20:36+0200\n"
+"Last-Translator: Esko Arajärvi <edu@iki.fi>\n"
+"Language-Team: Finnish <debian-l10n-finnish@lists.debian.org>\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: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "Chainload from menu.lst?"
+msgstr "Ladataanko ketjutettuna tiedostosta menu.lst?"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "GRUB upgrade scripts have detected a GRUB Legacy setup in /boot/grub."
+msgstr ""
+"GRUBin päivityskomentosarjat ovat löytäneet vanhoja GRUB-asetuksia "
+"tiedostosta /boot/grub."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In order to replace the Legacy version of GRUB in your system, it is "
+"recommended that /boot/grub/menu.lst is adjusted to chainload GRUB 2 from "
+"your existing GRUB Legacy setup.  This step may be automaticaly performed "
+"now."
+msgstr ""
+"Järjestelmässä olevan vanhan GRUB-version korvaamiseksi on suositeltavaa "
+"muokata tiedostoa /boot/grub/menu.lst siten, että GRUB 2 ladataan olemassa "
+"olevista vanhoista GRUB-asetuksista. Tämä voidaan tehdä automaattisesti nyt."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"It's recommended that you accept chainloading GRUB 2 from menu.lst, and "
+"verify that your new GRUB 2 setup is functional for you, before you install "
+"it directly to your MBR (Master Boot Record)."
+msgstr ""
+"On suositeltavaa, että hyväksyt GRUB 2:n ketjutetun lataamisen tiedostosta "
+"menu.lst ja varmistat, että uudet GRUB 2 -asetukset toimivat, ennen kuin "
+"asennat ne pääkäynnistyslohkoon (MBR)."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In either case, whenever you want GRUB 2 to be loaded directly from MBR, you "
+"can do so by issuing (as root) the following command:"
+msgstr ""
+"Kun haluat asentaa GRUB 2:n latautumaan suoraan pääkäynnistyslohkosta, voit "
+"joka tapauksessa tehdä sen ajamalla pääkäyttäjänä seuraavan komennon:"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "upgrade-from-grub-legacy"
+msgstr "upgrade-from-grub-legacy"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid "Linux command line:"
+msgstr "Linuxin komentorivi:"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+#, fuzzy
+#| msgid ""
+#| "The following Linux command line was extracted from the `kopt' parameter "
+#| "in GRUB Legacy's menu.lst.  Please verify that it is correct, and modify "
+#| "it if necessary."
+msgid ""
+"The following Linux command line was extracted from /etc/default/grub or the "
+"`kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"GRUB Legacyn tiedoston menu.lst parametrista ”kopt” löydettiin seuraava "
+"Linuxin komentorivi. Varmista, että se on oikea ja muuta sitä tarvittaessa."
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+#, fuzzy
+#| msgid "Linux command line:"
+msgid "Linux default command line:"
+msgstr "Linuxin komentorivi:"
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid ""
+"The following string will be used as Linux parameters for the default menu "
+"entry but not for the recovery mode."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+#, fuzzy
+#| msgid "Linux command line:"
+msgid "kFreeBSD command line:"
+msgstr "Linuxin komentorivi:"
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+#, fuzzy
+#| msgid ""
+#| "The following Linux command line was extracted from the `kopt' parameter "
+#| "in GRUB Legacy's menu.lst.  Please verify that it is correct, and modify "
+#| "it if necessary."
+msgid ""
+"The following kFreeBSD command line was extracted from /etc/default/grub or "
+"the `kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"GRUB Legacyn tiedoston menu.lst parametrista ”kopt” löydettiin seuraava "
+"Linuxin komentorivi. Varmista, että se on oikea ja muuta sitä tarvittaessa."
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+#, fuzzy
+#| msgid "Linux command line:"
+msgid "kFreeBSD default command line:"
+msgstr "Linuxin komentorivi:"
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid ""
+"The following string will be used as kFreeBSD parameters for the default "
+"menu entry but not for the recovery mode."
+msgstr ""
--- grub2-1.97~beta3.orig/debian/po/es.po
+++ grub2-1.97~beta3/debian/po/es.po
@@ -0,0 +1,202 @@
+# grub2 po-debconf translation to Spanish
+# Copyright (C) 2007, 2009 Software in the Public Interest
+# This file is distributed under the same license as the grub2 package.
+#
+# Changes:
+#   - Initial translation
+#       Maria Germana Oliveira Blazetic<germanaoliveirab@gmail.com>, 2007
+#
+#   - Updates
+#       Gary Ariel Sandi Vigabriel <gary.gsv@gmail.com>, 2009
+#       Francisco Javier Cuadrado <fcocuadrado@gmail.com>, 2009
+#
+# Traductores, si no conocen el formato PO, merece la pena leer la
+# documentación de gettext, especialmente las secciones dedicadas a este
+# formato, por ejemplo ejecutando:
+#       info -n '(gettext)PO Files'
+#       info -n '(gettext)Header Entry'
+#
+# Equipo de traducción al español, por favor lean antes de traducir
+# los siguientes documentos:
+#
+#   - El proyecto de traducción de Debian al español
+#     http://www.debian.org/intl/spanish/
+#     especialmente las notas y normas de traducción en
+#     http://www.debian.org/intl/spanish/notas
+#
+#   - La guía de traducción 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: grub2 1.96+20090829-2\n"
+"Report-Msgid-Bugs-To: grub2@packages.debian.org\n"
+"POT-Creation-Date: 2009-08-30 17:54+0200\n"
+"PO-Revision-Date: 2009-08-30 19:42+0100\n"
+"Last-Translator: Francisco Javier Cuadrado <fcocuadrado@gmail.com>\n"
+"Language-Team: Debian l10n Spanish <debian-l10n-spanish@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "Chainload from menu.lst?"
+msgstr "¿Desea realizar la carga en cadena desde el archivo «menu.lst»?"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "GRUB upgrade scripts have detected a GRUB Legacy setup in /boot/grub."
+msgstr ""
+"Los scripts de actualización han detectado en «/boot/grub» una configuración "
+"heredada de una versión anterior de GRUB."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In order to replace the Legacy version of GRUB in your system, it is "
+"recommended that /boot/grub/menu.lst is adjusted to chainload GRUB 2 from "
+"your existing GRUB Legacy setup.  This step may be automaticaly performed "
+"now."
+msgstr ""
+"Para reemplazar la versión anterior de GRUB en el sistema, se recomienda que "
+"se configure «/boot/grub/menu.lst» para que cargue en cadena GRUB 2 a partir "
+"de la configuración heredada de GRUB. Este paso se debería hacer de forma "
+"automática."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"It's recommended that you accept chainloading GRUB 2 from menu.lst, and "
+"verify that your new GRUB 2 setup is functional for you, before you install "
+"it directly to your MBR (Master Boot Record)."
+msgstr ""
+"Antes de instalar GRUB 2 directamente en el MBR («Master Boot Record») se "
+"recomienda que acepte cargarlo en cadena desde el archivo «menu.lst» y que "
+"verifique que puede utilizar la nueva configuración de GRUB 2."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In either case, whenever you want GRUB 2 to be loaded directly from MBR, you "
+"can do so by issuing (as root) the following command:"
+msgstr ""
+"En cualquier caso, cuando quiera que GRUB 2 se cargue directamente desde el "
+"MBR, puede hacerlo ejecutando (como usuario «root») la siguiente orden:"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "upgrade-from-grub-legacy"
+msgstr "upgrade-from-grub-legacy"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid "Linux command line:"
+msgstr "Linea de órdenes de Linux:"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid ""
+"The following Linux command line was extracted from /etc/default/grub or the "
+"`kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"La siguiente linea de órdenes de Linux se extrajo del archivo «/etc/default/"
+"grub» o del parámetro «kopt» en el archivo «menu.lst» de la versión anterior "
+"de GRUB. Por favor, compruebe que esto es correcto y modifíquelo si es "
+"necesario."
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid "Linux default command line:"
+msgstr "Linea de órdenes predeterminada de Linux:"
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid ""
+"The following string will be used as Linux parameters for the default menu "
+"entry but not for the recovery mode."
+msgstr ""
+"La siguiente cadena se utilizará como parámetros de Linux para la entrada "
+"predeterminada del menú pero no para el modo de recuperación."
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid "kFreeBSD command line:"
+msgstr "Linea de órdenes de kFreeBSD:"
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid ""
+"The following kFreeBSD command line was extracted from /etc/default/grub or "
+"the `kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"La siguiente linea de órdenes de kFreeBSD se extrajo del archivo «/etc/"
+"default/grub» o del parámetro «kopt» en el archivo «menu.lst» de la versión "
+"anterior de GRUB. Por favor, compruebe que esto es correcto y modifíquelo si "
+"es necesario."
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid "kFreeBSD default command line:"
+msgstr "Linea de órdenes predeterminada de kFreeBSD:"
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid ""
+"The following string will be used as kFreeBSD parameters for the default "
+"menu entry but not for the recovery mode."
+msgstr ""
+"La siguiente cadena se utilizará como parámetros de kFreeBSD para la entrada "
+"predeterminada del menú pero no para el modo de recuperación."
+
+#~ msgid "GRUB 1.95 numbering scheme transition"
+#~ msgstr "Esquema de transición numérica de GRUB 1.95"
+
+#~ msgid ""
+#~ "As of version 1.95, GRUB 2 has changed its numbering scheme.  Partitions "
+#~ "are now counted starting from 1 rather than 0.  This is to make it "
+#~ "consistent with device names of Linux and the other kernels used in "
+#~ "Debian.  For example, when using Linux as the kernel, \"(hd0,1)\" refers "
+#~ "to the same partition as the /dev/sda1 device node."
+#~ msgstr ""
+#~ "GRUB 2 ha cambiado el esquema de numeración, como en la versión 1.95. "
+#~ "Ahora las particiones comienzan en el número 1 en vez de en el número 0. "
+#~ "Esto sirve para hacerlo consistente con los nombres de dispositivos de "
+#~ "Linux y otros núcleos que se usan en Debian. Por ejemplo, cuando se usa "
+#~ "Linux como núcleo, «(hd0, 1)» se refiere a la misma partición que el "
+#~ "dispositivo «/dev/sda1»."
+
+#~ msgid ""
+#~ "Because of this, there's a chance your system becomes unbootable if "
+#~ "update-grub(8) is run before GRUB is updated, generating a grub.cfg file "
+#~ "that your installed GRUB won't yet be able to parse correctly.  To ensure "
+#~ "your system will be able to boot, you have to:"
+#~ msgstr ""
+#~ "Por este motivo, existe la posibilidad de que su sistema no sea capaz de "
+#~ "arrancar si se ejecuta update-grub(8) antes de actualizar GRUB, ya que se "
+#~ "generaría un archivo «grub.cfg» que la versión instalada de GRUB no podría "
+#~ "leer correctamente. Para asegurarse de que el sistema arrancará, debe:"
+
+#~ msgid ""
+#~ " - Reinstall GRUB (typically, by running grub-install).\n"
+#~ " - Rerun update-grub to generate a new grub.cfg."
+#~ msgstr ""
+#~ " - Reinstalar GRUB (normalmente, ejecutando grub-install).\n"
+#~ "- Volver a ejecutar update-grub para generar un nuevo archivo «grub.cfg»."
--- grub2-1.97~beta3.orig/debian/po/POTFILES.in
+++ grub2-1.97~beta3/debian/po/POTFILES.in
@@ -0,0 +1,2 @@
+[type: gettext/rfc822deb] grub-pc.templates.in
+[type: gettext/rfc822deb] templates.in
--- grub2-1.97~beta3.orig/debian/po/pt.po
+++ grub2-1.97~beta3/debian/po/pt.po
@@ -0,0 +1,154 @@
+# Portuguese translation for grub2's debconf messages
+# Copyright (C) 2007 Miguel Figueiredo
+# This file is distributed under the same license as the grub2 package.
+# Miguel Figueiredo <elmig@debianpt.org>, 2007.
+# Ricardo Silva <ardoric@gmail.com>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: grub2 1.96+20081005-1\n"
+"Report-Msgid-Bugs-To: grub2@packages.debian.org\n"
+"POT-Creation-Date: 2009-08-30 17:54+0200\n"
+"PO-Revision-Date: 2008-11-02 11:07+0000\n"
+"Last-Translator: Ricardo Silva <ardoric@gmail.com>\n"
+"Language-Team: Portuguese <traduz@debianpt.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "Chainload from menu.lst?"
+msgstr "Carregar a partir do menu.lst?"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "GRUB upgrade scripts have detected a GRUB Legacy setup in /boot/grub."
+msgstr ""
+"Os scripts de actualização do GRUB detectaram uma configuração do GRUB "
+"Legacy em /boot/grub."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In order to replace the Legacy version of GRUB in your system, it is "
+"recommended that /boot/grub/menu.lst is adjusted to chainload GRUB 2 from "
+"your existing GRUB Legacy setup.  This step may be automaticaly performed "
+"now."
+msgstr ""
+"Para substituir a versão Legacy do GRUB no seu sistema, é recomendado que o /"
+"boot/grub/menu.lst seja ajustado para carregar o GRUB 2 a partir da sua "
+"configuração do GRUB Legacy existente. Este passo pode ser executado agora "
+"automaticamente."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"It's recommended that you accept chainloading GRUB 2 from menu.lst, and "
+"verify that your new GRUB 2 setup is functional for you, before you install "
+"it directly to your MBR (Master Boot Record)."
+msgstr ""
+"É recomendado que aceite carregar o GRUB 2 a partir do menu.lst, e verifique "
+"que a sua nova configuração do GRUB 2 está funcional, antes de o instalar "
+"directamente no seu MBR (Master Boot Record)."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In either case, whenever you want GRUB 2 to be loaded directly from MBR, you "
+"can do so by issuing (as root) the following command:"
+msgstr ""
+"Em qualquer dos casos, quando quiser que o GRUB 2 seja carregado "
+"directamente a partir do MBR, pode fazê-lo correndo o seguinte comando (como "
+"root):"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "upgrade-from-grub-legacy"
+msgstr "upgrade-from-grub-legacy"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid "Linux command line:"
+msgstr "Linha de comandos do Linux:"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+#, fuzzy
+#| msgid ""
+#| "The following Linux command line was extracted from the `kopt' parameter "
+#| "in GRUB Legacy's menu.lst.  Please verify that it is correct, and modify "
+#| "it if necessary."
+msgid ""
+"The following Linux command line was extracted from /etc/default/grub or the "
+"`kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"A linha de comandos do Linux que se segue foi obtida a partir do parâmetro "
+"`kopt' no ficheiro menu.lst do GRUB Legacy. Por favor verifique que ela está "
+"correcta, e modifique-a se necessário."
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+#, fuzzy
+#| msgid "Linux command line:"
+msgid "Linux default command line:"
+msgstr "Linha de comandos do Linux:"
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid ""
+"The following string will be used as Linux parameters for the default menu "
+"entry but not for the recovery mode."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+#, fuzzy
+#| msgid "Linux command line:"
+msgid "kFreeBSD command line:"
+msgstr "Linha de comandos do Linux:"
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+#, fuzzy
+#| msgid ""
+#| "The following Linux command line was extracted from the `kopt' parameter "
+#| "in GRUB Legacy's menu.lst.  Please verify that it is correct, and modify "
+#| "it if necessary."
+msgid ""
+"The following kFreeBSD command line was extracted from /etc/default/grub or "
+"the `kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"A linha de comandos do Linux que se segue foi obtida a partir do parâmetro "
+"`kopt' no ficheiro menu.lst do GRUB Legacy. Por favor verifique que ela está "
+"correcta, e modifique-a se necessário."
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+#, fuzzy
+#| msgid "Linux command line:"
+msgid "kFreeBSD default command line:"
+msgstr "Linha de comandos do Linux:"
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid ""
+"The following string will be used as kFreeBSD parameters for the default "
+"menu entry but not for the recovery mode."
+msgstr ""
--- grub2-1.97~beta3.orig/debian/po/ca.po
+++ grub2-1.97~beta3/debian/po/ca.po
@@ -0,0 +1,146 @@
+# translation of ca.po to catalan
+# Catalan translation of grub2's debconf messages
+# Copyright © 2009 Free Software Foundation, Inc.
+# This file is distributed under the same license as the grub2 package.
+#
+# Jordi Mallach <jordi@debian.org>, 2009.
+# Juan Andrés Gimeno Crespo <juagicre@gmail.com>, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: ca\n"
+"Report-Msgid-Bugs-To: grub2@packages.debian.org\n"
+"POT-Creation-Date: 2009-08-30 17:54+0200\n"
+"PO-Revision-Date: 2009-09-02 18:12+0200\n"
+"Last-Translator: Juan Andrés Gimeno Crespo <juagicre@gmail.com>\n"
+"Language-Team: catalan <debian-l10n-catalan@lists.debian.org>\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: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "Chainload from menu.lst?"
+msgstr "Voleu carregar en cadena des del menu.lst?"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "GRUB upgrade scripts have detected a GRUB Legacy setup in /boot/grub."
+msgstr ""
+"Els scripts d'actualització del GRUB han detectat una configuració del GRUB "
+"Legacy en /boot/grub."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In order to replace the Legacy version of GRUB in your system, it is "
+"recommended that /boot/grub/menu.lst is adjusted to chainload GRUB 2 from "
+"your existing GRUB Legacy setup.  This step may be automaticaly performed "
+"now."
+msgstr ""
+"A l'hora de reemplaçar la versió Legacy del GRUB que hi ha al sistema, és "
+"recomanable que es modifique /boot/grub/menu.lst per a carregar el GRUB 2 en "
+"cadena des de la vostra configuració del GRUB Legacy existent. Aquest pas es "
+"pot dur a terme ara."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"It's recommended that you accept chainloading GRUB 2 from menu.lst, and "
+"verify that your new GRUB 2 setup is functional for you, before you install "
+"it directly to your MBR (Master Boot Record)."
+msgstr ""
+"És recomanable que accepteu la càrrega en cadena del GRUB 2 des del menu."
+"lst, per a verificar que la nova configuració del GRUB 2 funciona "
+"correctament, abans de que l'instal·leu directament al vostre registre "
+"mestre d'arrencada (MBR)."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In either case, whenever you want GRUB 2 to be loaded directly from MBR, you "
+"can do so by issuing (as root) the following command:"
+msgstr ""
+"En qualsevol cas, quan vulgueu que es carregue el GRUB 2 directament des de "
+"l'MBR, podeu fer-ho executant (com a root) l'ordre següent:"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "upgrade-from-grub-legacy"
+msgstr "upgrade-from-grub-legacy"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid "Linux command line:"
+msgstr "Línia d'ordres de Linux:"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid ""
+"The following Linux command line was extracted from /etc/default/grub or the "
+"`kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"La següent línia d'ordres de Linux ha sigut extreta de /etc/default/grub o "
+"del paràmetre «kopt» del fitxer menu.lst del GRUB Legacy. Per favor verifique "
+"que és correcta, i modifiqueu-la si és necessari."
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid "Linux default command line:"
+msgstr "Línia d'ordres de Linux per defecte:"
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid ""
+"The following string will be used as Linux parameters for the default menu "
+"entry but not for the recovery mode."
+msgstr ""
+"La següent cadena serà usada com a paràmetre Linux per al menú d'entrada per "
+"defecte però no per al mode de recuperació."
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+#, fuzzy
+#| msgid "Linux command line:"
+msgid "kFreeBSD command line:"
+msgstr "Línia d'ordres de Linux:"
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid ""
+"The following kFreeBSD command line was extracted from /etc/default/grub or "
+"the `kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"La següent línia d'ordres de kFreeBSD ha sigut extreta de /etc/default/grub "
+"o del paràmetre «kopt» del fitxer menu.lst del GRUB Legacy. Per favor "
+"verifique que és correcta, i modifiqueu-la si és necessari."
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid "kFreeBSD default command line:"
+msgstr "Línia d'ordres de kFreeBSD per defecte:"
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid ""
+"The following string will be used as kFreeBSD parameters for the default "
+"menu entry but not for the recovery mode."
+msgstr ""
+"La següent cadena serà usada com a paràmetre kFreeBSD per al menú d'entrada "
+"per defecte però no per al mode de recuperació."
--- grub2-1.97~beta3.orig/debian/po/be.po
+++ grub2-1.97~beta3/debian/po/be.po
@@ -0,0 +1,178 @@
+# Belarusian translation of grub2 templates
+# Copyright (C) 2009 respective translators (see below)
+# This file is distributed under the same license as the grub2 package.
+# Hleb Rubanau <g.rubanau@gmail.com>, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: be\n"
+"Report-Msgid-Bugs-To: grub2@packages.debian.org\n"
+"POT-Creation-Date: 2009-08-30 17:54+0200\n"
+"PO-Revision-Date: 2009-08-31 10:50+0200\n"
+"Last-Translator: Hleb Rubanau <g.rubanau@gmail.com>\n"
+"Language-Team: Debian Belarusian (Official spelling) <debian-l10n-"
+"belarusian@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "Chainload from menu.lst?"
+msgstr "Ланцуговая загрузка з menu.lst?"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "GRUB upgrade scripts have detected a GRUB Legacy setup in /boot/grub."
+msgstr ""
+"Скрыпты абнаўлення GRUB выявілі папярэднюю версію GRUB, усталяваную ў /boot/"
+"grub."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In order to replace the Legacy version of GRUB in your system, it is "
+"recommended that /boot/grub/menu.lst is adjusted to chainload GRUB 2 from "
+"your existing GRUB Legacy setup.  This step may be automaticaly performed "
+"now."
+msgstr ""
+"Каб замяніць папярэднюю версію GRUB у Вашай сістэме, раім выправіць файл /"
+"boot/grub/menu.lst такім чынам, каб GRUB 2 загружаўся праз механізм "
+"ланцуговай загрузкі (chainload) з існуючай папярэдняй версіі GRUB. Зараз "
+"можна зрабіць гэтую наладку аўтаматычна. "
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"It's recommended that you accept chainloading GRUB 2 from menu.lst, and "
+"verify that your new GRUB 2 setup is functional for you, before you install "
+"it directly to your MBR (Master Boot Record)."
+msgstr ""
+"Раім абраць опцыю ланцуговай загрузкі GRUB 2 з menu.lst, каб праверыць, ці "
+"прыдатны для Вас нанова ўсталяваны GRUB 2, перад тым як усталёўваць яго "
+"непасрэдна ў галоўны загрузачны запіс (MBR, Master Boot Record)."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In either case, whenever you want GRUB 2 to be loaded directly from MBR, you "
+"can do so by issuing (as root) the following command:"
+msgstr ""
+"Калі ж Вы хочаце, каб GRUB 2 запускаўся непасрэдна з MBR, дастаткова "
+"запусціць з правамі карыстальніка root наступную каманду:"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "upgrade-from-grub-legacy"
+msgstr "update-from-grub-legacy"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid "Linux command line:"
+msgstr "Радок камандаў для ядра Linux:"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid ""
+"The following Linux command line was extracted from /etc/default/grub or the "
+"`kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"Гэты радок камандаў для ядра Linux узяты з файлу /etc/default/grub або з "
+"параметру `kopt' у файле наладак (menu.lst) папярэдняй версіі GRUB. Калі "
+"ласка, пераканайцеся, што каманды запісаныя правільна, або папраўце іх, калі "
+"трэба."
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid "Linux default command line:"
+msgstr "Прадвызначаны радок камандаў для ядра Linux:"
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid ""
+"The following string will be used as Linux parameters for the default menu "
+"entry but not for the recovery mode."
+msgstr ""
+"Наступны радок будзе выкарыстаны ў якасці параметраў ядра Linux для "
+"прадвызначанага пункту меню (але не для рэжыму аднаўлення)."
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid "kFreeBSD command line:"
+msgstr "Радок камандаў для ядра kFreeBSD:"
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid ""
+"The following kFreeBSD command line was extracted from /etc/default/grub or "
+"the `kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"Гэты радок камандаў для kFreeBSD узяты з файлу /etc/default/grub або з "
+"параметру `kopt' у файле наладак (menu.lst) папярэдняй версіі GRUB. Калі "
+"ласка, пераканайцеся, што каманды запісаныя правільна, або папраўце іх, калі "
+"трэба."
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid "kFreeBSD default command line:"
+msgstr "Прадвызначаны радок камандаў для ядра kFreeBSD:"
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid ""
+"The following string will be used as kFreeBSD parameters for the default "
+"menu entry but not for the recovery mode."
+msgstr ""
+"Наступны радок будзе выкарыстаны ў якасці параметраў ядра kFreeBSD для "
+"прадвызначанага пункту меню (але не для рэжыму аднаўлення)."
+
+#~ msgid "GRUB 1.95 numbering scheme transition"
+#~ msgstr "Змена схемы нумарацыі GRUB 1.95"
+
+#~ msgid ""
+#~ "As of version 1.95, GRUB 2 has changed its numbering scheme.  Partitions "
+#~ "are now counted starting from 1 rather than 0.  This is to make it "
+#~ "consistent with device names of Linux and the other kernels used in "
+#~ "Debian.  For example, when using Linux as the kernel, \"(hd0,1)\" refers "
+#~ "to the same partition as the /dev/sda1 device node."
+#~ msgstr ""
+#~ "Схема нумарацыі ў GRUB 2 змянілася ў параўнанні з версіяй 1.95 . Зараз "
+#~ "падзелы дыску адлічваюцца пачынаючы з 1 замест 0. Гэта зроблена, каб "
+#~ "адпавядаць назвам прыладаў у Linux і іншых ядрах, якія выкарыстоўваюцца ў "
+#~ "Debian. Напрыклад, калі ў якасці ядра выкарыстоўваецца Linux, радок "
+#~ "\"(hd0,1)\" датычыцца таго самага падзелу дыску, як і файл прылады /dev/"
+#~ "sda1."
+
+#~ msgid ""
+#~ "Because of this, there's a chance your system becomes unbootable if "
+#~ "update-grub(8) is run before GRUB is updated, generating a grub.cfg file "
+#~ "that your installed GRUB won't yet be able to parse correctly.  To ensure "
+#~ "your system will be able to boot, you have to:"
+#~ msgstr ""
+#~ "З гэтай прычыны Ваша сістэма можа стаць няздольнай да загрузкі, калі "
+#~ "праграма update-grub(8), запушчаная да абнаўлення GRUB, стварыла файл "
+#~ "grub.cfg, які немагчыма карэктна апрацаваць усталяваным GRUB. Каб "
+#~ "пераканацца, што Ваша сістэма здольная да загрузкі, варта: "
+
+#~ msgid ""
+#~ " - Reinstall GRUB (typically, by running grub-install).\n"
+#~ " - Rerun update-grub to generate a new grub.cfg."
+#~ msgstr ""
+#~ " - Пераўсталяваць GRUB (звычайна, праз запуск grub-install).\n"
+#~ " - Перазапусціць update-grub, каб стварыць новы grub.cfg."
--- grub2-1.97~beta3.orig/debian/po/ja.po
+++ grub2-1.97~beta3/debian/po/ja.po
@@ -0,0 +1,138 @@
+# Copyright (C) 2008-2009 GRUB Maintainers <pkg-grub-devel@lists.alioth.debian.org>
+# This file is distributed under the same license as the grub2 package.
+# Hideki Yamane (Debian-JP) <henrich@debian.or.jp>, 2008-2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: grub2 1.96+20080724-4\n"
+"Report-Msgid-Bugs-To: grub2@packages.debian.org\n"
+"POT-Creation-Date: 2009-08-30 17:54+0200\n"
+"PO-Revision-Date: 2009-09-01 11:07+0900\n"
+"Last-Translator: Hideki Yamane (Debian-JP) <henrich@debian.or.jp>\n"
+"Language-Team: Japanese <debian-japanese@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "Chainload from menu.lst?"
+msgstr "menu.lst から続けて起動 (チェーンロード)しますか?"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "GRUB upgrade scripts have detected a GRUB Legacy setup in /boot/grub."
+msgstr ""
+"GRUB のアップグレードプログラムは GRUB Legacy の設定が /boot/grub にあるのを"
+"検出しました。"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In order to replace the Legacy version of GRUB in your system, it is "
+"recommended that /boot/grub/menu.lst is adjusted to chainload GRUB 2 from "
+"your existing GRUB Legacy setup.  This step may be automaticaly performed "
+"now."
+msgstr ""
+"システム中に存在している以前のバージョンの GRUB を置き換えるためには、/boot/"
+"grub/menu.lst にある GRUB Legacy の設定を使って GRUB2 をチェーンロードするよ"
+"うに調整するのがお勧めです。この作業は自動的に実行されます。"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"It's recommended that you accept chainloading GRUB 2 from menu.lst, and "
+"verify that your new GRUB 2 setup is functional for you, before you install "
+"it directly to your MBR (Master Boot Record)."
+msgstr ""
+"MBR (マスタブートレコード) に直接インストールする前に、GRUB 2 が menu.lst か"
+"らチェーンロードするように設定し、新しい GRUB 2 の設定が動作するかどうかを確"
+"認する事をお勧めします。"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In either case, whenever you want GRUB 2 to be loaded directly from MBR, you "
+"can do so by issuing (as root) the following command:"
+msgstr ""
+"いずれにせよ、GRUB 2 を MBR から直接起動したくなった時いつでもは (root にて) "
+"以下のコマンドを入力することで対応できます:"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "upgrade-from-grub-legacy"
+msgstr "upgrade-from-grub-legacy"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid "Linux command line:"
+msgstr "Linux コマンド:"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid ""
+"The following Linux command line was extracted from /etc/default/grub or the "
+"`kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"以下の Linux のコマンドラインは /etc/default/grub か GRUB Legacy の menu.lst "
+"上の「kopt」パラメータから取得されています。これが正しいものであるかを確認し"
+"て、必要であれば修正してください。"
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid "Linux default command line:"
+msgstr "Linux デフォルトコマンドライン:"
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid ""
+"The following string will be used as Linux parameters for the default menu "
+"entry but not for the recovery mode."
+msgstr ""
+"以下の文字列はリカバリーモードではない通常のメニューエントリでの Linux パラ"
+"メータとして使われます。"
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid "kFreeBSD command line:"
+msgstr "kFreeBSD コマンドライン:"
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid ""
+"The following kFreeBSD command line was extracted from /etc/default/grub or "
+"the `kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"以下の kFreeBSD のコマンドラインは /etc/default/grub か GRUB Legacy の menu."
+"lst 上の「kopt」パラメータから取得されています。これが正しいものであるかを確"
+"認して、必要であれば修正してください。"
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid "kFreeBSD default command line:"
+msgstr "kFreeBSD デフォルトコマンドライン:"
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid ""
+"The following string will be used as kFreeBSD parameters for the default "
+"menu entry but not for the recovery mode."
+msgstr ""
+"以下の文字列はリカバリーモードではない通常のメニューエントリでの kFreeBSD パ"
+"ラメータとして使われます。"
--- grub2-1.97~beta3.orig/debian/po/eu.po
+++ grub2-1.97~beta3/debian/po/eu.po
@@ -0,0 +1,152 @@
+# translation of eu.po to Basque
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Piarres Beobide <pi@beobide.net>, 2008.
+# Iñaki Larrañaga Murgoitio <dooteo@euskalgnu.org>, 2008, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: eu\n"
+"Report-Msgid-Bugs-To: grub2@packages.debian.org\n"
+"POT-Creation-Date: 2009-08-30 17:54+0200\n"
+"PO-Revision-Date: 2009-04-04 14:29+0200\n"
+"Last-Translator: Iñaki Larrañaga Murgoitio <dooteo@euskalgnu.org>\n"
+"Language-Team: Basque <itzulpena@euskalgnu.org>\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: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "Chainload from menu.lst?"
+msgstr "Kargatu menu.lst fitxategitik?"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "GRUB upgrade scripts have detected a GRUB Legacy setup in /boot/grub."
+msgstr ""
+"GRUB eguneratzeko skriptek GRUB zahar baten konfigurazioa aurkitu dute /boot/"
+"grub-en."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In order to replace the Legacy version of GRUB in your system, it is "
+"recommended that /boot/grub/menu.lst is adjusted to chainload GRUB 2 from "
+"your existing GRUB Legacy setup.  This step may be automaticaly performed "
+"now."
+msgstr ""
+"GRUB zaharraren bertsioa behar bezala ordezkatzeko, gomendagarria da /boot/"
+"grub/menu.lst doitzea GRUB 2 dagoeneko instalaturik duzun GRUB zaharraren "
+"bidez kargatzeko.  Urrats hau automatikoki egin daiteke orain."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"It's recommended that you accept chainloading GRUB 2 from menu.lst, and "
+"verify that your new GRUB 2 setup is functional for you, before you install "
+"it directly to your MBR (Master Boot Record)."
+msgstr ""
+"Gomendagarria da GRUB 2 menu.lst bidez kargatzea onartzea, GRUB 2 "
+"konfigurazioak zure beharrak betetzen dituela egiatzatzeko MBR-ran (Master "
+"Boot Record) zuzenean instalatu aurretik."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In either case, whenever you want GRUB 2 to be loaded directly from MBR, you "
+"can do so by issuing (as root) the following command:"
+msgstr ""
+"Edozein kasutan, GRUB 2 zuzenean MBR-tik kargatzea nahi duzunean exekutatu "
+"honako komandoa (root gisa):"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "upgrade-from-grub-legacy"
+msgstr "upgrade-from-grub-legacy"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid "Linux command line:"
+msgstr "Linux-eko komando-lerroa:"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+#, fuzzy
+#| msgid ""
+#| "The following Linux command line was extracted from the `kopt' parameter "
+#| "in GRUB Legacy's menu.lst.  Please verify that it is correct, and modify "
+#| "it if necessary."
+msgid ""
+"The following Linux command line was extracted from /etc/default/grub or the "
+"`kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"Linux-eko komando-lerro hau GRUB zaharraren menu.lst fitxategiko 'kopt' "
+"parametrotik atera da. Egiaztatu zuzena dela, eta eraldatu behar izanez gero."
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+#, fuzzy
+#| msgid "Linux command line:"
+msgid "Linux default command line:"
+msgstr "Linux-eko komando-lerroa:"
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid ""
+"The following string will be used as Linux parameters for the default menu "
+"entry but not for the recovery mode."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+#, fuzzy
+#| msgid "Linux command line:"
+msgid "kFreeBSD command line:"
+msgstr "Linux-eko komando-lerroa:"
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+#, fuzzy
+#| msgid ""
+#| "The following Linux command line was extracted from the `kopt' parameter "
+#| "in GRUB Legacy's menu.lst.  Please verify that it is correct, and modify "
+#| "it if necessary."
+msgid ""
+"The following kFreeBSD command line was extracted from /etc/default/grub or "
+"the `kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"Linux-eko komando-lerro hau GRUB zaharraren menu.lst fitxategiko 'kopt' "
+"parametrotik atera da. Egiaztatu zuzena dela, eta eraldatu behar izanez gero."
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+#, fuzzy
+#| msgid "Linux command line:"
+msgid "kFreeBSD default command line:"
+msgstr "Linux-eko komando-lerroa:"
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid ""
+"The following string will be used as kFreeBSD parameters for the default "
+"menu entry but not for the recovery mode."
+msgstr ""
--- grub2-1.97~beta3.orig/debian/po/cs.po
+++ grub2-1.97~beta3/debian/po/cs.po
@@ -0,0 +1,141 @@
+# Czech translation of grub2 debconf messages.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the grub2 package.
+# Miroslav Kure <kurem@debian.cz>, 2008, 2009
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: grub2\n"
+"Report-Msgid-Bugs-To: grub2@packages.debian.org\n"
+"POT-Creation-Date: 2009-08-30 17:54+0200\n"
+"PO-Revision-Date: 2009-08-30 18:47+0200\n"
+"Last-Translator: Miroslav Kure <kurem@debian.cz>\n"
+"Language-Team: Czech <debian-l10n-czech@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "Chainload from menu.lst?"
+msgstr "Zavést přes menu.lst?"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "GRUB upgrade scripts have detected a GRUB Legacy setup in /boot/grub."
+msgstr ""
+"Aktualizační skripty GRUBu rozpoznaly v /boot/grub nastavení pro předchozí "
+"verzi GRUBu (tzv. GRUB Legacy)."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In order to replace the Legacy version of GRUB in your system, it is "
+"recommended that /boot/grub/menu.lst is adjusted to chainload GRUB 2 from "
+"your existing GRUB Legacy setup.  This step may be automaticaly performed "
+"now."
+msgstr ""
+"Abyste na svém systému nahradili zastaralou verzi GRUBu, je doporučeno "
+"upravit /boot/grub/menu.lst tak, aby zavedl GRUB 2 pomocí stávajícího GRUB "
+"Legacy. Tento krok je nyní možné provést automaticky."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"It's recommended that you accept chainloading GRUB 2 from menu.lst, and "
+"verify that your new GRUB 2 setup is functional for you, before you install "
+"it directly to your MBR (Master Boot Record)."
+msgstr ""
+"Před instalací GRUBu 2 přímo do MBR (Master Boot Record) se doporučuje "
+"nejprve vyzkoušet zavedení GRUBu 2 skrze menu.lst a teprve po ověření, že "
+"vše funguje očekávaným způsobem, zkusit instalaci do MBR."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In either case, whenever you want GRUB 2 to be loaded directly from MBR, you "
+"can do so by issuing (as root) the following command:"
+msgstr ""
+"Až se rozhodnete zavádět GRUB 2 přímo z MBR, stačí jako uživatel root "
+"spustit příkaz:"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "upgrade-from-grub-legacy"
+msgstr "upgrade-from-grub-legacy"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid "Linux command line:"
+msgstr "Parametry pro Linux:"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid ""
+"The following Linux command line was extracted from /etc/default/grub or the "
+"`kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"Následující řádka s parametry pro Linux byla získána ze starého souboru menu."
+"lst z parametru „kopt“ nebo ze souboru /etc/default/grub. Zkontrolujte "
+"prosím, zda jsou parametry v pořádku a případně je upravte do požadované "
+"podoby."
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid "Linux default command line:"
+msgstr "Výchozí parametry pro Linux:"
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid ""
+"The following string will be used as Linux parameters for the default menu "
+"entry but not for the recovery mode."
+msgstr ""
+"Následující parametry pro Linux se použijí pro výchozí položku menu, ale ne "
+"pro záchranný režim."
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid "kFreeBSD command line:"
+msgstr "Parametry pro kFreeBSD:"
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid ""
+"The following kFreeBSD command line was extracted from /etc/default/grub or "
+"the `kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"Následující řádka s parametry pro kFreeBSD byla získána ze starého souboru "
+"menu.lst z parametru „kopt“ nebo ze souboru /etc/default/grub. Zkontrolujte "
+"prosím, zda jsou parametry v pořádku a případně je upravte do požadované "
+"podoby."
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid "kFreeBSD default command line:"
+msgstr "Výchozí parametry pro kFreeBSD:"
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid ""
+"The following string will be used as kFreeBSD parameters for the default "
+"menu entry but not for the recovery mode."
+msgstr ""
+"Následující parametry pro kFreeBSD se použijí pro výchozí položku menu, ale "
+"ne pro záchranný režim."
--- grub2-1.97~beta3.orig/debian/po/templates.pot
+++ grub2-1.97~beta3/debian/po/templates.pot
@@ -0,0 +1,120 @@
+# 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 <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: grub2@packages.debian.org\n"
+"POT-Creation-Date: 2009-08-30 17:54+0200\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "Chainload from menu.lst?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "GRUB upgrade scripts have detected a GRUB Legacy setup in /boot/grub."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In order to replace the Legacy version of GRUB in your system, it is "
+"recommended that /boot/grub/menu.lst is adjusted to chainload GRUB 2 from "
+"your existing GRUB Legacy setup.  This step may be automaticaly performed "
+"now."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"It's recommended that you accept chainloading GRUB 2 from menu.lst, and "
+"verify that your new GRUB 2 setup is functional for you, before you install "
+"it directly to your MBR (Master Boot Record)."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In either case, whenever you want GRUB 2 to be loaded directly from MBR, you "
+"can do so by issuing (as root) the following command:"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "upgrade-from-grub-legacy"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid "Linux command line:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid ""
+"The following Linux command line was extracted from /etc/default/grub or the "
+"`kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid "Linux default command line:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid ""
+"The following string will be used as Linux parameters for the default menu "
+"entry but not for the recovery mode."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid "kFreeBSD command line:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid ""
+"The following kFreeBSD command line was extracted from /etc/default/grub or "
+"the `kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid "kFreeBSD default command line:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid ""
+"The following string will be used as kFreeBSD parameters for the default "
+"menu entry but not for the recovery mode."
+msgstr ""
--- grub2-1.97~beta3.orig/debian/po/nl.po
+++ grub2-1.97~beta3/debian/po/nl.po
@@ -0,0 +1,141 @@
+# translation of grub2.pot to Dutch
+# Copyright (C) 2008-2009 THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the grub2 package.
+#
+# Paul Gevers <paul@climbing.nl>, 2008-2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: grub2_1.96+20099829_nl\n"
+"Report-Msgid-Bugs-To: grub2@packages.debian.org\n"
+"POT-Creation-Date: 2009-08-30 17:54+0200\n"
+"PO-Revision-Date: 2009-09-01 22:46+0100\n"
+"Last-Translator: Paul Gevers <paul@climbing.nl>\n"
+"Language-Team: Dutch <debian-l10n-dutch@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "Chainload from menu.lst?"
+msgstr "Doorschakelen vanuit menu.lst?"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "GRUB upgrade scripts have detected a GRUB Legacy setup in /boot/grub."
+msgstr ""
+"GRUB's opwaardeerscripts hebben een oude-stijl GRUB opstelling in /boot/grub "
+"gedetecteerd."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In order to replace the Legacy version of GRUB in your system, it is "
+"recommended that /boot/grub/menu.lst is adjusted to chainload GRUB 2 from "
+"your existing GRUB Legacy setup.  This step may be automaticaly performed "
+"now."
+msgstr ""
+"Om de oude-stijl versie van GRUB op uw systeem te vervangen wordt het "
+"aangeraden om het /boot/grub/menu.lst bestand zo te laten aanpassen dat naar "
+"GRUB2 wordt doorgeschakeld (chainloading) vanuit uw bestaande oude-stijl "
+"GRUB opstelling. Deze stap kan nu automatisch worden uitgevoerd."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"It's recommended that you accept chainloading GRUB 2 from menu.lst, and "
+"verify that your new GRUB 2 setup is functional for you, before you install "
+"it directly to your MBR (Master Boot Record)."
+msgstr ""
+"U wordt aangeraden om het doorschakelen van GRUB2 vanuit menu.lst te "
+"accepteren, en daarna te verifiëren dat uw nieuwe GRUB2 opstelling werkt "
+"voordat u het in de MBR (Master Boot Record) installeert."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In either case, whenever you want GRUB 2 to be loaded directly from MBR, you "
+"can do so by issuing (as root) the following command:"
+msgstr ""
+"Waar u ook voor kiest, als u GRUB2 direct in de MBR wilt laden kunt u dat "
+"doen door het volgende commando uit te voeren (met beheerdersrechten (root)):"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "upgrade-from-grub-legacy"
+msgstr "upgrade-from-grub-legacy"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid "Linux command line:"
+msgstr "Linux-commandoregel:"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid ""
+"The following Linux command line was extracted from /etc/default/grub or the "
+"`kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"De volgende Linux-commandoregel is gebaseerd op /etc/default/grub of op de "
+"'kopt'-parameter gevonden in het menu.lst bestand van de oude-stijl GRUB. "
+"Wilt u deze op correctheid controleren en indien nodig aanpassen?"
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid "Linux default command line:"
+msgstr "Standaard Linux-commandoregel:"
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid ""
+"The following string will be used as Linux parameters for the default menu "
+"entry but not for the recovery mode."
+msgstr ""
+"De volgende regel zal, behalve in de herstelmodus, gebruikt worden voor de "
+"Linux parameters in de standaard menuoptie."
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid "kFreeBSD command line:"
+msgstr "kFreeBSD-commandoregel:"
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid ""
+"The following kFreeBSD command line was extracted from /etc/default/grub or "
+"the `kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"De volgende kFreeBSD-commandoregel is gebaseerd /etc/default/grub of op de "
+"'kopt'-parameter gevonden in het menu.lst bestand van de oude-stijl GRUB. "
+"Wilt u deze op correctheid controleren en indien nodig aanpassen?"
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid "kFreeBSD default command line:"
+msgstr "Standaard kFreeBSD-commandoregel:"
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid ""
+"The following string will be used as kFreeBSD parameters for the default "
+"menu entry but not for the recovery mode."
+msgstr ""
+"De volgende regel zal, behalve in de herstelmodus, gebruikt worden voor de "
+"kFreeBSD parameters in de standaard menuoptie."
--- grub2-1.97~beta3.orig/debian/po/it.po
+++ grub2-1.97~beta3/debian/po/it.po
@@ -0,0 +1,140 @@
+# Italian (it) translation of debconf templates for grub2
+# This file is distributed under the same license as the grub2 package.
+# Luca Monducci <luca.mo@tiscali.it>, 2007-2009.
+# 
+msgid ""
+msgstr ""
+"Project-Id-Version: grub2 1.96+20090829-2 italian debconf templates\n"
+"Report-Msgid-Bugs-To: grub2@packages.debian.org\n"
+"POT-Creation-Date: 2009-08-30 17:54+0200\n"
+"PO-Revision-Date: 2009-09-04 10:37+0200\n"
+"Last-Translator: Luca Monducci <luca.mo@tiscali.it>\n"
+"Language-Team: Italian <debian-l10n-italian@lists.debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "Chainload from menu.lst?"
+msgstr "Effettuare il caricamento in cascata da menu.lst?"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "GRUB upgrade scripts have detected a GRUB Legacy setup in /boot/grub."
+msgstr ""
+"Gli script di aggiornamento hanno rilevato una configurazione del vecchio "
+"GRUB in /boot/grub."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In order to replace the Legacy version of GRUB in your system, it is "
+"recommended that /boot/grub/menu.lst is adjusted to chainload GRUB 2 from "
+"your existing GRUB Legacy setup.  This step may be automaticaly performed "
+"now."
+msgstr ""
+"Per sostituire la vecchia versione di GRUB sul proprio sistema, si "
+"raccomanda di correggere il file /boot/grub/menu.lst in modo da caricare "
+"GRUB 2 in cascata dalla versione di GRUB esistente. Questa modifica può "
+"essere effettuata automaticamente adesso."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"It's recommended that you accept chainloading GRUB 2 from menu.lst, and "
+"verify that your new GRUB 2 setup is functional for you, before you install "
+"it directly to your MBR (Master Boot Record)."
+msgstr ""
+"Si raccomanda di accettare il caricamento in cascata di GRUB 2 da menu.lst e "
+"di verificare che la nuova configurazione di GRUB 2 sia adatta alle proprie "
+"necessità prima di procedere con l'installazione diretta sul MBR (Master "
+"Boot Record)."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In either case, whenever you want GRUB 2 to be loaded directly from MBR, you "
+"can do so by issuing (as root) the following command:"
+msgstr ""
+"In ogni caso, per caricare GRUB 2 direttamente dal MBR, è necessario "
+"eseguire (da root) il seguente comando:"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "upgrade-from-grub-legacy"
+msgstr "upgrade-from-grub-legacy"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid "Linux command line:"
+msgstr "Riga di comando Linux:"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid ""
+"The following Linux command line was extracted from /etc/default/grub or the "
+"`kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"La seguente riga di comando Linux è stata estratta da /etc/default/grub "
+"oppure dal parametro \"kopt\" presente nel file menu.lst del vecchio GRUB. "
+"Controllare che sia corretta e modificarla se necessario."
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid "Linux default command line:"
+msgstr "Riga di comando Linux predefinita:"
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid ""
+"The following string will be used as Linux parameters for the default menu "
+"entry but not for the recovery mode."
+msgstr ""
+"Questa stringa verrà usata come parametri per Linux nella voce di menu "
+"predefinita ma non nella modalità di ripristino."
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid "kFreeBSD command line:"
+msgstr "Riga di comando kFreeBSD:"
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid ""
+"The following kFreeBSD command line was extracted from /etc/default/grub or "
+"the `kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"La seguente riga di comando kFreeBSD è stata estratta da /etc/default/grub "
+"oppure dal parametro \"kopt\" presente nel file menu.lst del vecchio GRUB. "
+"Controllare che sia corretta e modificarla se necessario."
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid "kFreeBSD default command line:"
+msgstr "Riga di comando kFreeBSD predefinita:"
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid ""
+"The following string will be used as kFreeBSD parameters for the default "
+"menu entry but not for the recovery mode."
+msgstr ""
+"Questa stringa verrà usata come parametri per kFreeBSD nella voce di menu "
+"predefinita ma non nella modalità di ripristino."
--- grub2-1.97~beta3.orig/debian/po/ar.po
+++ grub2-1.97~beta3/debian/po/ar.po
@@ -0,0 +1,138 @@
+# translation of grub.ar.po to Arabic
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Ossama M. Khayat <okhayat@yahoo.com>, 2008, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: grub.ar\n"
+"Report-Msgid-Bugs-To: grub2@packages.debian.org\n"
+"POT-Creation-Date: 2009-08-30 17:54+0200\n"
+"PO-Revision-Date: 2009-08-31 13:11+0300\n"
+"Last-Translator: Ossama M. Khayat <okhayat@yahoo.com>\n"
+"Language-Team: Arabic <support@arabeyes.org>\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: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "Chainload from menu.lst?"
+msgstr "تفعيل التحميل التسلسلي من menu.lst؟"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "GRUB upgrade scripts have detected a GRUB Legacy setup in /boot/grub."
+msgstr "عثرت بريمجيات ترقية GRUB على إعداد سابق في /boot/grub."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In order to replace the Legacy version of GRUB in your system, it is "
+"recommended that /boot/grub/menu.lst is adjusted to chainload GRUB 2 from "
+"your existing GRUB Legacy setup.  This step may be automaticaly performed "
+"now."
+msgstr ""
+"لتستبدل النسخة السابقة من GRUB في نظامك، يُستحسن تعديل الملف /boot/grub/menu."
+"lst لتحميل GRUB 2 تسلسلياً من إعداد GRUB السابق. ويمكن تنفيذ هذه الخطوة "
+"تلقائياً الآن."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"It's recommended that you accept chainloading GRUB 2 from menu.lst, and "
+"verify that your new GRUB 2 setup is functional for you, before you install "
+"it directly to your MBR (Master Boot Record)."
+msgstr ""
+"يُستحسن أن تقبل التحميل التسلسلي لمدير الإقلاع GRUB من خلال الملف menu.lst، "
+"وتحقق من أن إعداد GRUB 2 صالح لاستخدامك، قبل أن تُبّته مباشرة على سجل الإقلاع "
+"الرئيسي MBR الخاص بك."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In either case, whenever you want GRUB 2 to be loaded directly from MBR, you "
+"can do so by issuing (as root) the following command:"
+msgstr ""
+"في أي من الحالتين، متى ما أردت تحميل GRUB 2 مباشرة من سجل الإقلاع الرئيسي "
+"MBR، يمكنك ذلك بإصدار الأمر التالي كمُستخدم root:"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "upgrade-from-grub-legacy"
+msgstr "upgrade-from-grub-legacy"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid "Linux command line:"
+msgstr "سطر أوامر لينكس:"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid ""
+"The following Linux command line was extracted from /etc/default/grub or the "
+"`kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"سطر أوامر لينكس التالي تم استخراجه من /etc/default/grub أو\n"
+"مُعطى `kopt' في ملف menu.lst الخاص بحزمة GRUB القديمة. رجاءً تحقق من\n"
+"صحته وقم بتعديله إن كانت هناك ضرورة."
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid "Linux default command line:"
+msgstr "سطر أوامر لينكس الافتراضي:"
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid ""
+"The following string will be used as Linux parameters for the default menu "
+"entry but not for the recovery mode."
+msgstr ""
+"سيتم استخدام سلسلة الحروف التالية كمُعطيات لتشغيل النظام لمُدخل القائمة\n"
+"الافتراضي ولكن ليس لوضع الإنقاذ."
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid "kFreeBSD command line:"
+msgstr "سطر أوامر KFreeBSD:"
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid ""
+"The following kFreeBSD command line was extracted from /etc/default/grub or "
+"the `kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"سطر أوامر KFreeBSD التالي تم استخراجه من /etc/default/grub أو\n"
+"مُعطى `kopt' في ملف menu.lst الخاص بحزمة GRUB القديمة. رجاءً تحقق من صحته وقم "
+"بتعديله إن كانت هناك ضرورة."
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid "kFreeBSD default command line:"
+msgstr "سطر أوامر KFreeBSD الافتراضي:"
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid ""
+"The following string will be used as kFreeBSD parameters for the default "
+"menu entry but not for the recovery mode."
+msgstr ""
+"سيتم استخدام النص التالي كمُعطى KFreeBSD لمُدخل القائمة\n"
+"الافتراضي ولكن ليس لوضع الإنقاذ."
--- grub2-1.97~beta3.orig/debian/po/gl.po
+++ grub2-1.97~beta3/debian/po/gl.po
@@ -0,0 +1,128 @@
+# Galician translation of grub2's debconf templates
+# This file is distributed under the same license as the grub2 package.
+# Jacobo Tarrio <jtarrio@debian.org>, 2007, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: grub2\n"
+"Report-Msgid-Bugs-To: grub2@packages.debian.org\n"
+"POT-Creation-Date: 2009-08-30 17:54+0200\n"
+"PO-Revision-Date: 2008-05-28 17:15+0100\n"
+"Last-Translator: Jacobo Tarrio <jtarrio@debian.org>\n"
+"Language-Team: Galician <proxecto@trasno.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "Chainload from menu.lst?"
+msgstr "¿Cargar en cadea desde menu.lst?"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "GRUB upgrade scripts have detected a GRUB Legacy setup in /boot/grub."
+msgstr ""
+"Os scripts de actualización de GRUB detectaron unha configuración do GRUB "
+"antigo en /boot/grub."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In order to replace the Legacy version of GRUB in your system, it is "
+"recommended that /boot/grub/menu.lst is adjusted to chainload GRUB 2 from "
+"your existing GRUB Legacy setup.  This step may be automaticaly performed "
+"now."
+msgstr ""
+"Para substituír a versión antiga de GRUB do sistema, recoméndase axustar /"
+"boot/grub/menu.lst para cargar GRUB 2 en cadea desde a configuración "
+"existente do GRUB antigo. Pódese realizar este paso automaticamente agora."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"It's recommended that you accept chainloading GRUB 2 from menu.lst, and "
+"verify that your new GRUB 2 setup is functional for you, before you install "
+"it directly to your MBR (Master Boot Record)."
+msgstr ""
+"Recoméndase que acepte cargar en cadea GRUB 2 desde menu.lst, e que "
+"verifique que a nova configuración de GRUB 2 funciona para vostede, antes de "
+"instalalo directamente no MBR (rexistro mestre de inicio)."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In either case, whenever you want GRUB 2 to be loaded directly from MBR, you "
+"can do so by issuing (as root) the following command:"
+msgstr ""
+"En calquera caso, cando queira cargar GRUB 2 directamente desde o MBR, pode "
+"facelo executando (coma administrador) a seguinte orde:"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "upgrade-from-grub-legacy"
+msgstr "upgrade-from-grub-legacy"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid "Linux command line:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid ""
+"The following Linux command line was extracted from /etc/default/grub or the "
+"`kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid "Linux default command line:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid ""
+"The following string will be used as Linux parameters for the default menu "
+"entry but not for the recovery mode."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid "kFreeBSD command line:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid ""
+"The following kFreeBSD command line was extracted from /etc/default/grub or "
+"the `kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid "kFreeBSD default command line:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid ""
+"The following string will be used as kFreeBSD parameters for the default "
+"menu entry but not for the recovery mode."
+msgstr ""
--- grub2-1.97~beta3.orig/debian/po/zh_TW.po
+++ grub2-1.97~beta3/debian/po/zh_TW.po
@@ -0,0 +1,140 @@
+# Copyright (C) 2009 Tetralet
+# This file is distributed under the same license as the grub2 package.
+# 
+msgid ""
+msgstr ""
+"Project-Id-Version: grub2\n"
+"Report-Msgid-Bugs-To: grub2@packages.debian.org\n"
+"POT-Creation-Date: 2009-08-30 17:54+0200\n"
+"PO-Revision-Date: 2009-02-02 12:05+0800\n"
+"Last-Translator: Tetralet <tetralet@gmail.com>\n"
+"Language-Team: Debian-user in Chinese [Big5] <debian-chinese-big5@lists."
+"debian.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "Chainload from menu.lst?"
+msgstr "?????? menu.list ? chainload ???"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "GRUB upgrade scripts have detected a GRUB Legacy setup in /boot/grub."
+msgstr "GRUB ?????? /boot/grub ???? GRUB ? Legacy ???"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In order to replace the Legacy version of GRUB in your system, it is "
+"recommended that /boot/grub/menu.lst is adjusted to chainload GRUB 2 from "
+"your existing GRUB Legacy setup.  This step may be automaticaly performed "
+"now."
+msgstr ""
+"?????????? Legacy ?? GRUB,????? /boot/grub/menu.lst ?????? GRUB Legacy ???? "
+"chainload ????? GRUB 2??????????????"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"It's recommended that you accept chainloading GRUB 2 from menu.lst, and "
+"verify that your new GRUB 2 setup is functional for you, before you install "
+"it directly to your MBR (Master Boot Record)."
+msgstr ""
+"???? GRUB 2 ??? MBR(??????)??,??????? menu.lst ??? chainload ????? GRUB "
+"2,?????? GRUB 2 ?????????"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In either case, whenever you want GRUB 2 to be loaded directly from MBR, you "
+"can do so by issuing (as root) the following command:"
+msgstr "??????????,???? GRUB 2 ??? MBR ??????,???(? root ??)???????:"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "upgrade-from-grub-legacy"
+msgstr "upgrade-from-grub-legacy"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid "Linux command line:"
+msgstr "Linux ???:"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+#, fuzzy
+#| msgid ""
+#| "The following Linux command line was extracted from the `kopt' parameter "
+#| "in GRUB Legacy's menu.lst.  Please verify that it is correct, and modify "
+#| "it if necessary."
+msgid ""
+"The following Linux command line was extracted from /etc/default/grub or the "
+"`kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"??? Linux ????? `kopt' ??? GRUB Legacy ? menu.lst ???????????????,??????????"
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+#, fuzzy
+#| msgid "Linux command line:"
+msgid "Linux default command line:"
+msgstr "Linux ???:"
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid ""
+"The following string will be used as Linux parameters for the default menu "
+"entry but not for the recovery mode."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+#, fuzzy
+#| msgid "Linux command line:"
+msgid "kFreeBSD command line:"
+msgstr "Linux ???:"
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+#, fuzzy
+#| msgid ""
+#| "The following Linux command line was extracted from the `kopt' parameter "
+#| "in GRUB Legacy's menu.lst.  Please verify that it is correct, and modify "
+#| "it if necessary."
+msgid ""
+"The following kFreeBSD command line was extracted from /etc/default/grub or "
+"the `kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"??? Linux ????? `kopt' ??? GRUB Legacy ? menu.lst ???????????????,??????????"
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+#, fuzzy
+#| msgid "Linux command line:"
+msgid "kFreeBSD default command line:"
+msgstr "Linux ???:"
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid ""
+"The following string will be used as kFreeBSD parameters for the default "
+"menu entry but not for the recovery mode."
+msgstr ""
--- grub2-1.97~beta3.orig/debian/po/ka.po
+++ grub2-1.97~beta3/debian/po/ka.po
@@ -0,0 +1,143 @@
+# 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 <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: grub2@packages.debian.org\n"
+"POT-Creation-Date: 2009-08-30 17:54+0200\n"
+"PO-Revision-Date: 2009-08-30 18:05+0400\n"
+"Last-Translator: Aiet Kolkhi <aietkolkhi@gmail.com>\n"
+"Language-Team: Georgian <aiet@gakartuleba.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: georgian\n"
+"X-Poedit-Country: GEORGIA\n"
+"X-Poedit-SourceCharset: utf-8\n"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "Chainload from menu.lst?"
+msgstr "გსურთ Chainload ჩატვირთვა menu.lst-დან?"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "GRUB upgrade scripts have detected a GRUB Legacy setup in /boot/grub."
+msgstr ""
+"GRUB-ის განახლების სკრიფტები GRUB-ის ძველ ინსტალაციას გადააწყდა /boot/grub "
+"მდებარეობაში."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In order to replace the Legacy version of GRUB in your system, it is "
+"recommended that /boot/grub/menu.lst is adjusted to chainload GRUB 2 from "
+"your existing GRUB Legacy setup.  This step may be automaticaly performed "
+"now."
+msgstr ""
+"იმისათვის, რომ თქვენს სისტემაზე ჩანაცვლდეს ძველი GRUB-ის ინსტალაცია, "
+"სასურველია /boot/grub/menu.lst ჩასწორდეს, რომ შეასრულოს GRUB 2-ის chainload "
+"ჩატვირთვა თქვენი არსებული GRUB-ის ძველი ინსტალაციიდან.  ეს საფეხური "
+"შესაძლებელია ახლა შესრულდეს ავტომატურად."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"It's recommended that you accept chainloading GRUB 2 from menu.lst, and "
+"verify that your new GRUB 2 setup is functional for you, before you install "
+"it directly to your MBR (Master Boot Record)."
+msgstr ""
+"სასურველია მიიღოთ menu.lst-დან GRUB 2-ის chainload მეთოდით ჩატვირთვა, ასევე "
+"გადაამოწმოთ, რომ თქვენი ახალი GRUB 2-ის ინსტალაცია ფუნქციონირებდეს, სანამ "
+"მას პირდაპირ Master Boot Record (MBR)-ში ჩაწერდეთ."
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid ""
+"In either case, whenever you want GRUB 2 to be loaded directly from MBR, you "
+"can do so by issuing (as root) the following command:"
+msgstr ""
+"ნებისმიერ შემთხვევაში, როდესაც მოისურვებთ GRUB 2 პირდაპირ MBR-დან "
+"ჩაიტვირთოს, ამისათვის გაუშვით შემდეგი ბრძანება (root პრივილეგიებით):"
+
+#. Type: boolean
+#. Description
+#: ../grub-pc.templates.in:2001
+msgid "upgrade-from-grub-legacy"
+msgstr "upgrade-from-grub-legacy"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid "Linux command line:"
+msgstr "ლინუქსის ბრძანების სტრიქონი:"
+
+#. Type: string
+#. Description
+#: ../templates.in:1001
+msgid ""
+"The following Linux command line was extracted from /etc/default/grub or the "
+"`kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"ლინუქსის შემდეგი ბრძანება მოძიებულ იქნა /etc/default/grub-დან ან `kopt' "
+"პარამეტრიდან ძველი GRUB-ის menu.lst-ში.  გადაამოწმეთ, რომ იგი სწორია, ან "
+"შეცვალეთ შესაბამისად."
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid "Linux default command line:"
+msgstr "ლინუქსის სტანდარტული ბრძანების სტრიქონი:"
+
+#. Type: string
+#. Description
+#: ../templates.in:2001
+msgid ""
+"The following string will be used as Linux parameters for the default menu "
+"entry but not for the recovery mode."
+msgstr ""
+"შემდეგი სტრიქონი გამოყენებულ იქნება როგორც ლინუქსის პარამეტრები მენიუს "
+"სტანდარტული შენატანისათვის, მაგრამ არა აღდგენის რეჟიმისათვის."
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid "kFreeBSD command line:"
+msgstr "kFreeBSD ბრძანების სტრიქონი:"
+
+#. Type: string
+#. Description
+#: ../templates.in:3001
+msgid ""
+"The following kFreeBSD command line was extracted from /etc/default/grub or "
+"the `kopt' parameter in GRUB Legacy's menu.lst.  Please verify that it is "
+"correct, and modify it if necessary."
+msgstr ""
+"შემდეგი kFreeBSD-ის ბრძანების სტრიქონი ამოღებულ იქნა /etc/default/grub-დან "
+"ან `kopt'  პარამეტრიდან ძველი GRUB-ის menu.lst-ში.  გადაამოწმეთ, რომ იგი "
+"სწორია, ან შეცვალეთ შესაბამისად."
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid "kFreeBSD default command line:"
+msgstr "kFreeBSD-ის სტანდარტული ბრძანების სტრიქონი:"
+
+#. Type: string
+#. Description
+#: ../templates.in:4001
+msgid ""
+"The following string will be used as kFreeBSD parameters for the default "
+"menu entry but not for the recovery mode."
+msgstr ""
+"შემდეგი სტრიქონი გამოყენებულ იქნება როგორც kFreeBSD-ს პარამეტრები მენიუს "
+"სტანდარტული შენატანისათვის, მაგრამ არა აღდგენის რეჟიმისათვის."
--- grub2-1.97~beta3.orig/debian/default/grub
+++ grub2-1.97~beta3/debian/default/grub
@@ -0,0 +1,22 @@
+# If you change this file, run 'update-grub' afterwards to update
+# /boot/grub/grub.cfg.
+
+GRUB_DEFAULT=0
+GRUB_TIMEOUT=5
+GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
+GRUB_CMDLINE_LINUX_DEFAULT="quiet"
+GRUB_CMDLINE_LINUX=""
+
+# Uncomment to disable graphical terminal (grub-pc only)
+#GRUB_TERMINAL=console
+
+# The resolution used on graphical terminal
+# note that you can use only modes which your graphic card supports via VBE
+# you can see them in real GRUB with the command `vbeinfo'
+#GRUB_GFXMODE=640x480
+
+# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
+#GRUB_DISABLE_LINUX_UUID=true
+
+# Uncomment to disable generation of recovery mode menu entrys
+#GRUB_DISABLE_LINUX_RECOVERY="true"
--- grub2-1.97~beta3.orig/debian/default/grub.md5sum
+++ grub2-1.97~beta3/debian/default/grub.md5sum
@@ -0,0 +1,2 @@
+dfad90339e4227d432636ed7d4483744  experimental_1.96+20081129-1
+e916b60d7de71969dd7bad5a809fb9dc  lenny_1.96+20080724-16
--- grub2-1.97~beta3.orig/debian/patches/901_dpkg_version_comparison.diff
+++ grub2-1.97~beta3/debian/patches/901_dpkg_version_comparison.diff
@@ -0,0 +1,24 @@
+Index: util/grub-mkconfig_lib.in
+===================================================================
+--- util/grub-mkconfig_lib.in	(revision 2482)
++++ util/grub-mkconfig_lib.in	(working copy)
+@@ -185,8 +185,8 @@ version_test_numeric ()
+ 
+ version_test_gt ()
+ {
+-  local a=`echo $1 | sed -e "s/[^-]*-//"`
+-  local b=`echo $2 | sed -e "s/[^-]*-//"`
++  local a=`echo $1 | sed -e "s/[^-]*-//;s/[._-]\(pre\|rc\|test\|git\|old\)/~\1/g"`
++  local b=`echo $2 | sed -e "s/[^-]*-//;s/[._-]\(pre\|rc\|test\|git\|old\)/~\1/g"`
+   local cmp=gt
+   if [ "x$b" = "x" ] ; then
+     return 0
+@@ -196,7 +196,7 @@ version_test_gt ()
+     *.old:*) a=`echo -n $a | sed -e s/\.old$//` ; cmp=gt ;;
+     *:*.old) b=`echo -n $b | sed -e s/\.old$//` ; cmp=ge ;;
+   esac
+-  version_test_numeric $a $cmp $b
++  dpkg --compare-versions "$a" $cmp "$b"
+   return $?
+ }
+ 
--- grub2-1.97~beta3.orig/debian/patches/902_boot_blocklist_hack.diff
+++ grub2-1.97~beta3/debian/patches/902_boot_blocklist_hack.diff
@@ -0,0 +1,20 @@
+Index: util/i386/pc/grub-setup.c
+===================================================================
+--- util/i386/pc/grub-setup.c	(revision 1836)
++++ util/i386/pc/grub-setup.c	(working copy)
+@@ -383,6 +383,15 @@
+       grub_disk_cache_invalidate_all ();
+
+       file = grub_file_open (core_path_dev);
++
++      if (grub_errno == GRUB_ERR_FILE_NOT_FOUND)
++	{
++	  /* Clean the previous grub_errno */
++	  grub_errno = GRUB_ERR_NONE;
++	  strcpy (core_path_dev, "/grub/core.img");
++	  file = grub_file_open (core_path_dev);
++	}
++
+       if (file)
+ 	{
+ 	  if (grub_file_size (file) != core_size)
--- grub2-1.97~beta3.orig/debian/patches/903_grub_legacy_0_based_partitions.diff
+++ grub2-1.97~beta3/debian/patches/903_grub_legacy_0_based_partitions.diff
@@ -0,0 +1,11 @@
+--- util/hostdisk.c	2008-02-11 16:47:35.000000000 +0100
++++ util/hostdisk.c	2008-02-28 17:00:20.000000000 +0100
+@@ -584,7 +584,7 @@
+   sprintf (p, (drive & 0x80) ? "hd%d" : "fd%d", drive & ~0x80);
+
+   if (dos_part >= 0)
+-    sprintf (p + strlen (p), ",%d", dos_part + 1);
++    sprintf (p + strlen (p), ",%d", dos_part + (getenv ("GRUB_LEGACY_0_BASED_PARTITIONS") ? 0 : 1));
+
+   if (bsd_part >= 0)
+     sprintf (p + strlen (p), ",%c", bsd_part + 'a');
--- grub2-1.97~beta3.orig/debian/patches/05_insmod_in_rescue_disks.diff
+++ grub2-1.97~beta3/debian/patches/05_insmod_in_rescue_disks.diff
@@ -0,0 +1,13 @@
+--- ../grub2/docs/grub.cfg	2008-04-29 14:17:33.000000000 +0200
++++ docs/grub.cfg	2008-04-29 14:52:22.000000000 +0200
+@@ -2,6 +2,10 @@
+ # Sample GRUB configuration file
+ #
+
++insmod biosdisk
++insmod pc
++insmod gpt
++
+ # Boot automatically after 30 secs.
+ set timeout=30
+
--- grub2-1.97~beta3.orig/debian/patches/906_grub_extras.diff
+++ grub2-1.97~beta3/debian/patches/906_grub_extras.diff
@@ -0,0 +1,26 @@
+Index: Makefile.in
+===================================================================
+--- Makefile.in	(revision 2402)
++++ Makefile.in	(working copy)
+@@ -143,6 +143,8 @@
+ 	fi
+ 
+ include $(srcdir)/conf/$(target_cpu)-$(platform).mk
++GRUB_EXTRAS=$(srcdir)/debian/grub-extras
++-include $(GRUB_EXTRAS)/conf/$(target_cpu)-$(platform).mk
+ 
+ ### General targets.
+ 
+Index: autogen.sh
+===================================================================
+--- autogen.sh	(revision 2402)
++++ autogen.sh	(working copy)
+@@ -5,7 +5,7 @@
+ autoconf
+ autoheader
+ echo timestamp > stamp-h.in
+-for rmk in conf/*.rmk; do
++for rmk in conf/*.rmk debian/grub-extras/conf/*.rmk; do
+   ruby genmk.rb < $rmk > `echo $rmk | sed 's/\.rmk$/.mk/'`
+ done
+ ./gendistlist.sh > DISTLIST
--- grub2-1.97~beta3.orig/debian/patches/905_setup_force.diff
+++ grub2-1.97~beta3/debian/patches/905_setup_force.diff
@@ -0,0 +1,24 @@
+
+Upstream wanted grub-setup to require --force when blocklists are to be
+used.  However, this is not suitable for debian because we have to maintain
+backward-compatibility.
+
+To make things worse, since the Lenny release D-I creates a broken setup
+on GPT, where blocklists become the _only_ option.  When this is fixed, we
+could contemplate removing this patch and instead just pass --force whenever
+calling grub-install from postinst.
+
+Index: util/i386/pc/grub-install.in
+===================================================================
+--- util/i386/pc/grub-install.in	(revision 2202)
++++ util/i386/pc/grub-install.in	(working copy)
+@@ -124,6 +124,9 @@
+     esac
+ done
+
++# added by debian patch
++setup_force="--force"
++
+ # for make_system_path_relative_to_its_root()
+ . ${libdir}/grub/grub-mkconfig_lib
+
--- grub2-1.97~beta3.orig/debian/patches/904_disable_floppies.diff
+++ grub2-1.97~beta3/debian/patches/904_disable_floppies.diff
@@ -0,0 +1,28 @@
+
+Author: Robert Millan
+
+An ugly kludge.  Should this be merged upstream?
+
+Index: util/hostdisk.c
+===================================================================
+--- util/hostdisk.c	(revision 1832)
++++ util/hostdisk.c	(working copy)
+@@ -544,6 +544,18 @@
+ 	  continue;
+ 	}
+
++      if (! strncmp (p, "/dev/fd", sizeof ("/dev/fd") - 1))
++	{
++	  char *q = p + sizeof ("/dev/fd") - 1;
++	  if (*q >= '0' && *q <= '9')
++	    {
++	      free (map[drive].drive);
++	      map[drive].drive = NULL;
++	      grub_util_info ("`%s' looks like a floppy drive, skipping", p);
++	      continue;
++	    }
++	}
++
+ #ifdef __linux__
+       /* On Linux, the devfs uses symbolic links horribly, and that
+ 	 confuses the interface very much, so use realpath to expand
--- grub2-1.97~beta3.orig/debian/patches/07_core_in_fs.diff
+++ grub2-1.97~beta3/debian/patches/07_core_in_fs.diff
@@ -0,0 +1,31 @@
+Index: util/i386/pc/grub-setup.c
+===================================================================
+--- util/i386/pc/grub-setup.c	(revision 2220)
++++ util/i386/pc/grub-setup.c	(working copy)
+@@ -53,6 +53,7 @@ static const grub_gpt_part_type_t grub_g
+
+ #define DEFAULT_BOOT_FILE	"boot.img"
+ #define DEFAULT_CORE_FILE	"core.img"
++#define CORE_IMG_IN_FS		"setup_left_core_image_in_filesystem"
+
+ /* This is the blocklist used in the diskboot image.  */
+ struct boot_blocklist
+@@ -388,6 +389,8 @@ setup (const char *dir,
+ 		       boot_img))
+     grub_util_error ("%s", grub_errmsg);
+
++  unlink (DEFAULT_DIRECTORY "/" CORE_IMG_IN_FS);
++
+   goto finish;
+
+ unable_to_embed:
+@@ -402,6 +405,9 @@ unable_to_embed:
+   if (! force)
+     grub_util_error ("If you really want blocklists, use --force.");
+
++  fp = fopen (DEFAULT_DIRECTORY "/" CORE_IMG_IN_FS, "w");
++  fclose (fp);
++
+   /* Make sure that GRUB reads the identical image as the OS.  */
+   tmp_img = xmalloc (core_size);
+   core_path_dev = grub_util_get_path (dir, core_file);
--- grub2-1.97~beta3.orig/debian/patches/002_grub.d_freebsd.in.diff
+++ grub2-1.97~beta3/debian/patches/002_grub.d_freebsd.in.diff
@@ -0,0 +1,128 @@
+
+This patch is unreadable because it's an overhaul of the whole file,
+it is now derived from 10_linux.in.
+
+Index: util/grub.d/10_freebsd.in
+===================================================================
+--- util/grub.d/10_freebsd.in	(revision 2546)
++++ util/grub.d/10_freebsd.in	(working copy)
+@@ -1,7 +1,7 @@
+ #! /bin/sh -e
+ 
+ # grub-mkconfig helper script.
+-# Copyright (C) 2008,2009  Free Software Foundation, Inc.
++# Copyright (C) 2006,2007,2008,2009  Free Software Foundation, Inc.
+ #
+ # GRUB is free software: you can redistribute it and/or modify
+ # it under the terms of the GNU General Public License as published by
+@@ -26,51 +26,77 @@
+   *)		OS="FreeBSD" ;;
+ esac
+ 
+-if test -e /boot/device.hints ; then
+-  devices=/boot/device.hints
+-fi
+-
+-if test -e /boot/kernel/kernel ; then
+-  kfreebsd=/boot/kernel/kernel
+-fi
+-if test -e /boot/kernel/kernel.gz ; then
+-  kfreebsd=/boot/kernel/kernel.gz
+-fi
+-
+-if [ "x$kfreebsd" != "x" ] ; then
+-  echo "Found kernel of FreeBSD: $kfreebsd" >&2
+-
+-  kfreebsd_basename=`basename $kfreebsd`
+-  kfreebsd_dirname=`dirname $kfreebsd`
+-  kfreebsd_rel_dirname=`make_system_path_relative_to_its_root $kfreebsd_dirname`
+-
+-  if [ x"$devices" != "x" ] ; then
+-    devices_basename=`basename $devices`
+-    devices_dirname=`dirname $devices`
+-    devices_rel_dirname=`make_system_path_relative_to_its_root $devices_dirname`
+-  fi
+-
+-  case ${GRUB_FS} in
+-    ufs1 | ufs2)	kfreebsd_fs=ufs ;;
+-    *)			kfreebsd_fs=${GRUB_FS} ;;
+-  esac
+-
++kfreebsd_entry ()
++{
+   cat << EOF
+-menuentry "${OS}" {
++menuentry "$1" {
+ EOF
+   prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/"
+   cat << EOF
+-	freebsd			${kfreebsd_rel_dirname}/${kfreebsd_basename}
++	freebsd			${rel_dirname}/${basename}
+ EOF
+ 
+-  if [ x"$devices" != "x" ] ; then
++  if test -n "${devices}" ; then
+     cat << EOF
+ 	freebsd_loadenv		${devices_rel_dirname}/${devices_basename}
+ EOF
+   fi
++
++  if test -n "${acpi_ko}" ; then
++    cat << EOF
++	freebsd_module_elf	${acpi_ko_rel_dirname}/${acpi_ko_basename}
++EOF
++  fi
++
+   cat << EOF
+ 	set FreeBSD.vfs.root.mountfrom=${kfreebsd_fs}:${GRUB_DEVICE}
+ 	set FreeBSD.vfs.root.mountfrom.options=rw
+ }
+ EOF
+-fi
++}
++
++list=`for i in /boot/kfreebsd-* /boot/kernel/kernel ; do
++        if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi
++      done`
++
++while [ "x$list" != "x" ] ; do
++  kfreebsd=`version_find_latest $list`
++  echo "Found kernel of FreeBSD: $kfreebsd" >&2
++  basename=`basename $kfreebsd`
++  dirname=`dirname $kfreebsd`
++  rel_dirname=`make_system_path_relative_to_its_root $dirname`
++
++  if [ -f /boot/device.hints ] ; then
++    devices=/boot/device.hints
++    devices_basename=`basename $devices`
++    devices_dirname=`dirname $devices`
++    devices_rel_dirname=`make_system_path_relative_to_its_root $devices_dirname`
++  fi
++
++  case ${GRUB_FS} in
++    ufs1 | ufs2)        kfreebsd_fs=ufs ;;
++    *)                  kfreebsd_fs=${GRUB_FS} ;;
++  esac
++
++  version=`echo $basename | sed -e "s,^[^0-9]*-,,g;s/\.gz$//g"`
++  alt_version=`echo $version | sed -e "s,\.old$,,g"`
++
++  acpi_ko=
++  for i in "/lib/modules/${version}/acpi.ko" "/lib/modules/${alt_version}/acpi.ko" \
++      "/boot/kernel/acpi.ko"; do
++    if test -e "$i" ; then
++      acpi_ko="$i"
++      break
++    fi
++  done
++  if test -n "${acpi_ko}" ; then
++    echo "Found ACPI module: ${acpi_ko}" >&2
++    acpi_ko_basename=`basename ${acpi_ko}`
++    acpi_ko_dirname=`dirname ${acpi_ko}`
++    acpi_ko_rel_dirname=`make_system_path_relative_to_its_root $acpi_ko_dirname`
++  fi
++
++  kfreebsd_entry "${OS}, kFreeBSD ${version}"
++
++  list=`echo $list | tr ' ' '\n' | grep -vx $kfreebsd | tr '\n' ' '`
++done
--- grub2-1.97~beta3.orig/debian/patches/01_uuids_and_lvm_dont_play_along_nicely.diff
+++ grub2-1.97~beta3/debian/patches/01_uuids_and_lvm_dont_play_along_nicely.diff
@@ -0,0 +1,14 @@
+diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
+index c2da413..cbd9d6b 100644
+--- a/util/grub.d/10_linux.in
++++ b/util/grub.d/10_linux.in
+@@ -36,7 +36,8 @@ case ${GRUB_DEVICE} in
+ esac
+
+ if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \
+-    || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" ; then
++    || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" \
++    || [ "`grub-probe -t abstraction --device ${GRUB_DEVICE} | sed -e 's,.*\(lvm\).*,\1,'`" = "lvm"  ] ; then
+   LINUX_ROOT_DEVICE=${GRUB_DEVICE}
+ else
+   LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
--- grub2-1.97~beta3.orig/debian/patches/06_olpc_prefix_hack.diff
+++ grub2-1.97~beta3/debian/patches/06_olpc_prefix_hack.diff
@@ -0,0 +1,24 @@
+
+This sucks, but it's better than what OFW was giving us.
+
+diff -ur grub2-1.96+20080601.old/kern/ieee1275/init.c grub2-1.96+20080601/kern/ieee1275/init.c
+--- grub2-1.96+20080601.old/kern/ieee1275/init.c	2008-06-08 20:40:07.000000000 +0200
++++ grub2-1.96+20080601/kern/ieee1275/init.c	2008-06-08 22:03:17.000000000 +0200
+@@ -84,6 +84,9 @@
+     /* We already set prefix in grub_machine_init().  */
+     return;
+
++#ifdef __i386__
++  grub_env_set ("prefix", "(sd,1)/");
++#else
+   if (grub_ieee1275_get_property (grub_ieee1275_chosen, "bootpath", &bootpath,
+ 				  sizeof (bootpath), 0))
+     {
+@@ -121,6 +124,7 @@
+
+   grub_free (filename);
+   grub_free (prefix);
++#endif
+ }
+
+ /* Claim some available memory in the first /memory node. */
--- grub2-1.97~beta3.orig/debian/legacy/update-grub
+++ grub2-1.97~beta3/debian/legacy/update-grub
@@ -0,0 +1,1067 @@
+#!/bin/bash
+#
+# Insert a list of installed kernels in a grub config file
+#   Copyright 2001 Wichert Akkerman <wichert@linux.com>
+#   Copyright (C) 2007,2008  Free Software Foundation, Inc.
+#
+# 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 3 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 GRUB.  If not, see <http://www.gnu.org/licenses/>.
+#
+# Contributors:
+#	Jason Thomas <jason@debian.org>
+#	David B.Harris <dbarclay10@yahoo.ca>
+#	Marc Haber <mh+debian-packages@zugschlus.de>
+#	Crispin Flowerday <crispin@zeus.com>
+
+# Abort on errors
+set -e
+
+host_os=`uname -s | tr '[A-Z]' '[a-z]'`
+
+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 /boot/grub /boot/boot/grub ; do
+		if [ -d "$d" ] ; then
+			grub_dir="$d"
+			break
+		fi
+	done
+	
+	if [ -z "$grub_dir" ] ; then
+		abort "No GRUB directory found.\n To create a template run 'mkdir /boot/grub' first.\n To install grub, install it manually or try the 'grub-install' command.\n ### Warning, grub-install is used to change your MBR. ###"
+	else
+		echo "found: $grub_dir" >&2
+	fi
+
+	echo $grub_dir
+}
+
+# This function was borrowed from grub2/util/update-grub_lib.in
+make_system_path_relative_to_its_root ()
+{
+  path=$1
+  # abort if file doesn't exist
+  if test -e $path ; then : ;else
+    return 1
+  fi
+
+  # canonicalize
+  if path=`readlink -f $path` ; then : ; else
+    return 1
+  fi
+
+  # if not a directory, climb up to the directory containing it
+  if test -d $path ; then
+    dir=$path
+  else
+    dir=`echo $path | sed -e "s,/[^/]*$,,g"`
+  fi
+
+  num=`stat -c %d $dir`
+
+  # this loop sets $dir to the root directory of the filesystem we're inspecting
+  while : ; do
+    parent=`readlink -f $dir/..`
+    if [ "x`stat -c %d $parent`" = "x$num" ] ; then : ; else
+      # $parent is another filesystem; we found it.
+      break
+    fi
+    if [ "x$dir" = "x/" ] ; then
+      # / is our root.
+      break
+    fi
+    dir=$parent
+  done
+
+  # This function never prints trailing slashes (so that its output can be
+  # appended a slash unconditionally).  Each slash in $dir is considered a
+  # preceding slash, and therefore the root directory is an empty string.
+  if [ "$dir" = "/" ] ; then
+    dir=""
+  fi
+
+  echo $path | sed -e "s,^$dir,,g"
+}
+
+# The grub installation directory
+grub_dir=$(find_grub_dir)
+
+# Full path to the device.map
+device_map=$grub_dir/device.map
+
+find_device ()
+{
+	if ! test -e ${device_map} ; then
+		echo quit | grub --batch --no-floppy --device-map=${device_map} > /dev/null
+	fi
+	grub-probe --device-map=${device_map} -t device $1 2> /dev/null
+}
+
+# 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] | /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.
+convert () {
+	if ! test -e ${device_map} ; then
+		echo quit | grub --batch --no-floppy --device-map=${device_map} > /dev/null
+	fi
+	GRUB_LEGACY_0_BASED_PARTITIONS=1 grub-probe --device-map=${device_map} -t drive -d "$1" 2> /dev/null || { 
+		echo "warning: grub-probe can't find drive for $1." >&2
+		tmp_map=$(mktemp -t device.map.XXXXXXXX)
+		grub-mkdevicemap --device-map=${tmp_map} --no-floppy >/dev/null 2>&1 || true
+		GRUB_LEGACY_0_BASED_PARTITIONS=1 grub-probe --device-map=${tmp_map} -t drive -d "$1" || {
+			rm -f ${tmp_map}
+			return 1
+		}
+		echo "Please check ${device_map}, you might have to regenerate it with grub-mkdevicemap." >&2
+		rm -f ${tmp_map}
+	}
+}
+
+# Usage: convert_default os_device
+# Convert an OS device to the corresponding GRUB drive.
+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
+
+	convert $tmp_dev
+}
+
+## Configuration Options
+
+# Full path to the menu.lst
+menu_file_basename=menu.lst
+menu_file=$grub_dir/$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_device "/")
+
+# loop-AES arranges things so that /dev/loop/X can be our root device, but
+# the initrds that Linux uses don't like that.
+case ${root_device} in
+  /dev/loop/*|/dev/loop[0-9])
+    root_device=`losetup ${root_device} | sed -e "s/^[^(]*(\([^)]\+\)).*/\1/"`
+  ;;
+esac
+
+# the device for the /boot filesystem
+boot_device=$(find_device "/boot")
+
+# where grub looks for the kernels at boot time
+kernel_dir=`make_system_path_relative_to_its_root /boot`
+
+# the "-t abstraction" check is a workaround untill #484297 is fixed
+if abstraction=`grub-probe -t abstraction --device ${root_device} 2> /dev/null` && [ "$abstraction" = "" ] && \
+    root_uuid=`grub-probe --device-map=${device_map} --device ${root_device} --target=fs_uuid 2> /dev/null` && \
+    test -e "/dev/disk/by-uuid/${root_uuid}" ; then
+  linux_root_device=UUID=${root_uuid}
+else
+  linux_root_device=${root_device}
+fi
+
+# Default kernel options, overidden by the kopt statement in the menufile.
+kopt="root=$linux_root_device ro"
+
+# Title
+title="Debian GNU/`uname -s | sed -e s,GNU/,,g`"
+
+# should update-grub remember the default entry
+updatedefaultentry="false"
+
+# Drive(in GRUB terms) where the kernel is located. Overridden by the
+# groot statement in menufile.
+grub_root_device=$(convert_default "$boot_device")
+
+# 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=""
+
+# 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="(single-user 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
+
+# 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" <<EOF
+# $menu_file_basename - See: grub(8), info grub, update-grub(8)
+#            grub-install(8), grub-floppy(8),
+#            grub-md5-crypt, /usr/share/doc/grub
+#            and /usr/share/doc/grub-legacy-doc/.
+
+## default num
+# Set the default entry to the entry number NUM. Numbering starts from 0, and
+# the entry number 0 is the default if the command is not used.
+#
+# You can specify 'saved' instead of a number. In this case, the default entry
+# is the entry saved with the command 'savedefault'.
+# WARNING: If you are using dmraid do not change this entry to 'saved' or your
+# array will desync and will not let you boot your system.
+default		0
+
+## timeout sec
+# Set a timeout, in SEC seconds, before automatically booting the default entry
+# (normally the first entry defined).
+timeout		5
+
+# Pretty colours
+color cyan/blue white/blue
+
+## password ['--md5'] passwd
+# If used in the first section of a menu file, disable all interactive editing
+# control (menu entry editor and command-line)  and entries protected by the
+# command 'lock'
+# e.g. password topsecret
+#      password --md5 \$1\$gLhU0/\$aW78kHK1QfV3P2b2znUoe/
+# password topsecret
+
+#
+# examples
+#
+# title		Windows 95/98/NT/2000
+# root		(hd0,0)
+# makeactive
+# chainloader	+1
+#
+# title		Linux
+# root		(hd0,1)
+# kernel	/vmlinuz root=/dev/hda2 ro
+#
+
+#
+# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST
+
+EOF
+## End Configuration Options
+
+echo -n "Searching for default file ... " >&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
+  if [ -f /usr/lib/grub-legacy/grub-set-default ] ; then
+    /usr/lib/grub-legacy/grub-set-default $1
+  else
+    grub-set-default $1
+  fi
+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 ##"
+
+# 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 A<B
+#          0 if A==B
+#          1 if A>B
+# 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()
+{  
+	local a=`echo $1 | sed -e "s,.*/vmlinu[zx]-,,g;s/[._-]\(pre\|rc\|test\|git\)/~\1/g"`
+	local b=`echo $2 | sed -e "s,.*/vmlinu[zx]-,,g;s/[._-]\(pre\|rc\|test\|git\)/~\1/g"`
+	if [ "$a" = "$b" ] ; then
+		echo 0
+	elif dpkg --compare-versions "$a" gt "$b" ; then
+		echo 1
+	else
+		echo -1
+	fi
+}
+
+# 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
+			version=$(echo $version | sed 's/_\?[^_]*$//')
+		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 ", kernel $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 test x"$savedefault" = x"true" ; then
+		echo "savedefault" >> $buffer
+	fi
+	echo >> $buffer
+}
+
+
+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
+	menu="$menu_file"
+	echo >&2
+	echo >&2
+	if [ "-y" = "$command_line_arguments" ] ; then
+		echo "Warning: ignoring deprecated -y option." >&2
+	fi
+	echo >&2
+	echo "Generating $menu_file" >&2
+	cat "$newtemplate" > $menu_file
+	rm -f $newtemplate
+	unset newtemplate
+fi
+
+# Extract the kernel options to use
+kopt=$(GetMenuOpt "kopt" "$kopt")
+
+# Set the kernel 2.6 option only for fresh install
+test -z "$(GetMenuOpt "kopt" "")" && kopt_2_6="root=$linux_root_device ro"
+
+# Extract options for specific kernels
+opts="$(ExtractMenuOpts "\(kopt_[[:alnum:]_]\+\)")"
+test -z "$opts" || eval "$opts"
+CustomKopts=$(GetMenuOpts "\(kopt_[[:alnum:]_]\+\)")
+
+# 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
+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")
+
+# 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 "$CustomKopts" ] ; then
+    echo "$CustomKopts" >> $buffer
+elif [ -n "$kopt_2_6" ] && [ "$kopt" != "$kopt_2_6" ]; then
+    echo "# kopt_2_6=$kopt_2_6" >> $buffer
+fi
+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=(single-user) 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`
+grub_dir_rel=`make_system_path_relative_to_its_root $grub_dir`
+splashimage_path="splashimage=${grub_root_device}/${grub_dir_rel##${kernel_dir}}/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
+
+xen0Kernels=""
+# First kernels with xen0 support.
+for ver in `grep -l CONFIG_XEN=y /boot/config* | sed -e s%/boot/config-%%`; do
+  if ! grep -q CONFIG_XEN_PRIVILEGED_GUEST=y /boot/config-$ver ; then
+      continue
+  fi
+  # ver is a kernel version
+  kern="/boot/vmlinuz-$ver"
+  if [ -r $kern ] ; then
+       newerKernels=""
+       for i in $xen0Kernels ; 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
+        xen0Kernels="$newerKernels"
+    fi
+done
+
+sortedKernels=""
+for kern in $(/bin/ls -1vr /boot | grep -v "dpkg-*" | grep "^vmlinuz-") ; do
+        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
+
+hypervisors=""
+for hyp in /boot/xen-*.gz; do
+    if [ ! -h "$hyp" ] && [ -f "$hyp" ]; then
+	hypervisors="$hypervisors `basename "$hyp"`"
+    fi
+done
+
+#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
+
+## heres where we start writing out the kernel entries
+counter=0
+
+grub2name="${kernel_dir}/grub/core.img"
+if [ "$LET_US_TRY_GRUB_2" = "true" ] \
+  && test -f /boot/grub/core.img ; then
+	echo "Found GRUB 2: $grub2name" >&2
+	cat >> $buffer << EOF
+title		Chainload into GRUB 2
+root		$grub_root_device
+kernel		$grub2name
+
+title		`echo ───────────────────────────────────────────────────────────────────── | iconv -f utf-8 -t cp437`
+root
+		
+title		When you have verified GRUB 2 works, you can use this command to
+root
+
+title		complete the upgrade:  upgrade-from-grub-legacy
+root
+
+title		`echo ───────────────────────────────────────────────────────────────────── | iconv -f utf-8 -t cp437`
+root
+
+EOF
+fi
+    
+
+# Xen entries first.
+for kern in $xen0Kernels ; 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" \
+				"$savedefault" "$do_lockold"
+
+		done
+	fi
+done
+
+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
+
+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
+	if [ -f /usr/lib/grub-legacy/grub-set-default ] ; then
+	    /usr/lib/grub-legacy/grub-set-default $1
+	else
+	    grub-set-default $1
+	fi
+    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 [ "$LET_US_TRY_GRUB_2" = "true" ] && test -f /boot/grub/core.img ; then
+	set_default_value "0"
+elif 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
--- grub2-1.97~beta3.orig/debian/legacy/upgrade-from-grub-legacy
+++ grub2-1.97~beta3/debian/legacy/upgrade-from-grub-legacy
@@ -0,0 +1,38 @@
+#!/bin/bash -e
+
+if test ! -f /boot/grub/core.img ; then
+  echo -e "\ncore.img doestn't exist, trying to create it.\n" >&2
+  grub-install --no-floppy --grub-setup=/bin/true "(hd0)" > /dev/null
+fi
+
+echo RESET grub-pc/install_devices | debconf-communicate
+
+# Pretend we're upgrading grub-pc.  This will make our postinst DTRT.
+/var/lib/dpkg/info/grub-pc.postinst configure dummy-version
+
+if test ! -f /boot/grub/grub.cfg ; then
+  echo -e "\nCalling update-grub to generate grub.cfg\n" >&2
+  update-grub || cat << EOF
+Failed to generate /boot/grub/grub.cfg but GRUB2 has been already installed to
+your MBR.
+THIS MEANS YOU HAVE CURRENTLY AN UNBOOTABLE SYSTEM.
+Either fix the error from update-grub and run $0 again
+or install old grub again and run grub-install from it to have again
+grub-legacy in your MBR.
+EOF
+fi
+
+# These never contain any valuable information, and they aren't useful for
+# boot anymore, since we just overwrote MBR/PBR.
+rm -f /boot/grub/{{xfs,reiserfs,e2fs,fat,jfs,minix}_stage1_5,stage{1,2}}
+
+cat << EOF
+
+GRUB Legacy has been removed, but its configuration files have been preserved,
+since this script cannot determine if they contain valuable information.  If
+you would like to remove the configuration files as well, use the following
+command:
+
+  rm -f /boot/grub/menu.lst*
+
+EOF
--- grub2-1.97~beta3.orig/debian/legacy/grub-set-default
+++ grub2-1.97~beta3/debian/legacy/grub-set-default
@@ -0,0 +1,141 @@
+#! /bin/sh
+
+# Set a default boot entry for GRUB
+#   Copyright (C) 2004 Free Software Foundation, Inc.
+#
+# 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.
+
+# Initialize some variables.
+PACKAGE=grub
+VERSION=0.97
+
+rootdir=
+entry=
+
+# Usage: usage
+# Print the usage.
+usage () {
+    cat <<EOF
+Usage: grub-set-default [OPTION] entry
+Set the default boot entry for GRUB.
+
+  -h, --help              print this message and exit
+  -v, --version           print the version information and exit
+  --root-directory=DIR    Use the directory DIR instead of the root directory
+
+ENTRY is a number or the special keyword \`default\'.
+
+Report bugs to <bug-grub@gnu.org>.
+EOF
+}
+
+# Check the arguments.
+for option in "$@"; do
+    case "$option" in
+    -h | --help)
+	usage
+	exit 0 ;;
+    -v | --version)
+	echo "grub-set-default (GNU GRUB ${VERSION})"
+	exit 0 ;;
+    --root-directory=*)
+	rootdir=`echo "$option" | sed 's/--root-directory=//'` ;;
+    -*)
+	echo "Unrecognized option \`$option'" 1>&2
+	usage
+	exit 1
+	;;
+    *)
+	if test "x$entry" != x; then
+	    echo "More than one entries?" 1>&2
+	    usage
+	    exit 1
+	fi
+	# We don't care about what the user specified actually.
+	entry="${option}" ;;
+    esac
+done
+
+if test "x$entry" = x; then
+    echo "entry not specified." 1>&2
+    usage
+    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.
+# 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
+    grubdir=${rootdir}/grub
+    if test -d ${grubdir}; then
+        :
+    else
+        echo "No GRUB directory found under ${rootdir}/" 1>&2
+        exit 1
+    fi
+  fi
+else
+  grubdir=$(find_grub_dir)
+fi
+
+file=${grubdir}/default
+if test -f ${file}; then
+    chmod 0600 ${file}
+    rm -f ${file}
+fi
+cat <<EOF > $file
+$entry
+#
+#
+#
+#
+#
+#
+#
+#
+#
+#
+# WARNING: If you want to edit this file directly, do not remove any line
+# from this file, including this warning. Using \`grub-set-default\' is
+# strongly recommended.
+EOF
+
+# Bye.
+exit 0
