Commit graph

83 commits

Author SHA1 Message Date
Vladimir 'phcoder' Serbinenko
8585e54bec factor cryptodisk part out 2011-04-23 18:00:42 +02:00
Vladimir 'phcoder' Serbinenko
24089d19e2 Add cheatmounting 2011-04-22 19:20:46 +02:00
Vladimir 'phcoder' Serbinenko
0aaa85f1a0 merge lazy into luks 2011-04-22 15:13:12 +02:00
Vladimir 'phcoder' Serbinenko
4defebbec8 automatic raid members addition 2011-04-22 13:55:30 +02:00
Vladimir 'phcoder' Serbinenko
65b4742cd7 Add lost lvm/ prefix. Autoadd lvm subdevices. 2011-04-22 02:46:36 +02:00
Vladimir 'phcoder' Serbinenko
c0c837c10b merge devmapper into lazy 2011-04-22 01:21:26 +02:00
Vladimir 'phcoder' Serbinenko
5dad99b730 more linux-like name for LVM volumes 2011-04-22 01:10:24 +02:00
Vladimir 'phcoder' Serbinenko
24b905a11c Lazy LVM and RAID assembly 2011-04-22 00:09:07 +02:00
Vladimir 'phcoder' Serbinenko
a10e7a5a89 Support grub-probe -t drive 2011-04-21 12:39:31 +02:00
Vladimir 'phcoder' Serbinenko
0c910e9626 merge devmapper into luks 2011-04-21 11:59:51 +02:00
Vladimir 'phcoder' Serbinenko
e8f28d4c0e * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_flush):
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.
2011-04-19 22:39:14 +02:00
Vladimir 'phcoder' Serbinenko
50d2cc5ae5 Identify RAID by its UUID rather than (guessed) name.
* grub-core/disk/raid.c (ascii2hex): New function.
	(grub_raid_open): Accept mduuid/%s specification.
	* grub-core/kern/emu/getroot.c (get_mdadm_name): Revamped into ...
	(get_mdadm_uuid): ... this.
	(grub_util_get_grub_dev): Use mduuid/%s if UUID is available.
2011-04-16 15:27:35 +02:00
Colin Watson
78fa584f67 Rewrite /proc/self/mountinfo handling to cope with bind-mounts and
move-mounts appearing out of order.  Fixes Ubuntu bug #738345.

* grub-core/kern/emu/getroot.c (find_root_device_from_mountinfo):
Build a list of relevant visible mounts using the mnt_id and
parent_mnt_id fields, and then scan that list at the end.
2011-04-13 12:36:04 +01:00
Vladimir 'phcoder' Serbinenko
c7ba1ba62e merge mainline into butter 2011-04-11 07:56:31 +02:00
Vladimir 'phcoder' Serbinenko
5ca1a64de6 * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_data): New member
is_disk.
	(grub_util_biosdisk_open): Don't apply ioctl on non-disk devices.
	(open_device) Likewise.
	(grub_util_biosdisk_close): Likewise.
	Reported by: Mark Korenberger.
2011-04-10 16:08:58 +02:00
Vladimir 'phcoder' Serbinenko
478182a838 * grub-core/kern/emu/hostdisk.c (open_device): Sync on close and not
on open.
	(grub_util_biosdisk_close): Likewise.
