summaryrefslogtreecommitdiff
path: root/util/grub-setup.c
Commit message (Collapse)AuthorAge
* gnulib: Upgrade Gnulib and switch to bootstrap toolColin Watson2019-03-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Upgrade Gnulib files to 20190105. It's much easier to maintain GRUB's use of portability support files from Gnulib when the process is automatic and driven by a single configuration file, rather than by maintainers occasionally running gnulib-tool and committing the result. Removing these automatically-copied files from revision control also removes the temptation to hack the output in ways that are difficult for future maintainers to follow. Gnulib includes a "bootstrap" program which is designed for this. The canonical way to bootstrap GRUB from revision control is now "./bootstrap", but "./autogen.sh" is still useful if you just want to generate the GRUB-specific parts of the build system. GRUB now requires Autoconf >= 2.63 and Automake >= 1.11, in line with Gnulib. Gnulib source code is now placed in grub-core/lib/gnulib/ (which should not be edited directly), and GRUB's patches are in grub-core/lib/gnulib-patches/. I've added a few notes to the developer manual on how to maintain this. Signed-off-by: Colin Watson <cjwatson@ubuntu.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
* Build fixes for argp.h with older gcc.Vladimir Serbinenko2013-12-21
|
* Enable -Wformat=2 if it's supported.Vladimir Serbinenko2013-12-21
|
* Add --no-rs-codes flag to optionally disable reed-solomon codes in ↵Jon McCune2013-12-09
| | | | grub-install and grub-bios-setup for x86 BIOS targets.
* fix partition module names when /boot is on diskfilterAndrey Borzenkov2013-12-07
| | | | | | | | | /usr/local/grub2/sbin/grub-install: info: grub-mkimage --directory '/usr/local/grub2/lib/grub/i386-pc' --prefix '(mduuid/e6d1dcf06cea72140bafae74a8677f36)/grub' --output '/boot/grub/i386-pc/core.img' --format 'i386-pc' --compression 'auto' 'ext2' 'msdos' 'msdos' 'diskfilter' 'mdraid1x' 'biosdisk' . /usr/local/grub2/sbin/grub-install: error: cannot open `/usr/local/grub2/lib/grub/i386-pc/msdos.mod': No such file or directory. Introduce common helper for both diskfilter and non-diskfilter case that converts partition map names into module names.
* fix using grub device name as install deviceAndrey Borzenkov2013-11-29
| | | | | | | | | | | | | | | | | | Shell version of grub-install called grub-setup which resolved install device name and called main setup routine. C version of grub-install calls main setup routine directly, which leads to the error: grub2-install: info: grub-bios-setup --verbose --force --skip-fs-probe --directory='/boot/grub2/i386-pc' --device-map='/boot/grub2/device.map' '(hd2)'. grub2-install: info: reading /boot/grub2/i386-pc/boot.img. grub2-install: info: reading /boot/grub2/i386-pc/core.img. grub2-install: info: root is `(null)', dest is `(hd2)'. grub2-install: info: Opening dest. grub2-install: info: drive = -1. grub2-install: error: disk `(hd2)' not found. Move resolving of destination device name into main setup routine so it is done consistently in both cases.
* Split grub-setup.c into frontend (grub-setup.c) and backend (setup.c)Vladimir 'phcoder' Serbinenko2013-10-15
| | | | files.
* Add a wrapper for fopen. On unix-like systems just pass-through. OnVladimir 'phcoder' Serbinenko2013-10-13
| | | | windows use unicode version.
* Move set_program_name and init_nls to host_init. On windowsVladimir 'phcoder' Serbinenko2013-10-13
| | | | fix in this fuction console and argument charset as well.
* * util/grub-setup.c (setup): Move copying of partition table asVladimir 'phcoder' Serbinenko2013-10-11
| | | | futher up as possible to avoid possible overwrite by floppy routines.
* * include/grub/util/lvm.h: Removed.Vladimir 'phcoder' Serbinenko2013-10-08
|
* * util/grub-setup.c (setup): Handle some corner cases.Vladimir 'phcoder' Serbinenko2013-04-04
|
* Remove nested functions from disk and file read hooks.Colin Watson2013-02-27
| | | | | | | | | | * include/grub/disk.h (grub_disk_read_hook_t): New type. (struct grub_disk): Add read_hook_data member. * include/grub/file.h (struct grub_file): Likewise. * include/grub/fshelp.h (grub_fshelp_read_file): Add read_hook_data argument. Update all callers.
* Remove nested functions from device iterators.Colin Watson2013-01-20
| | | | | | | | | | | | | | | | | | | | | | | * include/grub/arc/arc.h (grub_arc_iterate_devs_hook_t): New type. (grub_arc_iterate_devs): Add hook_data argument. * include/grub/ata.h (grub_ata_dev_iterate_hook_t): New type. (struct grub_ata_dev.iterate): Add hook_data argument. * include/grub/device.h (grub_device_iterate_hook_t): New type. (grub_device_iterate): Add hook_data argument. * include/grub/disk.h (grub_disk_dev_iterate_hook_t): New type. (struct grub_disk_dev.iterate): Add hook_data argument. (grub_disk_dev_iterate): Likewise. * include/grub/gpt_partition.h (grub_gpt_partition_map_iterate): Likewise. * include/grub/msdos_partition.h (grub_partition_msdos_iterate): Likewise. * include/grub/partition.h (grub_partition_iterate_hook_t): New type. (struct grub_partition_map.iterate): Add hook_data argument. (grub_partition_iterate): Likewise. * include/grub/scsi.h (grub_scsi_dev_iterate_hook_t): New type. (struct grub_scsi_dev.iterate): Add hook_data argument. Update all callers.
* * util/grub-setup.c (write_rootdev): Remove unused core_imgColin Watson2012-09-19
| | | | | | parameter. Update all callers. (setup): Define core_sectors only if GRUB_SETUP_BIOS, to appease 'gcc -Wunused-but-set-variable'. Remove unnecessary nested #ifdef GRUB_SETUP_BIOS.
* * include/grub/types.h (grub_set_unaligned64): New function.Vladimir 'phcoder' Serbinenko2012-06-07
| | | | | * util/grub-setup.c (write_rootdev): Use unaligned access functions. (setup): Likewise.
* * util/grub-setup.c (setup): Remove duplicate call to embed. FixesVladimir 'phcoder' Serbinenko2012-05-02
| | | | crash when embedding onto filesystem.
* * util/grub-setup.c (setup): Fix partition handling and blocklistVladimir 'phcoder' Serbinenko2012-04-13
| | | | check.
* * grub-core/net/http.c: Add TRANSLATORS comments.Vladimir 'phcoder' Serbinenko2012-03-05
| | | | | | | | | | | | | | | * grub-core/normal/cmdline.c: Likewise. * grub-core/normal/misc.c: Likewise. * grub-core/partmap/msdos.c: Likewise. * grub-core/parttool/msdospart.c: Likewise. * grub-core/script/execute.c: Likewise. * grub-core/script/main.c: Likewise. * grub-core/term/terminfo.c: Likewise. * grub-core/video/bitmap.c: Likewise. * util/grub-install.in: Likewise. * util/grub-mkimage.c: Likewise. * util/grub-mklayout.c: Likewise. * util/grub-setup.c: Likewise.
* * grub-core/commands/gptsync.c: Fix typographic quoting.Vladimir 'phcoder' Serbinenko2012-03-03
| | | | | | | | | | | | | | | | | | | | | | | | | * grub-core/commands/ieee1275/suspend.c: Likewise. * grub-core/commands/parttool.c: Likewise. * grub-core/commands/search_wrap.c: Likewise. * grub-core/commands/videoinfo.c: Likewise. * grub-core/gfxmenu/gui_label.c: Likewise. * grub-core/hello/hello.c: Likewise. * grub-core/kern/emu/main.c: Likewise. * grub-core/net/net.c: Likewise. * grub-core/normal/menu.c: Likewise. * grub-core/normal/menu_text.c: Likewise. * grub-core/normal/misc.c: Likewise. * util/grub-editenv.c: Likewise. * util/grub-install.in: Likewise. * util/grub-kbdcomp.in: Likewise. * util/grub-mkconfig.in: Likewise. * util/grub-mknetdir.in: Likewise. * util/grub-mkrescue.in: Likewise. * util/grub-mkstandalone.in: Likewise. * util/grub-reboot.in: Likewise. * util/grub-set-default.in: Likewise. * util/grub-setup.c: Likewise. * util/powerpc/ieee1275/grub-mkrescue.in: Likewise.
* * util/grub-setup.c (setup) [!__linux__]: Add missing file declarationVladimir 'phcoder' Serbinenko2012-02-29
| | | | and grub_file_close call.
* * include/grub/partition.h (grub_partition_map): Change prototype ofColin Watson2012-02-27
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | embed to take a maximum value for nsectors. * include/grub/emu/hostdisk.h (grub_util_ldm_embed): Likewise. * include/grub/fs.h (grub_fs): Likewise. * grub-core/partmap/msdos.c (embed_signatures): New array. (pc_partition_map_embed): Check for and avoid sectors matching any of the signatures in embed_signatures, up to max_nsectors. * grub-core/partmap/gpt.c (gpt_partition_map_embed): Restrict returned sector map to max_nsectors. * grub-core/disk/ldm.c (grub_util_ldm_embed): Likewise. * grub-core/fs/btrfs.c (grub_btrfs_embed): Likewise. * grub-core/fs/zfs/zfs.c (grub_zfs_embed): Likewise. * util/grub-setup.c (setup): Allow for the embedding area being split into multiple blocklists. Tell dest_partmap->embed the maximum number of sectors we care about.
| * Avoid consuming lots of space and time if the first partition is not near ↵Colin Watson2011-03-25
| | | | | | | | the start of the disk (Debian bug #619458, Ubuntu bug #691569).
| * merge trunkColin Watson2011-03-14
| |\
| * \ merge trunkColin Watson2011-01-05
| |\ \
| * | | * partmap/msdos.c (embed_signatures): New array.Colin Watson2010-11-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (pc_partition_map_embed): Check for and avoid sectors matching any of the signatures in embed_signatures. * util/grub-setup.c (setup): Allow for the embedding area being split into multiple blocklists.
* | | | * util/grub-install.in: Clarify strings.Vladimir 'phcoder' Serbinenko2012-02-27
| | | | | | | | | | | | | | | | Fix source dir check.
* | | | Remove any awareness of *.c util files about target.Vladimir 'phcoder' Serbinenko2012-02-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.util.def (grub-setup): Split to ... (grub-bios-setup): ... and this. (grub-sparc64-setup): ... and this. * configure.ac: Don't add machine_CPPFLAGS into HOST_CPPFLAGS. * docs/man/grub-setup.h2m: Split into ... * docs/man/grub-sparc64-setup.h2m: ... this. * docs/man/grub-bios-setup.h2m: ... and this. * include/grub/dl.h (grub_dl) [GRUB_UTIL]: Remove struct. * include/grub/elf.h (Elf_*) [GRUB_UTIL]: Remove types. (GRUB_TARGET_WORDSIZE) [GRUB_UTIL]: Remove. (grub_target_addr_t): Remove. (grub_target_size_t): Remove. (grub_target_ssize_t): Remove. * util/grub-install.in: Use new grub-*-setup. * util/grub-mkimagexx.c (Elf_Word): New define. (Elf_Half): Likewise. (Elf_Section): Likewise. (ELF_ST_TYPE): Likewise. * util/grub-setup.c: Switch from GRUB_MACHINE_SPARC64 to GRUB_SETUP_SPARC64 and from GRUB_MACHINE_PCBIOS to GRUB_SETUP_BIOS.
* | | | Another round of string clarification and adding TRANSLATORS comments.Vladimir 'phcoder' Serbinenko2012-02-26
| | | |
* | | | Convert grub-emu to argp.Vladimir 'phcoder' Serbinenko2012-02-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * grub-core/Makefile.core.def (kernel): Add kern/emu/argp_common.c on emu. * util/argp_common.c: Rename to ... * grub-core/kern/emu/argp_common.c: ... this. All users updated. Add missing includes. * grub-core/kern/emu/main.c: Convert to argp. * po/POTFILES.in: Regenerate. * util/grub-install.in (usage): Make first letter lowcase in messages for uniformity. * util/grub-setup.c (options): Likewise.
* | | | * util/grub-setup.c (setup): Remove unused variable. Avoid shadowing.Vladimir 'phcoder' Serbinenko2012-02-10
| | | | | | | | | | | | | | | | | | | | | | | | Fix format specifications. Respect format security. Don't translate already translated grub_errmsg. (argp_parser): Remove unused variable
* | | | Improve gettext support. Stylistic fixes and error handling fixes whileVladimir 'phcoder' Serbinenko2012-02-08
| | | | | | | | | | | | | | | | on it.
* | | | Clarify and unify messages.Vladimir 'phcoder' Serbinenko2012-02-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * grub-core/commands/hashsum.c (options): Unify messages. * grub-core/commands/keystatus.c (GRUB_MOD_INIT): Don't mark a literal-only message as translatable. * grub-core/commands/lsacpi.c (GRUB_MOD_INIT): Likewise. * grub-core/loader/ia64/efi/linux.c (GRUB_MOD_INIT): Likewise. * grub-core/commands/legacycfg.c (GRUB_MOD_INIT): Add quoting around commands. * grub-core/commands/menuentry.c (options): Clarify that it's a keyboard key, not the key used to unlock. Clarify what it's used for. * grub-core/kern/emu/hostdisk.c (read_device_map): Unify error message. * grub-core/loader/xnu.c (grub_xnu_load_driver): Remove erroneous colon. * grub-core/script/main.c (GRUB_MOD_INIT): Clarify [n] to be [NUM]. * util/grub-editenv.c (options): Unify "verbose" message. * util/grub-fstest.c (read_file): Unify error message. (fstest): Add quotes around commands. (options): Unify "verbose" message. * util/grub-install.in: Add quotes around variable name. * util/grub-kbdcomp.in: Unify error message. * util/grub-mkfont.c (main): Likewise. * util/grub-mkrescue.in: Likewise. * util/grub-mklayout.c (options): Unify "verbose" message. * util/grub-mkstandalone.in: Unify help and verbose messages. * util/grub-mount.c (options): Unify "verbose" message. * util/grub-probe.c (options): Likewise. * util/grub-script-check.c (options): Likewise. * util/grub-setup.c (setup): Unify no-terminator message. (options): Use DEVICE and not DEV. Unify "verbose" message. * util/ieee1275/ofpath.c (xrealpath): Unify error message.
* | | | Improve and unify messages.Vladimir 'phcoder' Serbinenko2012-02-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * grub-core/kern/emu/hostdisk.c (grub_util_get_fd_sectors): Add argument name. All users updated. Print filename in error. (read_device_map): Print filename in error. * util/getroot.c (grub_guess_root_devices): Print filename in error. (grub_util_get_os_disk): Likewise. (grub_util_biosdisk_get_grub_dev): Likewise. (grub_util_check_block_device): Likewise. (grub_util_check_char_device): Likewise. (grub_make_system_path_relative_to_its_root): Likewise. * util/grub-editenv.c (create_envblk_file): Likewise. (open_envblk_file): Likewise. (write_envblk): Likewise. * util/grub-fstest.c (cmd_cp): Likewise. (cmd_cat): Likewise. (cmd_cmp): Likewise. * util/grub-menulst2cfg.c (main): Likewise. * util/grub-mkfont.c (write_font_ascii_bitmap): Likewise. (write_font_width_spec): Likewise. (write_font_pf2): Likewise. * util/grub-mkimage.c (generate_image): New argument outname. All users updated. Remove unreacheable message. (options): Unify messages. (help_filter): Likewise. * util/grub-mklayout.c (usage): Removed (unused). (main): Print filename in error. * util/grub-mkrescue.in: Fix wrong quoting. * util/grub-setup.c (setup): Print filename in error. * util/ieee1275/ofpath.c (vendor_is_ATA): Likewise. (check_sas): Likewise. * util/misc.c (grub_util_get_fp_size): Removed. (grub_util_get_image_size): Print filename in error. (grub_util_read_at): Removed. (grub_util_read_image): Print filename in error. (grub_util_load_image): Likewise. (grub_util_write_image_at): New argument filename. All users updated. Print filename in error. (grub_util_write_image): New argument filename. All users updated. Print filename in error. * util/raid.c (grub_util_raid_getmembers): Print filename in error. * util/resolve.c (grub_util_resolve_dependencies): Likewise.
* | | | Migrate grub-mkimage.c to argp.Vladimir 'phcoder' Serbinenko2012-02-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.util.def (grub-mkimage): Add util/argp_common.c. (grub-setup): Likewise. * util/grub-setup.c (print_version): Move to ... * util/argp_common.c (print_version): ... here. * util/grub-setup.c (argp_program_version_hook): Move to ... * util/argp_common.c (argp_program_version_hook): ... here. * util/grub-setup.c (argp_parser): Add exit (1) on fatal error for safety. * util/grub-mkimage.c (main): Migrate to argp.
* | | | * grub-core/commands/ls.c: Gettextize.Vladimir 'phcoder' Serbinenko2012-02-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * grub-core/commands/setpci.c: Likewise. * grub-core/commands/videotest.c: Likewise. * grub-core/disk/geli.c: Likewise. * grub-core/kern/mm.c: Likewise. * grub-core/lib/relocator.c: Likewise. * grub-core/loader/efi/appleloader.c: Likewise. * grub-core/loader/i386/xnu.c: Likewise. * grub-core/loader/ia64/efi/linux.c: Likewise. * grub-core/loader/xnu.c: Likewise. * grub-core/net/dns.c: Likewise. * grub-core/net/net.c: Likewise. * grub-core/script/lexer.c: Likewise. * grub-core/script/parser.y: Likewise. * grub-core/script/yylex.l: Likewise. * util/getroot.c: Likewise. * util/grub-setup.c: Likewise.
* | | | Support install on multi-device filesystems.Vladimir 'phcoder' Serbinenko2012-02-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * include/grub/emu/getroot.h (grub_guess_root_device): Renamed to ... (grub_guess_root_devices): ...this. Return char **. All users updated. * include/grub/emu/misc.h (grub_find_root_device_from_mountinfo): Removed. * util/getroot.c (find_root_device_from_libzfs): Moved pool logic to ... (find_root_devices_from_poolname): ... here. (grub_find_root_devices_from_mountinfo): Return char **. Make static. Support zfs-fuse. (grub_guess_root_device): Rename to ... (grub_guess_root_devices): ... this. Return char **. All users updated. * util/grub-install.in: Handle multi-device filesystems. * util/grub-probe.c (probe). Make device_names a char **. Add delim argument. All users updated. Handle multi-device filesystems. Use 'delim' as separator. Remove device check to allow filesystems on file. (main): Support -0 argument. Handle multi-device. * util/grub-setup.c (setup): Remove root argument. Handle multi-device. Fix a cross-device check while on it. (arguments): Remove root_dev. (argp_parser): Remove -r. (main): Remove root_dev.
* | | | Merge common RAID and LVM logic to an abstract diskfilter.Vladimir 'phcoder' Serbinenko2012-01-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add LDM support using the same framework. * Makefile.util.def (libgrubkern): Add grub-core/disk/ldm.c, grub-core/disk/diskfilter.c and grub-core/partmap/gpt.c. (libgrubmods): Remove grub-core/disk/raid.c and grub-core/partmap/gpt.c. * grub-core/Makefile.core.def (ldm): New module. (raid): Renamed to diskfilter. All users updated. * grub-core/disk/raid.c: Moved to ... * grub-core/disk/diskfilter.c: ... here. * grub-core/disk/diskfilter.c: Rename grub_raid_ to grub_diskfilter_. (lv_num): New var. (find_array): Renamed to ... (find_lv): ... this. Support multi-LV. Skip nameless LVs (grub_is_array_readable): Renamed to ... (grub_is_lv_readable): ... this. Support multinode hierarchy. (insert_array): New argument id. (is_node_readable): New function. (scan_device): Rename to ... (scan_disk): .. this. Restrict to one disk. (scan_devices): New function. (grub_diskfilter_iterate): Support multi-LV. Skip invisible and nameless LVs. (grub_diskfilter_memberlist): Support multi-LV. (grub_diskfilter_read_node): New function. (grub_raid_read): Most of logic moved to ... (read_segment): ... here (read_lv): New function. (grub_diskfilter_get_vg_by_uuid): New function. (grub_diskfilter_make_raid): Likewise. * grub-core/disk/ldm.c: New file. * grub-core/disk/lvm.c (vg_list): Removed. (lv_count): Likewise. (scan_depth): Likewise. (is_lv_readable): Likewise. (grub_lvm_getvalue): Advance pointer past the number. (find_lv): Removed. (do_lvm_scan): Refactored into ... (grub_lvm_detect): ... this. Support raid. (grub_lvm_iterate): Removed. (grub_lvm_memberlist): Likewise. (grub_lvm_open): Likewise. (grub_lvm_close): Likewise. (read_lv): Likewise. (read_node): Likewise. (is_node_readable): Likewise. (is_lv_readable): Likewise. (grub_lvm_read): Likewise. (grub_lvm_write): Likewise. (grub_lvm_dev): Use diskfilter (GRUB_MOD_INIT): Likewise. (GRUB_MOD_FINI): Likewise. * grub-core/disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Use new interface. * grub-core/disk/mdraid1x_linux.c (grub_mdraid_detect): Likewise. * grub-core/disk/mdraid_linux.c (grub_mdraid_detect): Likewise. * grub-core/disk/raid5_recover.c (grub_raid5_recover): Use grub_diskfilter_read_node. Fix a bug with xor. * grub-core/disk/raid6_recover.c (grub_raid6_recover): Use grub_diskfilter_read_node. Support GRUB_RAID_LAYOUT_MUL_FROM_POS. * grub-core/kern/disk.c (grub_disk_dev_list): Make global. (grub_disk_dev_iterate): Move from here... * include/grub/disk.h (grub_disk_dev_iterate): ... to here. Inlined. * grub-core/kern/emu/hostdisk.c (grub_hostdisk_find_partition_start): Make global. (grub_hostdisk_find_partition_start): Likewise. (grub_hostdisk_os_dev_to_grub_drive): New function. (grub_util_biosdisk_get_osdev): Check that disk is biosdisk. * grub-core/kern/emu/hostdisk.c (make_device_name): Move to ... * util/getroot.c (make_device_name): ... here. * grub-core/kern/emu/hostdisk.c (grub_util_get_dm_node_linear_info): Move to ... * util/getroot.c (grub_util_get_dm_node_linear_info): ...here. * grub-core/kern/emu/hostdisk.c (convert_system_partition_to_system_disk): Move to ... * util/getroot.c (convert_system_partition_to_system_disk): ...here. * grub-core/kern/emu/hostdisk.c (device_is_wholedisk): Move to ... * util/getroot.c (device_is_wholedisk): ... here. * grub-core/kern/emu/hostdisk.c (find_system_device): Move to ... * util/getroot.c (find_system_device): ... here. * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_is_present): Move to ... * util/getroot.c (grub_util_biosdisk_is_present): ...here. * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_get_grub_dev): Move to ... * util/getroot.c (grub_util_biosdisk_get_grub_dev): ... here. Handle LDM. * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_is_floppy): Move to ... * util/getroot.c (grub_util_biosdisk_is_floppy): ... here. * grub-core/partmap/gpt.c (grub_gpt_partition_map_iterate): Made global. * include/grub/disk.h (grub_disk_dev_id): Replaced RAID and LVM with DISKFILTER. * include/grub/raid.h: Renamed to ... * include/grub/diskfilter.h: ... this. * include/grub/diskfilter.h: Rename grub_raid_* to grub_diskfilter_* (GRUB_RAID_LAYOUT_*): Make into array. (GRUB_RAID_LAYOUT_MUL_FROM_POS): New value. (grub_diskfilter_vg): New struct. (grub_diskfilter_pv_id): Likewise. (grub_raid_member): Removed. (grub_raid_array): Likewise. (grub_diskfilter_pv): New struct. (grub_diskfilter_lv): Likewise. (grub_diskfilter_segment): Likewise. (grub_diskfilter_node): Likewise. (grub_diskfilter_get_vg_by_uuid): New proto. (grub_raid_register): Inline. (grub_diskfilter_unregister): Likewise. (grub_diskfilter_make_raid): New proto. (grub_diskfilter_vg_register): Likewise. (grub_diskfilter_read_node): Likewise. (grub_diskfilter_get_pv_from_disk) [GRUB_UTIL]: Likewise. * include/grub/emu/hostdisk.h (grub_util_get_ldm): New proto. (grub_util_is_ldm): Likewise. (grub_util_ldm_embed) [GRUB_UTIL]: Likewise. (grub_hostdisk_find_partition_start): Likewise. (grub_hostdisk_os_dev_to_grub_drive): Likewise. * include/grub/gpt_partition.h (GRUB_GPT_PARTITION_TYPE_LDM): New definition. (grub_gpt_partition_map_iterate): New proto. * include/grub/lvm.h (grub_lvm_vg): Removed. (grub_lvm_pv): Likewise. (grub_lvm_lv): Likewise. (grub_lvm_segment): Likewise. (grub_lvm_node): Likewise. * util/getroot.c [...] * util/grub-probe.c (probe_raid_level): Handle diskfilter. (probe_abstraction): Likewise. * util/grub-setup.c (setup): Remove must_embed. Support LDM. (main): Remove dead logic.
* | | | Eliminate fixed limit on reed solomon decoder length.Vladimir 'phcoder' Serbinenko2012-01-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * grub-core/boot/i386/pc/lnxboot.S: Scan for multiboot signature rather than hardcoding the address. * grub-core/boot/i386/pc/startup_raw.S: Add new data field no_reed_solomon_length. Move gate_a20 to no-reed-solomon part. Don't force a particular size of no reed-solomon part. * include/grub/offsets.h (GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART): Removed. (GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_LENGTH): New define. * util/grub-setup.c (setup): Read no_rs_length from the image itself.
* | | | * grub-core/lib/reed_solomon.c (grub_reed_solomon_add_redundancy): AddVladimir 'phcoder' Serbinenko2011-12-23
| | | | | | | | | | | | | | | | | | | | an assert. * util/grub-setup.c (setup): Likewise.
* | | | * util/grub-mkimage.c (generate_image): Decrease the higher limitVladimir 'phcoder' Serbinenko2011-12-15
| | | | | | | | | | | | | | | | | | | | | | | | because of stack. * util/grub-setup.c (setup): Don't add redundancy past the higher load limit.
* | | | Defer multiboot device parsing until we're in compressed part.Vladimir 'phcoder' Serbinenko2011-11-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * grub-core/boot/i386/pc/lnxboot.S: Remove setting dos_part and bsd_part. setdevice has fallen into disuse. * grub-core/boot/i386/pc/startup_raw.S (dos_part): Removed. (bsd_part): Likewise. (boot_dev): New variable. (multiboot_trampoline): Don't parse multiboot device. Pass multiboot device in %edx. * grub-core/disk/i386/pc/biosdisk.c (GRUB_MOD_INIT): Parse grub_boot_device. * grub-core/kern/i386/pc/init.c (grub_machine_get_bootlocation): Likewise. * grub-core/kern/i386/pc/startup.S: Save edx. (grub_boot_drive): Removed. (grub_install_dos_part): Likewise. (grub_install_bsd_part): Likewise. (grub_boot_device): New variable. * include/grub/i386/pc/kernel.h (grub_install_dos_part): Removed. (grub_install_bsd_part): Likewise. (grub_boot_drive): Likewise. (grub_boot_device): New variable. * include/grub/offsets.h (GRUB_KERNEL_I386_PC_INSTALL_DOS_PART): Removed. (GRUB_KERNEL_I386_PC_INSTALL_BSD_PART): Likewise. (GRUB_KERNEL_I386_PC_REED_SOLOMON_REDUNDANCY): Moved lower. (GRUB_KERNEL_MACHINE_INSTALL_BSD_PART): Removed. (GRUB_KERNEL_MACHINE_INSTALL_DOS_PART): Likewise. * util/grub-install.in: Remove redundant condition.
* | | | * grub-core/commands/efi/fixvideo.c: Gettextize.Vladimir 'phcoder' Serbinenko2011-11-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * grub-core/commands/hashsum.c: Likewise. * grub-core/commands/i386/cmostest.c: Likewise. * grub-core/commands/i386/pc/drivemap.c: Likewise. * grub-core/commands/i386/pc/lsapm.c: Likewise. * grub-core/commands/i386/pc/sendkey.c: Likewise. * grub-core/commands/lsmmap.c: Likewise. * grub-core/commands/menuentry.c: Likewise. * grub-core/commands/mips/loongson/lsspd.c: Likewise. * grub-core/commands/setpci.c: Likewise. * grub-core/loader/i386/bsd.c: Likewise. * grub-core/loader/i386/linux.c: Likewise. * util/getroot.c: Likewise. * util/grub-editenv.c: Likewise. * util/grub-fstest.c: Likewise. * util/grub-mkfont.c: Likewise. * util/grub-mkimage.c: Likewise. * util/grub-mkpasswd-pbkdf2.c: Likewise. * util/grub-pe2elf.c: Likewise. * util/grub-probe.c: Likewise. * util/grub-setup.c: Likewise. * util/ieee1275/ofpath.c: Likewise. * util/misc.c: Likewise. * util/raid.c: Likewise.
* | | | Support BtrFS embedding.Vladimir 'phcoder' Serbinenko2011-11-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * grub-core/fs/btrfs.c (grub_btrfs_embed) [GRUB_UTIL]: New function. (grub_btrfs_fs) [GRUB_UTIL]: Set embed. * include/grub/fs.h (grub_fs) [GRUB_UTIL]: New field embed. * util/grub-setup.c (setup): Use fs embedding if available. Add additional sanity check.
* | | | * util/grub-setup.c: Add missing include.Vladimir 'phcoder' Serbinenko2011-10-23
| | | |
* | | | 2011-10-09 Robert Millan <rmh@gnu.org>Robert Millan2011-10-09
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LVM support for FreeBSD and GNU/kFreeBSD. * util/lvm.c (grub_util_lvm_isvolume): Enable on FreeBSD and GNU/kFreeBSD. (LVM_DEV_MAPPER_STRING): Move from here ... * include/grub/util/lvm.h (LVM_DEV_MAPPER_STRING): ... to here. * util/getroot.c: Include `<grub/util/lvm.h>'. (grub_util_get_dev_abstraction): Enable grub_util_biosdisk_is_present() on FreeBSD and GNU/kFreeBSD. Check for LVM abstraction on FreeBSD and GNU/kFreeBSD. (grub_util_get_grub_dev): Replace "/dev/mapper/" with `LVM_DEV_MAPPER_STRING'. Enable LVM and mdRAID only on platforms that support it. * util/grub-setup.c (main): Check for LVM also on FreeBSD and GNU/kFreeBSD. * util/grub.d/10_kfreebsd.in: Load `geom_linux_lvm' kernel module when LVM abstraction is required for ${GRUB_DEVICE}.
* | | | * util/grub-setup.c (main): Add missing gcry initialisation.Vladimir 'phcoder' Serbinenko2011-08-16
| | | |
* | | | automatic raid members additionVladimir 'phcoder' Serbinenko2011-04-22
| | | |
* | | | * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_flush):Vladimir 'phcoder' Serbinenko2011-04-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | New function. (grub_util_biosdisk_close): Use grub_util_biosdisk_flush. * include/grub/emu/hostdisk.h (grub_util_biosdisk_flush): New proto. * util/grub-setup.c (setup): Use grub_util_biosdisk_flush.
* | | | correct Changelog spellingVladimir 'phcoder' Serbinenko2011-04-08
| | | |