Re: /dev/root: which approach ? [PATCH]

From: Andrew Morton
Date: Wed Mar 10 2004 - 15:03:10 EST


Miquel van Smoorenburg <miquels@xxxxxxxxxx> wrote:
>
> Currently if you boot from a blockdevice with a dynamically
> allocated major number (such as LVM or partitionable raid),
> there is no way to check the root filesystem. The root
> fs is still read-only, so you cannot create a device node
> anywhere to point fsck at.
>
> This was discussed on the linux-raid mailinglist, and I proposed
> (as proof of concept) a simple check in bdget() to see if the
> device is being opened is the /dev/root node and if so redirect
> it to the current root device. This is a 8-line patch, the only
> disadvantage I can think of is that for an open file, inode->i_rdev
> is then different from blockdevice->bd_dev.

The /dev/root alias resolution looks nice to me, which probably means that
it has a fatal flaw.

Is it not possible to create a device node on ramfs or ramdisk and point
fsck at that?

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