Commit graph

1593 commits

Author SHA1 Message Date
proski
3aefa85781 2008-06-30 Pavel Roskin <proski@gnu.org>
* util/i386/pc/grub-setup.c (setup): Use core_path_dev, not
	core_path to calculate the blocklist.
	Patch from Javier Martín <lordhabbit@gmail.com>
2008-06-30 20:44:58 +00:00
robertmh
5444088da6 2008-06-29 Robert Millan <rmh@aybabtu.com>
* fs/xfs.c (GRUB_XFS_FSB_TO_BLOCK): New macro.  Maps filesystem
        block to disk block.
        (grub_xfs_read_block): Use GRUB_XFS_FSB_TO_BLOCK() on result.
        Patch from Niels B\303\266hm <bitbucket@arcor.de>
2008-06-29 21:33:38 +00:00
robertmh
674835c830 2008-06-29 Robert Millan <rmh@aybabtu.com>
* util/update-grub_lib.in (font_path): Search for fonts in
        /boot/grub first, which is more likely to be readable (we aren't
        deciding where fonts live, just looking for them).
2008-06-29 14:29:48 +00:00
proski
6c2d8df669 2008-06-26 Pavel Roskin <proski@gnu.org>
* util/biosdisk.c (read_device_map): Don't leave dead map
	entries for devices failing stat() check.
2008-06-26 16:15:52 +00:00
proski
f527dbc80b 2008-06-26 Pavel Roskin <proski@gnu.org>
* util/i386/pc/grub-setup.c (setup): Don't reuse core_path, use
	core_path_dev for the core.img path on the target device.
2008-06-26 15:29:32 +00:00
proski
f19dbdb73f Remove trailing spaces and tabs, replace spaces with tabs when needed 2008-06-26 15:02:58 +00:00
robertmh
aebe3d13bb 2008-06-26 Robert Millan <rmh@aybabtu.com>
* disk/fs_uuid.c: New file.
        * conf/common.rmk (pkglib_MODULES): Add `fs_uuid.mod'.
        (fs_uuid_mod_SOURCES, fs_uuid_mod_CFLAGS)
        (fs_uuid_mod_LDFLAGS): New variables.
        * include/grub/disk.h (grub_disk_dev_id): Add
        `GRUB_DISK_DEVICE_UUID_ID'.
        * kern/disk.c (grub_disk_dev_iterate): Allow disk devices not to
        implement iterate().
2008-06-26 14:26:07 +00:00
robertmh
37aaf354c9 2008-06-26 Robert Millan <rmh@aybabtu.com>
* util/grub.d/10_linux.in: Avoid passing UUIDs to Linux when either
        "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" does not exist, or when a
        Linux image includes no initrd.
2008-06-26 07:03:26 +00:00
robertmh
25ff262a6c 2008-06-21 Javier Mart\303\255n <lordhabbit@gmail.com>
* util/i386/pc/grub-setup.c (setup): Remove literal "core.img" in a
        call to resolve the core image location that effectively appended the
        name twice.
2008-06-21 14:21:03 +00:00
robertmh
76a2bd44b3 2008-06-21 Robert Millan <rmh@aybabtu.com>
* util/grub.d/00_header.in: Move last prepare_grub_to_access_device()
        call from here ...

        * util/grub.d/10_hurd.in: ... to here ...
        * util/grub.d/10_linux.in: ... and here.
