From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ciPUq-0003IQ-EP for mharc-grub-devel@gnu.org; Mon, 27 Feb 2017 12:54:04 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48321) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ciPUo-0003HN-8r for grub-devel@gnu.org; Mon, 27 Feb 2017 12:54:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ciPUi-0006xI-01 for grub-devel@gnu.org; Mon, 27 Feb 2017 12:54:02 -0500 Received: from mail-lf0-x232.google.com ([2a00:1450:4010:c07::232]:35073) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ciPUh-0006xE-Ob for grub-devel@gnu.org; Mon, 27 Feb 2017 12:53:55 -0500 Received: by mail-lf0-x232.google.com with SMTP id z127so36600887lfa.2 for ; Mon, 27 Feb 2017 09:53:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=dEs4JNAKEEB9sDGWpyG1nDdqAELyypYqQUuVuACRl2Q=; b=Q7CFko+7k37z5G7nx6pZr6P9KNnxDpdjDWjPNITNDNESMXPNdz7qy8NHESV6z0fEvw 0KRdPRzeGu51xoP0gM1Z/CODwe4PWLBJl25nXw3QXZEliN5ExV5lIwqkLUi71vovVOFq X+jvoTa01d6HETVe2ZunoFkAwONjnr7Br5oEffd8ysHBtUdR4ScMSTAfg2tCkQU+XTxM IR879oU4ex0sUayj2KvTOhdp83dwZKj80x5CvSTIY+nUIrpVcTMDn4TJoeaRhmNbkoGT yniUNg49O/qPpT6gB5Z2RIzKeUnWpyAAjW+DMfNUEafP/iWtCRC6ctnHqvobKcR9CNO9 gJEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=dEs4JNAKEEB9sDGWpyG1nDdqAELyypYqQUuVuACRl2Q=; b=W3e44K3kfEmR6RI6GAQ1wkC/9QfscOjP+GXcO7MVpIxZcGYoC3MhWFKG6PS13nVWY8 20WNznASrvlXutEVxoDyJGRNs/bDPJolKR2T6IkGeLcIQZ55wQ1xOX0q+wMMGiDjOrw6 IATN3ekSNW2CWnsp2O3JVkdBhh7wlYYYa4Jqy5iut042XNli6/fdV/I9Cu1QufYKkOm/ gUswAXsIQY2mbeq4ekaph619LKTvcicJN9ssJ6vUDgFAihF9lYbnrPIgHb9OkhzxkmGs CN5TVrqOn631K1n2b5RxLGL7INb593WXIFx/iW5HtkPHz+guLFbSPfQKwqofi136zzDz 1mYA== X-Gm-Message-State: AMke39ne6YVOjMn+S811RsYn14Rm/85Q8xFLVU9ZXhI9qSahdz8nWSmJeFPAt3myQXdpEw== X-Received: by 10.46.5.2 with SMTP id 2mr269340ljf.34.1488218033610; Mon, 27 Feb 2017 09:53:53 -0800 (PST) Received: from [192.168.1.6] (ppp109-252-90-129.pppoe.spdop.ru. [109.252.90.129]) by smtp.gmail.com with ESMTPSA id w17sm10529996ljd.54.2017.02.27.09.53.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 27 Feb 2017 09:53:52 -0800 (PST) Subject: Re: [PATCH 1/1] add --partuuid to probe To: grub-devel@gnu.org References: <20170214180035.3461-1-skenton@ou.edu> From: Andrei Borzenkov Message-ID: <2e48f17a-20d7-c9cb-2300-1bc5fec88f12@gmail.com> Date: Mon, 27 Feb 2017 20:53:51 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::232 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 17:54:03 -0000 27.02.2017 03:37, Vladimir 'phcoder' Serbinenko пишет: ... >>>>> This is not NT-style. NT uses partition offset. Who uses this format? >> Are >>>> >>>> This is used by util-linux and Linux kernel. >>>> >>>> >>>> * 6) PARTUUID=00112233-4455-6677-8899-AABBCCDDEEFF representing >> 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 grub >> 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. 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 != bdev->bd_contains) >> 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. >>