From mboxrd@z Thu Jan 1 00:00:00 1970 From: Oleg Pykhalov Subject: Re: partitions and filesystems Date: Thu, 16 Nov 2017 06:44:12 +0300 Message-ID: <87ineax4z7.fsf@gmail.com> References: <20171104120107.002ca8de@graviton.instanton> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48852) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eFB6C-0007dx-Ul for help-guix@gnu.org; Wed, 15 Nov 2017 22:44:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eFB68-0005PW-Q9 for help-guix@gnu.org; Wed, 15 Nov 2017 22:44:20 -0500 Received: from mail-lf0-x232.google.com ([2a00:1450:4010:c07::232]:46694) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eFB68-0005On-D8 for help-guix@gnu.org; Wed, 15 Nov 2017 22:44:16 -0500 Received: by mail-lf0-x232.google.com with SMTP id k66so16510833lfg.3 for ; Wed, 15 Nov 2017 19:44:16 -0800 (PST) In-Reply-To: <20171104120107.002ca8de@graviton.instanton> (Marco van Hulten's message of "Sat, 04 Nov 2017 12:01:07 +0100") List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: Marco van Hulten Cc: help-guix@gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello Marco, Thank you for catching this! Marco van Hulten writes: > Something is not so clear to me on this page: > > https://www.gnu.org/software/guix/manual/html_node/Preparing-for-Installa= tion.html > > under section "6.1.4.3 Disk Partitioning": > >> Preferably, assign partitions a label so that you can easily and >> reliably refer to them in file-system declarations (see File >> Systems). This is typically done using the -L option of mkfs.ext4 and >> related commands. So, assuming the target root partition lives >> at /dev/sda1, a file system with the label my-root can be created >> with: mkfs.ext4 [...] > > and > >> mount the target root partition under /mnt with a command like >> (again, assuming my-root is the label of the root partition) > > Wait, "my-root" was the label of the filesystem, right? > > > I think the terms "partition" and "filesystem" are confused here. I > propose that this be correct and consistent, so > > - a partition has a "partition label"; > - a filesystem has a "filesystem label", or "volume label" when > following mkfs(8) terminology. This makes sense. Also here is additional information. https://superuser.com/questions/1099232/what-is-the-difference-between-a-pa= rtition-name-and-a-partition-label/1099292 The GPT disk format can simply contain more data than its predecessors. One of these fields is the partition name, which, as you have found, can be set by gdisk or similar. However, before GPT, there were formats which didn't support labels in the partition table (e.g. MBR), so the data was stored in the fs as a filesystem label. Using GPT with a filesystem that supports labels (i.e. basically anything) therefore produces the slightly confusing combination of partition name/label and filesystem name/label. These values are totally independent, (although I don't exactly recommend making them totally different) and most programs will use the fs label, as that one is available across basically all file systems, unlike the partition name, which is only on GPT. However, some programs can use the partition name too. (E.g. /dev/disk/ contains by-label/ as well as by-partlabel/.) =2D-8<---------------cut here---------------start------------->8--- $ sudo blkid /dev/sda1: SEC_TYPE=3D"msdos" UUID=3D"=E2=80=A6" TYPE=3D"vfat" PARTLABEL=3D= "EFI System Partition" PARTUUID=3D"=E2=80=A6" /dev/sda2: LABEL=3D"magnolia-root" UUID=3D"=E2=80=A6" TYPE=3D"ext4" PARTUUI= D=3D"=E2=80=A6" /dev/sdb1: LABEL=3D"magnolia-data" UUID=3D"=E2=80=A6" TYPE=3D"ext4" PARTUUI= D=3D"=E2=80=A6" =2D-8<---------------cut here---------------end--------------->8--- =2D-8<---------------cut here---------------start------------->8--- $ ls /dev/disk/{by-label,by-partlabel} /dev/disk/by-label: magnolia-data magnolia-root /dev/disk/by-partlabel: 'EFI\x20System\x20Partition' =2D-8<---------------cut here---------------end--------------->8--- > Could someone make this consistent? Or I could propose an updated text. > Should I send them in plain text to guix-devel? We need someone to make a patch. I attached one below. If it is not good enough, you could send =E2=80=9Cupdated text=E2=80=9D as a =E2=80=9Cpl= ain text=E2=80=9D file or as a patch to this mailing list or guix-devel@gnu.org or bug-guix@gnu.org. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-doc-Unconfuse-my-root-file-system-label-and-partitio.patch Content-Transfer-Encoding: quoted-printable Content-Description: [PATCH] doc: Unconfuse my-root file system label and partition label. From=203d39f3c02b4e7192ce8879b86f75434b1bd692e0 Mon Sep 17 00:00:00 2001 From: Marco van Hulten Date: Thu, 16 Nov 2017 06:21:23 +0300 Subject: [PATCH] doc: Unconfuse my-root file system label and partition lab= el. * doc/guix.texi (Preparing for Installation): Unconfuse 'my-root' file syst= em label and partition label. =2D-- doc/guix.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 098ff5e54..8045312e5 100644 =2D-- a/doc/guix.texi +++ b/doc/guix.texi @@ -8072,7 +8072,7 @@ types.}. For the ESP, if you have one and assuming i= t is mkfs.fat -F32 /dev/sda2 @end example =20 =2DPreferably, assign partitions a label so that you can easily and +Preferably, assign file system a label so that you can easily and reliably refer to them in @code{file-system} declarations (@pxref{File Systems}). This is typically done using the @code{-L} option of @command{mkfs.ext4} and related commands. So, assuming the target root @@ -8099,7 +8099,7 @@ mkfs.ext4 -L my-root /dev/mapper/my-partition =20 Once that is done, mount the target root partition under @file{/mnt} with a command like (again, assuming @code{my-root} is the label of the =2Droot partition): +root file system): =20 @example mount LABEL=3Dmy-root /mnt =2D-=20 2.15.0 --=-=-= Content-Type: text/plain Oleg. --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEc+OyAXw1EaDPCmAPckbhHGm3lWkFAloNCYwACgkQckbhHGm3 lWkboRAA0c6RB+GNZ4CiQG43bbn8/cOI17HcKnRw/RzpQmcl3/BVmtHAvdjDiXhG SyEfgVpdi4jHhP08F0nYeRZ6qUbsoOFk/XgInjracNm90mHhOBwxLYxdlbyfDqCr gJPo2H95/5ux1+iZf06tasA/SXPsTtFkSh1bdCYSSDH69iv6v3hF9enbYDQf/6+K 2QJBTspHImaZjlHWpqI0SwpenQxbEnjsuj01VuErBR9IPpdfmAxA1HEtmXmYs3BX BI0nptTChyCudRp94SJnekLEhe2a6HgshDGvPG3jcuoh/8iydgwjcTP5ArE1JTV8 uk/c68cLvGrnYGLRHOgwyF5Fgi7XHBKV7sjpr4oAKj2RM3u5gttp65YqwZsRgU8w uQGN7EZDrRF9B/f4tCF26zMvlUuKvmE9ImqsiEpriAYwowjsks6Pk53b334tiwhG XgRCjEklLtN3F+X5lJYWDE8js9r5OLbmkvfL7o7ftCWhn3icdA2d9qR70oomgat5 EpHJm8U1rX8QLKFgzuaT7q8kg2h1TZdhR4yckSBFG+fsfYQW3e+ZZVp0wiKDiZRF Ve2B0VlyNPnTiXkdj7xsn3zOwhb6gBW2UtuGEyEY7x3tmza14TumRBs7Eqe0bw0M W4/0G8DJERBNQjctExL1sNy5TcvFZ50Uq6AEDiKpbDB07+tJ5h8= =5lZ6 -----END PGP SIGNATURE----- --==-=-=--