2008-06-21 13:51:19 +00:00
robertmh
650e1c79b9 2008-06-19 Robert Millan <rmh@aybabtu.com>
* kern/main.c (grub_main): Export `prefix' variable inmediately
        after it has been set by grub_machine_set_prefix().
2008-06-19 20:08:57 +00:00
robertmh
6ce63911ab 2008-06-19 Robert Millan <rmh@aybabtu.com>
* commands/search.c (search_label, search_fs_uuid, search_file): Print
        search result when not saving to variable, not the other way around.
        When saving to variable, abort iteration as soon as a match is found.
2008-06-19 13:09:16 +00:00
robertmh
73940cec58 2008-06-19 Robert Millan <rmh@aybabtu.com>
* util/update-grub_lib.in (prepare_grub_to_access_device): Remove
        check for partition that provides /boot/grub.  Its logic is flawed,
        as it prevents prepare_grub_to_access_device() from being called
        multiple times.
2008-06-19 12:31:42 +00:00
robertmh
3c62a39d26 2008-06-19 Robert Millan <rmh@aybabtu.com>
* util/update-grub_lib.in (prepare_grub_to_access_device): Issue
        "insmod" command directly when abstraction modules are needed,
        instead of reliing on GRUB_PRELOAD_MODULES (which had no effect
        since it had already been processed).
2008-06-19 12:29:44 +00:00
proski
47395a42d7 2008-06-19 Pavel Roskin <proski@gnu.org>
* conf/i386-efi.rmk: Recompile grub-mkimage.c if Makefile has
	changed.  This is needed in case GRUB_LIBDIR changes.
	* conf/i386-ieee1275.rmk: Likewise.
	* conf/i386-linuxbios.rmk: Likewise.
	* conf/i386-pc.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.
2008-06-19 05:14:16 +00:00
proski
a145ac2d9a 2008-06-18 Pavel Roskin <proski@gnu.org>
* conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): Rename
	kernel_elf_symlist.c to symlist.c for consistency with other
	architectures.  Update all users.
	* conf/sparc64-ieee1275.rmk (kernel_elf_SOURCES): Likewise.
2008-06-19 01:04:59 +00:00
robertmh
7847c51e22 2008-06-18 Robert Millan <rmh@aybabtu.com>
* util/i386/pc/grub-install.in: If the drive is LVM or RAID, prepend
        it in prefix.

        * util/i386/pc/grub-setup.c (main): Don't handle prefix at all.  Set
        `must_embed' to 1 when root_dev is a RAID device.  When dest_dev is
        a RAID device, run setup() for all members independently on whether
        LVM abstraction is being used.
        (setup): Don't handle prefix at all; let grub-mkimage take care of it.
        If grub-mkimage has set `*install_dos_part == -2', don't override this
        value.
        Perform *install_dos_part adjustments independently on whether
        we're embedding or not.
        Clarify error message when image is too big for embedding.
        Remove duplicate *install_dos_part stanza.
2008-06-18 17:35:26 +00:00
robertmh
b23e5644cf 2008-06-17 Robert Millan <rmh@aybabtu.com>
* term/ieee1275/ofconsole.c (fgcolor, bgcolor): Remove variables.
        (grub_ofconsole_normal_color, grub_ofconsole_highlight_color): New
        variables.
        (grub_ofconsole_setcolor, grub_ofconsole_getcolor): Load/store
        values in grub_ofconsole_normal_color and
        grub_ofconsole_highlight_color (they're not directly related to
        background and foreground).
        (grub_ofconsole_setcolorstate): Extract background and foreground
        from grub_ofconsole_normal_color and grub_ofconsole_highlight_color.
2008-06-17 15:27:14 +00:00
robertmh
0aac2f79b7 2008-06-17 Robert Millan <rmh@aybabtu.com>
* util/update-grub_lib.in (prepare_grub_to_access_device): Use
        /boot/grub for the check in last commit, not /boot (they could be
        different partitions).
2008-06-17 13:35:04 +00:00
robertmh
3cca7ef3b6 2008-06-16 Robert Millan <rmh@aybabtu.com>
* util/update-grub_lib.in (prepare_grub_to_access_device): If we were
        asked to setup access for the same partition that provides /boot,
        don't bother using UUIDs since our root already has the value we
        want.
2008-06-16 22:08:03 +00:00
robertmh
347396d87f 2008-06-16 Robert Millan <rmh@aybabtu.com>
* util/biosdisk.c (convert_system_partition_to_system_disk): Detect
        I2O devices.
        Patch from Sven Mueller <sven@debian.org>.
2008-06-16 20:45:21 +00:00
robertmh
991477f8a7 2008-06-16 Robert Millan <rmh@aybabtu.com>
* util/update-grub.in: Check for $EUID instead of $UID.
        Reported by Vincent Zweije.
2008-06-16 20:29:55 +00:00
bean
d31a32a14c 2008-06-16 Bean <bean123ch@gmail.com>
* fs/ext2.c (grub_ext2_blockgroup): Revert to pre journal state.
	(grub_ext2_read_block): Likewise.
	(grub_ext2_read_inode): Likewise.
	(grub_ext2_mount): Likewise.
	(grub_ext2_close): Likewise.
	(grub_ext3_get_journal): Removed.

	* fs/reiserfs.c (grub_reiserfs_get_item): Revert to pre journal state.
	(grub_reiserfs_read_symlink): Likewise.
	(grub_reiserfs_mount): Likewise.
	(grub_reiserfs_open): Likewise.
	(grub_reiserfs_read): Likewise.
	(grub_reiserfs_close): Likewise.
	(grub_reiserfs_get_journal): Removed.

	* fs/fshelp.c (grub_fshelp_read): Removed.
	(grub_fshelp_map_block): Likewise.

	* include/grub/fshelp.h (grub_fshelp_journal_type): Removed.
	(grub_fshelp_journal): Likewise.
	(grub_fshelp_read): Likewise.
	(grub_fshelp_map_block): Likewise.
2008-06-16 19:02:08 +00:00
proski
3540a760ea 2008-06-16 Pavel Roskin <proski@gnu.org>
* conf/powerpc-ieee1275.rmk: Remove -msoft-float, we don't use
	floating point anymore.
	* include/grub/powerpc/libgcc.h: Leave only necessary exports.
2008-06-16 05:00:50 +00:00
proski
fe6b695a02 Fix typos 2008-06-16 01:10:14 +00:00
proski
95614c84f8 2008-06-15 Pavel Roskin <proski@gnu.org>
* commands/ls.c (grub_ls_list_files): Use integer calculations
	for human readable format, avoid floating point use.
	* kern/misc.c (grub_ftoa): Remove.
	(grub_vsprintf): Remove floating point support.
2008-06-16 00:42:48 +00:00
robertmh
50465dd603 2008-06-15 Robert Millan <rmh@aybabtu.com>
* util/grub.d/10_linux.in: Use the underliing device for loop-AES
        devices.
        Reported by Max Vozeler.
2008-06-15 20:15:57 +00:00
robertmh
a920728493 2008-06-15 Robert Millan <rmh@aybabtu.com>
* util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
        in our prefix, set install_{dos,bsd}_part = -2 to indicate this can be
        skipped later.
        (main): If a memdisk was requested, add "(memdisk)" drive explicitly to
        the beginning of the prefix.

        * kern/i386/pc/init.c (make_install_device): Remove memdisk check.
        It is assumed that if we have a memdisk, grub-mkimage has set
        grub_prefix to include the "(memdisk)" drive in it.
2008-06-15 18:21:16 +00:00
robertmh
a7cbd45a07 2008-06-15 Robert Millan <rmh@aybabtu.com>
* term/i386/pc/console.c [GRUB_MACHINE_LINUXBIOS] (grub_console_init):
        Initialize keyboard controller after registering the terminal, so that
        grub_printf() can be called from grub_keyboard_controller_init().
2008-06-15 14:19:34 +00:00
robertmh
21cf716ad4 2008-06-15 Robert Millan <rmh@aybabtu.com>
* fs/sfs.c (grub_sfs_read_extent): Fix the count of nodes in
        extent-btree which is written as big endian on disk.
        Reported by Alain Greppin  <al@chilibi.org>.
2008-06-15 13:31:18 +00:00
robertmh
23a64d8eaf 2008-06-14 Robert Millan <rmh@aybabtu.com>
* util/i386/efi/grub-install.in (modules): Remove `_chain'.
        * util/i386/pc/grub-install.in (modules): Likewise.
