From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 2ABC11381F3 for ; Tue, 2 Jul 2013 14:31:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 13177E0A7E; Tue, 2 Jul 2013 14:30:56 +0000 (UTC) Received: from mail-la0-f42.google.com (mail-la0-f42.google.com [209.85.215.42]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8478EE09F7 for ; Tue, 2 Jul 2013 14:30:54 +0000 (UTC) Received: by mail-la0-f42.google.com with SMTP id eb20so5588967lab.29 for ; Tue, 02 Jul 2013 07:30:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=N9qq0m/EtKzpWDL3+7X7ArFjCCnztI0sHxJdfkGfvVw=; b=gzIKnGzk2pOXUq14duXTap6uixXlKodmPNnIJHbrO8uAIumF6IDHhGCCfhsHk2QNA/ b2BvIKUfO+RdyZt+1soYN7RFE3UwxdvOqz6ztlQ6gyFLb1SBKTt9aPtjydgFkrkubic7 yTyw0B4QHpKVHZeTcyeIhi++VyasNKU2ESDdw6HyX6Aw1x27yWkdN7LmCbx9qvwYUUah VxnHtPnAc59T+xhoq4SJCn+U9bgg0qIaXwN1vJNxWUDz+hVaJcf3ERTHUGScari/zCa8 2LYq1v4m1rBokj8qoiq1ExSM2vaYztqVbmquWVpJbY5YF0MmktISbh3NKZjky3SfF8mU q0Uw== Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 X-Received: by 10.152.25.195 with SMTP id e3mr14457076lag.76.1372775452744; Tue, 02 Jul 2013 07:30:52 -0700 (PDT) Received: by 10.114.14.137 with HTTP; Tue, 2 Jul 2013 07:30:52 -0700 (PDT) In-Reply-To: References: Date: Tue, 2 Jul 2013 16:30:52 +0200 Message-ID: Subject: Re: [gentoo-user] Re: Can't find init due to inconsistent drive order From: =?ISO-8859-1?Q?Randolph_Maa=DFen?= To: gentoo-user@lists.gentoo.org Content-Type: multipart/alternative; boundary=089e0160bc3437a1df04e0883117 X-Archives-Salt: 3e919535-126e-4e1e-a62b-8943eb869ce6 X-Archives-Hash: 032cf30323effb7357119d5c387e4390 --089e0160bc3437a1df04e0883117 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 2013/7/2 Grant Edwards > On 2013-07-01, Grant Edwards 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=3D/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 still haven't figured out why my drives suddenly started getting > discovered in varying orders. I think that the SATA drives are always > in the same order with respect to each other, but sometimes the > external firewire drive gets discovered before the SATA drives and > sometimes after the SATA drives. > > It looks like my options are: > > 1) Keep hitting the reset button until it works. > > 2) Unplug or power down the firewire drive when booting. > > 3) Set up an initrd for the sole purpose of finding the actual root > parition via filesystem label. [I find this idea rather offensive.] > > 4) Build the firewire drive as a module instead of building it into > the kernel. That would delay the discovery of the firewire drive > until after root has been mounted. > > 5) For the drive with the root parition on it switch from a DOS > parition table to a GPT partition table and use the > root=3DPARTUUID=3D kernel option. > > You don't need to switch to GPT for that. I have a DOS partitioned disk and "blkid" prints the LABEL and UUID for each partition. > 6) Fix the kernel so it can find root by looking at filesystem > labels. > > Number 6 (fixing the kernel) is The Right Thing To Do(tm), but it's a > bit out of scope for the momement. The "early code" in the kernel > obviously knows how to read partition tables and also knows about the > relevent file system, so I'm a bit baffled why it can't look at the > file system label. > > Changing the firewire driver to be a module is probably the simplest > solution, but it's a kludgy work-around for what is, in my opinion, a > kernel bug: if you are going to require people to specify an absolute > disk drive index for the root partition, then you'd better index > drives in a consistent order from one boot to the next. > > Switching to a GPT partition table sounds like the cleanest solution, > but I need to figure out if the grub (legacy) ebuild includes GPT > support or not. I know it's supported by grub2, but I don't really > feel like switching to grub2 ATM. > > -- > Grant Edwards grant.b.edwards Yow! But was he mature > at enough last night at t= he > gmail.com lesbian masquerade? > > > --=20 Mit freundlichen Gr=FC=DFen / Best regards Randolph Maa=DFen --089e0160bc3437a1df04e0883117 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
2013/7/2 Grant Edwards <grant.b.edwards@gmail.com= >
On 2013-07-01, Grant Edwards <grant.b.edwards@gmail.com> wrote:

> I've just recently run into a problem where sometimes when a machi= ne
> boots, the kernel can't find init. =A0This appears to be because m= y grub
> configuration line says "root=3D/dev/sda5" and _sometimes_ t= he 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 still haven't figured out why my drives suddenly started gettin= g
discovered in varying orders. =A0I think that the SATA drives are always in the same order with respect to each other, but sometimes the
external firewire drive gets discovered before the SATA drives and
sometimes after the SATA drives.

It looks like my options are:

=A01) Keep hitting the reset button until it works.

=A02) Unplug or power down the firewire drive when booting.

=A03) Set up an initrd for the sole purpose of finding the actual root
=A0 =A0 parition via filesystem label. =A0[I find this idea rather offensiv= e.]

=A04) Build the firewire drive as a module instead of building it into
=A0 =A0 the kernel. =A0That would delay the discovery of the firewire drive=
=A0 =A0 until after root has been mounted.

=A05) For the drive with the root parition on it switch from a DOS
=A0 =A0 parition table to a GPT partition table and use the
=A0 =A0 root=3DPARTUUID=3D<whatever> kernel option.


You don't need to switch to GPT fo= r that. I have a DOS partitioned disk and "blkid" prints the LABE= L and UUID for each partition.
=A0
=A06) Fix the kernel so it can find root by looking at filesystem
=A0 =A0 labels.

Number 6 (fixing the kernel) is The Right Thing To Do(tm), but it's a bit out of scope for the momement. =A0The "early code" in the ker= nel
obviously knows how to read partition tables and also knows about the
relevent file system, so I'm a bit baffled why it can't look at the=
file system label.

Changing the firewire driver to be a module is probably the simplest
solution, but it's a kludgy work-around for what is, in my opinion, a kernel bug: if you are going to require people to specify an absolute
disk drive index for the root partition, then you'd better index
drives in a consistent order from one boot to the next.

Switching to a GPT partition table sounds like the cleanest solution,
but I need to figure out if the grub (legacy) ebuild includes GPT
support or not. =A0I know it's supported by grub2, but I don't real= ly
feel like switching to grub2 ATM.

--
Grant Edwards =A0 =A0 =A0 =A0 =A0 =A0 =A0 grant.b.edwards =A0 =A0 =A0 =A0Yo= w! But was he mature
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 at =A0 = =A0 =A0 =A0 =A0 =A0 =A0 enough last night at the
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 gmail.com =A0 =A0 =A0 =A0 =A0 =A0lesbia= n masquerade?





--
Mit freundlichen Gr=FC=DFen=A0/ Best regards
=A0
Randolph Maa=DFen

--089e0160bc3437a1df04e0883117--