From owner-svn-src-user@FreeBSD.ORG Wed Jun 20 13:35:28 2012 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E25D71065674; Wed, 20 Jun 2012 13:35:28 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigknife-pt.tunnel.tserv9.chi1.ipv6.he.net [IPv6:2001:470:1f10:75::2]) by mx1.freebsd.org (Postfix) with ESMTP id B6A878FC0C; Wed, 20 Jun 2012 13:35:28 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 10444B911; Wed, 20 Jun 2012 09:35:28 -0400 (EDT) From: John Baldwin To: "Andrey V. Elsukov" Date: Wed, 20 Jun 2012 09:30:03 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p13; KDE/4.5.5; amd64; ; ) References: <201206200829.q5K8TPcK028907@svn.freebsd.org> <201206200744.57808.jhb@freebsd.org> <4FE1C832.7000805@FreeBSD.org> In-Reply-To: <4FE1C832.7000805@FreeBSD.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201206200930.03176.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 20 Jun 2012 09:35:28 -0400 (EDT) Cc: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: Re: svn commit: r237294 - user/ae/bootcode/sys/boot/i386/pmbr X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jun 2012 13:35:29 -0000 On Wednesday, June 20, 2012 8:55:14 am Andrey V. Elsukov wrote: > On 20.06.2012 15:44, John Baldwin wrote: > >> Add one partition record to the PMBR image. It covers all space after > >> the LBA 0. It is better to have one partially correct record, than > >> have nothing. > > > > This latter part is not true. :( > > > > boot1 has a hardcoded partition in it (for use in dangerously dedicated mode). > > This has a mixed history. At one point the table entry it used caused certain > > SCSI BIOSes to crash due to a divide by zero (the SCSI BIOS read the MBR to > > try to guess what C/H/S geometry the rest of the system was expecting). I > > think having a hardcoded entry here can only really result in problems. I > > would rather you add some sort of 'restore' functionality to gpart that > > allowed it to build a PMBR 'from scratch' with a proper partition entry than > > to resort to this hack. > > AFAIK, DD mode is not supported now. Correct, because it was a disasater. Let's not create a new disaster. > As another solution we can remove checking for PMBR partition type existence > when detecting GPT (like the kernel does). I think adding a suitable command to gpart to let it recover a disk is the way to go. -- John Baldwin