2008-06-14 19:04:44 +00:00
proski
d687651c07 2008-06-13 Pavel Roskin <proski@gnu.org>
* commands/ls.c (grub_ls_list_files): Fix format warnings.
2008-06-13 21:51:14 +00:00
bean
dfe9ddd4cb 2008-06-13 Bean <bean123ch@gmail.com>
* commands/hexdump.c (grub_cmd_hexdump): Adjust offset for partition.

	* fs/ext2.c (grub_ext3_get_journal): Fix revoke block handling.

	* fs/fshelp.c (grub_fshelp_map_block): Don't map block 0 as it's used
	to indicate sparse block.
2008-06-13 06:47:46 +00:00
proski
e6d1a308ed 2008-06-12 Pavel Roskin <proski@gnu.org>
* fs/ext2.c (grub_ext2_read_inode): Don't normalize block
	number, grub_fshelp_read() does it for us.
2008-06-12 16:13:21 +00:00
proski
16ae7781ef 2008-06-12 Pavel Roskin <proski@gnu.org>
* fs/fshelp.c (grub_fshelp_read): New function.  Implement
	linear disk read with journal translation.
	* fs/ext2.c: Use grub_fshelp_read() instead of grub_disk_read().
	* include/grub/fshelp.h: Declare grub_fshelp_read().
