lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 13 Feb 2012 12:25:39 +0400
From:	Kirill Smelkov <kirr@....spb.ru>
To:	Paul Parsons <lost.distance@...oo.com>
Cc:	"H. Peter Anvin" <hpa@...or.com>,
	Kay Sievers <kay.sievers@...y.org>,
	linux-kernel@...r.kernel.org
Subject: Re: No /dev/root with devtmpfs?

On Fri, Feb 10, 2012 at 01:10:37PM +0000, Paul Parsons wrote:
> --- On Fri, 10/2/12, Kirill Smelkov <kirr@....spb.ru> 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

This does not work universally either, for example for

    root=PARTUUID=00112233-4455-6677-8899-AABBCCDDEEFF


the kernel scans partitions and finds one for root by partition uuid
(see name_to_dev_t() in init/do_mounts.c).

That's exactly my situation - I have universal flash image which can
bee booted via CF slot (on several boards, thus will have different
/dev/hd? or /dev/sd?) and via usb/cardreader (again different /dev/
entry), and root is mounted by partition id.

The kernel has no problem finding root partition and mounting it. I just
needed a sane and robust way to know its choice.


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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