Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Jul 2000 17:31:58 -0700
From:      Mike Smith <msmith@freebsd.org>
To:        Doug White <dwhite@resnet.uoregon.edu>
Cc:        hackers@freebsd.org
Subject:   Re: suprising mount root behavior 
Message-ID:  <200007220031.RAA02106@mass.osd.bsdi.com>
In-Reply-To: Your message of "Fri, 21 Jul 2000 17:02:44 PDT." <Pine.BSF.4.21.0007211700490.69345-100000@resnet.uoregon.edu> 

next in thread | previous in thread | raw e-mail | index | archive | help
> Some new root mount behavior in 4.0 just saved my bacon, but I'm curious
> as to how it's implemented.

8)

> My custom installer accidentally created fstab entries for IDE disks on a
> SCSI-only system.  Thus, fstab point to /dev/ad0s1a for / and /dev/ad0s1b
> for swap.  
> 
> I rebooted the system to try and fix it, and lo and behold it booted up
> correctly!  I had no swap but root was mounted RW so I could fix the
> fstab.
> 
> Now my question is: How did it know?  I'm not setting vfs.root.mountfrom
> in the loader.  
> 
> Also, how did mount know to not override the / mountpoint to the one from
> fstab (and subsequently fail)?

There's a complex order of battle associated with mounting /.  8)

You can read /sys/kern/vfs_conf.c:vfs_mountroot() and associated stuff to 
get the gory details, but the bottom line is that there are several 
layers of fallback, and you were saved by the one that looks at the major 
and minor numbers passed in by the bootloader and tries them if the fstab 
entry fails.

-- 
... every activity meets with opposition, everyone who acts has his
rivals and unfortunately opponents also.  But not because people want
to be opponents, rather because the tasks and relationships force
people to take different points of view.  [Dr. Fritz Todt]




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200007220031.RAA02106>