2008-06-12 14:48:27 +00:00
proski
40fd3a2b99 2008-06-09 Pavel Roskin <proski@gnu.org>
* fs/minix.c (grub_minix_mount): Handle error reading
	superblock.
2008-06-09 15:32:43 +00:00
robertmh
f5679726cd 2008-06-08 Robert Millan <rmh@aybabtu.com>
* util/i386/pc/grub-setup.c (main): If install drive is an LVM,
        don't append the RAID prefix afterwards.
        Reported by Clint Adams.
2008-06-08 22:54:34 +00:00
robertmh
ce525529f9 2008-06-08 Robert Millan <rmh@aybabtu.com>
Based on description from Pavel:
        * kern/disk.c (grub_disk_check_range): Rename to ...
        (grub_disk_adjust_range): ... this.  Add a comment explaining the
        tasks performed by this function.
2008-06-08 19:46:43 +00:00
robertmh
ad4936a035 2008-06-08 Robert Millan <rmh@aybabtu.com>
* include/grub/ntfs.h (struct grub_ntfs_bpb): Rename `serial_number' to
        `num_serial' (for consistency with other variables).
        (struct grub_ntfs_data): Add `uuid' member.
        * fs/ntfs.c (grub_ntfs_mount): Initialize `data->uuid'.
        (grub_ntfs_uuid): New function.
        (grub_ntfs_fs): Reference grub_ntfs_uuid() in `uuid' struct member.
2008-06-08 19:18:58 +00:00
proski
dc20b0f9f5 2008-06-07 Pavel Roskin <proski@gnu.org>
* util/biosdisk.c (open_device): Revert last change to the
	function, it broke installation.  The sector needs to be
	different dependent on which device is opened.
2008-06-07 04:30:22 +00:00
robertmh
c5e3cfba13 2008-06-06 Robert Millan <rmh@aybabtu.com>
Ensure GRUB_KERNEL_MACHINE_DATA_END is always consistent with the
        rest of GRUB, and breakage doesn't happen if its value were modified.

        * include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE):
        Redefine as an offset from `GRUB_KERNEL_MACHINE_DATA_END' instead of
        a constant (same value).
        * kern/i386/pc/startup.S: Replace hardcoded `0x50' with
        `GRUB_KERNEL_MACHINE_DATA_END' (same value).
2008-06-06 16:29:19 +00:00
robertmh
26a1f8c455 2008-06-06 Robert Millan <rmh@aybabtu.com>
* util/biosdisk.c (open_device): Do not modify sector offset when
        accessing a partition.  kern/disk.c already handles this for us.
