On Thu, 23 Dec 1999, David Malone wrote:

> The problem seems to be that I'm listing the "/dev/wd1s1a" devices
> in fstab instead of "/dev/ad1s1a", and fsck doesn't recognise that
> they are the same thing, and so doesn't spot that it needs to set
> the hotroot flag.
> 
> I'm not sure if this is purely a config problem, or if the compatility
> devices should be more compatable.

What is the root device according to mount(8)?  If it is /dev/ad1s1a,
then the problem would have been fixed by ignoring the fstab entry and
using the actual root device, except the translation was broken by
unimplementing block devices.  Lightly tested fix for the translation:

diff -c2 libc/gen/fstab.c~ libc/gen/fstab.c
*** libc/gen/fstab.c~   Fri Oct  2 15:08:53 1998
--- libc/gen/fstab.c    Sat Dec  4 00:57:09 1999
***************
*** 72,76 ****
                strcpy(buf, _PATH_DEV);
        strcat(buf, sf.f_mntfromname);
!       if (stat(buf, &sb) != 0 || !S_ISBLK(sb.st_mode))
                return;
        _fs_fstab.fs_spec = buf;
--- 72,77 ----
                strcpy(buf, _PATH_DEV);
        strcat(buf, sf.f_mntfromname);
!       if (stat(buf, &sb) != 0 ||
!           (!S_ISBLK(sb.st_mode) && !S_ISCHR(sb.st_mode)))
                return;
        _fs_fstab.fs_spec = buf;

The boot loader now reads fstab and may defeat this by forcing the actual
root device to the one given in fstab.  setrootbyname() in the kernel could
translate from "wd" to "ad" in the device name, but I don't think it does.

Summary: put the actual root device in fstab unless you are working on fixing
the compatibility cruft.

Bruce



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to