diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-11-15 09:01:15 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-11-15 09:01:15 +0000 |
commit | 5d9f10c31297c5f6bfe261717dfc5c841722a4c2 (patch) | |
tree | 140e36e0c10d1a4ced1ef0ec883ecf01bc5d9221 | |
parent | fd81d3f9b25f9ee8616091c9c3abb7373e185015 (diff) | |
download | libguestfs-5d9f10c31297c5f6bfe261717dfc5c841722a4c2.tar.gz libguestfs-5d9f10c31297c5f6bfe261717dfc5c841722a4c2.tar.xz libguestfs-5d9f10c31297c5f6bfe261717dfc5c841722a4c2.zip |
recipes: Add sections about hexdumping, hexediting sectors.
-rw-r--r-- | examples/guestfs-recipes.pod | 15 |
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 |