From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: util-linux-owner@vger.kernel.org Received: from mail-ie0-f179.google.com ([209.85.223.179]:34777 "EHLO mail-ie0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752736AbbGNUQ6 (ORCPT ); Tue, 14 Jul 2015 16:16:58 -0400 Received: by iebmu5 with SMTP id mu5so19357988ieb.1 for ; Tue, 14 Jul 2015 13:16:58 -0700 (PDT) Received: from brickies-eth0.mosers.us (d149-67-16-30.nap.wideopenwest.com. [67.149.30.16]) by smtp.gmail.com with ESMTPSA id g81sm1260969ioi.20.2015.07.14.13.16.57 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Jul 2015 13:16:57 -0700 (PDT) Date: Tue, 14 Jul 2015 16:16:56 -0400 (EDT) From: Scott Moser To: util-linux@vger.kernel.org Subject: GPT writing of unknown partition uuids Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: util-linux-owner@vger.kernel.org List-ID: Hi, I came to send the previous patch after realizing that the following is a lossy operation if the GUID type for the partition is not known to sfdisk. $ img="/tmp/my.img" $ size="100M" $ rm -f "$img" $ truncate --size "$size" "$img" $ GPT_PREP="9E1A2D38-C612-4316-AA26-8B49521E5A8B" $ PT1_UUID="7EB5EBCA-1611-431B-9C80-D87300B41B3B" $ LABEL_UUID="3C5AD185-CFBF-480D-B80C-AD089E073AC9" $ sfdisk "$img" <