Received: from list by lists.gnu.org with archive (Exim 4.71) id 1azOSS-0003cr-Iz for mharc-grub-devel@gnu.org; Sun, 08 May 2016 09:09:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50507) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azOSQ-0003Zk-Qn for grub-devel@gnu.org; Sun, 08 May 2016 09:09:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1azOSO-0004jS-NM for grub-devel@gnu.org; Sun, 08 May 2016 09:09:13 -0400 Received: from smtpgw.dds.nl ([91.142.252.201]:36726 helo=smtp1.dds.nl) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1azOSK-0004is-16; Sun, 08 May 2016 09:09:08 -0400 Received: from webmail.dds.nl (app1.dds.nl [81.21.136.61]) by smtp1.dds.nl (Postfix) with ESMTP id D3C4B7F92D; Sun, 8 May 2016 15:09:06 +0200 (CEST) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Date: Sun, 08 May 2016 15:09:06 +0200 From: Dryden Personalis To: The development of GNU GRUB Cc: Grub-devel Subject: Re: [PATCH] Install to LVM PVs In-Reply-To: <572F0592.2010209@gmail.com> References: <572F0592.2010209@gmail.com> Message-ID: <01fced6a9e7410f3e6b3c041de4e213b@dds.nl> X-Sender: list@xenhideout.nl User-Agent: Roundcube Webmail/1.1.5 X-Virus-Scanned: clamav-milter 0.99.1 at smtp1 X-Virus-Status: Clean Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 91.142.252.201 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 May 2016 13:09:15 -0000 Andrei Borzenkov schreef op 08-05-2016 11:23: > 08.05.2016 07:53, Dryden Personalis =D0=BF=D0=B8=D1=88=D0=B5=D1=82: >> + if (is_lvm) >> + err =3D grub_util_lvm_embed (dest_dev->disk, &nsec, maxsec, >> + GRUB_EMBED_PCBIOS, §ors); >=20 > PV label may be in the first sector. In this case label will be > overwritten later by boot image. This needs additional check. Is that only true for the first sector? I saw it checks the first 4. So=20 I don't know what it does by default? pvcreate will not work on disks that have a partition, but they are okay=20 with having a label but no partitions. the man page suggests wiping the first sector, but it says nothing about=20 where it will install itself. You are suggesting to check whether PV header is in 1-3, and not proceed=20 if it is in 0.