Bug 216983 - emulators/linux_base-c6: info message advises to make the system not boot properly
Summary: emulators/linux_base-c6: info message advises to make the system not boot pro...
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-emulation (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-10 22:51 UTC by John Smith
Modified: 2018-02-08 18:32 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (emulation)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Smith 2017-02-10 22:51:06 UTC
1. install message for linux_base-c6 tells me to add 2 mounts to /etc/fstab because some programs might need it:

pkg info -D linux_base-c6
linux_base-c6-6.8_11:
Always:
Some programs need linprocfs mounted on /compat/linux/proc.  Add the
following line to /etc/fstab:

linprocfs   /compat/linux/proc	linprocfs	rw	0	0

Then run "mount /compat/linux/proc".

Some programs need tmpfs mounted on /compat/linux/dev/shm.  Add the
following line to /etc/fstab:

tmpfs    /compat/linux/dev/shm	tmpfs	rw,mode=1777	0	0

Then run "mount /compat/linux/dev/shm".

2. if I add them just like that and reboot - the system will boot into a single user mode, because '/etc/fstab' fails to mount those mounts.
3. it so turns out that one needs to add

linux_load="YES"
linprocfs_load="YES"

to the '/boot/loader.conf' file.

4. even with those lines added to the '/boot/loader.conf', the tmpfs mount in '/etc/fstab' will still lead to booting into a single user mode.

As far as I know (not 100% sure), but adding 'late' option to the tmpfs mount entry in '/etc/fstab' resolves the issue, but this is not mentioned anywhere and the port's info message directly advises to add quite specific line to '/etc/fstab', which leads to system not booting properly.
Comment 1 John Smith 2017-02-10 23:22:17 UTC
Turns out there's also 'tmpfs' kernel module, so one also needs to add

tmpfs_load="YES"

to the '/boot/loader.conf'.
Comment 2 John Smith 2017-02-11 11:13:18 UTC
The mos probably explanation of why that happens to me is given in bug 216985, comment 7:
Tobias Kortkamp wrote:
> This happens on systems that have a separate boot partition e.g. systems with an encrypted root partition.
> 
> It's impossible for modules to be autoloaded when /boot/kernel isn't available yet.
> 
> The FreeBSD 10.3-RELEASE installer will create such a system when you select ZFS and enable full-disk encryption.

I do have a fully encrypted ZFS disk.
Comment 3 Walter Schwarzenfeld 2018-02-07 23:11:35 UTC
Feedback please.
Comment 4 John Smith 2018-02-08 18:24:41 UTC
(In reply to w.schwarzenfeld from comment #3)
You may close this ticket if you want, the project is hardly alive.