From owner-freebsd-questions@freebsd.org Wed Sep 6 22:22:12 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 586DEE1A77C for ; Wed, 6 Sep 2017 22:22:12 +0000 (UTC) (envelope-from frank2@fjl.co.uk) Received: from bs1.fjl.org.uk (bs1.fjl.org.uk [84.45.41.196]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "bs1.fjl.org.uk", Issuer "bs1.fjl.org.uk" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A02F46FFD3 for ; Wed, 6 Sep 2017 22:22:10 +0000 (UTC) (envelope-from frank2@fjl.co.uk) Received: from [192.168.1.35] (host81-153-12-205.range81-153.btcentralplus.com [81.153.12.205]) (authenticated bits=0) by bs1.fjl.org.uk (8.14.4/8.14.4) with ESMTP id v86MLxXo050427 for ; Wed, 6 Sep 2017 23:21:59 +0100 (BST) (envelope-from frank2@fjl.co.uk) Subject: Re: problem booting from 2nd drive To: freebsd-questions@freebsd.org References: <4B828DE3-C784-45A9-A01B-F944DAFE1601@cretaforce.gr> From: Frank Leonhardt Message-ID: <100fd907-b8a5-daf9-112f-1363fe6f7e2e@fjl.co.uk> Date: Wed, 6 Sep 2017 23:22:02 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <4B828DE3-C784-45A9-A01B-F944DAFE1601@cretaforce.gr> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Sep 2017 22:22:12 -0000 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 I'd guess this is something to do with the BIOS and the way disks get configured when you boot from the second one. You get this is the sector read fails for some reason. Knowing the reason would be useful! AIUI, gptboot goes off looking for a UFS partition to boot from - not necessarily the disk it's just loaded from! Could it be looking at some other drive (real, or imagined by the BIOS) that doesn't have a GPT partition on it? Something to think about until Warran shows up :-) Regards, Frank.