* include/grub/i386/pc/util/biosdisk.h: Moved to ...
* include/grub/util/biosdisk.h: ... here.
* util/i386/pc/biosdisk.c: Moved to ...
* util/biosdisk.c: ... here.
* util/i386/pc/getroot.c: Moved to ...
* util/getroot.c: ... here.
* util/i386/pc/grub-mkdevicemap.c: Moved to ...
* util/grub-mkdevicemap.c: ... here.
* util/i386/pc/grub-probe.c: Moved to ...
* util/grub-probe.c: ... here.
* util/update-grub.in: Fix a few assumptions about the devices holding
/, /boot and /boot/grub being the same.
* util/grub.d/00_header.in: Likewise.
* util/grub.d/10_hurd.in: Likewise.
* util/grub.d/10_linux.in: Likewise.
* util/grub.d/10_linux.in: Implement Linux image sorting with arbitrary
patterns. Use that to define the `.old' suffix as older than `'.
* util/grub.d/00_header.in: Set default gfxmode to `800x600x16'.
* util/update-grub.in: Add a reference to ${sysconfdir}/default/grub in
the grub.cfg header message.
* util/update-grub.in: Create device.map if it doesn't already exist,
before attempting to run grub-probe.
Check for grub-probe and grub-mkdevicemap with the same code
grub-install is using.
Remove test mode.
* util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
determine partition map module.
* util/i386/pc/grub-install.in: Use this feature to decide which
partition module to load, instead of hardcoding pc and gpt.
* conf/i386-pc.rmk (grub_setup_SOURCES): Add partmap/gpt.c.
(grub_probe_SOURCES): Likewise.
* util/i386/pc/biosdisk.c (grub_util_biosdisk_get_grub_dev): Detect
GPT and initialize dos_part and bsd_part accordingly.
* util/i386/pc/grub-setup.c (setup): Ditto for install_dos_part and
install_bsd_part.
(main): Activate gpt module for use during partition identification,
and deactivate it afterwards.
* util/i386/pc/grub-install.in: Add gpt module to core.img.
* util/i386/pc/grub-probe.c (main): Activate gpt module for use during
partition identification, and deactivate it afterwards.
* util/grub-emu.c: Move initialization functions
grub_util_biosdisk_init() and grub_init_all() before
grub_util_biosdisk_get_grub_dev(), which relies on them.
./configure --program-transform-name="s/grub/grub2/"
And the installed files (in this case for i386-pc) will be:
/usr/lib/grub2/i386-pc/*
/usr/local/sbin/grub2-emu
/usr/local/sbin/grub2-install
...etc
Also grub2-install place boot files in "/boot/grub2"
This allows easy integration into distributions as it allows grub2 to
sit side by side with a grub legacy install without.
* fs/ext2.c (EXT2_GOOD_OLD_REVISION): New macro.
(EXT2_GOOD_OLD_INODE_SIZE): Likewise.
(EXT2_REVISION): Likewise.
(EXT2_INODE_SIZE): Likewise.
(struct grub_ext2_block_group): Added a missing member
"used_dirs".
(grub_ext2_read_inode): Divide by the inode size in a superblock
instead of 128 to obtain INODES_PER_BLOCK.
Use the macro EXT2_INODE_SIZE instead of directly using
SBLOCK->INODE_SIZE.
* fs/ext2.c (grub_ext2_read_inode): Use the inode size in a
superblock instead of the structure size to compute an
offset. This fixes the problem that GRUB could not read a
filesystem when inode size is different from 128-byte.
* conf/powerpc-ieee1275.rmk (kernel_elf_LDFLAGS): Link at 64KB.
* kern/powerpc/ieee1275/init.c (_end): Add declaration.
(_start): Likewise.
(grub_arch_modules_addr): Return address after `_end'.
* util/powerpc/ieee1275/grub-mkimage.c: Include grub/misc.h.
(load_modules): Use new parameter as `p_paddr' and `p_vaddr'.
(add_segments): Calculate `_end' from phdr size and location.
(ALIGN_UP): Moved to ...
* include/grub/misc.h: here.
* include/grub/powerpc/ieee1275/kernel.h (GRUB_IEEE1275_MOD_ALIGN):
New macro.
(GRUB_IEEE1275_MODULE_BASE): Removed.
* Makefile.in (enable_grub_emu): New variable.
* configure.ac (--enable-grub-emu): New option.
Do the checks for (n)curses only if `--enable-grub-emu' is requested.
* conf/i386-efi.rmk (sbin_UTILITIES): Add `grub-emu' only if requested.
* conf/i386-pc.rmk: Likewise.
* conf/powerpc-ieee1275.rmk: Likewise.
* conf/sparc64-ieee1275.rmk (bin_UTILITIES): Likewise.
* include/grub/err.h (grub_err_t): Add `GRUB_ERR_MENU'.
* kern/env.c (grub_env_unset): Don't free the member `value' when
the type is GRUB_ENV_VAR_DATA, in this case it's a user defined
pointer.
* normal/main.c (current_menu): Removed.
(free_menu): Unset the `menu' environment variable.
(grub_normal_menu_addentry): Make use of the environment variable
`menu', instead of using the global `current_menu'. Allocate
memory for the sourcecode of this entry.
(read_config_file): New argument `nested', changed all callers.
Only in the case of a new context, initialize a new menu. Set the
`menu' environment variable.
(grub_normal_execute): Don't set and unset the environment
variable `menu' here anymore. Only free the menu when leaving the
context.
* util/i386/pc/biosdisk.c (linux_find_partition): Fixed a memory
leak.
* kern/disk.c (grub_disk_read): When there is a read error, always
try to read only the necessary data.
* conf/i386-pc.rmk (grub_probe_SOURCES): Add disk/lvm.c and
disk/raid.c.
* include/grub/disk.h [GRUB_UTIL] (grub_raid_init): New
prototype.
[GRUB_UTIL] (grub_raid_fini): Likewise.
[GRUB_UTIL] (grub_lvm_init): Likewise.
[GRUB_UTIL] (grub_lvm_fini): Likewise.
* util/i386/pc/grub-probe.c (probe): Check whether DEVICE_NAME is
RAID device and copy DEVICE_NAME to DRIVE_NAME in that case.
(main): Call grub_raid_init(), grub_lvm_init(), grub_lvm_fini()
and grub_raid_fini().
* kern/elf.c (grub_elf_file): Call grub_file_seek. Call
grub_error_push and grub_error_pop in the error-handling path.
(grub_elf32_load_segment): Only call grub_file_read with non-zero
length.
2006-10-18 Jeroen Dekkers <jeroen@dekkers.cx>
* disk/lvm.c: Rename VGS to VG_LIST.
(grub_lvm_iterate): Change VGS->LV to VG-LV.
(grub_lvm_open): Likewise.
Thanks to Michael Guntsche for finding this bug.