mount by UUID or label
Michael Havens
bmike1 at gmail.com
Thu Jan 1 12:17:56 MST 2015
and then I tried it on my computer:
bmike1 at c521 ~ $ sudo blkid
[sudo] password for bmike1:
/dev/sda1: UUID="f35e1797-4cdb-4930-a740-b424afbf61c7" TYPE="ext4"
/dev/sda3: UUID="7ca483d5-70b1-4449-a2dd-99d5ce8601f1" TYPE="ext4"
/dev/sda5: UUID="b45d28c4-edc6-4f9a-a80b-144e20197cf8" TYPE="swap"
bmike1 at c521 ~ $ sudo mount -Lb45d28c4-edc6-4f9a-a80b-144e20197cf8 /mnt/sda6
mount: no such partition found
bmike1 at c521 ~ $ sudo mount -Lb45d28c4-edc6-4f9a-a80b-144e20197cf8 /mnt/sda2
mount: no such partition found
bmike1 at c521 ~ $
But then, as I was searching man just now, I think I found why it failed:
Mount by label or uuid will work only if your devices have the
names
listed in /proc/partitions. In particular, it may well fail if
the
kernel was compiled with devfs but devfs is not mounted.
and after looking into /proc/partitions see they aren't there. How could I
put the labels into /proc/partitions?
bmike1 at c521 ~ $ cat /proc/partitions
major minor #blocks name
8 0 244140625 sda
8 1 24148992 sda1
8 2 1 sda2
8 3 214134784 sda3
8 5 5855661 sda5
bmike1 at c521 ~ $
Could I open a text editor and manually append them after sda? ?
:-)~MIKE~(-:
On Thu, Jan 1, 2015 at 12:02 PM, Michael Havens <bmike1 at gmail.com> wrote:
> How would you mount a partition by its UUID/label, when it's not listed in
> /dev by the UUID/label?
>
> # blkid/dev/loop0: TYPE="squashfs" /dev/loop1: UUID="81200825-ccb6-4370-9e04-dbf763b0dbb6" TYPE="ext3" /dev/sda1: LABEL="/" UUID="2639-4A0E" TYPE="vfat" /dev/sda5: LABEL="Puppy" UUID="0a86140e-c4ec-4842-b2e0-7eb8c76b3a4e" TYPE="ext4" /dev/sda6: UUID="b6455bbc-9451-47f1-b0bb-2f6bdbb7d2fe" TYPE="swap" /dev/sda7: LABEL="Kubuntu" UUID="c3401d73-0c85-43ba-abf5-dc18b525f3e7" TYPE="ext4" /dev/sda8: LABEL="Files" UUID="dfb4fb3b-b012-4f41-8bad-c563492a9f99" TYPE="ext4" /dev/loop4: TYPE="squashfs" # mount -L 2639-4A0E /mnt/sda1
> mount: no such partition found#
>
> :-)~MIKE~(-:
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.phxlinux.org/pipermail/plug-discuss/attachments/20150101/3d99b659/attachment.html>
More information about the PLUG-discuss
mailing list