* grub/asmstub.c (get_diskinfo): Toggle "kern.geom.debugflags" sysctl
before opening a device for writing.
* util/grub-install.in: Devices don't have this "r" prefix anymore.
* stage2/builtins.c (setup_func): Specify the size of DEVICE to
grub_strncat instead of a strange number 256. Reported by Vitaly
Fertman <vitaly@namesys.com>.
* stage2/fsys_xfs.c (next_dentry): Use arrays of arrays instead of
arrays of pointers for USUAL, to avoid read-only strings. Reported
by Sven Wegener <swegener@gentoo.org>.
* lib/device.c (get_drive_geometry): Use ST.ST_SIZE instead of
ST.ST_BLOCKS to get the total number of sectors, because st_blocks
is not the same if it is a sparse file.
* stage2/fsys_fat.c (fat_mount): Ignore the 3rd bit of a media
descriptor, because some BIOSes overwrite this value, according
to the storage mode (e.g. USB Floppy or USB HDD).
* stage2/builtins.c (install_func): If DEST_DRIVE is a hard
disk, enable the workaround in Stage 1 by replacing the jmp
with double nop's.
* stage1/stage1.h (STAGE1_BOOT_DRIVE_CHECK): New macro.
(STAGE1_BOOT_DRIVE_MASK): Removed.
* stage1/stage1.S (boot_drive_check): New label. This implements
a different workaround for buggy BIOSes which don't pass boot
drive correctly. This is effective for BIOSes which pass a value
without the seventh bit (0x80).
(boot_drive_mask): Removed.
* grub/asmstub.c (console_current_color): Make it global as
declared.
(grub_stage2): Tweak the declaration and the definition of the
nested function doit.
* docs/internals.texi (Internals): Changed to an appendix.
* docs/grub.texi (@setchapternewpage): Changed to odd from off.
(@contents): Moved to the beginning.
(Future): Changed to an appendix.
This is a big change on saving a default entry. This change
makes it possible to set up a quite robust system using GRUB.
Now we do not use the second sector of Stage 2 to store an
entry number but use the file /boot/grub/default. This file
must be generated by grub-set-default, although this file is
plain-text.
* util/grub-set-default.in: New file.
* util/grub-install.in (grub_set_default): New variable.
Use /grub instead of /boot/grub on OpenBSD as well as NetBSD.
Run grub-set-default to make a default file.
* util/Makefile.am (sbin_SCRIPTS): Added grub-set-default.
* stage2/stage2.c (run_menu): Change the fallback handling to
support multiple fallback entries.
(cmain): Likewise. Also, get a saved entry from a default file
if possible, before reading a config file.
* stage2/shared.h (DEFAULT_FILE_BUF): New macro.
(DEFAULT_FILE_BUFLEN): Likewise.
(CMDLINE_BUF): Set to DEFAULT_FILE_BUF + DEFAULT_FILE_BUFLEN.
(MENU_BUFLEN): Set to 0x8000 + PASSWORD_BUF - MENU_BUF.
(fallback_entry): Removed.
(fallback_entries): Declared.
(fallback_entryno): Likewise.
(MAX_FALLBACK_ENTRIES): New macro.
* stage2/cmdline.c (run_script): Use FALLBACK_ENTRYNO instead of
FALLBACK_ENTRY.
* stage2/builtins.c (fallback_entry): Removed.
(fallback_entryno): New variable.
(fallback_entries): Likewise.
(init_config): Initialize FALLBACK_ENTRYNO and FALLBACK_ENTRIES.
(fallback_func): Rewritten completely.
(savedefault_func): Likewise.
* docs/grub.texi (grub-set-default): New direntry.
(Installation): Describe grub-set-default for manual
installations.
(Making your system robust): New section.
(Booting once-only): New subsection.
(Booting fallback systems): Likewise.
(fallback): Describe multiple fallback entries.
(savedefault): Describe an optional argument.
(Invoking grub-set-default): New chapter.
(Future): Replaced with a description about GRUB 2.
* configure.ac (AC_CONFIG_FILES): Added util/grub-set-default.
* stage2/char_io.c (grub_isspace): Use a switch sentense instead
of an if sentense, because that reduces the size.
* lib/device.c (read_device_map): Change the max number of DRIVE
to 127 from 8. This was too strict.
* stage2/asm.S (stop_floppy): Call pusha and popa outside the
block of real mode code. Reported by Guillem Jover
<guillem@debian.org>.
* lib/device.c: Mangle __FreeBSD_* macro usage to support
kFreeBSD-based non-FreeBSD systems (i.e. GNU/kFreeBSD).
Implement runtime detection of version of kFreeBSD. Now if
we build against kFreeBSD 5.x headers the GRUB shell will work on
both 4.x and 5.x.
Replace `u_int_t' types with portable `unsigned int' and old
reference to `geometry' structure to new `geom' one.
* docs/menu.lst: Split GNU/kFreeBSD and GNU/kNetBSD as separate
options than FreeBSD and NetBSD, respectively. There are minor
differences now (different paths).
* docs/grub.texi (Making a GRUB bootable CD-ROM): minor edits,
including a few compatibility notes and a change to
-boot-load-size 4 for the mkisofs command.
* Makefile.am (AUTOMAKE_OPTIONS): Add "gnu".
* configure.ac: Update to work with automake 1.8, quote all
AC_DEFUN's correctly and provide descriptions for AC_DEFINE's.
* acinclude.m4: Likewise.
* acconfig.h: Removed.
* stage1/Makefile.am (.exec): Use suffix rules instead of pattern
rules.
* stage2/Makefile.am (.exec): Likewise.