Subject: Re: Trivia: detecting the root filesystem type
To: None <johan.wallen+lists@helsinki.fi>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: current-users
Date: 12/07/2007 19:43:31
johan.wallen+lists@helsinki.fi wrote:

> (/ is ffs, /usr is lfs).  Does somebody have any idea why it sometimes
> immediately recognise that root is ffs, and sometimes falls back to
> first trying lfs and then ffs (in both cases, the file systems have been
> cleanly unmounted before reboot)?  This is just due to interest -- both
> cases give the same end result, so it does not really matter.

See sys/kern/vfs_subr.c:

---
int
vfs_mountroot(void)
 :
	LIST_FOREACH(v, &vfs_list, vfs_list) {
		if (v->vfs_mountroot == NULL)
			continue;
#ifdef DEBUG
		aprint_normal("mountroot: trying %s...\n", v->vfs_name);
#endif
---

"may the source be with you"

---
Izumi Tsutsui