Project

General

Profile

Actions

Bug #11483

closed

Installer does not add required module to loader.conf when using ZFS

Added by Steve Wheeler almost 4 years ago. Updated almost 4 years ago.

Status:
Resolved
Priority:
High
Category:
Installer
Target version:
Start date:
02/20/2021
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Default
Affected Version:
2.5.0
Affected Architecture:
amd64

Description

The ADI installer image correctly installs to eMMC or mSATA creating a bootable install on RCC-VE with the default install options: UFS with swap.

If you choose to remove the swap slice, if you have one of the 4G eMMC models for example, the resulting UFS install tries to mount root from da1.
It does not pick up the fix for the swapped boot devices caused by the USB drive becoming da0.
That can be worked past editing the fstab manually.

If you choose ZFS the resulting install does not boot whether or not you choose the default ZFS options.
It fails at mountroot:

Loading kernel...
/boot/kernel/kernel text=0x1a5b6c4 data=0x140 data=0x1b62810 syms=[0x8+0x1c20c0+0x8+0x1c83cf]
Loading configured modules...
can't find '/etc/hostid'
/boot/entropy size=0x1000
KDB: debugger backends: ddb
KDB: current backend: ddb
---<<BOOT>>---
Copyright (c) 1992-2020 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
    The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 12.2-STABLE 38a4c12973d(plus-devel-12) pfSense amd64
