grub2: Invoking grub2-mount

1 
1 28 Invoking grub2-mount
1 ***********************
1 
1 The program 'grub2-mount' performs a read-only mount of any file system
1 or file system image that GRUB understands, using GRUB's file system
1 drivers via FUSE. (It is only available if FUSE development files were
1 present when GRUB was built.)  This has a number of uses:
1 
1    * It provides a convenient way to check how GRUB will view a file
1      system at boot time.  You can use normal command-line tools to
1      compare that view with that of your operating system, making it
1      easy to find bugs.
1 
1    * It offers true read-only mounts.  Linux does not have these for
1      journalling file systems, because it will always attempt to replay
1      the journal at mount time; while you can temporarily mark the block
1      device read-only to avoid this, that causes the mount to fail.
1      Since GRUB intentionally contains no code for writing to file
1      systems, it can easily provide a guaranteed read-only mount
1      mechanism.
1 
1    * It allows you to examine any file system that GRUB understands
1      without needing to load additional modules into your running
1      kernel, which may be useful in constrained environments such as
1      installers.
1 
1    * Since it can examine file system images (contained in regular
1      files) just as easily as file systems on block devices, you can use
1      it to inspect any file system image that GRUB understands with only
1      enough privileges to use FUSE, even if nobody has yet written a
1      FUSE module specifically for that file system type.
1 
1    Using 'grub2-mount' is normally as simple as:
1 
1      grub-mount /dev/sda1 /mnt
1 
1    'grub2-mount' must be given one or more images and a mount point as
1 non-option arguments (if it is given more than one image, it will treat
1 them as a RAID set), and also accepts the following options:
1 
1 '--help'
1      Print a summary of the command-line options and exit.
1 
1 '--version'
1      Print the version number of GRUB and exit.
1 
1 '-C'
1 '--crypto'
1      Mount encrypted devices, prompting for a passphrase if necessary.
1 
1 '-d STRING'
1 '--debug=STRING'
1      Show debugging output for conditions matching STRING.
1 
1 '-K prompt|FILE'
1 '--zfs-key=prompt|FILE'
1      Load a ZFS encryption key.  If you use 'prompt' as the argument,
1      'grub2-mount' will read a passphrase from the terminal; otherwise,
1      it will read key material from the specified file.
1 
1 '-r DEVICE'
1 '--root=DEVICE'
1      Set the GRUB root device to DEVICE.  You do not normally need to
1      set this; 'grub2-mount' will automatically set the root device to
1      the root of the supplied file system.
1 
1      If DEVICE is just a number, then it will be treated as a partition
1      number within the supplied image.  This means that, if you have an
1      image of an entire disk in 'disk.img', then you can use this
1      command to mount its second partition:
1 
1           grub-mount -r 2 disk.img mount-point
1 
1 '-v'
1 '--verbose'
1      Print verbose messages.
1