lkml.org 
[lkml]   [2012]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: No /dev/root with devtmpfs?
On Wed, Feb 08, 2012 at 04:44:00PM +0000, Paul Parsons wrote:
> --- On Wed, 8/2/12, Kirill Smelkov <kirr@mns.spb.ru> wrote:
> > "On what disk/partition was / mounted?" is a well-defined
> > question for
> > cases when backing store is local hdd, so there should be
> > well-defined
> > answer.
> >
> > Previously it was /dev/root, but if /dev/root is not good
> > there should be
> > some other way for getting the answer. With ext2 I've
> > switched to
> > `mountpoint -d /` and then grepping major/minor in
> > /proc/partitions, but
> > with major=0 case I suspect this won't work.
> >
> >
> > My use case is to check md5 sum of mbr + bootloader area +
> > root-partition early right after the boot, to verify whether
> > software is
> > not corrupt, and for doing so it was useful to know / ->
> > root-partition
> > -> whole block device. It's not tivo, just checking for
> > medium damage. (I
> > understand this would be better done in the early bootloader
> > but that
> > part is out of my control)
>
> 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.


Thanks,
Kirill


\
 
 \ /
  Last update: 2012-02-10 10:05    [W:0.061 / U:7.956 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site