unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: Oleg Pykhalov <go.wigust@gmail.com>
To: Marco van Hulten <marco@hulten.org>
Cc: help-guix@gnu.org
Subject: Re: partitions and filesystems
Date: Thu, 16 Nov 2017 06:44:12 +0300	[thread overview]
Message-ID: <87ineax4z7.fsf@gmail.com> (raw)
In-Reply-To: <20171104120107.002ca8de@graviton.instanton> (Marco van Hulten's message of "Sat, 04 Nov 2017 12:01:07 +0100")


[-- Attachment #1.1: Type: text/plain, Size: 3387 bytes --]

Hello Marco,

Thank you for catching this!

Marco van Hulten <marco@hulten.org> writes:

> Something is not so clear to me on this page:
>
> https://www.gnu.org/software/guix/manual/html_node/Preparing-for-Installation.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-partition-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/.)

--8<---------------cut here---------------start------------->8---
$ sudo blkid
/dev/sda1: SEC_TYPE="msdos" UUID="…" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="…"
/dev/sda2: LABEL="magnolia-root" UUID="…" TYPE="ext4" PARTUUID="…"
/dev/sdb1: LABEL="magnolia-data" UUID="…" TYPE="ext4" PARTUUID="…"
--8<---------------cut here---------------end--------------->8---

--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'
--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 “updated text” as a “plain text” file or as
a patch to this mailing list or guix-devel@gnu.org or bug-guix@gnu.org.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: [PATCH] doc: Unconfuse my-root file system label and partition label. --]
[-- Type: text/x-patch, Size: 1335 bytes --]

From 3d39f3c02b4e7192ce8879b86f75434b1bd692e0 Mon Sep 17 00:00:00 2001
From: Marco van Hulten <marco@hulten.org>
Date: Thu, 16 Nov 2017 06:21:23 +0300
Subject: [PATCH] doc: Unconfuse my-root file system label and partition label.

* doc/guix.texi (Preparing for Installation): Unconfuse 'my-root' file system
  label and partition label.
---
 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
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -8072,7 +8072,7 @@ types.}.  For the ESP, if you have one and assuming it is
 mkfs.fat -F32 /dev/sda2
 @end example
 
-Preferably, 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
 
 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
-root partition):
+root file system):
 
 @example
 mount LABEL=my-root /mnt
-- 
2.15.0


[-- Attachment #1.3: Type: text/plain, Size: 7 bytes --]


Oleg.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2017-11-16  3:44 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-04 11:01 partitions and filesystems Marco van Hulten
2017-11-16  3:44 ` Oleg Pykhalov [this message]
2017-11-16 14:05   ` Marco van Hulten
2017-11-16 16:00     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ineax4z7.fsf@gmail.com \
    --to=go.wigust@gmail.com \
    --cc=help-guix@gnu.org \
    --cc=marco@hulten.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).