From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ciPuO-0007Ql-Hx for mharc-grub-devel@gnu.org; Mon, 27 Feb 2017 13:20:28 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ciPuL-0007JZ-2y for grub-devel@gnu.org; Mon, 27 Feb 2017 13:20:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ciPuJ-0006iD-No for grub-devel@gnu.org; Mon, 27 Feb 2017 13:20:25 -0500 Received: from mail-ua0-x233.google.com ([2607:f8b0:400c:c08::233]:33226) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ciPuJ-0006hI-Gp for grub-devel@gnu.org; Mon, 27 Feb 2017 13:20:23 -0500 Received: by mail-ua0-x233.google.com with SMTP id e4so31655258uae.0 for ; Mon, 27 Feb 2017 10:20:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=dq961Q0ffBBe0/Ix0tobQ9A52VSWr+Qz7xctrducy/g=; b=kURPYut5D/ZoOGLIgS8XBvsOajJZTPQp44LOrHEkCOy1pTt6cmhyDc5Vyx8CJ8Ui6I AcjjfgUipgZ3uPOKg/3Lusow9EHCrOKk/ewoFOAJtMELd/NOkq4YV4ECUHjdQJHrZuGt gAWqyuVdSX+9xvzGJV0H9joZIKddKEipYwitjt9QDc7FatGQcoFN+oqyoeewB6jHpSMh H3ePVb/nViUZuwWA5MBY6TroXRUSE1/JjZ7zt7jcvqxG8YddbPuFN/He7Tt2Hu+K7dZr 82+laJDqT/FARppl8nnJpJvfmnFRQKTRKSXbxqRRq8qqaugkZJ7wb8ikMRudSqEr3ZAd p66g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=dq961Q0ffBBe0/Ix0tobQ9A52VSWr+Qz7xctrducy/g=; b=CgRQxoQ6Rlt4zQ8PIxjw8kVgnhfT/uEjA3DMefKPnHEJGMpdnKuuJY1jaMFGH4HHyC 2Hvd1ViNXTXh104NxMwD8+VpveCPnrGtXkHyPm+AE3R4EvokUVH9DxelFfwHT3tTGD04 Pqj2T6izWK7e2RePj1pjB61AJUUTX3BESXGzcFvYTsjYFEk+0lyi3v40yfLaMZ07RgZd 2U5dJ5q+NrQ2aFXSZ7UkujE4WXiYwcBbNPyx5I1EpeqxruUJH/+oLqUGay3Mrj3Isq/I prVfJu6s1a+wbbYLN/4FR3Yr01yXw9LNzzOKoAwok/6wGABd572WbIflxQ/0Y0QEd3Zm YesA== X-Gm-Message-State: AMke39k+JcmtjHauOqMShVdV+lsauLUl1wloVfcOiBSn+Xo0CPx9EcqPaKCorH5vRIyG/yQ4tXwORq8px2qwaQ== X-Received: by 10.176.90.147 with SMTP id w19mr8498631uae.0.1488219622667; Mon, 27 Feb 2017 10:20:22 -0800 (PST) MIME-Version: 1.0 References: <20170214180035.3461-1-skenton@ou.edu> <2e48f17a-20d7-c9cb-2300-1bc5fec88f12@gmail.com> In-Reply-To: <2e48f17a-20d7-c9cb-2300-1bc5fec88f12@gmail.com> From: "Vladimir 'phcoder' Serbinenko" Date: Mon, 27 Feb 2017 18:20:11 +0000 Message-ID: Subject: Re: [PATCH 1/1] add --partuuid to probe To: The development of GNU GRUB Content-Type: multipart/alternative; boundary=f403045f8a20f4fa6405498721fe X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400c:c08::233 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: Mon, 27 Feb 2017 18:20:26 -0000 --f403045f8a20f4fa6405498721fe Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, Feb 27, 2017, 09:55 Andrei Borzenkov wrote: > 27.02.2017 03:37, Vladimir 'phcoder' Serbinenko =D0=BF=D0=B8=D1=88=D0=B5= =D1=82: > ... > >>>>> This is not NT-style. NT uses partition offset. Who uses this forma= t? > >> Are > >>>> > >>>> This is used by util-linux and Linux kernel. > >>>> > >>>> > >>>> * 6) PARTUUID=3D00112233-4455-6677-8899-AABBCCDDEEFF represent= ing > >> the > >>>> * unique id of a partition if the partition table provides > it. > >>>> * The UUID may be either an EFI/GPT UUID, or refer to an > MSDOS > >>>> * partition using the format SSSSSSSS-PP, where SSSSSSSS is= a > >>>> zero- > >>>> * filled hex representation of the 32-bit "NT disk > signature", > >>>> and PP > >>>> * is a zero-filled hex representation of the 1-based > partition > >>>> number. > >>>> > >>>>> you sure that partition numbers are synced with user? Even in > presence > >> of > >>>>> Solaris and bsd partitions. > >>>>> > >>>> > >>>> It is not clear what we should return for nested partition. I'm not > sure > >>>> whether linux kernel scans nested partitions at all in which case we > >>>> probably should follow the suite and assign PARTUUID to top-level > >>>> partitions only. > >>>> > >>> Linux scans nested partitions and it uses though numeration in > dev/sdaX, > >> in > >>> some cases shifting numbering of normal partitions. In those cases gr= ub > >> and > >>> Linux numeration get out of sync > >>> > >> > >> Can you provide example? > > > > Bsd and Solaris partitions. I remember we had problem with numbering of > > those. > > > > Linux ignores nested BSD partitions (just tested). There are no special > files created. Of course someone needs to test what happens under > *BSD/Solaris in this case. > Kpartx or normal sdX? Is bsd-partition support enabled in kernel build? > > I never liked idea of artificial partition GUIDs for MBR, but as long as > only Linux is using them and we are consistent with its usage - so be it. > > >> I tried to create nested partition table, but > >> Linux will not display it (actually attempt to "blockdev --rereadpt > >> /dev/vda5" fails with "Invalid argument"). > >> > >> if (!disk_part_scan_enabled(disk) || bdev !=3D bdev->bd_contai= ns) > >> return -EINVAL; > >> > >> Where bdev->bd_contains points to containing device for partition and = to > >> itself for the whole disk. > >> > >> As util-linux does not scan partition table itself, it does show these > >> nested partitions either. > >> > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel > --f403045f8a20f4fa6405498721fe Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On Mon, Feb 27, 2017, 0= 9:55 Andrei Borzenkov <arvidjaar@= gmail.com> wrote:
27.02.20= 17 03:37, Vladimir 'phcoder' Serbinenko =D0=BF=D0=B8=D1=88=D0=B5=D1= =82:
...
>>>>> This is not NT-style. NT uses partition offset. Who us= es this format?
>> Are
>>>>
>>>> This is used by util-linux and Linux kernel.
>>>>
>>>>
>>>>=C2=A0 *=C2=A0 =C2=A0 =C2=A0 6) PARTUUID=3D00112233-4455-66= 77-8899-AABBCCDDEEFF representing
>> the
>>>>=C2=A0 *=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0unique id of a pa= rtition if the partition table provides it.
>>>>=C2=A0 *=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0The UUID may be e= ither an EFI/GPT UUID, or refer to an MSDOS
>>>>=C2=A0 *=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0partition using t= he format SSSSSSSS-PP, where SSSSSSSS is a
>>>> zero-
>>>>=C2=A0 *=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0filled hex repres= entation of the 32-bit "NT disk signature",
>>>> and PP
>>>>=C2=A0 *=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0is a zero-filled = hex representation of the 1-based partition
>>>> number.
>>>>
>>>>> you sure that partition numbers are synced with user? = Even in presence
>> of
>>>>> Solaris and bsd partitions.
>>>>>
>>>>
>>>> It is not clear what we should return for nested partition= . I'm not sure
>>>> whether linux kernel scans nested partitions at all in whi= ch case we
>>>> probably should follow the suite and assign PARTUUID to to= p-level
>>>> partitions only.
>>>>
>>> Linux scans nested partitions and it uses though numeration in= dev/sdaX,
>> in
>>> some cases shifting numbering of normal partitions. In those c= ases grub
>> and
>>> Linux numeration get out of sync
>>>
>>
>> Can you provide example?
>
> Bsd and Solaris partitions. I remember we had problem with numbering o= f
> those.
>

Linux ignores nested BSD partitions (just tested). There are no special
files created. Of course someone needs to test what happens under
*BSD/Solaris in this case.
K= partx or normal sdX? Is bsd-partition support enabled in kernel build?

I never liked idea of artificial partition GUIDs for MBR, but as long as only Linux is using them and we are consistent with its usage - so be it.
>> I tried to create nested partition table, but
>> Linux will not display it (actually attempt to "blockdev --re= readpt
>> /dev/vda5" fails with "Invalid argument").
>>
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if (!disk_part_scan_enabled(disk)= || bdev !=3D bdev->bd_contains)
>>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0retur= n -EINVAL;
>>
>> Where bdev->bd_contains points to containing device for partiti= on and to
>> itself for the whole disk.
>>
>> As util-linux does not scan partition table itself, it does show t= hese
>> nested partitions either.
>>


_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/l= istinfo/grub-devel
--f403045f8a20f4fa6405498721fe--