summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/guestfs-recipes.pod15
1 files changed, 14 insertions, 1 deletions
diff --git a/examples/guestfs-recipes.pod b/examples/guestfs-recipes.pod
index 0b86e7c4..1a1e51c4 100644
--- a/examples/guestfs-recipes.pod
+++ b/examples/guestfs-recipes.pod
@@ -123,7 +123,7 @@ one which is encrypted or buried inside an LV or RAID device):
To download to stdout, replace the filename with a C<-> character:
- guestfish --ro -a disk.img run : download /dev/sda1 - | hexdump -C
+ guestfish --ro -a disk.img run : download /dev/sda1 - | gzip > sda1.gz
To list the filesystems in a disk image, use L<virt-filesystems(1)>.
@@ -317,6 +317,19 @@ This might give you a clue as to what program is running.
=back
+=head1 Hex-dumping sectors from the guest
+
+Hex-dump the boot partition:
+
+ guestfish --ro -a disk.img run : pread-device /dev/sda 0x200 0 |
+ hexdump -C
+
+=head1 Hex-editing sectors in the guest
+
+Hex-edit the first sector (boot partition):
+
+ guestfish --rw -a disk.img run : hexedit /dev/sda 0x200
+
=head1 Install RPMs in a guest
The link below contains a method to install RPMs in a guest. In fact