Gentoo Archives: gentoo-user

From: "Canek Peláez Valdés" <caneko@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Hard drives not detected in repeatable order.
Date: Mon, 03 Oct 2011 19:36:23
Message-Id: CADPrc83sQU5weNA8jZnZqtp0SdWkv1OHQv5pcX6owZ2ahe51Aw@mail.gmail.com
In Reply to: [gentoo-user] Hard drives not detected in repeatable order. by Grant Edwards
1 On Mon, Oct 3, 2011 at 11:40 AM, Grant Edwards
2 <grant.b.edwards@×××××.com> wrote:
3 > Just recently I've run in to problems because my hard drives are not
4 > detected in a predictable order, so my fstab that mount /dev/sdb1 and
5 > /dev/sdc1 sometimes result in directory trees in the wrong places
6 > (/dev/sda seems consistent, but I don't know why).
7 >
8 > What's the recommended way to fix this?
9
10 You can set labels to all the partitions, and set /etc/fstab to use
11 them: my fstab looks like:
12
13 LABEL=Gentoo / ext4 noatime 0 1
14 LABEL=Swap none swap sw 0 0
15 shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
16 tmpfs /tmp tmpfs defaults,nosuid 0 0
17
18 I believe this is the recommended way to use fstab in distros like
19 Fedora and OpenSUSE, because of your use case exactly.
20
21 You can set labels to ext[234] partitions with e2label, and for NTFS
22 partitions you can use ntfslabel, and to swap partitions with mkswap.
23 I suppose every filesystem in the world has a similar tool to set its
24 label.
25
26 Regards.
27 --
28 Canek Peláez Valdés
29 Posgrado en Ciencia e Ingeniería de la Computación
30 Universidad Nacional Autónoma de México