On Mon 25 Nov 2024 at 10:33:35 (-0500), Felix Miata wrote:
> David Wright composed on 2024-11-25 09:21 (UTC-0600):
> > On Mon 25 Nov 2024 at 10:07:35 (-0500), eben wrote:
> >> George at Clug wrote:
>
> >>> I would create a folder into which to mount the HD's relevant
> >>> partition, then used "blkid" to find the UUID and manually added a
> >>> mount point to "/etc/fstab".  The resulting paths may be a bit ugly,
> >>> but I am lazy.
>
> >> I find PARTLABELs to be a lot more human-friendly than UUIDs.
>
> > Can you put PARTLABELs on an MBR disk?
>
> > (I'm not condoning such a disk. I'd take the opportunity to
> > switch to UEFI booting from a GPT SSD if that's possible.
> > Some explanation of the partitioning would be useful, rather
> > that slavishly copying them.)
>
> I have to think eben wasn't conscious of the difference between PARTLABEL and
> LABEL when composing.

My comment was more for the benefit of the OP, who's the one actually
configuring their system. AFAICT they're sticking with BIOS booting
and MBR partitions.

> All manual configuration I do involving Linux native filesystems is done using
> LABELs, swapspace too. I favor lsblk -f over blkid most of the time.

Same here, but with one exception of course: encrypted partitions,
which are selected by PARTLABEL.

On Mon 25 Nov 2024 at 12:24:57 (-0500), eben wrote:
> On 11/25/24 10:21, David Wright wrote:
> > Can you put PARTLABELs on an MBR disk?

The question mark is there because the evidence for the OP having
an MBR disk is entirely circumstantial. IOW I'm guessing.

> Ah, apparently you have to use LABEL, but otherwise yes, at least in fstab:

You can use pretty much anything that points to the particular device
in fstab besides /dev/sdXN: LABEL, PARTLABEL, UUID and PARTUUID having
the keyword syntax, or any of the symlinks, like /dev/disk/by-foo/bar,
that point to the device file.

> eben@cerberus:~$ sudo fdisk -l /dev/sdc | grep label
> Disklabel type: dos
>
> eben@cerberus:~$ sudo blkid /dev/sdc1
> /dev/sdc1: LABEL="Partition_1" UUID="ab7e9bee-27f4-4f4f-94c4-5d19d8413074"
> BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="b1604273-01"
>
> eben@cerberus:~$ grep Partition_1 /etc/fstab
> LABEL=Partition_1                     /mnt/temp2              ext4    default

A few things to notice:

No PARTLABEL on MBR disks. A GPT PARTLABEL string would be 4½× too
large to fit within the entire partition table entry on an MBR disk.

The PARTUUID is AFAIK not stable, being a made up string generated
from the Disk ID and the partition number. It's not clear to me
whether that number is the maybe-stable slot number for a primary
partition, or something else; and what sort of chaos arises within
an extended partition.

When used about MBR disks, the term Partition Label doesn't mean
a PARTLABEL, but a Filesystem LABEL, coined when partitions weren't
named/labelled.

Cheers,
David.

Reply via email to