2011-04-08 11:49:38 +02:00
Vladimir 'phcoder' Serbinenko
72a89a54e1 * grub-core/kern/emu/getroot.c (grub_util_get_grub_dev): Add missing
const attribute and use grub_isdigit.
2011-04-08 11:44:44 +02:00
Vladimir 'phcoder' Serbinenko
829ea451a4 * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_read): Don't close
on failed seek as it breaks open fd reusage.
2011-04-03 15:45:20 +02:00
Vladimir 'phcoder' Serbinenko
56445fb2b4 * grub-core/kern/emu/getroot.c (grub_util_get_grub_dev) [__linux__]:
Preserve partition number in mdadm code path.
2011-03-30 16:37:10 +02:00
Vladimir 'phcoder' Serbinenko
c871b1c6d0 * grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_get_grub_dev): Add
few potentially useful grub_util_info.
2011-03-30 13:13:25 +02:00
Vladimir 'phcoder' Serbinenko
9e4d19e0d3 * grub-core/kern/emu/hostdisk.c (find_partition_start)
[HAVE_DIOCGDINFO]: Add safety checks.
2011-03-29 15:00:23 +02:00
Seth Goldberg
c482ad98b3 * grub-core/kern/emu/getroot.c (find_root_device_from_libzfs): Don't return freed string. 2011-03-26 23:22:59 +01:00
Vladimir 'phcoder' Serbinenko
f4727da93f Use libgeom on FreeBSD to detect partitions.
* Makefile.util.def (grub-mkimage): Add LIBGEOM to ldadd.
	(grub-mkrelpath): Likewise.
	(grub-script-check): Likewise.
	(grub-editenv): Likewise.
	(grub-mkpasswd-pbkdf2): Likewise.
	(grub-fstest): Likewise.
	(grub-mkfont): Likewise.
	(grub-mkdevicemap): Likewise.
	(grub-probe): Likewise.
	(grub-setup): Likewise.
	(grub-ofpathname): Likewise.
	(grub-mklayout): Likewise.
	(example_unit_test): Likewise.
	(grub-menulst2cfg): Likewise.
	* grub-core/Makefile.core.def (grub-emu): Likewise.
	(grub-emu-lite): Likewise.
	* configure.ac: Check for -lgeom on FreeBSD and set LIBGEOM.
	* grub-core/kern/emu/hostdisk.c [FreeBSD]: Include libgeom.h. Don't
	define HAVE_DIOCGDINFO.
	(follow_geom_up) [FreeBSD]: New function.
	(find_partition_start) [FreeBSD]: Rewritten using follow_geom_up.
	(convert_system_partition_to_system_disk) [FreeBSD]: Likewise.
	(grub_util_biosdisk_get_grub_dev) [FreeBSD]: Use FreeBSD path
	unconditionally of HAVE_DIOCGDINFO.
2011-03-26 12:59:02 +01:00
Vladimir 'phcoder' Serbinenko
82fe6c751b Fix FreeBSD compilation problem.
* grub-core/kern/emu/hostdisk.c (MAJOR) [FreeBSD]: New definition.
	(FLOPPY_MAJOR) [FreeBSD]: Likewise.
2011-03-26 12:49:34 +01:00
Colin Watson
ebad0b81be remove unused variable 2011-03-23 14:45:04 +00:00
Colin Watson
28f9509eb7 merge trunk 2011-02-17 14:51:11 +00:00
Colin Watson
8c2c4ff2f5 Handle empty dir passed to grub_find_root_device_from_mountinfo; fixes grub-mkrelpath on btrfs subvolumes. 2011-02-04 13:33:16 +00:00
Colin Watson
118fb264ee Support probing multipath disks. 2011-01-25 16:51:23 +00:00
Colin Watson
307ed0b484 remove unused variables 2011-01-25 12:28:11 +00:00
Vladimir 'phcoder' Serbinenko
3533413cd5 * grub-core/kern/emu/getroot.c: Include config-util.h explicitly. 2011-01-22 15:37:05 +01:00
Colin Watson
bd1a414714 Resolve the device returned by grub_find_root_device_from_mountinfo or
find_root_device_from_libzfs using grub_find_device.
Reported by: Roderich Schupp.
2011-01-12 17:27:52 -06:00
Vladimir 'phcoder' Serbinenko
4b07826647 partitioned mdraid support (untested) 2011-01-08 16:33:49 +01:00
Colin Watson
b7d86d53c4 merge trunk 2011-01-07 17:26:15 +00:00
Colin Watson
11b970d7c9 Always initialise *relroot in grub_find_root_device_from_mountinfo,
otherwise we free an uninitialised pointer if /proc is unmounted.
Reported by: Scott Moser.
2011-01-07 17:24:25 +00:00
Colin Watson
6383772c92 remove unused variable 2011-01-06 18:08:01 +00:00
Colin Watson
71b6a2b7a2 * grub-core/kern/emu/getroot.c (find_root_device_from_mountinfo):
Fix prefix check to handle the case where dir ends with a slash
(most significantly, "/" itself).
Reported by: Michael Vogt.
2011-01-06 11:09:17 +00:00
Colin Watson
304e349b7f include <grub/emu/getroot.h> for grub_find_device 2011-01-05 11:41:12 +00:00
Vladimir 'phcoder' Serbinenko
ebc71d284c * grub-core/kern/emu/getroot.c (grub_util_get_grub_dev): Check md/%s
names.
	Reported by: David Pravec.
2011-01-04 18:15:27 +01:00
Vladimir 'phcoder' Serbinenko
228cfb40bf support bind and subvolume mount 2010-12-02 14:26:46 +01:00
Modestas Vainius
d20a3b371c * grub-core/kern/emu/getroot.c (grub_util_is_dmraid): Recognise ddf1_
fakeraid.
2010-11-14 17:09:13 +01:00
Vladimir 'phcoder' Serbinenko
c0e103e4da Support for partitioned loop devices. Improved devmapper support 2010-11-08 16:51:50 +01:00
Vladimir 'phcoder' Serbinenko
80c6d25eef * grub-core/kern/emu/hostdisk.c
(convert_system_partition_to_system_disk): Handle devices like "sdaa1".
2010-11-07 00:10:49 +01:00
Vladimir 'phcoder' Serbinenko
4f6a2e2175 * grub-core/kern/emu/misc.c
(grub_make_system_path_relative_to_its_root)
	[HAVE_LIBZFS && HAVE_LIBNVPAIR]: Fix mountpoint return on ZFS.
2010-10-23 20:39:08 +02:00
Vladimir 'phcoder' Serbinenko
5c81f8b349 * grub-core/kern/emu/misc.c
(grub_make_system_path_relative_to_its_root): Revert r2882.
2010-10-23 20:34:50 +02:00
Robert Millan
1eb01cd276 2010-10-16 Robert Millan <rmh@gnu.org>
* grub-core/kern/emu/misc.c
	(grub_make_system_path_relative_to_its_root): Fix premature return
	when processing non-root ZFS filesystems.
2010-10-16 02:30:14 +02:00
Robert Millan
8e57a6ca44 2010-09-26 Robert Millan <rmh@gnu.org>
Support degraded ZFS arrays in "grub-probe -t device" resolution.
	
	* grub-core/kern/emu/getroot.c (find_root_device_from_libzfs): When
	the pool is an array of devices, iterate through it and return the
	first device that passes a stat() test (instead of blindly returning
	the first one).
2010-09-26 16:11:33 +02:00
Robert Millan
f913083640 2010-09-26 Robert Millan <rmh@gnu.org>
Build fixes for GNU/kFreeBSD.
	
	* Makefile.util.def: Add `$(LIBZFS) $(LIBNVPAIR)' library dependencies
	to programs that require ZFS conversion.
	* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_is_floppy): Support
	kernels that don't have FLOPPY_MAJOR.
2010-09-26 15:53:05 +02:00
BVK Chaitanya
96510fafd2 fix typo 2010-09-25 10:48:48 +05:30
BVK Chaitanya
449333eb7d Fix grub-emu build.
* grub-core/kern/emu/main.c: Remove #include <getopt.h>.
	* grub-core/kern/emu/full.c: Split grub_mdraid_{init,fini} into
	mdraid09 and mdraid1x.
2010-09-25 10:43:09 +05:30
Grégoire Sutre
1b655af685 Define FLOPPY_MAJOR on NetBSD. 2010-09-22 23:32:58 +02:00