* netboot/main.c (ifconfig): If GW is specified, clear out the
ARP entry for the gateway. If SVR is specified, clear out the
ARP entry for the server. Reported by Uwe Dannowski
<ud3@ira.uka.de>.
* util/grub-md5-crypt.in: Prompt to retype a password, and check
if the passwords matches. Suggested by Matt Perry
<matt@primefactor.com>.
Also, don't use Perl any longer, because *BSD's sh and GNU
support ``read -r'', and GRUB doesn't support any other
operating system anyway.
* stage2/builtins.c (boot_func): Load the boot partition
information, only if the address of the boot partition entry is
set appropriately.
(real_root_func): If ATTEMPT_MOUNT is false, call open_partition
and if successful, call set_bootdev, to set the offset of the
boot partition and the address of the boot paetition entry.
IF ATTEMPT_MOUNT is false, don't set BOOTDEV. The BSD evil hack
is useless with the command "rootnoverify" anyway.
* stage2/disk_io.c (boot_part_addr): Initialized with zero
explicitly, to emphasize that it is invalid.
Define the behavior of the boot loader when the load end address
and the bss end address are zero in the Multiboot Specification,
and add the support into GRUB. I've modified a patch from Yuri
Zaporogets <yuriz@ukr.net>.
* stage2/boot.c (load_image): In the case of Multiboot a.out
kludge, set the load end address to the load address plus the
size of the OS image file, if it is zero. Similarly, set the bss
end address to the load end address, if it is zero.
* util/mbchk.c (check_multiboot): Don't check if the load
address is greater than or equal to the load end address, if the
load end address is zero. Don't check if the load end address is
greater than the bss end address, if the bss end address is
zero. And, don't check if the load end address is less than or
equal to the entry address, if the load end address is zero.
* docs/multiboot.texi (The address fields of Multiboot header):
Added descriptions about the behavior of the boot loader when
LOAD_END_ADDR is zero and BSS_END_ADDR is zero.
* stage2/builtins.c (boot_func): If DEBUG is true, print
BOOT_DRIVE and BOOT_PART_OFFSET.
Don't set ERRNUM after rawread failed, because rawread should
set ERRNUM itself.
* lib/device.c (read_device_map): Show an error message and exit
abnormally, if MAP[DRIVE] has already been filled.
* util/grub-install.in: If there is any dulicated entry, print
an error message and exit abnormally.
* netboot/etherboot.h (ETH_MAX_MTU): Because some DHCP/BOOTP
servers don't treat the maximum length the same as Etherboot,
subtract the size of an IP header and that of an UDP header.
From Jean-Jacques Michel <jjmichel@linbox.com>:
* stage2/boot.c (load_image): For Linux, check if DATA_LEN is
greater than MULTIBOOT_SEARCH. If that's true, read the rest
after copying data already read in BUFFER.
* stage2/boot.c (load_image): For Linux, don't check if the
length of protected mode code is greater than or equal to the
expected length minus 16. Instead, just check if no error
occurred. That was problematic, because memdisk has no protected
mode code. Also, I don't see what the magic number 16 was for.
* stage2/builtins.c [GRUB_UTIL] (dump_func): New function.
[GRUB_UTIL] (builtin_dump): New variable.
(builtin_table) [GRUB_UTIL]: Added a pointer to BUILTIN_DUMP.
* util/grub-install.in: Make sure that GRUB reads the same
images as the host operating system by comparing the result of
running the command "dump" with the contents of the OS file.
* docs/grub.texi (General commands): Added ``pager'' into the
menu.
(pager): New subsection.
(terminal): Added a description about the option
``--lines=LINES''.
* configure.in (AC_INIT_AUTOMAKE): Set the version number to
0.92.
* stage2/boot.c (linux_mem_size): New variable.
(load_image): Check a mem= option and set LINUX_MEM_SIZE to the
specified memory size, if any. Otherwise, to zero. When an
overflow is detected, use LINUX_INITRD_MAX_ADDRESS instead.
(load_initrd): If LINUX_MEM_SIZE is non-zero, use it instead of
the actual memory size.
* stage2/char_io.c (safe_parse_maxint): Use ERR_NUMBER_OVERFLOW
instead of ERR_NUMBER_PARSING, when an overflow occurs.
* stage2/common.c [!STAGE1_5] (err_list): Added
ERR_NUMBER_OVERFLOW.
* stage2/shared.h (ERR_NUMBER_OVERFLOW): New constant.
* stage2/stage2.c (run_menu): Call cls outside the loop to run
scripts.
* stage2/cmdline.c (run_script): Prompt a user's intervention,
only when FALLBACK_ENTRY is negative.
device for given file or directory. Resolve symlinks to fix
problem on Linux with devfs and old device names in /etc/fstab.
Use find_device() for root_device, bootdir_device and
grubdir_device.
* grub/main.c (OPT_NO_PAGER): New macro.
(longopts): Added an entry for "--no-pager".
(usage): Added a description about "--no-pager".
(main): In case of OPT_NO_PAGER, set USE_PAGER to zero. The same
thing is done with OPT_BATCH, because the pager is just harmful
in batch mode.
An internal pager is implemented.
* stage2/builtins.c (pager_func): New function.
(builtin_pager): New variable.
(terminal_func): New option, "--lines=LINES" is added. If this
option is specified, set MAX_LINES to the value. Otherwise, set
MAX_LINES to 24.
(vbeprobe_func): Remove the pager code specific to this
function.
(builtin_table): Added a pointer to BUILTIN_PAGER.
* stage2/char_io.c (max_lines) [!STAGE1_5]: New variable.
(count_lines) [!STAGE1_5]: Likewise.
(use_pager) [!STAGE1_5]: Likewise.
(grub_putchar) [!STAGE1_5]: if C is a newline and COUNT_LINES is
not -1, count up the number of lines. If it exceeds the maximum
number of lines minus 2, show a message and wait for input of
return key. "minus 2" is to reserve space for the message
printed by this internal pager.
* stage2/cmdline.c (enter_cmdline): If USE_PAGER is true, set
COUNT_LINES to zero, before running a command, and reset
COUNT_LINES to -1 after that.
* stage2/shared.h (max_lines) [!STAGE1_5]: Declared.
(count_lines) [!STAGE1_5]: Likewise.
(use_pager) [!STAGE1_5]: Likewise.
* stage2/fsys_jfs.c (jfs_read) [STAGE1_5]: Set and reset
DISK_READ_FUNC even in Stage 1.5.
* stage2/fsys_xfs.c (xfs_read) [STAGE1_5]: Likewise.
* stage2/stage1_5.c (saved_sector): Initialized with -1.
(cmain): Check if SAVED_SECTOR was set appropriately after
reading the second sector of Stage 2. If SAVED_SECTOR is not
set (i.e. it is equal to -1), print an error and stop.