/init during early userspace,
/sbin/request-key are three files that the Linux kernel accesses (and they are all executables). Are there any other files, possibly non-executable ones, that Linux opens? Like maybe the files containing the names of the users on a system?
In general, a Linux kernel doesn't open files on its own behalf (rather than on behalf of processes). Even
/sbin/init (or the 'init' program specified on the kernel command line) is
exec()ed by a process (process 1 is constructed directly from an image inside the kernel, IIRC).
At one time, kernel modules requiring firmware would directly open the firmware files, but this is no longer the case, and instead the kernel makes requests of a user-mode helper program.
If your question is about which filenames are compiled into the Linux kernel, then we see the following in the 'init' image that seeds process 1:
/init /sbin/init /etc/init /bin/init /bin/sh /dev/console
A recursive grep for
"/ turns up quite a few hits; mostly false-positives, but worth looking through for real matches.
Regarding user names, the kernel don't need (and don't care about) them, since it is dealing only with numerical user ids (the uid 0, a.k.a.
root, may have special status). See credentials(7) & capabilities(7)
Regarding opening files from inside the kernel outside of an existing process (which uses open(2)...) AFAIK the kernel is only starting few processes from
/sbin/init (or else
/sbin/poweroff, etc... You might get the full list by using
strings on the uncompressed
vmlinux kernel file.
Notice also that several files paths are hardcoded in the dynamic loader (see ld-linux(8) etc...) or the standard C library (your
libc.so) so practically needed for nearly all applications.