From owner-freebsd-current@FreeBSD.ORG Wed Jun 27 19:27:43 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BCBA41065670; Wed, 27 Jun 2012 19:27:43 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward6.mail.yandex.net (unknown [IPv6:2a02:6b8:0:202:22cf:30ff:fe6b:6ebc]) by mx1.freebsd.org (Postfix) with ESMTP id EF7938FC1D; Wed, 27 Jun 2012 19:27:42 +0000 (UTC) Received: from smtp8.mail.yandex.net (smtp8.mail.yandex.net [77.88.61.54]) by forward6.mail.yandex.net (Yandex) with ESMTP id 6BC5B1122011; Wed, 27 Jun 2012 23:27:41 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1340825261; bh=OkIspLjKNGyDaXq1y54PSoQ1RwCOJlaxTYj6xdEDex8=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type; b=WEM/gdYAgPrvfgtzz2Ut57kWXpxwvT3h575FAUMWCrqRDbUauQXUZ+OHE9I/w6HXt DkXqPjTwurTeBjIDz+L5vsZAAuNArZxOPxrlGjfhAGZTmbmEhOwqYEi39z9YSp6+GW ODlC+gKC61OQhxQHPCx83+6QmBNc0aprTkC5o4qw= Received: from smtp8.mail.yandex.net (localhost [127.0.0.1]) by smtp8.mail.yandex.net (Yandex) with ESMTP id E141A1B604F8; Wed, 27 Jun 2012 23:27:40 +0400 (MSK) Received: from dynamic-178-141-5-132.kirov.comstar-r.ru (dynamic-178-141-5-132.kirov.comstar-r.ru [178.141.5.132]) by smtp8.mail.yandex.net (nwsmtp/Yandex) with ESMTP id ReOCrCvP-ReOStuZF; Wed, 27 Jun 2012 23:27:40 +0400 X-Yandex-Rcpt-Suid: marcel@xcllnt.net X-Yandex-Rcpt-Suid: jhb@freebsd.org X-Yandex-Rcpt-Suid: dfr@freebsd.org X-Yandex-Rcpt-Suid: marcel@freebsd.org X-Yandex-Rcpt-Suid: pjd@freebsd.org X-Yandex-Rcpt-Suid: freebsd-hackers@freebsd.org X-Yandex-Rcpt-Suid: avg@freebsd.org X-Yandex-Rcpt-Suid: freebsd-current@freebsd.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1340825260; bh=OkIspLjKNGyDaXq1y54PSoQ1RwCOJlaxTYj6xdEDex8=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:X-Enigmail-Version:Content-Type; b=eWuqWtCm5wixM4u9+w5Mht+fOE+tsyf0ejOwz+dW8gs9aNGc5piFB1qkicRFRxfcX hc4beO5f0yRROxtjbMaffb1yf33TEnBF7ep3B6vEWHGFydimWesxp4kvEu4qGGskNO VJYI9hHykSYemJzvLzQZh8waNbYVUj0ipqShUClI= Message-ID: <4FEB5EA1.7060903@yandex.ru> Date: Wed, 27 Jun 2012 23:27:29 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0.3) Gecko/20120406 Thunderbird/10.0.3 MIME-Version: 1.0 To: Marcel Moolenaar References: <4FE9B01C.30306@yandex.ru> <201206261337.11741.jhb@freebsd.org> <4FEA910C.4090305@yandex.ru> <7E41D945-F6FA-48D5-ADDC-4884A7C7C0F8@xcllnt.net> In-Reply-To: <7E41D945-F6FA-48D5-ADDC-4884A7C7C0F8@xcllnt.net> X-Enigmail-Version: 1.4 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig83CA4CDA895588EA348A5B70" Cc: Doug Rabson , Marcel Moolenaar , Pawel Jakub Dawidek , freebsd-hackers , Andriy Gapon , freebsd-current Subject: Re: [CFC/CFT] large changes in the loader(8) code X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Jun 2012 19:27:43 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig83CA4CDA895588EA348A5B70 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable On 27.06.2012 21:55, Marcel Moolenaar wrote: > You can't just re-interpret standards to match a context you know very = well > isn't applicable and consequently redefine what the word "device" means= =2E > You're on a slippery slope and while you may not see it as a problem, y= ou > do make it a problem for FreeBSD users. It's our users we should be kee= ping > in mind when we solve problems. >=20 >> If a user wants modify GPT in the disk editor from the another OS, >> he can do it, and it should work. The result depends only from the par= tition editor, >> it might overwrite the last sector and might don't. >=20 > Right. Another happy user that sees his/her FreeBSD installation destro= yed > or degraded (no mirroring, warning messages about corrupted GPT, etc) f= or > no apparent reason and without any kind of warning that what he/she is = doing > is potentially harmful... That's the spirit! Ok. Let's return back to my patches. They don't add any new methods to shoot in the foot. We are talking about the *FreeBSD loader*. This is the program that starts FreeBSD kernel. It doesn't start other OS. We already have many users who uses FreeBSD as a single system on the machine. Many of them use GPT inside of some GEOM provider. You can just read the lists, articles about installing FreeBSD, forums, etc. We already have these users and i hope they will use FreeBSD as before. So, why can't add a simple quirk to make theirs system a bit more reliable? As i understand there two parts where we haven't a consensus: 1. You are against from: Our loader detects that primary GPT header is damaged. It tries to read backup GPT header from the last LBA and it detects that there is "GEOM::" signature. It tries to read one previous sector and there is *valid* GPT header. It is valid, because it's CRC is valid, it's self_LBA is valid. For the *FreeBSD* users it is better to don't use this GPT and just complain "i'm sorry, can't boot". The other OSes can't, and we shouldn't. 2. You are against from having one fake PMBR entry by default in the /boot/pmbr image. Ok, I can propose several ways to resolve this: * remove from the loader's GPT probing code restriction to necessarily have PMBR partition record in the MBR; * teach the boot0cfg command properly write the PMBR; * add new condition to mark GPT as corrupt when it has invalid PMBR. Thus, when you write PMBR with empty partition table with dd(1), the kernel will complain and you will be forced to run `gpart recover`. --=20 WBR, Andrey V. Elsukov --------------enig83CA4CDA895588EA348A5B70 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQEcBAEBAgAGBQJP616pAAoJEAHF6gQQyKF6+e4H/iJa1VBeTVo2y5XMs0n4jwSZ ESorJVjkq+erib5v25ww5YHD4B2302wYaSJUu4dSHtWvAv9WRbMz917GPnYegc8T PNGPOuVFUqBYcdlBbJFoPg+yZG+OdkLzjLrcQk3GCOpapBxTD5FNhGaWzwtZUhJ2 yD0wnmS1qwJKObiJxWQOgC9NoJJT06b033ss+aj8qERbE0Sh7jijDycG4rNDYI71 b5LbBXqU+YrmJRrWz4x9i1kKBe/O6XVgeNEW/wmhz7XuWQiCnJ7jiUknrsxYofP/ 7ybGIgZaQn+ZhC0AFkdiqxF5RW/sYsB+CIeOoGtZnG8zclgkdUJNsgv9L+BCdBs= =r5NN -----END PGP SIGNATURE----- --------------enig83CA4CDA895588EA348A5B70--