From owner-freebsd-questions@FreeBSD.ORG Thu Aug 30 13:52:52 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C1FD8106566B for ; Thu, 30 Aug 2012 13:52:52 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id 7C5D38FC0A for ; Thu, 30 Aug 2012 13:52:52 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.5/8.14.5) with ESMTP id q7UDqhIU008394; Thu, 30 Aug 2012 07:52:43 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.5/8.14.5/Submit) with ESMTP id q7UDqhRb008391; Thu, 30 Aug 2012 07:52:43 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Thu, 30 Aug 2012 07:52:42 -0600 (MDT) From: Warren Block To: =?KOI8-R?B?98nUwczJyiD01dLP18XD?= In-Reply-To: Message-ID: References: User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (wonkity.com [127.0.0.1]); Thu, 30 Aug 2012 07:52:43 -0600 (MDT) Cc: FreeBSD Questions List Subject: Re: Force disk with old GPT label to be recognized as MBR one X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Aug 2012 13:52:52 -0000 On Thu, 30 Aug 2012, ??????? ??????? wrote: > Hello there, people! > I have a FreeBSD box with 9.1-RC3 i386 and an interesting HDD. > It was patitioned with GPT and zfs some (long) time ago. After that > the hdd has been completely repartitioned with MBR scheme and one > single freebsd (165) partition and one slice there. It worked fine in > 7.2, but now i have to get the data from that slice and when i connect > the hdd to 9.1 box, it finds old corrupt GPT label (i suppose, it's > backup GPT header somewhere in the end of actual disk) and does not > recognize the MBR scheme there. In case it has not been said: make a full backup of everything on that disk first using dd. Erasing the last 34 blocks or 17048 bytes of the disk will erase the backup GPT. It may be enough to erase just the very last block. # diskinfo -v /dev/ada1 /dev/ada1 512 # sectorsize 256060514304 # mediasize in bytes (238G) 500118192 # mediasize in sectors # : Not tested, could be off by one! # dd if=/dev/zero of=/dev/ada1 bs=512 seek=500118191 Force a retaste with 'true > /dev/ada1', then see what gpart shows. If the drive is still seen as GPT, adjust the seek to begin at (mediasize in sectors) - 34.