Subject: sysinst and LFS
To: None <current-users@NetBSD.org>
From: Jochen Kunz <jkunz@unixag-kl.fh-kl.de>
List: current-users
Date: 11/30/2006 17:42:02
Hi.

Last week I instaled -current on my Sun Ultra 5, / formated to FFS, /usr
to LFS. At the first reboot after instalation it faild to mount /usr.
Reason was simple:
# cat /etc/fstab
# NetBSD /etc/fstab
# See /usr/share/examples/fstab/ for more examples.
/dev/sd0a               /       ffs     rw,softdep               1 1
/dev/sd0b               none    swap    sw               0 0
# /dev/sd0g            /usr    lfs     rw               1 2
kernfs          /kern   kernfs  rw
procfs          /proc   procfs  rw,noauto

So why is there a "# " in front of the line with the /usr FS?

I investigated sysinst and found in disks.c:make_fstab()
                case FS_BSDLFS:
                        /* If there is no LFS, just comment it out. */
                        if (check_lfs_progs())
                                s =3D "# ";
                        fstype =3D "lfs";
check_lfs_progs() is in util.c and contains:
int
check_lfs_progs(void)
{
        return (access("/sbin/fsck_lfs", X_OK) =3D=3D 0 &&
                access("/sbin/mount_lfs", X_OK) =3D=3D 0 &&
                access("/sbin/newfs_lfs", X_OK) =3D=3D 0);
}

I.e. all LFS partitions are disabled in /etc/fstab of the _target_
system if there are {fsck,mount,newfs}_lfs executables on the
_instalation_ system. If, at all, the lines should be disabled if these
executables are _missing_, not when they are accessible. And why depends
the _target_ system /etc/fstab on the contens of the _instalation_
system at all?

I don't see any reason for this check and propose to remove it
alltogether.
--=20


tsch=FC=DF,
       Jochen

Homepage: http://www.unixag-kl.fh-kl.de/~jkunz/