Re: GEOM has amnesia

From: Andrey V. Elsukov <bu7cher_at_yandex.ru>
Date: Sat, 1 Apr 2017 01:36:54 +0300
On 01.04.2017 00:58, Chris H wrote:
> So. I spin up an old 11 server I have sitting in the closet, with
> this external drive attached to it. I do *NOT* get the corrupt GPT
> message. So I blank/partition/newfs the external drive &&
> mount the partitions individually to /mnt && restore again. When I
> reboot to the external drive still connected to the old 11 server,
> I do *NOT* receive the corrupt GPT message. WooHoo! I think.
> So I re-attach the drive to the new 12 server. Reboot, and can't
> boot to it && get the corrupt GPT message.
> 
> GEOM seems to be broken in 12, maybe even (recent) 11. As the 11
> server I used for testing is ~9 mos out.
> 
> What can I do to (help?) fix this mess?

Just a guess, BIOS on the system, where FreeBSD 12 is installed
overwrites the last sector of your disks.
I have seen such reports, and always this was the cause.

You can do the following steps to make sure:
* on the old 11 system with the sane GPT save the last sector to some file.
* reboot, save the sector again to another file and compare both files.
* attach the disk to your 12 system, GPT should become corrupted. Save
the last sector and compare with previous file.

You can look at the hexdump of this file, and probably it should be
obviously what is extraneous in the data.

To save the last sector you need to know its number, it can be found by
this command:

 # diskinfo da0 | awk '{print $4-1}'

Then use dd to save it:

 # dd if=/dev/da0 of=./sector skip=`diskinfo da0 | awk '{print $4-1}'`
 # hexdump -C ./sector

You should see something like this:
00000000  45 46 49 20 50 41 52 54  00 00 01 00 5c 00 00 00  |EFI
PART....\...|
00000010  d7 b2 b7 bc 00 00 00 00  af 32 cf 1d 00 00 00 00
|.........2......|
00000020  01 00 00 00 00 00 00 00  28 00 00 00 00 00 00 00
|........(.......|
00000030  87 32 cf 1d 00 00 00 00  a0 4a 4a e0 b0 0a e7 11
|.2.......JJ.....|
00000040  ba c4 54 ee 75 ad 8c c7  8f 32 cf 1d 00 00 00 00
|..T.u....2......|
00000050  80 00 00 00 80 00 00 00  22 88 eb 6d 00 00 00 00
|........"..m....|
00000060  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
|................|
*
00000200

The dump of correct GPT header should not have more lines.

-- 
WBR, Andrey V. Elsukov


Received on Fri Mar 31 2017 - 20:37:42 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:11 UTC