diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2009-07-15 23:12:02 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2009-07-15 23:12:02 +0100 |
commit | 7428b0a70caed014d0cb4126fe8a77432d8957c6 (patch) | |
tree | ac205ce3daeddff9129e4d7bc7c01eb62eaa1fdc /src/generator.ml | |
parent | 7fc3faabc71621a9d8b429d15327955f20757080 (diff) | |
download | libguestfs-7428b0a70caed014d0cb4126fe8a77432d8957c6.tar.gz libguestfs-7428b0a70caed014d0cb4126fe8a77432d8957c6.tar.xz libguestfs-7428b0a70caed014d0cb4126fe8a77432d8957c6.zip |
New commands: 'mkmountpoint' and 'rmmountpoint'
These specialized commands are used to create additional mountpoints
before mounting filesystems. They are only used where you want to
mount several unrelated or read-only filesystems together, and need
additional care to use correctly.
Here is how to use these calls to unpack the "Russian doll" nest
of a Fedora 11 live CD:
add-ro Fedora-11-i686-Live.iso
run
mkmountpoint /cd
mkmountpoint /squash
mkmountpoint /ext3
mount /dev/sda /cd
mount-loop /cd/LiveOS/squashfs.img /squash
mount-loop /squash/LiveOS/ext3fs.img /ext3
The inner filesystem is now unpacked under the /ext3 mountpoint.
Diffstat (limited to 'src/generator.ml')
-rwxr-xr-x | src/generator.ml | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/generator.ml b/src/generator.ml index 381e0ea7..adcc4ba4 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -2937,6 +2937,42 @@ This call is similar to C<guestfs_mounts>. That call returns a list of devices. This one returns a hash table (map) of device name to directory where the device is mounted."); + ("mkmountpoint", (RErr, [String "path"]), 148, [], + [], + "create a mountpoint", + "\ +C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are +specialized calls that can be used to create extra mountpoints +before mounting the first filesystem. + +These calls are I<only> necessary in some very limited circumstances, +mainly the case where you want to mount a mix of unrelated and/or +read-only filesystems together. + +For example, live CDs often contain a \"Russian doll\" nest of +filesystems, an ISO outer layer, with a squashfs image inside, with +an ext2/3 image inside that. You can unpack this as follows +in guestfish: + + add-ro Fedora-11-i686-Live.iso + run + mkmountpoint /cd + mkmountpoint /squash + mkmountpoint /ext3 + mount /dev/sda /cd + mount-loop /cd/LiveOS/squashfs.img /squash + mount-loop /squash/LiveOS/ext3fs.img /ext3 + +The inner filesystem is now unpacked under the /ext3 mountpoint."); + + ("rmmountpoint", (RErr, [String "path"]), 149, [], + [], + "remove a mountpoint", + "\ +This calls removes a mountpoint that was previously created +with C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> +for full details."); + ] let all_functions = non_daemon_functions @ daemon_functions |