Gentoo Archives: gentoo-user

From: Paul Hartman <paul.hartman+gentoo@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Hard drives not detected in repeatable order.
Date: Mon, 03 Oct 2011 19:41:15
Message-Id: CAEH5T2PP81mt2yS9Q0fKL0uH9jioJ=F=CmNzEAb=CxwqzFsH+w@mail.gmail.com
In Reply to: Re: [gentoo-user] Hard drives not detected in repeatable order. by Florian Philipp
1 On Mon, Oct 3, 2011 at 2:01 PM, Florian Philipp <lists@×××××××××××.net> wrote:
2 > Am 03.10.2011 20:40, schrieb Grant Edwards:
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 >
11 > Mount by UUID or label. In /etc/fstab, specify UUID=foo or LABEL=bar
12 > instead of /dev/sdx1. You can current UUIDs and labels with `ls -l
13 > /dev/disk/by-uuid` and `ls -l /dev/disk/by-label`, respectively.
14
15 Or another way I think is easier: run /sbin/blkid which will tell you
16 all of the info at once, such as:
17
18 /dev/sda1: LABEL="boot" UUID="a3193af5-35e1-4908-bfbd-928e8841ead3" TYPE="ext2"
19 /dev/sda2: LABEL="root" UUID="feaa6b06-5935-491d-9aef-fe1415c380b6" TYPE="ext4"
20 /dev/sda3: LABEL="swap" UUID="da4437c5-6f19-409a-a71a-ee63be6ef2e5" TYPE="swap"
21 /dev/sda4: LABEL="home" UUID="145fb951-6f01-4cff-b221-278b72c0604f" TYPE="ext4"
22
23 It also tells you the RAID member uuid and sub_uuid for your RAID
24 partitions, and more (man blkid).

Replies

Subject Author
[gentoo-user] Re: Hard drives not detected in repeatable order. Grant Edwards <grant.b.edwards@×××××.com>