misc/118160: unable to mount / rw while booting 7.0-BETA3

Bruce Evans brde at optusnet.com.au
Tue Nov 20 23:42:33 PST 2007

On Wed, 21 Nov 2007, Bruce Evans wrote:

> I can now see a plausible way to reach the bad state:
> - after booting, the root device is mounted on / r/o with no problems
> - mistype a mount command or have $true generate a wrong mount command,
>  so that the root device is mounted somewhere else (I don't know how
>  it can be on "", but it could be on " " or on any valid pathname).
>  If you preemptively mount it r/w, then this other mount will fail
>  -- look in the logs for messages about this.
> - now try to remount / r/w normally.  This will fail due to the r/o mount
>  not on /.
> - if there is only 1 extra r/o mount of /, then the r/w mount should work
>  after unmounting the extra.  If there are several extras, then unmounting
>  them in a certain order should give the bufobj panic.

The bufobj panic actually happens in the only possible order for trying to
fix the simulated problem: after booting with -s:

     # mount -o ro /dev/ad0s2a /mnt     # create extra mount (ad0s2a is root dev)
     #                                  # like a runaway script might
     # umount /mnt                      # get rid of the extra mount
     # fsck -p /
     --- panic


     # mount /dev/ad0s2a /mnt           # I forgot the ro
     --- this succeeds due to the hack that lets fsck succeed, but it shouldn't


More information about the freebsd-bugs mailing list