Date: Wed, 6 Sep 2017 23:44:31 +0100 From: Frank Leonhardt <frank2@fjl.co.uk> To: freebsd-questions@freebsd.org Subject: Re: problem booting from 2nd drive Message-ID: <8a798574-5d68-d6a3-259f-e971d1e30e4e@fjl.co.uk> In-Reply-To: <4B828DE3-C784-45A9-A01B-F944DAFE1601@cretaforce.gr> References: <4B828DE3-C784-45A9-A01B-F944DAFE1601@cretaforce.gr>
next in thread | previous in thread | raw e-mail | index | archive | help
On 06/09/2017 21:55, Christos Chatzaras wrote: > I used dump/restore commands to copy a custom freebsd 11.1 to a new server. After I restore the files I create gmirror (RAID-1) and copy the bootcode to both disks: > > gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0 > gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada1 > > When I select from BIOS to boot using 1st disk (ada0) then it boots without issue. If I select to boot from 2nd disk (ada1) then it hangs and restarts again and again. > > > gpart show > > => 40 7814037088 ada0 GPT (3.6T) > 40 472 1 freebsd-boot (236K) > 512 8388608 2 freebsd-ufs (4.0G) > 8389120 134217728 3 freebsd-swap (64G) > 142606848 33554432 4 freebsd-ufs (16G) > 176161280 134217728 5 freebsd-ufs (64G) > 310379008 33554432 6 freebsd-ufs (16G) > 343933440 1073741824 7 freebsd-ufs (512G) > 1417675264 6396361856 8 freebsd-ufs (3.0T) > 7814037120 8 - free - (4.0K) > > => 40 7814037088 ada1 GPT (3.6T) > 40 472 1 freebsd-boot (236K) > 512 8388608 2 freebsd-ufs (4.0G) > 8389120 134217728 3 freebsd-swap (64G) > 142606848 33554432 4 freebsd-ufs (16G) > 176161280 134217728 5 freebsd-ufs (64G) > 310379008 33554432 6 freebsd-ufs (16G) > 343933440 1073741824 7 freebsd-ufs (512G) > 1417675264 6396361856 8 freebsd-ufs (3.0T) > 7814037120 8 - free - (4.0K) > > > The message I get during boot is: > > gptboot: invalid primary GPT header > gptboot: invalid backup GPT header > gptboot: unable to load GPT > P.S. Possible reasons for the invalid header message are that the sector it reads in doesn't start with "EFI PART", the LBA the thing is read from doesn't match the one stored in the GPT, the revision number is too low or there there are too many entries in it. Looking at this again, I'd guess that it WAS reading a sector from a valid drive, but something about the sector was wrong. Either it IS the wrong sector, or it ended up on a sector that didn't match on the second drive. Why not dump out the GPT on both and take a look? Are these drives identical?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8a798574-5d68-d6a3-259f-e971d1e30e4e>