Blame SOURCES/0079-docs-grub.texi-Invoking-grub-mount-New-section.patch

f96e0b
From d964d1d7d0a8805e9a2cdf63b5124846e5301897 Mon Sep 17 00:00:00 2001
f96e0b
From: Colin Watson <cjwatson@ubuntu.com>
f96e0b
Date: Thu, 3 Jan 2013 10:32:57 +0000
f96e0b
Subject: [PATCH 079/482] * docs/grub.texi (Invoking grub-mount): New section.
f96e0b
 Reported by: Filipus Klutiero.  Fixes Debian bug #666427.
f96e0b
f96e0b
---
f96e0b
 ChangeLog      |  5 ++++
f96e0b
 docs/grub.texi | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
f96e0b
 2 files changed, 95 insertions(+), 1 deletion(-)
f96e0b
f96e0b
diff --git a/ChangeLog b/ChangeLog
f96e0b
index 0585437..c91fe35 100644
f96e0b
--- a/ChangeLog
f96e0b
+++ b/ChangeLog
f96e0b
@@ -1,3 +1,8 @@
f96e0b
+2013-01-03  Colin Watson  <cjwatson@ubuntu.com>
f96e0b
+
f96e0b
+	* docs/grub.texi (Invoking grub-mount): New section.
f96e0b
+	Reported by: Filipus Klutiero.  Fixes Debian bug #666427.
f96e0b
+
f96e0b
 2013-01-02  Colin Watson  <cjwatson@ubuntu.com>
f96e0b
 
f96e0b
 	* grub-core/tests/lib/test.c (grub_test_run): Return non-zero on
f96e0b
diff --git a/docs/grub.texi b/docs/grub.texi
f96e0b
index e9af377..60b18b5 100644
f96e0b
--- a/docs/grub.texi
f96e0b
+++ b/docs/grub.texi
f96e0b
@@ -20,7 +20,7 @@
f96e0b
 This manual is for GNU GRUB (version @value{VERSION},
f96e0b
 @value{UPDATED}).
f96e0b
 
f96e0b
-Copyright @copyright{} 1999,2000,2001,2002,2004,2006,2008,2009,2010,2011,2012 Free Software Foundation, Inc.
f96e0b
+Copyright @copyright{} 1999,2000,2001,2002,2004,2006,2008,2009,2010,2011,2012,2013 Free Software Foundation, Inc.
f96e0b
 
f96e0b
 @quotation
f96e0b
 Permission is granted to copy, distribute and/or modify this document
f96e0b
@@ -37,6 +37,7 @@ Invariant Sections.
f96e0b
 * grub-mkconfig: (grub)Invoking grub-mkconfig.  Generate GRUB configuration
f96e0b
 * grub-mkpasswd-pbkdf2: (grub)Invoking grub-mkpasswd-pbkdf2.
f96e0b
 * grub-mkrescue: (grub)Invoking grub-mkrescue.  Make a GRUB rescue image
f96e0b
+* grub-mount: (grub)Invoking grub-mount.        Mount a file system using GRUB
f96e0b
 * grub-probe: (grub)Invoking grub-probe.        Probe device information
f96e0b
 @end direntry
f96e0b
 
f96e0b
@@ -101,6 +102,7 @@ This edition documents version @value{VERSION}.
f96e0b
 * Invoking grub-mkpasswd-pbkdf2::
f96e0b
                                 Generate GRUB password hashes
f96e0b
 * Invoking grub-mkrescue::      Make a GRUB rescue image
f96e0b
+* Invoking grub-mount::         Mount a file system using GRUB
f96e0b
 * Invoking grub-probe::         Probe device information for GRUB
f96e0b
 * Obtaining and Building GRUB:: How to obtain and build GRUB
f96e0b
 * Reporting bugs::              Where you should send a bug report
f96e0b
@@ -4830,6 +4832,93 @@ built-in default.
f96e0b
 @end table
f96e0b
 
f96e0b
 
f96e0b
+@node Invoking grub-mount
f96e0b
+@chapter Invoking grub-mount
f96e0b
+
f96e0b
+The program @command{grub-mount} performs a read-only mount of any file
f96e0b
+system or file system image that GRUB understands, using GRUB's file system
f96e0b
+drivers via FUSE.  (It is only available if FUSE development files were
f96e0b
+present when GRUB was built.)  This has a number of uses:
f96e0b
+
f96e0b
+@itemize @bullet
f96e0b
+@item
f96e0b
+It provides a convenient way to check how GRUB will view a file system at
f96e0b
+boot time.  You can use normal command-line tools to compare that view with
f96e0b
+that of your operating system, making it easy to find bugs.
f96e0b
+
f96e0b
+@item
f96e0b
+It offers true read-only mounts.  Linux does not have these for journalling
f96e0b
+file systems, because it will always attempt to replay the journal at mount
f96e0b
+time; while you can temporarily mark the block device read-only to avoid
f96e0b
+this, that causes the mount to fail.  Since GRUB intentionally contains no
f96e0b
+code for writing to file systems, it can easily provide a guaranteed
f96e0b
+read-only mount mechanism.
f96e0b
+
f96e0b
+@item
f96e0b
+It allows you to examine any file system that GRUB understands without
f96e0b
+needing to load additional modules into your running kernel, which may be
f96e0b
+useful in constrained environments such as installers.
f96e0b
+
f96e0b
+@item
f96e0b
+Since it can examine file system images (contained in regular files) just as
f96e0b
+easily as file systems on block devices, you can use it to inspect any file
f96e0b
+system image that GRUB understands with only enough privileges to use FUSE,
f96e0b
+even if nobody has yet written a FUSE module specifically for that file
f96e0b
+system type.
f96e0b
+@end itemize
f96e0b
+
f96e0b
+Using @command{grub-mount} is normally as simple as:
f96e0b
+
f96e0b
+@example
f96e0b
+grub-mount /dev/sda1 /mnt
f96e0b
+@end example
f96e0b
+
f96e0b
+@command{grub-mount} must be given one or more images and a mount point as
f96e0b
+non-option arguments (if it is given more than one image, it will treat them
f96e0b
+as a RAID set), and also accepts the following options:
f96e0b
+
f96e0b
+@table @option
f96e0b
+@item --help
f96e0b
+Print a summary of the command-line options and exit.
f96e0b
+
f96e0b
+@item --version
f96e0b
+Print the version number of GRUB and exit.
f96e0b
+
f96e0b
+@item -C
f96e0b
+@itemx --crypto
f96e0b
+Mount encrypted devices, prompting for a passphrase if necessary.
f96e0b
+
f96e0b
+@item -d @var{string}
f96e0b
+@itemx --debug=@var{string}
f96e0b
+Show debugging output for conditions matching @var{string}.
f96e0b
+
f96e0b
+@item -K prompt|@var{file}
f96e0b
+@itemx --zfs-key=prompt|@var{file}
f96e0b
+Load a ZFS encryption key.  If you use @samp{prompt} as the argument,
f96e0b
+@command{grub-mount} will read a passphrase from the terminal; otherwise, it
f96e0b
+will read key material from the specified file.
f96e0b
+
f96e0b
+@item -r @var{device}
f96e0b
+@itemx --root=@var{device}
f96e0b
+Set the GRUB root device to @var{device}.  You do not normally need to set
f96e0b
+this; @command{grub-mount} will automatically set the root device to the
f96e0b
+root of the supplied file system.
f96e0b
+
f96e0b
+If @var{device} is just a number, then it will be treated as a partition
f96e0b
+number within the supplied image.  This means that, if you have an image of
f96e0b
+an entire disk in @file{disk.img}, then you can use this command to mount
f96e0b
+its second partition:
f96e0b
+
f96e0b
+@example
f96e0b
+grub-mount -r 2 disk.img mount-point
f96e0b
+@end example
f96e0b
+
f96e0b
+@item -v
f96e0b
+@itemx --verbose
f96e0b
+Print verbose messages.
f96e0b
+@end table
f96e0b
+
f96e0b
+
f96e0b
 @node Invoking grub-probe
f96e0b
 @chapter Invoking grub-probe
f96e0b
 
f96e0b
-- 
f96e0b
1.8.2.1
f96e0b