[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#248902: installation-report debian-installer beta4, arch i386



On Thu, May 13, 2004 at 11:13:01PM +0100, Martin Michlmayr wrote:
> * tbm <tbm@cyrius.com> [2004-05-13 21:02]:
> > * Nico Dietrich <nicodietrich@web.de> [2004-05-13 20:22]:
> > > LABEL=/                 /                   ext3    defaults        1 1
> > > LABEL=/home             /home               ext3    defaults        1 2
> > 
> > How did you get those LABELs?  Did you do that by hand after d-i?
> 
> Someone suggested a while ago to use LABEL= in d-i.  Can someone who
> uses this feature explain exactly how it works?  If I put LABEL=/home
> in a /etc/fstab, how does Linux know which partition is associated
> with this label?

Basically, at filesystem creation time (or afterwards) labels are added to
the filesystems. AFAIK, this is an ext2/3 and xfs feature, I'm not aware of
other filesystems that have it, someone may correct me.

This can be done with the mke2fs/tune2fs/mkfs.xfs -L option, or the
e2label/xfs_admin programs.

From fstab(5):

Instead of giving the device explicitly, one may indicate the (ext2 or xfs)
filesystem that is to be mounted by its UUID or volume label (cf.
e2label(8) or  xfs_admin(8)),  writing  LABEL=<label>  or UUID=<uuid>, e.g.,
`LABEL=Boot'   or `UUID=3e6be9de-8139-11d1-9106-a43f08d823a6'.  This will
make the system more robust: adding or removing a  SCSI disk changes the
disk device name but not the filesystem volume label.

So, it would actually be probably more desirable to mount using the UUID
than the label (however the label is more memorable), as most filesystems
have a UUID, whereas only a few support a label.

I would suggest that in the case of ext2/3 and XFS, when a filesystem is
created, it automatically gets labelled with a name relevant to what the
filesystem mount point should be, but perhaps in all cases the /etc/fstab
entry uses the filesystem's UUID.

The administrator can, if need be in a recovery situation, mount /usr by
going "mount LABEL=/usr /usr", but the system would normally mount /usr by
it's UUID.

Hope this helps.

Andrew

Attachment: signature.asc
Description: Digital signature


Reply to: