On 2013-07-01, Paul Hartman <paul.hartman+gen...@gmail.com> wrote:
> On Mon, Jul 1, 2013 at 4:52 PM, Grant Edwards <grant.b.edwa...@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.

Apparently so.

> I think there's a kernel toggle for that.

I'll look into it.

>> 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,

It's not really that complex.  There are two ways to get the kernel to
use an initial ram fs as root: the bootloader loads the initial ram
image into ram or it gets linked into the kernel when the kernel is
built.

> and every time I reboot I feel a bit of nervousness when I see
> "Loading initial ramdisk..." and don't breathe until it succeeds. :)

I've got nothing against initramfs -- on my embedded systems root
starts out as an initramfs and stays that way.  I just don't see why I
should be forced to have one.

-- 
Grant



Reply via email to