[Pkg-libvirt-commits] [libguestfs] 92/384: recipes: Tidy up section about hex-dumping and hex-editing sectors.

Hilko Bengen bengen at moszumanska.debian.org
Sun Mar 29 16:55:51 UTC 2015


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to branch experimental
in repository libguestfs.

commit ccb1f2a4a02da2f56649b5452f6b9c0356f91798
Author: Richard W.M. Jones <rjones at redhat.com>
Date:   Sat Dec 13 14:49:32 2014 +0000

    recipes: Tidy up section about hex-dumping and hex-editing sectors.
---
 examples/guestfs-recipes.pod | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)

diff --git a/examples/guestfs-recipes.pod b/examples/guestfs-recipes.pod
index 80e28bb..0bb2c0d 100644
--- a/examples/guestfs-recipes.pod
+++ b/examples/guestfs-recipes.pod
@@ -427,14 +427,23 @@ This might give you a clue as to what program is running.
 
 =head1 Hex-dumping sectors from the guest
 
-Hex-dump the boot partition:
+Hex-dump the boot partition (Master Boot Record / first sector):
 
  guestfish --ro -a disk.img run : pread-device /dev/sda 0x200 0 |
    hexdump -C
 
+(C<0x200> = 512 bytes which is the size of traditional PC sectors)
+
+To hexdump the N'th partition, substitute a number for C<N> in the
+following command:
+
+ guestfish --ro -a disk.img \
+     run : pread-device /dev/sda 0x200 $((N*0x200)) |
+   hexdump -C
+
 =head1 Hex-editing sectors in the guest
 
-Hex-edit the first sector (boot partition):
+Hex-edit the boot partition (Master Boot Record / first sector):
 
  guestfish --rw -a disk.img run : hexedit /dev/sda 0x200
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git



More information about the Pkg-libvirt-commits mailing list