* Re: partitions and filesystems
2017-11-04 11:01 partitions and filesystems Marco van Hulten
@ 2017-11-16 3:44 ` Oleg Pykhalov
2017-11-16 14:05 ` Marco van Hulten
0 siblings, 1 reply; 4+ messages in thread
From: Oleg Pykhalov @ 2017-11-16 3:44 UTC (permalink / raw)
To: Marco van Hulten; +Cc: help-guix
[-- 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 --]
^ permalink raw reply related [flat|nested] 4+ messages in thread