Solved cannot open /etc/rc: No such file or directory

balanga

Son of Beastie

Reaction score: 217
Messages: 4,024

How can I tell why I'm getting this msg:-
Code:
mountroot: waiting for device /dev/da0s2...
da0 at umass-sim0 bus 0 scbus0 target 0 lun 0
da0: <Generic- SD/MMC/MS PRO 1.00> Removable Direct Access SPC-2 SCSI device
da0: Serial Number 20120926571200000
da0: 40.000MB/s transfers
da0: 15193MB (31116288 512 byte sectors)
da0: quirks=0x2<NO_6_BYTE>
Mar 30 08:18:41 init: login_getclass: unknown class 'daemon'
sh: cannot open /etc/rc: No such file or directory

I'm in the single user shell and there is no such directory:-

Code:
Enter full pathname of shell or RETURN for /bin/sh:
# pwd
/
# ls -al /etc
total 224
drwxr-xr-x  27 0  0  512 Dec  3  2017 .
drwxr-xr-x  19 0  0  512 Nov 30  2017 ..
drwxr-xr-x   2 0  0  512 Nov 30  2017 X11
drwxr-xr-x   2 0  0  512 Nov 30  2017 autofs
drwxr-xr-x   2 0  0  512 Nov 30  2017 bluetooth
drwxr-xr-x   2 0  0  512 Nov 30  2017 casper
drwxr-xr-x   2 0  0  512 Nov 30  2017 cron.d
drwxr-xr-x   2 0  0  512 Nov 30  2017 defaults
drwxr-xr-x   2 0  0  512 Nov 30  2017 devd
drwxr-xr-x   2 0  0  512 Nov 30  2017 dma
-rw-r--r--   1 0  0   92 Dec  3  2017 fstab
drwxr-xr-x   2 0  0  512 Nov 30  2017 gss
drwxr-xr-x   2 0  0  512 Nov 30  2017 mail
drwxr-xr-x   2 0  0  512 Nov 30  2017 mtree
drwxr-xr-x   2 0  0  512 Nov 30  2017 newsyslog.conf.d
drwx------   2 0  0  512 Nov 30  2017 ntp
drwxr-xr-x   2 0  0  512 Nov 30  2017 pam.d
drwxr-xr-x   6 0  0  512 Nov 30  2017 periodic
drwxr-xr-x   2 0  0  512 Nov 30  2017 pkg
drwxr-xr-x   2 0  0  512 Nov 30  2017 ppp
drwxr-xr-x   2 0  0  512 Nov 30  2017 rc.conf.d
drwxr-xr-x   2 0  0  512 Nov 30  2017 rc.d
drwxr-xr-x   2 0  0  512 Nov 30  2017 security
drwxr-xr-x   2 0  0  512 Nov 30  2017 skel
drwxr-xr-x   2 0  0  512 Nov 30  2017 ssh
drwxr-xr-x   2 0  0  512 Nov 30  2017 ssl
drwxr-xr-x   2 0  0  512 Nov 30  2017 syslog.d
drwxr-xr-x   2 0  0  512 Nov 30  2017 zfs
#

but what is causing the requirement for /etc/rc ?

This is FreeBSD on ARM.
 

roccobaroccoSC

Aspiring Daemon

Reaction score: 173
Messages: 651

At system startup the kernel initializes via the /etc/rc script. It is automatically searched for and it starts the daemons.
You could create an empty file to stop the error message but the services will not be initialized and you will have more or less just the shell as a process.

How did you create this system? Is it stripped down? In the general case you DO want to run the init scripts, they initialize your network interfaces, start the services, logger, etc. Lots of stuff.
 
OP
B

balanga

Son of Beastie

Reaction score: 217
Messages: 4,024

How did you create this system? Is it stripped down? In the general case you DO want to run the init scripts, they initialize your network interfaces, start the services, logger, etc. Lots of stuff.

I built the system using the standard buildworld / buildkernel with a target of ARM.
 
OP
B

balanga

Son of Beastie

Reaction score: 217
Messages: 4,024

It was the line before ie:-Mar 30 08:18:41 init: login_getclass: unknown class 'daemon'
which led me to and that sorted it out. Turns out various files were missing from /etc namely /etc/login.conf among others.
 

roccobaroccoSC

Aspiring Daemon

Reaction score: 173
Messages: 651

The build seems incomplete then. You need to debug it. The init scripts are essential to the system startup.
 
Top