2008-06-06 15:56:46 +00:00
robertmh
25d6b3273b 2008-06-06 Robert Millan <rmh@aybabtu.com>
* util/grub-emu.c (grub_machine_init): Move code in this function from
        here ...
        (main): ... to here (before grub_util_biosdisk_init() call, to prevent
        segfault in case grub_printf() is called).

        * util/i386/pc/grub-install.in: Append `--device-map=${device_map}' to
        grub_probe.  Update all users not to explicitly add it again.
        (grub_device): New variable; contains corresponding device for grubdir.
        (fs_module, partmap_module, devabstraction_module): Pass
        `--device ${grub_device}' to grub_probe to avoid traversing /dev
        every time.
2008-06-06 15:49:23 +00:00
robertmh
9ece62fb9f 2008-06-05 Robert Millan <rmh@aybabtu.com>
* normal/misc.c (grub_normal_print_device_info): When a filesystem UUID
        is found, print it (same layout as with labels).
2008-06-05 21:27:54 +00:00
robertmh
1ad36d3785 2008-06-04 Robert Millan <rmh@aybabtu.com>
* util/biosdisk.c (get_drive): Rename to ...
        (find_grub_drive): ... this.  Update all users.

        (get_os_disk): Rename to ...
        (convert_system_partition_to_system_disk): ... this.  Update all users.

        (find_drive): Rename to ...
        (find_system_device): ... this.  Update all users.
2008-06-04 13:59:55 +00:00
robertmh
e6a30859dd 2008-06-04 Robert Millan <rmh@aybabtu.com>
* util/biosdisk.c (get_os_disk): Handle IDA devices.
        * util/grub-mkdevicemap.c (get_mmc_disk_name)
        (make_device_map): Likewise.
2008-06-04 11:20:36 +00:00
robertmh
00c108a446 2008-06-01 Robert Millan <rmh@aybabtu.com>
*  util/biosdisk.c (get_drive): Verify that `map[i].drive' is non-NULL
        before dereferencing it.

        * fs/fat.c (struct grub_fat_bpb): Move fat32-specific fields into a
        union with fat12/fat16-specific ones.  Add some new fields, including
        `num_serial' for both versions.
        (struct grub_fat_data): Add `uuid' member.
        (grub_fat_mount): Refer to fat32-specific fields in `bpb' by their new
        names.  Initialize `data->uuid' using `num_serial'.
        (grub_fat_uuid): New function.
        (grub_fat_fs): Reference grub_fat_uuid() in `uuid' struct member.

        * fs/reiserfs.c (grub_reiserfs_superblock): Add `uuid' field.
        (grub_reiserfs_uuid): New function.
        (grub_reiserfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct
        member.

        * fs/xfs.c (grub_xfs_sblock): Add `uuid' field.
        (grub_xfs_uuid): New function.
        (grub_xfs_fs): Reference grub_reiserfs_uuid() in `uuid' struct member.
2008-06-01 13:30:00 +00:00
robertmh
1385c5bb3d 2008-06-01 Robert Millan <rmh@aybabtu.com>
* util/update-grub_lib.in (prepare_grub_to_access_device): Generate
        code that is backward compatible with pre-uuid search command.
2008-06-01 10:42:48 +00:00
robertmh
c682dfd71d 2008-05-31 Robert Millan <rmh@aybabtu.com>
* disk/i386/pc/biosdisk.c (grub_biosdisk_iterate): Iterate through
        floppies after everything else, to ensure floppy drive isn't accessed
        unnecessarily (patch from Bean).
2008-05-31 21:14:27 +00:00
robertmh
b7db5d47d9 2008-05-31 Robert Millan <rmh@aybabtu.com>
* commands/search.c (search_label, search_fs_uuid, search_file): Do
        not print device names when we were asked to set a variable.
2008-05-31 21:08:04 +00:00