FreeBSD clang version 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aa2)
VT(vga): resolution 640x480
CPU: Intel(R) Atom(TM) CPU  C2558  @ 2.40GHz (2400.06-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0x406d8  Family=0x6  Model=0x4d  Stepping=8
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x43d8e3bf<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,MOVBE,POPCNT,TSCDLT,AESNI,RDRAND>
  AMD Features=0x28100800<SYSCALL,NX,RDTSCP,LM>
  AMD Features2=0x101<LAHF,Prefetch>
  Structured Extended Features=0x2282<TSCADJ,SMEP,ERMS,NFPUSG>
  VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
  TSC: P-state invariant, performance statistics
real memory  = 10737418240 (10240 MB)
avail memory = 8219598848 (7838 MB)
Event timer "LAPIC" quality 600
ACPI APIC Table: <CORE   COREBOOT>
WARNING: L1 data cache covers fewer APIC IDs than a core (0 < 1)
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
FreeBSD/SMP: 1 package(s) x 4 core(s)
random: unblocking device.
ioapic0 <Version 2.0> irqs 0-23 on motherboard
Launching APs: 2 3 1
Timecounter "TSC-low" frequency 1200029796 Hz quality 1000
wlan: mac acl policy registered
random: entropy device external interface
ipw_bss: You need to read the LICENSE file in /usr/share/doc/legal/intel_ipw.LICENSE.
ipw_bss: If you agree with the license, set legal.intel_ipw.license_ack=1 in /boot/loader.conf.
module_register_init: MOD_LOAD (ipw_bss_fw, 0xffffffff80743340, 0) error 1
ipw_ibss: You need to read the LICENSE file in /usr/share/doc/legal/intel_ipw.LICENSE.
ipw_ibss: If you agree with the license, set legal.intel_ipw.license_ack=1 in /boot/loader.conf.
module_register_init: MOD_LOAD (ipw_ibss_fw, 0xffffffff807433f0, 0) error 1
ipw_monitor: You need to read the LICENSE file in /usr/share/doc/legal/intel_ipw.LICENSE.
ipw_monitor: If you agree with the license, set legal.intel_ipw.license_ack=1 in /boot/loader.conf.
module_register_init: MOD_LOAD (ipw_monitor_fw, 0xffffffff807434a0, 0) error 1
iwi_bss: You need to read the LICENSE file in /usr/share/doc/legal/intel_iwi.LICENSE.
iwi_bss: If you agree with the license, set legal.intel_iwi.license_ack=1 in /boot/loader.conf.
module_register_init: MOD_LOAD (iwi_bss_fw, 0xffffffff8076ad30, 0) error 1
iwi_ibss: You need to read the LICENSE file in /usr/share/doc/legal/intel_iwi.LICENSE.
iwi_ibss: If you agree with the license, set legal.intel_iwi.license_ack=1 in /boot/loader.conf.
module_register_init: MOD_LOAD (iwi_ibss_fw, 0xffffffff8076ade0, 0) error 1
iwi_monitor: You need to read the LICENSE file in /usr/share/doc/legal/intel_iwi.LICENSE.
iwi_monitor: If you agree with the license, set legal.intel_iwi.license_ack=1 in /boot/loader.conf.
module_register_init: MOD_LOAD (iwi_monitor_fw, 0xffffffff8076ae90, 0) error 1
000.000018 [4336] netmap_init               netmap: loaded module
module_register_init: MOD_LOAD (vesa, 0xffffffff814123e0, 0) error 19
random: registering fast source Intel Secure Key RNG
random: fast provider: "Intel Secure Key RNG" 
kbd0 at kbdmux0
[ath_hal] loaded
mlx5en: Mellanox Ethernet driver 3.5.2 (September 2019)
nexus0
vtvga0: <VT VGA driver> on motherboard
cryptosoft0: <software crypto> on motherboard
padlock0: No ACE support.
acpi0: <CORE COREBOOT> on motherboard
acpi0: Power Button (fixed)
hpet0: <High Precision Event Timer> iomem 0xfed03000-0xfed033ff on acpi0
hpet0: invalid period
device_attach: hpet0 attach returned 6
cpu0: <ACPI CPU> on acpi0
hpet0: <High Precision Event Timer> iomem 0xfed03000-0xfed033ff on acpi0
hpet0: invalid period
device_attach: hpet0 attach returned 6
atrtc0: <AT realtime clock> port 0x70-0x77 on acpi0
atrtc0: registered as a time-of-day clock, resolution 1.000000s
Event timer "RTC" frequency 32768 Hz quality 0
attimer0: <AT timer> port 0x40-0x43,0x50-0x53 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x408-0x40b on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pcib1: <ACPI PCI-PCI bridge> mem 0xdfe00000-0xdfe1ffff irq 16 at device 1.0 on pci0
pci1: <ACPI PCI bus> on pcib1
pcib2: <ACPI PCI-PCI bridge> mem 0xdfe20000-0xdfe3ffff irq 16 at device 2.0 on pci0
pci2: <ACPI PCI bus> on pcib2
pcib3: <ACPI PCI-PCI bridge> mem 0xdfe40000-0xdfe5ffff irq 20 at device 3.0 on pci0
pci3: <ACPI PCI bus> on pcib3
igb0: <Intel(R) PRO/1000 PCI-Express Network Driver> port 0x1000-0x101f mem 0xdfc00000-0xdfc1ffff,0xdfc20000-0xdfc23fff irq 18 at device 0.0 on pci3
igb0: Using 1024 TX descriptors and 1024 RX descriptors
igb0: Using 2 RX queues 2 TX queues
igb0: Using MSI-X interrupts with 3 vectors
igb0: Ethernet address: 00:08:a2:0d:16:15
igb0: netmap queues/slots: TX 2/1024, RX 2/1024
pcib4: <ACPI PCI-PCI bridge> mem 0xdfe60000-0xdfe7ffff irq 23 at device 4.0 on pci0
pci4: <ACPI PCI bus> on pcib4
igb1: <Intel(R) PRO/1000 PCI-Express Network Driver> port 0x2000-0x201f mem 0xdfd00000-0xdfd1ffff,0xdfd20000-0xdfd23fff irq 19 at device 0.0 on pci4
igb1: Using 1024 TX descriptors and 1024 RX descriptors
igb1: Using 2 RX queues 2 TX queues
igb1: Using MSI-X interrupts with 3 vectors
igb1: Ethernet address: 00:08:a2:0d:16:16
igb1: netmap queues/slots: TX 2/1024, RX 2/1024
pci0: <processor> at device 11.0 (no driver attached)
pci0: <base peripheral, IOMMU> at device 15.0 (no driver attached)
igb2: <Intel(R) PRO/1000 PCI-Express Network Driver> port 0x3000-0x301f mem 0xdfea0000-0xdfebffff,0xdff24000-0xdff27fff irq 18 at device 20.0 on pci0
igb2: Using 1024 TX descriptors and 1024 RX descriptors
igb2: Using 4 RX queues 4 TX queues
igb2: Using MSI-X interrupts with 5 vectors
igb2: Ethernet address: 00:08:a2:0d:16:11
igb2: netmap queues/slots: TX 4/1024, RX 4/1024
igb3: <Intel(R) PRO/1000 PCI-Express Network Driver> port 0x3020-0x303f mem 0xdfec0000-0xdfedffff,0xdff28000-0xdff2bfff irq 19 at device 20.1 on pci0
igb3: Using 1024 TX descriptors and 1024 RX descriptors
igb3: Using 4 RX queues 4 TX queues
igb3: Using MSI-X interrupts with 5 vectors
igb3: Ethernet address: 00:08:a2:0d:16:12
igb3: netmap queues/slots: TX 4/1024, RX 4/1024
igb4: <Intel(R) PRO/1000 PCI-Express Network Driver> port 0x3040-0x305f mem 0xdfee0000-0xdfefffff,0xdff2c000-0xdff2ffff irq 20 at device 20.2 on pci0
igb4: Using 1024 TX descriptors and 1024 RX descriptors
igb4: Using 4 RX queues 4 TX queues
igb4: Using MSI-X interrupts with 5 vectors
igb4: Ethernet address: 00:08:a2:0d:16:13
igb4: netmap queues/slots: TX 4/1024, RX 4/1024
igb5: <Intel(R) PRO/1000 PCI-Express Network Driver> port 0x3060-0x307f mem 0xdff00000-0xdff1ffff,0xdff30000-0xdff33fff irq 21 at device 20.3 on pci0
igb5: Using 1024 TX descriptors and 1024 RX descriptors
igb5: Using 4 RX queues 4 TX queues
igb5: Using MSI-X interrupts with 5 vectors
igb5: Ethernet address: 00:08:a2:0d:16:14
igb5: netmap queues/slots: TX 4/1024, RX 4/1024
ehci0: <Intel Avoton USB 2.0 controller> mem 0xdff35400-0xdff357ff irq 22 at device 22.0 on pci0
usbus0: EHCI version 1.0
usbus0 on ehci0
usbus0: 480Mbps High Speed USB v2.0
ahci0: <Intel Avoton AHCI SATA controller> port 0x30c0-0x30c7,0x30e0-0x30e3,0x30c8-0x30cf,0x30e4-0x30e7,0x3080-0x309f mem 0xdff34000-0xdff347ff irq 23 at device 23.0 on pci0
ahci0: AHCI v1.30 with 4 3Gbps ports, Port Multiplier not supported
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich1: <AHCI channel> at channel 1 on ahci0
ahcich2: <AHCI channel> at channel 2 on ahci0
ahcich3: <AHCI channel> at channel 3 on ahci0
ahci1: <Intel Avoton AHCI SATA controller> port 0x30d0-0x30d7,0x30e8-0x30eb,0x30d8-0x30df,0x30ec-0x30ef,0x30a0-0x30bf mem 0xdff34800-0xdff34fff irq 16 at device 24.0 on pci0
ahci1: AHCI v1.30 with 2 6Gbps ports, Port Multiplier not supported
ahcich4: <AHCI channel> at channel 0 on ahci1
ahcich5: <AHCI channel> at channel 1 on ahci1
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
orm0: <ISA Option ROM> at iomem 0xc0000-0xc0fff pnpid ORM0000 on isa0
uart0: <16550 or compatible> at port 0x3f8 irq 4 on isa0
uart1: <16550 or compatible> at port 0x2f8 irq 3 flags 0x10 on isa0
uart1: console (115200,n,8,1)
est0: <Enhanced SpeedStep Frequency Control> on cpu0
Timecounters tick every 1.000 msec
ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
ada0: <INTEL SSDMCEAC030B3 LLLi> ACS-2 ATA SATA 3.x device
ada0: Serial Number CVLI444600X8030H
ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 28626MB (58626288 512 byte sectors)
ugen0.1: <Intel EHCI root HUB> at usbus0
Trying to mount root from zfs:zroot/ROOT/default []...
Mounting from zfs:zroot/ROOT/default failed with error 2: unknown file system.
Root mount waiting for:uhub0: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
 usbus0
Root mount waiting for: usbus0
Root mount waiting for: usbus0
Root mount waiting for: usbus0
uhub0: 8 ports with 8 removable, self powered
Root mount waiting for: usbus0
ugen0.2: <vendor 0x8087 product 0x07db> at usbus0
uhub1 on uhub0
uhub1: <vendor 0x8087 product 0x07db, class 9/0, rev 2.00/0.03, addr 2> on usbus0
uhub1: 4 ports with 4 removable, self powered
Root mount waiting for: usbus0
Root mount waiting for: usbus0
ugen0.3: <Generic Ultra Fast Media> at usbus0
umass0 on uhub1
umass0: <Generic Ultra Fast Media, class 0/0, rev 2.00/1.98, addr 3> on usbus0
da0 at umass-sim0 bus 0 scbus6 target 0 lun 0
da0: <Generic Ultra HS-COMBO 1.98> Removable Direct Access SCSI device
da0: Serial Number 000000225001
da0: 40.000MB/s transfers
da0: 29184MB (59768832 512 byte sectors)
da0: quirks=0x2<NO_6_BYTE>

Loader variables:
  vfs.root.mountfrom=zfs:zroot/ROOT/default

Manual root filesystem specification:
  <fstype>:<device> [options]
      Mount <device> using filesystem <fstype>
      and with the specified (optional) option list.

    eg. ufs:/dev/da0s1a
        zfs:zroot/ROOT/default
        cd9660:/dev/cd0 ro
          (which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /)

  ?               List valid disk boot devices
  .               Yield 1 second (for background tasks)
  <empty line>    Abort manual input

mountroot> ?

List of GEOM managed disk devices:
  diskid/DISK-000000225001s1b diskid/DISK-000000225001s1a label/swap0 ufsid/60314ca58f63d0b6 diskid/DISK-000000225001s1 da0s1b da0s1a diskid/DISK-000000225001 da0s1 da0 diskid/DISK-CVLI444600X8030Hp3 diskid/DISK-CVLI444600X8030Hp2 diskid/DISK-CVLI444600X8030Hp1 gptid/7b668746-73a8-11eb-ac58-0008a20d1615 gpt/zfs0 gptid/7b5bbaca-73a8-11eb-ac58-0008a20d1615 gpt/swap0 gptid/7b4e0a7c-73a8-11eb-ac58-0008a20d1615 gpt/gptboot0 diskid/DISK-CVLI444600X8030H ada0p3 ada0p2 ada0p1 ada0

mountroot> 

OK lsdev
disk devices:
    disk0:   BIOS drive C (58626288 X 512):
      disk0p1: FreeBSD boot
      disk0p2: FreeBSD swap
      disk0p3: FreeBSD ZFS
    disk1:   BIOS drive D (59768832 X 512):
      disk1s1: FreeBSD
        disk1s1a: FreeBSD UFS
        disk1s1b: FreeBSD swap
zfs devices:
    zfs:zroot
OK more /boot/loader.conf 
*** FILE /boot/loader.conf BEGIN ***
autoboot_delay="3" 
kern.ipc.nmbclusters="1000000" 
kern.ipc.nmbjumbop="524288" 
kern.ipc.nmbjumbo9="524288" 
hw.usb.no_pf="1" 
boot_serial="YES" 
console="comconsole" 
comconsole_port="0x2F8" 
hint.uart.0.flags="0x00" 
hint.uart.1.flags="0x10" 
comconsole_speed="115200" 
hw.hn.vf_transparent="0" 
hw.hn.use_if_start="1" 
*** FILE /boot/loader.conf END ***
OK more /etc/fstab 
*** FILE /etc/fstab BEGIN ***
# Device        Mountpoint    FStype    Options        Dump    Pass#
/dev/ada0p2        none    swap    sw        0    0
*** FILE /etc/fstab END ***
Actions #1

Updated by Steve Wheeler almost 4 years ago

The ZFS case fails in the same way whether installing to eMMC or mSATA.
See also: https://redmine.pfsense.org/issues/7309 though it's not failing in exactly the same way.

Tested the 21.02 release image

Actions #2

Updated by JohnPoz _ almost 4 years ago

I ran into this.. Trying to switch sg-4860 8GB/32GB eMMC model from UFS to ZFS doing clean install from USB boot..

Actions #3

Updated by Sven Gruenitz almost 4 years ago

I am also running into this with the 21.02 recovery image on the SG-5100.
No issue with prior builds and no issue when using UFS on the same system with the same BIOS settings.

OS install is on m-sata and not the internal eMMC.
Image used is pfSense-plus-memstick-serial-21.02-RELEASE-amd64.img

Actions #4

Updated by Sven Gruenitz almost 4 years ago

Did a bit more testing and debugging.

The issue is not related to fstab or the drive order recognition.

The installer "forgets" to add zfs_load="YES" to /boot/loader.conf

Adding it manually solves this issue.

Actions #5

Updated by Constantine Kormashev almost 4 years ago

zfs_load="YES" to /boot/loader.conf workaround seems pretty good. Have one more fixed 21.02 ZFS device.

Actions #6

Updated by Renato Botelho almost 4 years ago

  • Assignee set to Renato Botelho
Actions #7

Updated by Renato Botelho almost 4 years ago

  • Status changed from New to Feedback

Fixed by commit de3efe409ae on FreeBSD-src

commit de3efe409ae (HEAD -> devel-12, origin/devel-12)
Author: Renato Botelho do Couto <renato@netgate.com>
Date:   Mon Feb 22 07:37:31 2021

    bsdinstall: Do not replace loader.conf

    Concatenate custom loader.conf.pfSense to final loader.conf file respect
    items already added by bsdinstall.  Without this change it ends up not
    adding zfs_load to final config file and make ZFS installation
    unbootable
Actions #8

Updated by Jim Pingle almost 4 years ago

  • Status changed from Feedback to Waiting on Merge
  • Priority changed from Normal to High
  • Target version changed from CE-Next to 2.5.1
Actions #9

Updated by Renato Botelho almost 4 years ago

  • Status changed from Waiting on Merge to Feedback

Cherry-picked to FreeBSD-src RELENG_2_5_0

Actions #10

Updated by Jim Pingle almost 4 years ago

  • Subject changed from The ADI installer image produces unbootable installs for some cases to Installer does not add required module to loader.conf when using ZFS

Updating subject for release notes.

Actions #11

Updated by Steve Wheeler almost 4 years ago

  • Status changed from Feedback to Resolved

Looks good now in current 21.02p2 snapshots. The following are added to /boot/loader.conf:

opensolaris_load="YES" 
zfs_load="YES" 

The system boots ZFS after completing the guided ZFS install.

Tested:

21.02.2-RC (amd64)
built on Sat Mar 13 09:47:33 EST 2021
FreeBSD 12.2-STABLE

Actions

Also available in: Atom PDF