From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-user+bounces-148372-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	by finch.gentoo.org (Postfix) with ESMTP id DE3981381F3
	for <garchives@archives.gentoo.org>; Mon,  1 Jul 2013 22:55:21 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 1E8B5E0B39;
	Mon,  1 Jul 2013 22:55:16 +0000 (UTC)
Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46])
	(using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id CFE85E0B22
	for <gentoo-user@lists.gentoo.org>; Mon,  1 Jul 2013 22:55:14 +0000 (UTC)
Received: by mail-pa0-f46.google.com with SMTP id fa11so5586076pad.33
        for <gentoo-user@lists.gentoo.org>; Mon, 01 Jul 2013 15:55:13 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=mime-version:sender:in-reply-to:references:from:date
         :x-google-sender-auth:message-id:subject:to:content-type;
        bh=c2Bpa6vus3nfn6cJtVHp3rHCF5Vi9cSqPQyEVAoaMbY=;
        b=l/R+OMLeP9nZ7MQvODLFlBOfaV/vH84RWu997GtlmOajaa4gyvgTylni2lBGCIgUgT
         si8/zZUqtguPLEwZ375ycRAgfTFBb+oHjRkJFoAljyWCf4dsC6f4oVetxJgPgQ243VMS
         kQzNpgAqkkdTCUf0B2MEQfHswLmDBz/uwqhhOmx3HFrzQzuZrQcq720Lcc8d9Hnj4Y+V
         1ExYpNR/LYdOMLM1pSHCQKnFkl81WHRLFk+SSGQsqJVoRkXdVhtdYpHzVgyUvT3tktdX
         gpvCSisH5bTWOurylbggwWSATvrGpH43VBvQ+mr3lJrw/98fxgD5fFi0m9rUiL9gsojP
         ovZQ==
X-Received: by 10.68.221.138 with SMTP id qe10mr14371697pbc.103.1372719313710;
 Mon, 01 Jul 2013 15:55:13 -0700 (PDT)
Precedence: bulk
List-Post: <mailto:gentoo-user@lists.gentoo.org>
List-Help: <mailto:gentoo-user+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-user.gentoo.org>
X-BeenThere: gentoo-user@lists.gentoo.org
Reply-to: gentoo-user@lists.gentoo.org
MIME-Version: 1.0
Sender: paul.hartman@gmail.com
Received: by 10.70.62.105 with HTTP; Mon, 1 Jul 2013 15:54:53 -0700 (PDT)
In-Reply-To: <kqstnb$n0l$1@ger.gmane.org>
References: <kqstnb$n0l$1@ger.gmane.org>
From: Paul Hartman <paul.hartman+gentoo@gmail.com>
Date: Mon, 1 Jul 2013 17:54:53 -0500
X-Google-Sender-Auth: JSeXX94puPv8cKV8vNnduW0J400
Message-ID: <CAEH5T2NgSzp6U5jFAinQwf-AOmJiNM7yweHLFDJ3tUjzyeuF-g@mail.gmail.com>
Subject: Re: [gentoo-user] Can't find init due to inconsistent drive order
To: gentoo-user@lists.gentoo.org
Content-Type: text/plain; charset=ISO-8859-1
X-Archives-Salt: 412d248d-413e-4e3b-9f5d-db6880cf5a73
X-Archives-Hash: 0874e0b80f950d2cec8f14615f2ae8a8

On Mon, Jul 1, 2013 at 4:52 PM, Grant Edwards <grant.b.edwards@gmail.com> wrote:
> I've just recently run into a problem where sometimes when a machine
> boots, the kernel can't find init.  This appears to be because my grub
> configuration line says "root=/dev/sda5" and _sometimes_ the drive
> that contains my root partition is sdb instead of sda. AFAICT, for the
> past 30 years the linux kernel was 100% consistent in the order that
> hard drives were labelled -- but recently that has seems to have
> changed.

I wonder if it could be related to parallel initialization of disks. I
think there's a kernel toggle for that. I wonder if sometimes one
drive spins up faster than the other. (If that's even how it works...)

I have experienced situations where the drive names change depending
on what devices were plugged into the computer when it was turned on,
especially external hard drives, card readers or flash drives, or if a
disc in the CDROM drive. Not sure if that is due to the way the
computer's BIOS handled things during POST, or the way the linux
kernel does its thing.

> Are we really expected now to set up an initrd just so that the kernel
> can find the root partition??

As far as I know, the answer is "yes".

FWIW, I always resisted making an initrd until very recently, but
wanted to use UUID in my bootup on my new system. I used this command
(which I re-run whenever I deploy a new kernel):

dracut -H -o i18n -o resume -o usrmount --force /boot/initramfs.img

And then added one line to my grub2 config:

initrd  /initramfs.img

and it just simply works... though it's still a bit of black magic to
me, and every time I reboot I feel a bit of nervousness when I see
"Loading initial ramdisk..." and don't breathe until it succeeds. :)