Re: No /dev/root with devtmpfs?

From: Paul Parsons
Date: Fri Feb 10 2012 - 08:10:38 EST


--- On Fri, 10/2/12, Kirill Smelkov <kirr@xxxxxxxxxx> wrote:
> > Could you simply use /etc/fstab to identify the root
> partition?
>
> Unfortunately no, because /etc/fstab can't know where the
> card will be
> inserted to boot this time - i.e. either in compactflash
> slot on
> motherboard, or through usb via cardreader. So root has to
> be determined
> at runtime.
>
> Personally I'm ok with no /dev/root symlink as long as there
> is another
> way to detect root blkdev reliably. And I'm still confised
> what's the
> rationale about why this can't be done for modern
> filesysems.

Here's another suggestion: /proc/cmdline

The bootloader might pass the root partition to the kernel via the
"root=" kernel parameter; these can be read at /proc/cmdline.
For example, on an HP iPAQ hx4700: root=/dev/mtdblock2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/