no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | harddisks_by_label [06.01.2015 19:47] (current) – created Pascal Suter | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Mount Harddisks by Label in Linux ====== | ||
+ | I used to [[harddisks_by_uuid_in_debian_lenny|mount Harddisks by UUID]] but this requires you to update your fstab when you copy your system to a new partition that does not have the same uuid anymore. so i eventually changed to using labels. | ||
+ | one big advantage of labels is also, that, since you can set them yourself, your fstab becomes more readable and you can simply do it all wihtout any copy/paste or taking notes as one can remember a label like " | ||
+ | |||
+ | so all you do is creat a partition and then assign a label to it. | ||
+ | |||
+ | for ext file systems that can be done with e2label: | ||
+ | e2label /dev/sda1 backups | ||
+ | will create a label " | ||
+ | |||
+ | now you can use it in fstab like so: | ||
+ | LABEL=backups /backups ext4 defaults 0 0 | ||
+ | |||
+ | it's as easy as that :) |