From owner-freebsd-questions@FreeBSD.ORG Thu Aug 30 19:06:18 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4697F1065673 for ; Thu, 30 Aug 2012 19:06:18 +0000 (UTC) (envelope-from corebug@corebug.net) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id E79848FC08 for ; Thu, 30 Aug 2012 19:06:17 +0000 (UTC) Received: by vbmv11 with SMTP id v11so3043833vbm.13 for ; Thu, 30 Aug 2012 12:06:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:x-gm-message-state; bh=P/kwRRcsDABV0dPegI2enle2361MT8wjy0MKKmZlrgM=; b=blnaG0NhM1hl4TMRs+eAhTSle2SXFjPwM5LVwSwe6N7F7wemJk09E/HQ3owKxnjlqn A98msxItOQfLthan9tihknOu2WeTyRFR3q8YkNN/1P23OlHRn6m6jcTUBa6AlBzZJoVA FXDbsqP2E74i7gs36bIObd0lwgPDL3GdREfdKOWnP0duW/lzwcjtJMBrgPPWgcNMtHr8 843KF/fxiFa6AMqTwDakXUkyusvNZ8cE4xm4jh77IUuTVOrNWM6BVuOX6IwQTdtD9ULQ TEYFNNKwHoDjzVk9RD7ci5SJWACmNRD2L2kQaGptEZ37Eq/XzuDqizpkKdVKGCl/SDeT XYHQ== Received: by 10.220.248.69 with SMTP id mf5mr3926201vcb.42.1346353576066; Thu, 30 Aug 2012 12:06:16 -0700 (PDT) MIME-Version: 1.0 Received: by 10.58.249.138 with HTTP; Thu, 30 Aug 2012 12:05:55 -0700 (PDT) X-Originating-IP: [176.113.162.13] In-Reply-To: References: From: =?UTF-8?B?0JLQuNGC0LDQu9C40Lkg0KLRg9GA0L7QstC10YY=?= Date: Thu, 30 Aug 2012 22:05:55 +0300 Message-ID: To: Warren Block Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQkw0p6loLzhBoWhPGxmfnMXFLn1jN11rbSo2Ne+CvFvRCc9jyci4K82lf3WjTDoQXB3ganO 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 19:06:18 -0000 2012/8/30 Warren Block : > 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. Thank you a lot! It worked like a charm! -- ~~~ WBR, Vitaliy Turovets Systems Administrator Corebug.Net +38(093)265-70-55 VITU-RIPE X-NCC-RegID: ua.tv