Chris Murphy wrote:
On Mar 15, 2013, at 8:51 AM, Lennart Sorensen
<lsore...@csclub.uwaterloo.ca> wrote:
On Thu, Mar 14, 2013 at 08:56:18PM -0600, Chris Murphy wrote:
Right, for a 4Kn drive, to read LBA 1 and get the GPT header I'd
need:
sudo dd if=/dev/disk3 skip=8 count=1 2>/dev/null | hexdump -C
Wouldn't using 'bs=4096' make things simpler and more obvious?
How would it?
These structures are still predicated on a 512 byte block. The MBR is
always 512 bytes, but on a 4096/4096 4Kn drive, LBA 0 is 4096 bytes.
So if I don't want to see 3584 bytes of useless garbage, I can't set
the dd block size to 4096, or I get extra information.
If I want to see just the GPT header, which while only ~92 bytes, by
spec it gets its own sector, there's far less superfluous information
using a bs of 512 bytes than 4096 bytes.
There is more than one way to do things.
sudo dd if=/dev/disk3 bs=4096 skip=1 count=1 | cut -c 1-92 | hexdump -C
is one way that matches the physical drive.
The first mentioned way works too, but doesn't reflect as well what is
really going on.
-- Bruce
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel