[TEST/REVIEW]: rootfs mounting code rework

Poul-Henning Kamp phk at phk.freebsd.dk
Sun Dec 5 10:23:51 PST 2004


In message <41B34F8D.5030401 at freebsd.org>, Tim Kientzle writes:

>> The loader reads /etc/fstab and picks the entry for '/' out of it
>> so I can only pressume that whoever did that disagree with your
>> notion of "correct".
>
>Here's a situation that may be worth thinking
>about:
>
>   * Working FreeBSD system that uses
>     a separate controller.  / is /dev/da4.
>
>   * Controller blows up.
>
>   * Connect hard disk to the on-board controller.
>
>Note: kernel is now being loaded from /dev/da0,
>but /etc/fstab still says / is /dev/da4.
>With the old rootfs code, this system is
>unbootable.
>
>I hope you've considered situations like this.

First: I have _not_ changed the logic that decides _which_ rootfs
to mount, only the mechanics of how it is mounted.

Second: I belive you could simply type something like:

	set vfs.root.mountfrom="ufs:/dev/da0"

in the loader and your system would do what you expect it to.


-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the freebsd-current mailing list