Skip to content

Commit

Permalink
rc: make the 'linux' script explicitly load filesystem modules
Browse files Browse the repository at this point in the history
This removes a minor annoyance with Linux jails, where you often
want linux_mounts_enable="NO", yet you want those filesystems
available for mounting in jails; normally mount(8) would result
in kernel automatically loading the KLD, but this doesn't work
inside jails or chroots.

PR:		242955
Sponsored By:	EPSRC
Differential Revision:	https://reviews.freebsd.org/D29725

(cherry picked from commit 45aec46)
  • Loading branch information
trasz committed Feb 13, 2022
1 parent a10a92d commit 2ffd685
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libexec/rc/rc.d/linux
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ linux_start()
# Linux uses the pre-pts(4) tty naming scheme.
load_kld pty

# Explicitly load the filesystem modules; they are usually required,
# even with linux_mounts_enable="NO".
load_kld fdescfs
load_kld linprocfs
load_kld linsysfs

# Handle unbranded ELF executables by defaulting to ELFOSABI_LINUX.
if [ `sysctl -ni kern.elf64.fallback_brand` -eq "-1" ]; then
sysctl kern.elf64.fallback_brand=3 > /dev/null
Expand Down

0 comments on commit 2ffd685

Please sign in to comment.