* Re: [gentoo-user] Hard drives not detected in repeatable order.
2011-10-03 18:40 [gentoo-user] Hard drives not detected in repeatable order Grant Edwards
@ 2011-10-03 18:47 ` Canek Peláez Valdés
2011-10-03 18:48 ` Volker Armin Hemmann
` (5 subsequent siblings)
6 siblings, 0 replies; 48+ messages in thread
From: Canek Peláez Valdés @ 2011-10-03 18:47 UTC (permalink / raw
To: gentoo-user
On Mon, Oct 3, 2011 at 11:40 AM, Grant Edwards
<grant.b.edwards@gmail.com> wrote:
> Just recently I've run in to problems because my hard drives are not
> detected in a predictable order, so my fstab that mount /dev/sdb1 and
> /dev/sdc1 sometimes result in directory trees in the wrong places
> (/dev/sda seems consistent, but I don't know why).
>
> What's the recommended way to fix this?
You can set labels to all the partitions, and set /etc/fstab to use
them: my fstab looks like:
LABEL=Gentoo / ext4 noatime 0 1
LABEL=Swap none swap sw 0 0
shm /dev/shm tmpfs nodev,nosuid,noexec 0 0
tmpfs /tmp tmpfs defaults,nosuid 0 0
I believe this is the recommended way to use fstab in distros like
Fedora and OpenSUSE, because of your use case exactly.
You can set labels to ext[234] partitions with e2label, and for NTFS
partitions you can use ntfslabel, and to swap partitions with mkswap.
I suppose every filesystem in the world has a similar tool to set its
label.
Regards.
--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Hard drives not detected in repeatable order.
2011-10-03 18:40 [gentoo-user] Hard drives not detected in repeatable order Grant Edwards
2011-10-03 18:47 ` Canek Peláez Valdés
@ 2011-10-03 18:48 ` Volker Armin Hemmann
2011-10-03 18:49 ` [gentoo-user] " Grant Edwards
` (4 subsequent siblings)
6 siblings, 0 replies; 48+ messages in thread
From: Volker Armin Hemmann @ 2011-10-03 18:48 UTC (permalink / raw
To: gentoo-user
Am Montag 03 Oktober 2011, 18:40:21 schrieb Grant Edwards:
> Just recently I've run in to problems because my hard drives are not
> detected in a predictable order, so my fstab that mount /dev/sdb1 and
> /dev/sdc1 sometimes result in directory trees in the wrong places
> (/dev/sda seems consistent, but I don't know why).
>
> What's the recommended way to fix this?
use uuid to mount.
--
#163933
^ permalink raw reply [flat|nested] 48+ messages in thread
* [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-03 18:40 [gentoo-user] Hard drives not detected in repeatable order Grant Edwards
2011-10-03 18:47 ` Canek Peláez Valdés
2011-10-03 18:48 ` Volker Armin Hemmann
@ 2011-10-03 18:49 ` Grant Edwards
2011-10-03 19:03 ` Canek Peláez Valdés
2011-10-03 18:50 ` [gentoo-user] " Michael Mol
` (3 subsequent siblings)
6 siblings, 1 reply; 48+ messages in thread
From: Grant Edwards @ 2011-10-03 18:49 UTC (permalink / raw
To: gentoo-user
On 2011-10-03, Grant Edwards <grant.b.edwards@gmail.com> wrote:
> Just recently I've run in to problems because my hard drives are not
> detected in a predictable order, so my fstab that mount /dev/sdb1 and
> /dev/sdc1 sometimes result in directory trees in the wrong places
> (/dev/sda seems consistent, but I don't know why).
I still don't know what changed to cause disks ordering to become
non-deterministic. I recently upgraded from a single-core CPU to a
dual-core CPU. Would that do it?
> What's the recommended way to fix this?
After a bit more googling, it looks like this is what disk labels are
for. Never used them before, but it looks like it's time to give them
a go.
--
Grant Edwards grant.b.edwards Yow! My mind is making
at ashtrays in Dayton ...
gmail.com
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-03 18:49 ` [gentoo-user] " Grant Edwards
@ 2011-10-03 19:03 ` Canek Peláez Valdés
2011-10-03 19:28 ` Paul Hartman
` (2 more replies)
0 siblings, 3 replies; 48+ messages in thread
From: Canek Peláez Valdés @ 2011-10-03 19:03 UTC (permalink / raw
To: gentoo-user
On Mon, Oct 3, 2011 at 11:49 AM, Grant Edwards
<grant.b.edwards@gmail.com> wrote:
> On 2011-10-03, Grant Edwards <grant.b.edwards@gmail.com> wrote:
>> Just recently I've run in to problems because my hard drives are not
>> detected in a predictable order, so my fstab that mount /dev/sdb1 and
>> /dev/sdc1 sometimes result in directory trees in the wrong places
>> (/dev/sda seems consistent, but I don't know why).
>
> I still don't know what changed to cause disks ordering to become
> non-deterministic. I recently upgraded from a single-core CPU to a
> dual-core CPU. Would that do it?
>
>> What's the recommended way to fix this?
>
> After a bit more googling, it looks like this is what disk labels are
> for. Never used them before, but it looks like it's time to give them
> a go.
They have the advantage over UUID's in that you can set them and
therefore can be human readable. Also, if you use a desktop
environment, they look nice in file managers.
Good luck.
--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-03 19:03 ` Canek Peláez Valdés
@ 2011-10-03 19:28 ` Paul Hartman
2011-10-03 19:47 ` Michael Mol
` (2 more replies)
2011-10-04 2:25 ` Walter Dnes
2011-10-04 14:02 ` Michael A. Koerber
2 siblings, 3 replies; 48+ messages in thread
From: Paul Hartman @ 2011-10-03 19:28 UTC (permalink / raw
To: gentoo-user
On Mon, Oct 3, 2011 at 2:03 PM, Canek Peláez Valdés <caneko@gmail.com> wrote:
> On Mon, Oct 3, 2011 at 11:49 AM, Grant Edwards
>> After a bit more googling, it looks like this is what disk labels are
>> for. Never used them before, but it looks like it's time to give them
>> a go.
>
> They have the advantage over UUID's in that you can set them and
> therefore can be human readable. Also, if you use a desktop
> environment, they look nice in file managers.
AFAIK that benefit of labels can also be a danger. If you have
multiple systems and use the same label naming scheme on all of them
(for example you call your partitions "root" "home" "swap" etc.) and
someday you plug the HDD from one system into the other, it could
cause confusion by potentially choosing the wrong one. But someone can
correct me if I'm wrong. :)
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-03 19:28 ` Paul Hartman
@ 2011-10-03 19:47 ` Michael Mol
2011-10-03 19:49 ` Canek Peláez Valdés
2011-10-03 21:37 ` Neil Bothwick
2 siblings, 0 replies; 48+ messages in thread
From: Michael Mol @ 2011-10-03 19:47 UTC (permalink / raw
To: gentoo-user
On Mon, Oct 3, 2011 at 3:28 PM, Paul Hartman
<paul.hartman+gentoo@gmail.com> wrote:
> On Mon, Oct 3, 2011 at 2:03 PM, Canek Peláez Valdés <caneko@gmail.com> wrote:
>> They have the advantage over UUID's in that you can set them and
>> therefore can be human readable. Also, if you use a desktop
>> environment, they look nice in file managers.
>
> AFAIK that benefit of labels can also be a danger. If you have
> multiple systems and use the same label naming scheme on all of them
> (for example you call your partitions "root" "home" "swap" etc.) and
> someday you plug the HDD from one system into the other, it could
> cause confusion by potentially choosing the wrong one. But someone can
> correct me if I'm wrong. :)
I think we had that conversation one or two weeks ago, in the context
of lvm volume names.
--
:wq
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-03 19:28 ` Paul Hartman
2011-10-03 19:47 ` Michael Mol
@ 2011-10-03 19:49 ` Canek Peláez Valdés
2011-10-03 21:37 ` Neil Bothwick
2 siblings, 0 replies; 48+ messages in thread
From: Canek Peláez Valdés @ 2011-10-03 19:49 UTC (permalink / raw
To: gentoo-user
On Mon, Oct 3, 2011 at 12:28 PM, Paul Hartman
<paul.hartman+gentoo@gmail.com> wrote:
> On Mon, Oct 3, 2011 at 2:03 PM, Canek Peláez Valdés <caneko@gmail.com> wrote:
>> On Mon, Oct 3, 2011 at 11:49 AM, Grant Edwards
>>> After a bit more googling, it looks like this is what disk labels are
>>> for. Never used them before, but it looks like it's time to give them
>>> a go.
>>
>> They have the advantage over UUID's in that you can set them and
>> therefore can be human readable. Also, if you use a desktop
>> environment, they look nice in file managers.
>
> AFAIK that benefit of labels can also be a danger. If you have
> multiple systems and use the same label naming scheme on all of them
> (for example you call your partitions "root" "home" "swap" etc.) and
> someday you plug the HDD from one system into the other, it could
> cause confusion by potentially choosing the wrong one. But someone can
> correct me if I'm wrong. :)
You are right. But a) if you are swaping harddrives around, you better
know what you are doing, and b) nothing "terrible" happens, I believe
the first (or last) detected drive with a label in fstab will be
mounted. The other one will still be available by UUID and /dev
device.
Regards.
--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-03 19:28 ` Paul Hartman
2011-10-03 19:47 ` Michael Mol
2011-10-03 19:49 ` Canek Peláez Valdés
@ 2011-10-03 21:37 ` Neil Bothwick
2 siblings, 0 replies; 48+ messages in thread
From: Neil Bothwick @ 2011-10-03 21:37 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1044 bytes --]
On Mon, 3 Oct 2011 14:28:05 -0500, Paul Hartman wrote:
> > They have the advantage over UUID's in that you can set them and
> > therefore can be human readable.
You can set the UUIDs yourself too, but I think they have to stick to the
standard format.
> Also, if you use a desktop
> > environment, they look nice in file managers.
>
> AFAIK that benefit of labels can also be a danger. If you have
> multiple systems and use the same label naming scheme on all of them
> (for example you call your partitions "root" "home" "swap" etc.) and
> someday you plug the HDD from one system into the other, it could
> cause confusion by potentially choosing the wrong one. But someone can
> correct me if I'm wrong. :)
If you have multiple systems, the sensible approach it to give each
filesystem a unique label, such as hostname-mountpoint, which also has
the benefit of making it clear which box a drive came from when you get
them mixed up.
--
Neil Bothwick
This is as bad as it can get-but don't bet on it.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-03 19:03 ` Canek Peláez Valdés
2011-10-03 19:28 ` Paul Hartman
@ 2011-10-04 2:25 ` Walter Dnes
2011-10-04 2:45 ` Canek Peláez Valdés
` (2 more replies)
2011-10-04 14:02 ` Michael A. Koerber
2 siblings, 3 replies; 48+ messages in thread
From: Walter Dnes @ 2011-10-04 2:25 UTC (permalink / raw
To: gentoo-user
On Mon, Oct 03, 2011 at 12:03:47PM -0700, Canek Pel??ez Vald??s wrote
> They have the advantage over UUID's in that you can set them and
> therefore can be human readable. Also, if you use a desktop
> environment, they look nice in file managers.
I assume that name clashes can be avoided by using hostname-label. My
question is... are there any circumstances where you can use UUIDs but
not labels, or visa versa? If so, I'd prefer to go with the more robust
option from day 1, rather than switch later.
--
Walter Dnes <waltdnes@waltdnes.org>
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-04 2:25 ` Walter Dnes
@ 2011-10-04 2:45 ` Canek Peláez Valdés
2011-10-04 15:43 ` bill.longman
2011-10-04 3:15 ` Dale
2011-10-04 14:18 ` Grant Edwards
2 siblings, 1 reply; 48+ messages in thread
From: Canek Peláez Valdés @ 2011-10-04 2:45 UTC (permalink / raw
To: gentoo-user
On Mon, Oct 3, 2011 at 7:25 PM, Walter Dnes <waltdnes@waltdnes.org> wrote:
> On Mon, Oct 03, 2011 at 12:03:47PM -0700, Canek Pel??ez Vald??s wrote
>
>> They have the advantage over UUID's in that you can set them and
>> therefore can be human readable. Also, if you use a desktop
>> environment, they look nice in file managers.
>
> I assume that name clashes can be avoided by using hostname-label. My
> question is... are there any circumstances where you can use UUIDs but
> not labels, or visa versa? If so, I'd prefer to go with the more robust
> option from day 1, rather than switch later.
You can use whatever you want whenever you want. They are orthogonal.
Regards.
--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-04 2:25 ` Walter Dnes
2011-10-04 2:45 ` Canek Peláez Valdés
@ 2011-10-04 3:15 ` Dale
2011-10-04 4:54 ` Spidey
2011-10-04 14:18 ` Grant Edwards
2 siblings, 1 reply; 48+ messages in thread
From: Dale @ 2011-10-04 3:15 UTC (permalink / raw
To: gentoo-user
Walter Dnes wrote:
> On Mon, Oct 03, 2011 at 12:03:47PM -0700, Canek Pel??ez Vald??s wrote
>
>> They have the advantage over UUID's in that you can set them and
>> therefore can be human readable. Also, if you use a desktop
>> environment, they look nice in file managers.
> I assume that name clashes can be avoided by using hostname-label. My
> question is... are there any circumstances where you can use UUIDs but
> not labels, or visa versa? If so, I'd prefer to go with the more robust
> option from day 1, rather than switch later.
>
From what I know, they both seem to travel well. If you remove a drive
and take it to another system, the UUID and LABELS will go with it.
LABELS can be shorter and easier on the human to read tho. I see that
as a positive that UUID doesn't have.
Dale
:-) :-)
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-04 3:15 ` Dale
@ 2011-10-04 4:54 ` Spidey
2011-10-04 5:00 ` Canek Peláez Valdés
2011-10-04 5:02 ` Adam Carter
0 siblings, 2 replies; 48+ messages in thread
From: Spidey @ 2011-10-04 4:54 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 322 bytes --]
Windows gives partitions shorter UUID's too, so that's a non-standard thing
on your /etc/fstab. I opted for LABELs.
By the way, is it possible to use LABELs without and initrd? I'll start
using an initrd before too long, I'll also mess with decorations, but for
now, I'd like to keep my setup simple, no initrd.
--Spidey
[-- Attachment #2: Type: text/html, Size: 372 bytes --]
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-04 4:54 ` Spidey
@ 2011-10-04 5:00 ` Canek Peláez Valdés
2011-10-04 5:02 ` Adam Carter
1 sibling, 0 replies; 48+ messages in thread
From: Canek Peláez Valdés @ 2011-10-04 5:00 UTC (permalink / raw
To: gentoo-user
On Mon, Oct 3, 2011 at 9:54 PM, Spidey <spideybr@gmail.com> wrote:
> Windows gives partitions shorter UUID's too, so that's a non-standard thing
> on your /etc/fstab. I opted for LABELs.
> By the way, is it possible to use LABELs without and initrd? I'll start
> using an initrd before too long, I'll also mess with decorations, but for
> now, I'd like to keep my setup simple, no initrd.
Yeah, labels are a feature of mount, an initramfs (really, totally
different from an initrd) has nothing to do with it.
Regards.
--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-04 4:54 ` Spidey
2011-10-04 5:00 ` Canek Peláez Valdés
@ 2011-10-04 5:02 ` Adam Carter
2011-10-04 5:09 ` Canek Peláez Valdés
2011-10-04 5:10 ` Paul Hartman
1 sibling, 2 replies; 48+ messages in thread
From: Adam Carter @ 2011-10-04 5:02 UTC (permalink / raw
To: gentoo-user
> By the way, is it possible to use LABELs without and initrd? I'll start
> using an initrd before too long, I'll also mess with decorations, but for
> now, I'd like to keep my setup simple, no initrd.
AND what bootloaders can use LABEL/UUID? Can grub's device.map use them?
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-04 5:02 ` Adam Carter
@ 2011-10-04 5:09 ` Canek Peláez Valdés
2011-10-04 5:29 ` Florian Philipp
2011-10-04 5:10 ` Paul Hartman
1 sibling, 1 reply; 48+ messages in thread
From: Canek Peláez Valdés @ 2011-10-04 5:09 UTC (permalink / raw
To: gentoo-user
On Mon, Oct 3, 2011 at 10:02 PM, Adam Carter <adamcarter3@gmail.com> wrote:
>> By the way, is it possible to use LABELs without and initrd? I'll start
>> using an initrd before too long, I'll also mess with decorations, but for
>> now, I'd like to keep my setup simple, no initrd.
>
> AND what bootloaders can use LABEL/UUID? Can grub's device.map use them?
I believe grub uses its own partition scheme (hd(0,0)), so fstab
should not matter to it unless you use the root= option. But even with
the root= option, grub can understand labels, and so grub2 (I'm using
it with labels right now).
LILO I don't know, I haven't used it in years.
Regards.
--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-04 5:09 ` Canek Peláez Valdés
@ 2011-10-04 5:29 ` Florian Philipp
2011-10-04 5:36 ` Canek Peláez Valdés
0 siblings, 1 reply; 48+ messages in thread
From: Florian Philipp @ 2011-10-04 5:29 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1272 bytes --]
Am 04.10.2011 07:09, schrieb Canek Peláez Valdés:
> On Mon, Oct 3, 2011 at 10:02 PM, Adam Carter <adamcarter3@gmail.com> wrote:
>>> By the way, is it possible to use LABELs without and initrd? I'll start
>>> using an initrd before too long, I'll also mess with decorations, but for
>>> now, I'd like to keep my setup simple, no initrd.
>>
>> AND what bootloaders can use LABEL/UUID? Can grub's device.map use them?
>
> I believe grub uses its own partition scheme (hd(0,0)), so fstab
> should not matter to it unless you use the root= option. But even with
> the root= option, grub can understand labels, and so grub2 (I'm using
> it with labels right now).
>
> LILO I don't know, I haven't used it in years.
>
> Regards.
In my experience, grub's partition numbering is more stable than /dev.
hd(0,*) tends to be the device on which grub is installed, even if
device numbering in /dev changes.
The more tricky stuff is defining the root=/dev/* kernel parameter.
Fortunately, starting with 2.6.37, you can use a UUID here as well (but
not label, that support was removed a few years ago):
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=b5af921ec02333e943efb59aca4f56b78fc0e100
Regards,
Florian Philipp
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-04 5:29 ` Florian Philipp
@ 2011-10-04 5:36 ` Canek Peláez Valdés
0 siblings, 0 replies; 48+ messages in thread
From: Canek Peláez Valdés @ 2011-10-04 5:36 UTC (permalink / raw
To: gentoo-user
On Mon, Oct 3, 2011 at 10:29 PM, Florian Philipp <lists@binarywings.net> wrote:
> Am 04.10.2011 07:09, schrieb Canek Peláez Valdés:
>> On Mon, Oct 3, 2011 at 10:02 PM, Adam Carter <adamcarter3@gmail.com> wrote:
>>>> By the way, is it possible to use LABELs without and initrd? I'll start
>>>> using an initrd before too long, I'll also mess with decorations, but for
>>>> now, I'd like to keep my setup simple, no initrd.
>>>
>>> AND what bootloaders can use LABEL/UUID? Can grub's device.map use them?
>>
>> I believe grub uses its own partition scheme (hd(0,0)), so fstab
>> should not matter to it unless you use the root= option. But even with
>> the root= option, grub can understand labels, and so grub2 (I'm using
>> it with labels right now).
>>
>> LILO I don't know, I haven't used it in years.
>>
>> Regards.
>
> In my experience, grub's partition numbering is more stable than /dev.
> hd(0,*) tends to be the device on which grub is installed, even if
> device numbering in /dev changes.
>
> The more tricky stuff is defining the root=/dev/* kernel parameter.
> Fortunately, starting with 2.6.37, you can use a UUID here as well (but
> not label, that support was removed a few years ago):
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=b5af921ec02333e943efb59aca4f56b78fc0e100
Mmmh. This overrides the root option from grub? Then it will also work in LILO.
Regards.
--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-04 5:02 ` Adam Carter
2011-10-04 5:09 ` Canek Peláez Valdés
@ 2011-10-04 5:10 ` Paul Hartman
2011-10-04 5:20 ` Canek Peláez Valdés
1 sibling, 1 reply; 48+ messages in thread
From: Paul Hartman @ 2011-10-04 5:10 UTC (permalink / raw
To: gentoo-user
On Tue, Oct 4, 2011 at 12:02 AM, Adam Carter <adamcarter3@gmail.com> wrote:
>> By the way, is it possible to use LABELs without and initrd? I'll start
>> using an initrd before too long, I'll also mess with decorations, but for
>> now, I'd like to keep my setup simple, no initrd.
>
> AND what bootloaders can use LABEL/UUID? Can grub's device.map use them?
I think you need to use grub2 for that.
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-04 5:10 ` Paul Hartman
@ 2011-10-04 5:20 ` Canek Peláez Valdés
2011-10-04 5:25 ` Adam Carter
0 siblings, 1 reply; 48+ messages in thread
From: Canek Peláez Valdés @ 2011-10-04 5:20 UTC (permalink / raw
To: gentoo-user
On Mon, Oct 3, 2011 at 10:10 PM, Paul Hartman
<paul.hartman+gentoo@gmail.com> wrote:
> On Tue, Oct 4, 2011 at 12:02 AM, Adam Carter <adamcarter3@gmail.com> wrote:
>>> By the way, is it possible to use LABELs without and initrd? I'll start
>>> using an initrd before too long, I'll also mess with decorations, but for
>>> now, I'd like to keep my setup simple, no initrd.
>>
>> AND what bootloaders can use LABEL/UUID? Can grub's device.map use them?
>
> I think you need to use grub2 for that.
You are right: for grub-legacy you need to use the old hd(x,y) thingy.
Regards.
--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-04 5:20 ` Canek Peláez Valdés
@ 2011-10-04 5:25 ` Adam Carter
2011-10-04 5:28 ` Canek Peláez Valdés
2011-10-04 14:23 ` Grant Edwards
0 siblings, 2 replies; 48+ messages in thread
From: Adam Carter @ 2011-10-04 5:25 UTC (permalink / raw
To: gentoo-user
> You are right: for grub-legacy you need to use the old hd(x,y) thingy.
Which i assume suffers from the same reassignment risk as the kernel's
/dev/sdX naming that prompted this discussion. Looks I'll be moving to
grub2.
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-04 5:25 ` Adam Carter
@ 2011-10-04 5:28 ` Canek Peláez Valdés
2011-10-04 14:23 ` Grant Edwards
1 sibling, 0 replies; 48+ messages in thread
From: Canek Peláez Valdés @ 2011-10-04 5:28 UTC (permalink / raw
To: gentoo-user
On Mon, Oct 3, 2011 at 10:25 PM, Adam Carter <adamcarter3@gmail.com> wrote:
>> You are right: for grub-legacy you need to use the old hd(x,y) thingy.
>
> Which i assume suffers from the same reassignment risk as the kernel's
> /dev/sdX naming that prompted this discussion. Looks I'll be moving to
> grub2.
That's a good idea anyway, given that grub is in life support by its
maintainers.
Regards.
--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México
^ permalink raw reply [flat|nested] 48+ messages in thread
* [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-04 5:25 ` Adam Carter
2011-10-04 5:28 ` Canek Peláez Valdés
@ 2011-10-04 14:23 ` Grant Edwards
1 sibling, 0 replies; 48+ messages in thread
From: Grant Edwards @ 2011-10-04 14:23 UTC (permalink / raw
To: gentoo-user
On 2011-10-04, Adam Carter <adamcarter3@gmail.com> wrote:
>> You are right: for grub-legacy you need to use the old hd(x,y) thingy.
>
> Which i assume suffers from the same reassignment risk as the kernel's
> /dev/sdX naming that prompted this discussion.
I don't know if that's true. I've never seen it happen.
> Looks I'll be moving to grub2.
Yikes. What a monster...
--
Grant Edwards grant.b.edwards Yow! Can you MAIL a BEAN
at CAKE?
gmail.com
^ permalink raw reply [flat|nested] 48+ messages in thread
* [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-04 2:25 ` Walter Dnes
2011-10-04 2:45 ` Canek Peláez Valdés
2011-10-04 3:15 ` Dale
@ 2011-10-04 14:18 ` Grant Edwards
2011-10-04 15:12 ` Canek Peláez Valdés
2 siblings, 1 reply; 48+ messages in thread
From: Grant Edwards @ 2011-10-04 14:18 UTC (permalink / raw
To: gentoo-user
On 2011-10-04, Walter Dnes <waltdnes@waltdnes.org> wrote:
> On Mon, Oct 03, 2011 at 12:03:47PM -0700, Canek Pel??ez Vald??s wrote
>
>> They have the advantage over UUID's in that you can set them and
>> therefore can be human readable. Also, if you use a desktop
>> environment, they look nice in file managers.
>
> I assume that name clashes can be avoided by using hostname-label. My
> question is... are there any circumstances where you can use UUIDs but
> not labels, or visa versa? If so, I'd prefer to go with the more robust
> option from day 1, rather than switch later.
The only thing I came across was a mention that some filesystems (e.g.
VFAT) don't support labels. Though all the "good" ones appear to.
--
Grant Edwards grant.b.edwards Yow! Is this TERMINAL fun?
at
gmail.com
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-04 14:18 ` Grant Edwards
@ 2011-10-04 15:12 ` Canek Peláez Valdés
0 siblings, 0 replies; 48+ messages in thread
From: Canek Peláez Valdés @ 2011-10-04 15:12 UTC (permalink / raw
To: gentoo-user
On Tue, Oct 4, 2011 at 7:18 AM, Grant Edwards <grant.b.edwards@gmail.com> wrote:
> On 2011-10-04, Walter Dnes <waltdnes@waltdnes.org> wrote:
>> On Mon, Oct 03, 2011 at 12:03:47PM -0700, Canek Pel??ez Vald??s wrote
>>
>>> They have the advantage over UUID's in that you can set them and
>>> therefore can be human readable. Also, if you use a desktop
>>> environment, they look nice in file managers.
>>
>> I assume that name clashes can be avoided by using hostname-label. My
>> question is... are there any circumstances where you can use UUIDs but
>> not labels, or visa versa? If so, I'd prefer to go with the more robust
>> option from day 1, rather than switch later.
>
> The only thing I came across was a mention that some filesystems (e.g.
> VFAT) don't support labels. Though all the "good" ones appear to.
VFAT supports labels. mkfs.vfat -n sets the label name at creation
time: there must be a way to change it later.
Regards.
--
Canek Peláez Valdés
Posgrado en Ciencia e Ingeniería de la Computación
Universidad Nacional Autónoma de México
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-03 19:03 ` Canek Peláez Valdés
2011-10-03 19:28 ` Paul Hartman
2011-10-04 2:25 ` Walter Dnes
@ 2011-10-04 14:02 ` Michael A. Koerber
2011-10-04 14:29 ` Grant Edwards
2 siblings, 1 reply; 48+ messages in thread
From: Michael A. Koerber @ 2011-10-04 14:02 UTC (permalink / raw
To: gentoo-user@lists.gentoo.org
[-- Attachment #1: Type: text/plain, Size: 1761 bytes --]
On Mon, 2011-10-03 at 15:03 -0400, Canek Peláez Valdés wrote:
> On Mon, Oct 3, 2011 at 11:49 AM, Grant Edwards
> <grant.b.edwards@gmail.com> wrote:
> > On 2011-10-03, Grant Edwards <grant.b.edwards@gmail.com> wrote:
> >> Just recently I've run in to problems because my hard drives are not
> >> detected in a predictable order, so my fstab that mount /dev/sdb1 and
> >> /dev/sdc1 sometimes result in directory trees in the wrong places
> >> (/dev/sda seems consistent, but I don't know why).
> >
> > I still don't know what changed to cause disks ordering to become
> > non-deterministic. I recently upgraded from a single-core CPU to a
> > dual-core CPU. Would that do it?
> >
> >> What's the recommended way to fix this?
> >
> > After a bit more googling, it looks like this is what disk labels are
> > for. Never used them before, but it looks like it's time to give them
> > a go.
>
> They have the advantage over UUID's in that you can set them and
> therefore can be human readable. Also, if you use a desktop
> environment, they look nice in file managers.
I have found that use of LABEL=FOO in /etc/fstab doesn't always solve
the problem of disks being reassigned during boot. I use
LABEL=/Whatever for all file systems mounted on my Dell D830. The main
drive (most of the time) is /dev/sda. Sometimes I'll insert a second
drive in the machine (in the side battery slot) then power up. This
drive gets the /dev/sda assignment. I'm guessing since it doesn't have
a /boot directory on it the system fails to start.
If I power up w/o this second drive, and wait until the kernel start
reading the s/u scripts, I can insert the drive (during bootup) and
everything is mounted the way I intended.
Mike
[-- Attachment #2: Type: text/html, Size: 2202 bytes --]
^ permalink raw reply [flat|nested] 48+ messages in thread
* [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-04 14:02 ` Michael A. Koerber
@ 2011-10-04 14:29 ` Grant Edwards
2011-10-04 14:47 ` Spidey
2011-10-04 14:48 ` Paul Hartman
0 siblings, 2 replies; 48+ messages in thread
From: Grant Edwards @ 2011-10-04 14:29 UTC (permalink / raw
To: gentoo-user
On 2011-10-04, Michael A. Koerber <mak@ll.mit.edu> wrote:
> I have found that use of LABEL=FOO in /etc/fstab doesn't always solve
> the problem of disks being reassigned during boot.
That's because fstab isn't used during boot. What "root=" setting is
passed to your kernel by your bootloader? Is that using /dev/sda1 or
a label? In order to use a label, I _think_ you need some special magic
in an initrd (at least that used to be the case according to what I've
googled).
--
Grant Edwards grant.b.edwards Yow! Where's th' DAFFY
at DUCK EXHIBIT??
gmail.com
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-04 14:29 ` Grant Edwards
@ 2011-10-04 14:47 ` Spidey
2011-10-04 15:59 ` Florian Philipp
2011-10-04 14:48 ` Paul Hartman
1 sibling, 1 reply; 48+ messages in thread
From: Spidey @ 2011-10-04 14:47 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 808 bytes --]
On Tue, Oct 4, 2011 at 11:29, Grant Edwards <grant.b.edwards@gmail.com>wrote:
> On 2011-10-04, Michael A. Koerber <mak@ll.mit.edu> wrote:
>
> > I have found that use of LABEL=FOO in /etc/fstab doesn't always solve
> > the problem of disks being reassigned during boot.
>
> That's because fstab isn't used during boot. What "root=" setting is
> passed to your kernel by your bootloader? Is that using /dev/sda1 or
> a label? In order to use a label, I _think_ you need some special magic
> in an initrd (at least that used to be the case according to what I've
> googled).
>
That's my doubt. Last time I've read about, you needed some script to "load"
the labels.
Claudio Roberto França Pereira (a.k.a. Spidey)
hardMOB - HTForum - @spideybr
Engenharia de Computação - UFES 2006/1
[-- Attachment #2: Type: text/html, Size: 1211 bytes --]
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-04 14:47 ` Spidey
@ 2011-10-04 15:59 ` Florian Philipp
2011-10-05 5:53 ` Walter Dnes
2011-10-05 13:29 ` Michael A. Koerber
0 siblings, 2 replies; 48+ messages in thread
From: Florian Philipp @ 2011-10-04 15:59 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1253 bytes --]
Am 04.10.2011 16:47, schrieb Spidey:
> On Tue, Oct 4, 2011 at 11:29, Grant Edwards <grant.b.edwards@gmail.com
> <mailto:grant.b.edwards@gmail.com>> wrote:
>
> On 2011-10-04, Michael A. Koerber <mak@ll.mit.edu
> <mailto:mak@ll.mit.edu>> wrote:
>
> > I have found that use of LABEL=FOO in /etc/fstab doesn't always solve
> > the problem of disks being reassigned during boot.
>
> That's because fstab isn't used during boot. What "root=" setting is
> passed to your kernel by your bootloader? Is that using /dev/sda1 or
> a label? In order to use a label, I _think_ you need some special magic
> in an initrd (at least that used to be the case according to what I've
> googled).
>
>
> That's my doubt. Last time I've read about, you needed some script to
> "load" the labels.
>
> Claudio Roberto França Pereira (a.k.a. Spidey)
You cannot use labels with the root= parameters. That was provided as
some kind of hack a few years ago but has been removed since. You either
need to use an initramfs for labels or resort to UUIDs. See
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=b5af921ec02333e943efb59aca4f56b78fc0e100
Regards,
Florian Philipp
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-04 15:59 ` Florian Philipp
@ 2011-10-05 5:53 ` Walter Dnes
2011-10-05 13:29 ` Michael A. Koerber
1 sibling, 0 replies; 48+ messages in thread
From: Walter Dnes @ 2011-10-05 5:53 UTC (permalink / raw
To: gentoo-user
On Tue, Oct 04, 2011 at 05:59:57PM +0200, Florian Philipp wrote
> You cannot use labels with the root= parameters. That was provided as
> some kind of hack a few years ago but has been removed since. You either
> need to use an initramfs for labels or resort to UUIDs. See
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=b5af921ec02333e943efb59aca4f56b78fc0e100
Thanks. I had asked earlier in the thread if there are situations
where I can use one, but not the other. Given your answer, I'll go with
UUID for future installs. That answers the question for fstab. BTW, I
did some Google research and found that LILO can boot with UUID. See...
https://wiki.archlinux.org/index.php/Persistent_block_device_naming
The important thing to note is...
- do *NOT* use root configuration option; e.g. "root=blah_blah_blah"
- instead, specify root in the append line; e.g...
append = "video=640x480 root=blah_blah_blah"
--
Walter Dnes <waltdnes@waltdnes.org>
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-04 15:59 ` Florian Philipp
2011-10-05 5:53 ` Walter Dnes
@ 2011-10-05 13:29 ` Michael A. Koerber
2011-10-05 14:34 ` Florian Philipp
2011-10-05 18:54 ` walt
1 sibling, 2 replies; 48+ messages in thread
From: Michael A. Koerber @ 2011-10-05 13:29 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1214 bytes --]
> > > I have found that use of LABEL=FOO in /etc/fstab doesn't always solve
> > > the problem of disks being reassigned during boot.
> >
> > That's because fstab isn't used during boot. What "root=" setting is
> > passed to your kernel by your bootloader? Is that using /dev/sda1 or
> > a label? In order to use a label, I _think_ you need some special magic
> > in an initrd (at least that used to be the case according to what I've
> > googled).
> >
> >
> > That's my doubt. Last time I've read about, you needed some script to
> > "load" the labels.
> >
> > Claudio Roberto França Pereira (a.k.a. Spidey)
>
> You cannot use labels with the root= parameters. That was provided as
> some kind of hack a few years ago but has been removed since. You either
> need to use an initramfs for labels or resort to UUIDs. See
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=b5af921ec02333e943efb59aca4f56b78fc0e100
Just tried root=PARTUUID=.... failed. Checked my genblk.c and the
changes don't appear in the 2.6.36 or 2.6.39 kernels on my system. When
did (does) the PARTUUID syntax support get released?
tnx,
Mike
[-- Attachment #2: Type: text/html, Size: 1671 bytes --]
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-05 13:29 ` Michael A. Koerber
@ 2011-10-05 14:34 ` Florian Philipp
2011-10-05 18:54 ` walt
1 sibling, 0 replies; 48+ messages in thread
From: Florian Philipp @ 2011-10-05 14:34 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1442 bytes --]
Am 05.10.2011 15:29, schrieb Michael A. Koerber:
>> > > I have found that use of LABEL=FOO in /etc/fstab doesn't always solve
>> > > the problem of disks being reassigned during boot.
>> >
>> > That's because fstab isn't used during boot. What "root=" setting is
>> > passed to your kernel by your bootloader? Is that using /dev/sda1 or
>> > a label? In order to use a label, I _think_ you need some special magic
>> > in an initrd (at least that used to be the case according to what I've
>> > googled).
>> >
>> >
>> > That's my doubt. Last time I've read about, you needed some script to
>> > "load" the labels.
>> >
>> > Claudio Roberto França Pereira (a.k.a. Spidey)
>>
>> You cannot use labels with the root= parameters. That was provided as
>> some kind of hack a few years ago but has been removed since. You either
>> need to use an initramfs for labels or resort to UUIDs. See
>> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=b5af921ec02333e943efb59aca4f56b78fc0e100
> Just tried root=PARTUUID=.... failed. Checked my genblk.c and the
> changes don't appear in the 2.6.36 or 2.6.39 kernels on my system. When
> did (does) the PARTUUID syntax support get released?
>
> tnx,
>
> Mike
2.6.37: http://kernelnewbies.org/Linux_2_6_37#line-106
I definitely see the changes in gentoo-sources-2.6.39-r3.
Regards,
Florian Philipp
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply [flat|nested] 48+ messages in thread
* [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-05 13:29 ` Michael A. Koerber
2011-10-05 14:34 ` Florian Philipp
@ 2011-10-05 18:54 ` walt
2011-10-05 19:57 ` pk
` (2 more replies)
1 sibling, 3 replies; 48+ messages in thread
From: walt @ 2011-10-05 18:54 UTC (permalink / raw
To: gentoo-user
On 10/05/2011 06:29 AM, Michael A. Koerber wrote:
> Just tried root=PARTUUID=.... failed. Checked my genblk.c and the
> changes don't appear in the 2.6.36 or 2.6.39 kernels on my system.
> When did (does) the PARTUUID syntax support get released?
This is very obscure and confusing if you don't already know the
history of that code.
You might think, as I did, that PARTUUID stands for the UUID of the
partition you're searching for -- not true :(
PARTUUID stands for Partition Table UUID, which is entirely different
from a Partition UUID. Clear as mud, eh?
Only GUID/EFI partition tables have a UUID -- not DOS partition tables.
I posted a HOWTO on the subject here:
http://www.gossamer-threads.com/lists/gentoo/user/225071
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-05 18:54 ` walt
@ 2011-10-05 19:57 ` pk
2011-10-05 20:31 ` Paul Hartman
2011-10-05 20:33 ` Florian Philipp
2 siblings, 0 replies; 48+ messages in thread
From: pk @ 2011-10-05 19:57 UTC (permalink / raw
To: gentoo-user
On 2011-10-05 20:54, walt wrote:
> You might think, as I did, that PARTUUID stands for the UUID of the
> partition you're searching for -- not true :(
>
> PARTUUID stands for Partition Table UUID, which is entirely different
> from a Partition UUID. Clear as mud, eh?
IMHO it does seem like a better solution with a file system independent
UUID... I only hope the implementation is good. :-/
> I posted a HOWTO on the subject here:
>
> http://www.gossamer-threads.com/lists/gentoo/user/225071
Thanks!
Best regards
Peter K
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-05 18:54 ` walt
2011-10-05 19:57 ` pk
@ 2011-10-05 20:31 ` Paul Hartman
2011-10-05 20:33 ` Florian Philipp
2 siblings, 0 replies; 48+ messages in thread
From: Paul Hartman @ 2011-10-05 20:31 UTC (permalink / raw
To: gentoo-user
On Wed, Oct 5, 2011 at 1:54 PM, walt <w41ter@gmail.com> wrote:
> On 10/05/2011 06:29 AM, Michael A. Koerber wrote:
>
>> Just tried root=PARTUUID=.... failed. Checked my genblk.c and the
>> changes don't appear in the 2.6.36 or 2.6.39 kernels on my system.
>> When did (does) the PARTUUID syntax support get released?
>
> This is very obscure and confusing if you don't already know the
> history of that code.
>
> You might think, as I did, that PARTUUID stands for the UUID of the
> partition you're searching for -- not true :(
>
> PARTUUID stands for Partition Table UUID, which is entirely different
> from a Partition UUID. Clear as mud, eh?
>
> Only GUID/EFI partition tables have a UUID -- not DOS partition tables.
>
> I posted a HOWTO on the subject here:
>
> http://www.gossamer-threads.com/lists/gentoo/user/225071
There were some patches posted a few months ago in LKML, not sure if
they are in mainline kernel yet, but they allowed for this syntax:
root=PARTUUID=UUID/PARTNROFF=%d
where %d is the partition number offset. Basically it lets you choose
the Nth partition within the specified partition table UUID.
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-05 18:54 ` walt
2011-10-05 19:57 ` pk
2011-10-05 20:31 ` Paul Hartman
@ 2011-10-05 20:33 ` Florian Philipp
2 siblings, 0 replies; 48+ messages in thread
From: Florian Philipp @ 2011-10-05 20:33 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1106 bytes --]
Am 05.10.2011 20:54, schrieb walt:
> On 10/05/2011 06:29 AM, Michael A. Koerber wrote:
>
>> Just tried root=PARTUUID=.... failed. Checked my genblk.c and the
>> changes don't appear in the 2.6.36 or 2.6.39 kernels on my system.
>> When did (does) the PARTUUID syntax support get released?
>
> This is very obscure and confusing if you don't already know the
> history of that code.
>
> You might think, as I did, that PARTUUID stands for the UUID of the
> partition you're searching for -- not true :(
>
> PARTUUID stands for Partition Table UUID, which is entirely different
> from a Partition UUID. Clear as mud, eh?
>
> Only GUID/EFI partition tables have a UUID -- not DOS partition tables.
>
> I posted a HOWTO on the subject here:
>
> http://www.gossamer-threads.com/lists/gentoo/user/225071
>
>
Ah, bummer. It even reads so in the patch I've been posting here:
* The function will return the first partition which contains a matching
* UUID value in its partition_meta_info struct. This does not search
* by filesystem UUIDs.
Regards,
Florian Philipp
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-04 14:29 ` Grant Edwards
2011-10-04 14:47 ` Spidey
@ 2011-10-04 14:48 ` Paul Hartman
2011-10-04 15:01 ` Dale
1 sibling, 1 reply; 48+ messages in thread
From: Paul Hartman @ 2011-10-04 14:48 UTC (permalink / raw
To: gentoo-user
On Tue, Oct 4, 2011 at 9:29 AM, Grant Edwards <grant.b.edwards@gmail.com> wrote:
> On 2011-10-04, Michael A. Koerber <mak@ll.mit.edu> wrote:
>
>> I have found that use of LABEL=FOO in /etc/fstab doesn't always solve
>> the problem of disks being reassigned during boot.
>
> That's because fstab isn't used during boot. What "root=" setting is
> passed to your kernel by your bootloader? Is that using /dev/sda1 or
> a label? In order to use a label, I _think_ you need some special magic
> in an initrd (at least that used to be the case according to what I've
> googled).
There is something on the gentoo wiki about doing it in an initramfs:
http://en.gentoo-wiki.com/wiki/Initramfs#UUID.2FLABEL_Root_Mounting
(I've never tried it)
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-04 14:48 ` Paul Hartman
@ 2011-10-04 15:01 ` Dale
0 siblings, 0 replies; 48+ messages in thread
From: Dale @ 2011-10-04 15:01 UTC (permalink / raw
To: gentoo-user
Paul Hartman wrote:
> On Tue, Oct 4, 2011 at 9:29 AM, Grant Edwards<grant.b.edwards@gmail.com> wrote:
>> On 2011-10-04, Michael A. Koerber<mak@ll.mit.edu> wrote:
>>
>>> I have found that use of LABEL=FOO in /etc/fstab doesn't always solve
>>> the problem of disks being reassigned during boot.
>> That's because fstab isn't used during boot. What "root=" setting is
>> passed to your kernel by your bootloader? Is that using /dev/sda1 or
>> a label? In order to use a label, I _think_ you need some special magic
>> in an initrd (at least that used to be the case according to what I've
>> googled).
> There is something on the gentoo wiki about doing it in an initramfs:
>
> http://en.gentoo-wiki.com/wiki/Initramfs#UUID.2FLABEL_Root_Mounting
>
> (I've never tried it)
>
>
I think grub2 can use labels.
Dale
:-) :-)
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Hard drives not detected in repeatable order.
2011-10-03 18:40 [gentoo-user] Hard drives not detected in repeatable order Grant Edwards
` (2 preceding siblings ...)
2011-10-03 18:49 ` [gentoo-user] " Grant Edwards
@ 2011-10-03 18:50 ` Michael Mol
2011-10-03 19:01 ` Florian Philipp
` (2 subsequent siblings)
6 siblings, 0 replies; 48+ messages in thread
From: Michael Mol @ 2011-10-03 18:50 UTC (permalink / raw
To: gentoo-user
On Mon, Oct 3, 2011 at 2:40 PM, Grant Edwards <grant.b.edwards@gmail.com> wrote:
> Just recently I've run in to problems because my hard drives are not
> detected in a predictable order, so my fstab that mount /dev/sdb1 and
> /dev/sdc1 sometimes result in directory trees in the wrong places
> (/dev/sda seems consistent, but I don't know why).
>
> What's the recommended way to fix this?
Mount by volume name or UUID. For example, from fstab:
UUID=bddee12c-0047-4b4b-b1d2-9e137a9a8915 / auto noatime 0 1
UUID=857d7723-9dbf-4222-ac28-e05b87b41997 none swap sw 0 0
UUID=8d3648cf-5260-4064-b6a5-50df42acb3d8 /mnt/prevhome auto noatime 0 2
UUID=d7c17623-255b-4313-b50b-99f0f79a0681 /home auto noatime 0 2
UUID=33cc682d-0dd4-4c2b-bf37-876e9f8d3ef4 /boot auto noatime 0 2
To find the UUID:
shortcircuit:4@serenity/dev/disk/by-uuid
Mon Oct 03 02:49 PM
!509 #9 j0 ?0 $ ls -l
total 0
lrwxrwxrwx 1 root root 10 Sep 24 00:11
33cc682d-0dd4-4c2b-bf37-876e9f8d3ef4 -> ../../sda1
lrwxrwxrwx 1 root root 10 Sep 24 00:11
857d7723-9dbf-4222-ac28-e05b87b41997 -> ../../sda2
lrwxrwxrwx 1 root root 10 Sep 24 00:11
8d3648cf-5260-4064-b6a5-50df42acb3d8 -> ../../sda3
lrwxrwxrwx 1 root root 10 Sep 24 00:11
bddee12c-0047-4b4b-b1d2-9e137a9a8915 -> ../../sda4
lrwxrwxrwx 1 root root 10 Sep 24 00:11
d7c17623-255b-4313-b50b-99f0f79a0681 -> ../../dm-0
--
:wq
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Hard drives not detected in repeatable order.
2011-10-03 18:40 [gentoo-user] Hard drives not detected in repeatable order Grant Edwards
` (3 preceding siblings ...)
2011-10-03 18:50 ` [gentoo-user] " Michael Mol
@ 2011-10-03 19:01 ` Florian Philipp
2011-10-03 19:15 ` Bill Longman
` (2 more replies)
2011-10-03 19:46 ` [gentoo-user] " Dale
2011-10-03 19:54 ` Mark Knecht
6 siblings, 3 replies; 48+ messages in thread
From: Florian Philipp @ 2011-10-03 19:01 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 609 bytes --]
Am 03.10.2011 20:40, schrieb Grant Edwards:
> Just recently I've run in to problems because my hard drives are not
> detected in a predictable order, so my fstab that mount /dev/sdb1 and
> /dev/sdc1 sometimes result in directory trees in the wrong places
> (/dev/sda seems consistent, but I don't know why).
>
> What's the recommended way to fix this?
>
Mount by UUID or label. In /etc/fstab, specify UUID=foo or LABEL=bar
instead of /dev/sdx1. You can current UUIDs and labels with `ls -l
/dev/disk/by-uuid` and `ls -l /dev/disk/by-label`, respectively.
Hope this helps,
Florian Philipp
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Hard drives not detected in repeatable order.
2011-10-03 19:01 ` Florian Philipp
@ 2011-10-03 19:15 ` Bill Longman
2011-10-03 19:34 ` Paul Hartman
2011-10-03 19:38 ` [gentoo-user] " Mick
2 siblings, 0 replies; 48+ messages in thread
From: Bill Longman @ 2011-10-03 19:15 UTC (permalink / raw
To: gentoo-user
On 10/03/2011 12:01 PM, Florian Philipp wrote:
> Am 03.10.2011 20:40, schrieb Grant Edwards:
>> Just recently I've run in to problems because my hard drives are not
>> detected in a predictable order, so my fstab that mount /dev/sdb1 and
>> /dev/sdc1 sometimes result in directory trees in the wrong places
>> (/dev/sda seems consistent, but I don't know why).
>>
>> What's the recommended way to fix this?
>>
>
> Mount by UUID or label. In /etc/fstab, specify UUID=foo or LABEL=bar
> instead of /dev/sdx1. You can current UUIDs and labels with `ls -l
> /dev/disk/by-uuid` and `ls -l /dev/disk/by-label`, respectively.
Or, if they are ext, use tune2fs -l. One of its output lines will be:
Filesystem UUID: 40ea622d-8265-4498-bc89-0c0f9020dffb
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Hard drives not detected in repeatable order.
2011-10-03 19:01 ` Florian Philipp
2011-10-03 19:15 ` Bill Longman
@ 2011-10-03 19:34 ` Paul Hartman
2011-10-03 20:13 ` [gentoo-user] " Grant Edwards
2011-10-03 19:38 ` [gentoo-user] " Mick
2 siblings, 1 reply; 48+ messages in thread
From: Paul Hartman @ 2011-10-03 19:34 UTC (permalink / raw
To: gentoo-user
On Mon, Oct 3, 2011 at 2:01 PM, Florian Philipp <lists@binarywings.net> wrote:
> Am 03.10.2011 20:40, schrieb Grant Edwards:
>> Just recently I've run in to problems because my hard drives are not
>> detected in a predictable order, so my fstab that mount /dev/sdb1 and
>> /dev/sdc1 sometimes result in directory trees in the wrong places
>> (/dev/sda seems consistent, but I don't know why).
>>
>> What's the recommended way to fix this?
>>
>
> Mount by UUID or label. In /etc/fstab, specify UUID=foo or LABEL=bar
> instead of /dev/sdx1. You can current UUIDs and labels with `ls -l
> /dev/disk/by-uuid` and `ls -l /dev/disk/by-label`, respectively.
Or another way I think is easier: run /sbin/blkid which will tell you
all of the info at once, such as:
/dev/sda1: LABEL="boot" UUID="a3193af5-35e1-4908-bfbd-928e8841ead3" TYPE="ext2"
/dev/sda2: LABEL="root" UUID="feaa6b06-5935-491d-9aef-fe1415c380b6" TYPE="ext4"
/dev/sda3: LABEL="swap" UUID="da4437c5-6f19-409a-a71a-ee63be6ef2e5" TYPE="swap"
/dev/sda4: LABEL="home" UUID="145fb951-6f01-4cff-b221-278b72c0604f" TYPE="ext4"
It also tells you the RAID member uuid and sub_uuid for your RAID
partitions, and more (man blkid).
^ permalink raw reply [flat|nested] 48+ messages in thread
* [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-03 19:34 ` Paul Hartman
@ 2011-10-03 20:13 ` Grant Edwards
0 siblings, 0 replies; 48+ messages in thread
From: Grant Edwards @ 2011-10-03 20:13 UTC (permalink / raw
To: gentoo-user
On 2011-10-03, Paul Hartman <paul.hartman+gentoo@gmail.com> wrote:
> On Mon, Oct 3, 2011 at 2:01 PM, Florian Philipp <lists@binarywings.net> wrote:
>> Am 03.10.2011 20:40, schrieb Grant Edwards:
>>> Just recently I've run in to problems because my hard drives are not
>>> detected in a predictable order, so my fstab that mount /dev/sdb1 and
>>> /dev/sdc1 sometimes result in directory trees in the wrong places
>>> (/dev/sda seems consistent, but I don't know why).
>>>
>>> What's the recommended way to fix this?
>>>
>>
>> Mount by UUID or label. In /etc/fstab, specify UUID=foo or LABEL=bar
>> instead of /dev/sdx1. You can current UUIDs and labels with `ls -l
>> /dev/disk/by-uuid` and `ls -l /dev/disk/by-label`, respectively.
>
> Or another way I think is easier: run /sbin/blkid which will tell you
> all of the info at once, such as:
>
> /dev/sda1: LABEL="boot" UUID="a3193af5-35e1-4908-bfbd-928e8841ead3" TYPE="ext2"
> /dev/sda2: LABEL="root" UUID="feaa6b06-5935-491d-9aef-fe1415c380b6" TYPE="ext4"
> /dev/sda3: LABEL="swap" UUID="da4437c5-6f19-409a-a71a-ee63be6ef2e5" TYPE="swap"
> /dev/sda4: LABEL="home" UUID="145fb951-6f01-4cff-b221-278b72c0604f" TYPE="ext4"
>
> It also tells you the RAID member uuid and sub_uuid for your RAID
> partitions, and more (man blkid).
That's one I need to remember!
--
Grant Edwards grant.b.edwards Yow! I want a WESSON OIL
at lease!!
gmail.com
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Hard drives not detected in repeatable order.
2011-10-03 19:01 ` Florian Philipp
2011-10-03 19:15 ` Bill Longman
2011-10-03 19:34 ` Paul Hartman
@ 2011-10-03 19:38 ` Mick
2011-10-03 20:20 ` [gentoo-user] " Grant Edwards
2 siblings, 1 reply; 48+ messages in thread
From: Mick @ 2011-10-03 19:38 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 1004 bytes --]
On Monday 03 Oct 2011 20:01:16 Florian Philipp wrote:
> Am 03.10.2011 20:40, schrieb Grant Edwards:
> > Just recently I've run in to problems because my hard drives are not
> > detected in a predictable order, so my fstab that mount /dev/sdb1 and
> > /dev/sdc1 sometimes result in directory trees in the wrong places
> > (/dev/sda seems consistent, but I don't know why).
Is it perhaps because /dev/sda is PATA on IDE and the rest are SATA?
> > What's the recommended way to fix this?
>
> Mount by UUID or label. In /etc/fstab, specify UUID=foo or LABEL=bar
> instead of /dev/sdx1. You can current UUIDs and labels with `ls -l
> /dev/disk/by-uuid` and `ls -l /dev/disk/by-label`, respectively.
UUID or labels will solve this problem for sure, but if you are still trying
to find out what changed to cause this, have you looked at your BIOS settings
and how it recognises the drives?
Have you changed anything on the physical side (jumpers, cables, etc)?
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 48+ messages in thread
* [gentoo-user] Re: Hard drives not detected in repeatable order.
2011-10-03 19:38 ` [gentoo-user] " Mick
@ 2011-10-03 20:20 ` Grant Edwards
0 siblings, 0 replies; 48+ messages in thread
From: Grant Edwards @ 2011-10-03 20:20 UTC (permalink / raw
To: gentoo-user
On 2011-10-03, Mick <michaelkintzios@gmail.com> wrote:
> On Monday 03 Oct 2011 20:01:16 Florian Philipp wrote:
>> Am 03.10.2011 20:40, schrieb Grant Edwards:
>> > Just recently I've run in to problems because my hard drives are not
>> > detected in a predictable order, so my fstab that mount /dev/sdb1 and
>> > /dev/sdc1 sometimes result in directory trees in the wrong places
>> > (/dev/sda seems consistent, but I don't know why).
>
> Is it perhaps because /dev/sda is PATA on IDE and the rest are SATA?
Two are SATA, one is Firewire. They used to be detected consistently
with the two SATA drives first and second and the firewire drive
third. Within the past few weeks, that changed, and sometimes the
Firewire drive shows up second
> UUID or labels will solve this problem for sure, but if you are still
> trying to find out what changed to cause this, have you looked at
> your BIOS settings and how it recognises the drives?
The only thing I can think of recently is the CPU upgrade, but that
was a couple months ago. About six weeks ago I updated the kernel
from 2.6.37 to 3.6.39, but the drive order randomness didn't start
until the past week or two (I only reboot once or twice a month, so
it's hard to pin down the date of the change).
> Have you changed anything on the physical side (jumpers, cables,
> etc)?
Not that I know of.
--
Grant Edwards grant.b.edwards Yow! How's it going in
at those MODULAR LOVE UNITS??
gmail.com
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Hard drives not detected in repeatable order.
2011-10-03 18:40 [gentoo-user] Hard drives not detected in repeatable order Grant Edwards
` (4 preceding siblings ...)
2011-10-03 19:01 ` Florian Philipp
@ 2011-10-03 19:46 ` Dale
2011-10-03 19:54 ` Mark Knecht
6 siblings, 0 replies; 48+ messages in thread
From: Dale @ 2011-10-03 19:46 UTC (permalink / raw
To: gentoo-user
Grant Edwards wrote:
> Just recently I've run in to problems because my hard drives are not
> detected in a predictable order, so my fstab that mount /dev/sdb1 and
> /dev/sdc1 sometimes result in directory trees in the wrong places
> (/dev/sda seems consistent, but I don't know why).
>
> What's the recommended way to fix this?
>
I went the LABEL direction too. Here is a example fstab, mine actually.
LABEL=boot /boot ext2 defaults 1 2
LABEL=root / reiserfs defaults 0 1
LABEL=swap none swap sw 0 0
LABEL=var /var ext3 defaults 0 2
LABEL=portage /usr/portage ext3 defaults 0 2
LABEL=home /home reiserfs defaults 0 2
LABEL=data /data ext4 defaults 0 2
You can set that when your put the file system on or use the file system
tools to set it without formating the partition. It is usually -L
<label> and whatever other options you use. Since you already have a
install on there, I strongly recommend the later, otherwise you lose
your data.
Hope that helps.
Dale
:-) :-)
^ permalink raw reply [flat|nested] 48+ messages in thread
* Re: [gentoo-user] Hard drives not detected in repeatable order.
2011-10-03 18:40 [gentoo-user] Hard drives not detected in repeatable order Grant Edwards
` (5 preceding siblings ...)
2011-10-03 19:46 ` [gentoo-user] " Dale
@ 2011-10-03 19:54 ` Mark Knecht
6 siblings, 0 replies; 48+ messages in thread
From: Mark Knecht @ 2011-10-03 19:54 UTC (permalink / raw
To: gentoo-user
On Mon, Oct 3, 2011 at 11:40 AM, Grant Edwards
<grant.b.edwards@gmail.com> wrote:
> Just recently I've run in to problems because my hard drives are not
> detected in a predictable order, so my fstab that mount /dev/sdb1 and
> /dev/sdc1 sometimes result in directory trees in the wrong places
> (/dev/sda seems consistent, but I don't know why).
>
> What's the recommended way to fix this?
>
> --
> Grant Edwards grant.b.edwards Yow! Boy, am I glad it's
> at only 1971...
> gmail.com
Did you possibly update your kernel? You might want to run smartctl
and see if any drives are developing problems.
Check out blkid for more device info and mount either by label or UUID
for more reliability.
- Mark
c2stable ~ # /sbin/blkid -o list
device fs_type label mount point UUID
----------------------------------------------------------------------------------------------------------------
/dev/sdb1 ext2 (not mounted)
b9dd1fb9-5c7b-459c-a7fc-ca8ebe032fcc
/dev/sdb2 swap <swap>
2ea74bbb-8c1d-4a32-939d-512db4e40a54
/dev/sdb3 linux_raid_member c2stable:3 (in use)
de47f991-86d9-8467-0637-635b9c6d0591
/dev/sdb5 linux_raid_member (in use)
edb0ed65-6e87-b20e-dc0d-88ba780ef6a3
/dev/sdb6 linux_raid_member c2stable:6 (in use)
249c7331-a820-3540-c8f3-b020fb30a66b
/dev/sdb7 linux_raid_member c2stable:7 (in use)
ded5e0c6-1a5a-73ad-0194-9557bb4e015a
/dev/sdd2 linux_raid_member c2stable:7 (in use)
ded5e0c6-1a5a-73ad-0194-9557bb4e015a
/dev/sdd3 linux_raid_member c2stable:3 (in use)
de47f991-86d9-8467-0637-635b9c6d0591
/dev/sdd4 ext3 (not mounted)
d218024b-c219-4e79-8d65-51f13ec43a45
/dev/sde2 linux_raid_member c2stable:7 (in use)
ded5e0c6-1a5a-73ad-0194-9557bb4e015a
/dev/sde3 linux_raid_member c2stable:3 (in use)
de47f991-86d9-8467-0637-635b9c6d0591
/dev/sda1 ext2 boot (not mounted)
4efd04f2-839f-4e11-a32d-8fa25129b541
/dev/sda2 swap <swap>
ed41217e-abf4-4c60-a985-c0420eb054f3
/dev/sda3 linux_raid_member c2stable:3 (in use)
de47f991-86d9-8467-0637-635b9c6d0591
/dev/sda5 linux_raid_member (in use)
edb0ed65-6e87-b20e-dc0d-88ba780ef6a3
/dev/sda6 linux_raid_member c2stable:6 (in use)
249c7331-a820-3540-c8f3-b020fb30a66b
/dev/sda7 linux_raid_member c2stable:7 (in use)
ded5e0c6-1a5a-73ad-0194-9557bb4e015a
/dev/sdc1 ext2 (not mounted)
27f276fa-6f62-4769-b9d7-deb511dfc60a
/dev/sdc2 swap <swap>
0c6a1bd0-291e-4157-9b6a-67f7801c7a5e
/dev/sdc3 linux_raid_member c2stable:3 (in use)
de47f991-86d9-8467-0637-635b9c6d0591
/dev/sdc5 linux_raid_member (in use)
edb0ed65-6e87-b20e-dc0d-88ba780ef6a3
/dev/sdc6 linux_raid_member c2stable:6 (in use)
249c7331-a820-3540-c8f3-b020fb30a66b
/dev/sdc7 linux_raid_member c2stable:7 (in use)
ded5e0c6-1a5a-73ad-0194-9557bb4e015a
/dev/md126 ext3 /
d55d673f-76d8-41ec-8dda-908287a97e42
/dev/md3 ext4 RAID6root (not mounted)
80c3ebf0-d92f-415f-a6d7-1cdb1ceab593
/dev/md7 ext3 VirtualMachines /VirtualMachines
eb5f3040-4114-442e-8d34-16859e720310
/dev/md6 ext3 (not mounted)
be24fdaa-dfb5-461e-8232-bb236fe6f1f3
c2stable ~ #
^ permalink raw reply [flat|nested] 48+ messages in thread