Re: The backup GPT table is corrupt
Hi,
Phako wrote:
> > More over, the sector has not the expected size of 512B but 4096B
Nicolas George wrote:
> in octal, 0001000 means 512.
After all "od" means "octal dump".
One has to use "-t x1" to get single hex bytes. This option might even
stem from this century. Regrettably
https://pubs.opengroup.org/onlinepubs/9799919799/utilities/od.html
does not give year numbers with
"the optional field sizes were added to the d, f, o, u, and x type
specifiers"
I wrote my own dumper for inspecting binary data only to learn that
od can meanwhile put out multiline dumps:
$ echo 'Write an unambiguous representation' | od -t x1 -c -t d1
0000000 57 72 69 74 65 20 61 6e 20 75 6e 61 6d 62 69 67
W r i t e a n u n a m b i g
87 114 105 116 101 32 97 110 32 117 110 97 109 98 105 103
0000020 75 6f 75 73 20 72 65 70 72 65 73 65 6e 74 61 74
u o u s r e p r e s e n t a t
117 111 117 115 32 114 101 112 114 101 115 101 110 116 97 116
0000040 69 6f 6e 0a
i o n \n
105 111 110 10
0000044
The only remaining advantages of my hxd are that it gives hex and
decimal addresses, that it restricts its output to less than
80 characters per line (other than "od -t d1"), and that i don't have
to look into its non-existent manual:
$ echo 'Write an unambiguous representation' | hxd
00000000 : 57 72 69 74 65 20 61 6e 20 75 6e 61 6d 62 69 67
W r i t e a n u n a m b i g
0 : 87 114 105 116 101 32 97 110 32 117 110 97 109 98 105 103
00000010 : 75 6f 75 73 20 72 65 70 72 65 73 65 6e 74 61 74
u o u s r e p r e s e n t a t
16 : 117 111 117 115 32 114 101 112 114 101 115 101 110 116 97 116
00000020 : 69 6f 6e 0a
i o n
32 : 105 111 110 10
Have a nice day :)
Thomas
Reply to: