You are not logged in.
When using gpt partitioned disk,
genfstab -L /dev/sda >> /mnt/etc/fstab
just uses /dev/sda1, /dev/sda2 etc.
Is there any way to get it to use the partlabels?
Offline
Do you actually have labels on the filesystems? Labels are different than partlabels.
The file will also list the /dev/sda1 notation in a comment, but that's nothing.
Offline
using
parted -s -- /dev/sda name 1 boot
parted -s -- /dev/sda name 2 root
only gives me partlabels.
I can't remember, but I think on an msdos partitioning scheme, that would give me regular labels that show up under /dev/disk/by-label.
I assume I cannot get those to be replaced by /dev/disk/by-partlabel, so I'm already working on a little Perl script to part blkid and replace each e.g.
/dev/sda1
with
/dev/disk/by-partlabel/boot
etc.
Perhaps I'm missing something though?
Offline
Here's my solution... note that this is being run from Ansible in a loop, so the {{ item.1.name }} is replaced with each desired partition.
Offline
parted does partlabels
for labels, you have to look to the filesystem. In case of ext234 you can change the label with tune2fs.
Offline
When using gpt partitioned disk,
genfstab -L /dev/sda >> /mnt/etc/fstab
just uses /dev/sda1, /dev/sda2 etc.
Is there any way to get it to use the partlabels?
Hi:
genfstab -U -p /dev/sda >> /mnt/etc/fstab
-U use UUID , by default genfstab use label.
Cheers
La verdad está dormida en la mente de cada Hombre
Offline
To use PARTLABEL:
# genfstab -t PARTLABEL /mnt >> /mnt/etc/fstab
Offline