OPNsense Forum

Archive => 17.1 Legacy Series => Topic started by: dieterarn on August 31, 2016, 02:57:45 am

Title: install on zfs
Post by: dieterarn on August 31, 2016, 02:57:45 am
Hi all,

I thought i move my posting on zfs over here (see previous posts in the 16.7 section https://forum.opnsense.orgindex.php?topic=3543.0 (https://forum.opnsense.orgindex.php?topic=3543.0)) sinse, clearly zfs on 16.7 is impossible (and maybe 17.1 too). I thought I'd at least have a try at capturing the boot messages of a newly converted opnsense box booting up  - i did it with a "host pipe" in virtualbox and picked up the "socket" in minicom on the cli of my host machine - it this is useful to someone with madder skillz than i i'll be glad :-)

Code: [Select]

                  ______  _____  _____                         
                 /  __  |/ ___ |/ __  |                       
                 | |  | | |__/ | |  | |___  ___ _ __  ___  ___
                 | |  | |  ___/| |  | / __|/ _ \ '_ \/ __|/ _ \
                 | |__| | |    | |  | \__ \  __/ | | \__ \  __/
                 |_____/|_|    |_| /__|___/\___|_| |_|___/\___|

 +=========================================+     @@@@@@@@@@@@@@@@@@@@@@@@@@@@
 |                                         |   @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 |  1. Boot Multi User [Enter]             |   @@@@@                    @@@@@
 |  2. Boot [S]ingle User                  |       @@@@@            @@@@@   
 |  3. [Esc]ape to loader prompt           |    @@@@@@@@@@@       @@@@@@@@@@@
 |  4. Reboot                              |         \\\\\         /////     
 |                                         |   ))))))))))))       (((((((((((
 |  Options:                               |         /////         \\\\\     
 |  5. [K]ernel: kernel (1 of 2)           |    @@@@@@@@@@@       @@@@@@@@@@@
 |  6. Configure Boot [O]ptions...         |       @@@@@            @@@@@   
 |  7. Select Boot [E]nvironment...        |   @@@@@                    @@@@@
 |                                         |   @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 |                                         |   @@@@@@@@@@@@@@@@@@@@@@@@@@@@ 
 +=========================================+                                 
                                                  16.7 ``Dancing Dolphin''   

/boot/kernel/kernel text=0x11ca488 data=0x7f3c28+0x23dd20 syms=[0x8+0x170580+0x8+0x188e92]
/boot/kernel/zfs.ko size 0x2e9350 at 0x22f6000
loading required module 'opensolaris'
/boot/kernel/opensolaris.ko size 0x55b0 at 0x25e0000
Booting...
KDB: debugger backends: ddb
KDB: current backend: ddb
Copyright (c) 1992-2016 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 10.3-RELEASE-p7 #0 a0a18f4(stable/16.7): Mon Aug 15 06:35:28 CEST 2016
    root@sensey64:/usr/obj/usr/src/sys/SMP amd64
FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512
[HBSD ASLR] status: opt-out
[HBSD ASLR] mmap: 30 bit
[HBSD ASLR] exec base: 30 bit
[HBSD ASLR] stack: 42 bit
[HBSD ASLR] vdso: 28 bit
[HBSD ASLR] map32bit: 18 bit
[HBSD ASLR] disallow MAP_32BIT mode mmap: opt-in
[HBSD ASLR (compat)] status: opt-out
[HBSD ASLR (compat)] mmap: 14 bit
[HBSD ASLR (compat)] exec base: 14 bit
[HBSD ASLR (compat)] stack: 14 bit
[HBSD ASLR (compat)] vdso: 8 bit
[HBSD LOG] logging to system: enabled
[HBSD LOG] logging to user: disabled
CPU: Intel(R) Core(TM)2 Duo CPU     E6850  @ 3.00GHz (3007.15-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0x6fb  Family=0x6  Model=0xf  Stepping=11
  Features=0x783fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE,SSE2>
  Features2=0x209<SSE3,MON,SSSE3>
  AMD Features=0x20100800<SYSCALL,NX,LM>
  AMD Features2=0x1<LAHF>
real memory  = 2097086464 (1999 MB)
avail memory = 1988341760 (1896 MB)
Event timer "LAPIC" quality 400
ACPI APIC Table: <VBOX   VBOXAPIC>
random: <Software, Yarrow> initialized
ioapic0 <Version 1.1> irqs 0-23 on motherboard
ipw_bss: You need to read the LICENSE file in /usr/share/doc/legal/intel_ipw/.
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, 0xffffffff805fd2a0, 0) error 1
ipw_ibss: You need to read the LICENSE file in /usr/share/doc/legal/intel_ipw/.
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, 0xffffffff805fd350, 0) error 1
ipw_monitor: You need to read the LICENSE file in /usr/share/doc/legal/intel_ipw/.
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, 0xffffffff805fd400, 0) error 1
wlan: mac acl policy registered
kbd1 at kbdmux0
netmap: loaded module
cryptosoft0: <software crypto> on motherboard
acpi0: <VBOX VBOXXSDT> on motherboard
acpi0: Power Button (fixed)
acpi0: Sleep Button (fixed)
cpu0: <ACPI CPU> on acpi0
attimer0: <AT timer> port 0x40-0x43,0x50-0x53 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
Timecounter "ACPI-fast" frequency 3579545 Hz quality 900
acpi_timer0: <32-bit timer at 3.579545MHz> port 0x4008-0x400b on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
isab0: <PCI-ISA bridge> at device 1.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel PIIX4 UDMA33 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xd000-0xd00f at device 1.1 on pci0
ata0: <ATA channel> at channel 0 on atapci0
ata1: <ATA channel> at channel 1 on atapci0
vgapci0: <VGA-compatible display> mem 0xe0000000-0xe0ffffff irq 18 at device 2.0 on pci0
vgapci0: Boot video device
em0: <Intel(R) PRO/1000 Legacy Network Connection 1.1.0> port 0xd010-0xd017 mem 0xf0000000-0xf001ffff irq 19 at device 3.0 on pci0
em0: Ethernet address: 08:00:27:a4:59:de
em0: netmap queues/slots: TX 1/256, RX 1/256
pci0: <bridge> at device 7.0 (no driver attached)
em1: <Intel(R) PRO/1000 Legacy Network Connection 1.1.0> port 0xd040-0xd047 mem 0xf0820000-0xf083ffff irq 16 at device 8.0 on pci0
em1: Ethernet address: 08:00:27:14:45:26
em1: netmap queues/slots: TX 1/256, RX 1/256
ahci0: <Intel ICH8M AHCI SATA controller> port 0xd048-0xd04f,0xd058-0xd05f,0xd070-0xd07f mem 0xf0840000-0xf0841fff irq 21 at device 13.0 0
ahci0: AHCI v1.10 with 3 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
uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
uart0: console (9600,n,8,1)
acpi_acad0: <AC Adapter> on acpi0
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: model IntelliMouse Explorer, device ID 4
orm0: <ISA Option ROM> at iomem 0xc0000-0xc7fff on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
atrtc0: <AT realtime clock> at port 0x70 irq 8 on isa0
Event timer "RTC" frequency 32768 Hz quality 0
ppc0: cannot reserve I/O port range
ZFS NOTICE: Prefetch is disabled by default if less than 4GB of RAM is present;
            to enable, add "vfs.zfs.prefetch_disable=0" to /boot/loader.conf.
ZFS filesystem version: 5
ZFS storage pool version: features support (5000)
Timecounters tick every 1.000 msec
IPsec: Initialized Security Association Processing.
em1: link state changed to UP
ada0 at ahcich0 bus 0 scbus2 target 0 lun 0
cd0 at ata0 bus 0 scbus0 target 0 lun 0
cd0: <VBOX CD-ROM 1.0> Removable CD-ROM SCSI device
cd0: Serial Number VB0-01f003f6
cd0: 33.300MB/s transfers (UDMA2, ATAPI 12bytes, PIO 65534bytes)
cd0: Attempt to query device size failed: NOT READY, Medium not present
ada0: <VBOX HARDDISK 1.0> ATA-6 SATA 2.x device
ada0: Serial Number VB794a53a7-50b7892e
ada0: 300.000MB/s transfers (SATA 2.x, UDMA6, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 8192MB (16777216 512 byte sectors)
ada0: Previously was known as ad4
random: unblocking device.
Timecounter "TSC-low" frequency 1503572867 Hz quality 800
Trying to mount root from zfs:zroot/ROOT/default []...
Mounting filesystems...
mount: /: unknown special file or file system
fsck: cannot open `/dev/zroot/ROOT/default': No such file or directory
fsck: cannot open `/dev/zroot/ROOT/default': No such file or directory
mkdir: /tmp/.cdrom: Read-only file system
mount_unionfs: /tmp/.cdrom: No such file or directory
mkdir: /tmp/.cdrom: Read-only file system
mount_unionfs: /tmp/.cdrom: No such file or directory
mkdir: /tmp/.cdrom: Read-only file system
mount_unionfs: /tmp/.cdrom: No such file or directory
mkdir: /tmp/.cdrom: Read-only file system
mount_unionfs: /tmp/.cdrom: No such file or directory
mkdir: /tmp/.cdrom: Read-only file system
mount_unionfs: /tmp/.cdrom: No such file or directory
mkdir: /tmp/.cdrom: Read-only file system
mount_unionfs: /tmp/.cdrom: No such file or directory
PHP Warning:  file_put_contents(/etc/group): failed to open stream: Read-only file system in /usr/local/etc/rc.recover on line 210
PHP Warning:  file_put_contents(/etc/master.passwd): failed to open stream: Read-only file system in /usr/local/etc/rc.recover on line 213
PHP Warning:  file_put_contents(/etc/shells): failed to open stream: Read-only file system in /usr/local/etc/rc.recover on line 216
PHP Warning:  file_put_contents(/etc/ttys): failed to open stream: Read-only file system in /usr/local/etc/rc.recover on line 219
pwd_mkdb: /etc/pwd.db.tmp: Read-only file system
pwd_mkdb: /etc/pwd.db.tmp: Read-only file system
Updating motd: /etc/motd is not writable, update failed.
Configuring syscons: blanktime.
mkdir: /conf: Read-only file system
mkdir: /conf: Read-only file system
Bootstrapping config.xml...cp: /conf/config.xml: No such file or directory
done.
Bootstrapping openssl.cnf...cp: /usr/local/openssl/openssl.cnf: Read-only file system
done.
grep: /conf/config.xml: No such file or directory
grep: /conf/config.xml: No such file or directory
[: -ne: unexpected operator
[: -ne: unexpected operator
mkdir: /var/etc: Read-only file system
rm: /var/run/nologin: Read-only file system
Configuring crash dump device: /dev/ada0p2
swapon: adding /dev/ada0p2 as swap device
rm: /var/run/dmesg.boot: Read-only file system
eval: cannot create /var/run/dmesg.boot: Read-only file system
chmod: /tmp: Read-only file system
.ldconfig: mkstemp(/var/run/ld-elf.so.hints.6bZCj1): Read-only file system
ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib /usr/local/lib/ipsec /usr/local/lib/perl5/5.20/mach/CORE
32-bit compatibility ldconfig path: /usr/lib32
done.
PHP Warning:  fopen(): Filename cannot be empty in /usr/local/etc/rc.recover on line 179
PHP Warning:  ftruncate() expects parameter 1 to be resource, boolean given in /usr/local/etc/rc.recover on line 189
PHP Warning:  rewind() expects parameter 1 to be resource, boolean given in /usr/local/etc/rc.recover on line 190
PHP Warning:  fwrite() expects parameter 1 to be resource, boolean given in /usr/local/etc/rc.recover on line 191
^Ccap_mkdb: /etc/login.conf.db: Read-only file system
touch: /usr/local/etc/php/extensions.ini: Read-only file system
usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] source_file target_file
       cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] source_file ... target_directory
usage: chmod [-fhv] [-R [-H | -L | -P]] mode file ...
rm: /usr/local/etc/php.ini: Read-only file system
rm: /usr/local/lib/php.ini: Read-only file system
/usr/local/etc/rc.php_ini_setup: cannot create /usr/local/lib/php.ini: Read-only file system
sed: -I or -i may not be used with stdin
/usr/local/etc/rc.php_ini_setup: cannot create : No such file or directory
sed: -I or -i may not be used with stdin
/usr/local/etc/rc.php_ini_setup: cannot create : No such file or directory
sed: -I or -i may not be used with stdin
/usr/local/etc/rc.php_ini_setup: cannot create : No such file or directory
sed: -I or -i may not be used with stdin
/usr/local/etc/rc.php_ini_setup: cannot create : No such file or directory
sed: -I or -i may not be used with stdin
/usr/local/etc/rc.php_ini_setup: cannot create : No such file or directory
sed: -I or -i may not be used with stdin
/usr/local/etc/rc.php_ini_setup: cannot create : No such file or directory
sed: -I or -i may not be used with stdin
/usr/local/etc/rc.php_ini_setup: cannot create : No such file or directory
sed: -I or -i may not be used with stdin
/usr/local/etc/rc.php_ini_setup: cannot create : No such file or directory
sed: -I or -i may not be used with stdin
/usr/local/etc/rc.php_ini_setup: cannot create : No such file or directory
sed: -I or -i may not be used with stdin
/usr/local/etc/rc.php_ini_setup: cannot create : No such file or directory
sed: -I or -i may not be used with stdin
/usr/local/etc/rc.php_ini_setup: cannot create : No such file or directory
sed: -I or -i may not be used with stdin
/usr/local/etc/rc.php_ini_setup: cannot create : No such file or directory
sed: -I or -i may not be used with stdin
/usr/local/etc/rc.php_ini_setup: cannot create : No such file or directory
sed: -I or -i may not be used with stdin
/usr/local/etc/rc.php_ini_setup: cannot create : No such file or directory
sed: -I or -i may not be used with stdin
/usr/local/etc/rc.php_ini_setup: cannot create : No such file or directory
sed: -I or -i may not be used with stdin
/usr/local/etc/rc.php_ini_setup: cannot create : No such file or directory
sed: -I or -i may not be used with stdin
/usr/local/etc/rc.php_ini_setup: cannot create : No such file or directory
sed: -I or -i may not be used with stdin
/usr/local/etc/rc.php_ini_setup: cannot create : No such file or directory
sed: -I or -i may not be used with stdin
/usr/local/etc/rc.php_ini_setup: cannot create : No such file or directory
sed: -I or -i may not be used with stdin
/usr/local/etc/rc.php_ini_setup: cannot create : No such file or directory
/usr/local/etc/rc.php_ini_setup: cannot create /usr/local/lib/php.ini: Read-only file system
cp: /usr/local/etc/php.ini: Read-only file system
chmod: /usr/local/opnsense/service/configd.py: Read-only file system
/usr/local/etc/rc.d/configd: WARNING: failed precmd routine for configd
Launching the init system...touch: /var/run/booting: Read-only file system
 done.
Initializing...PHP Warning:  copy(/conf/config.xml): failed to open stream: No such file or directory in /usr/local/opnsense/mvc/app/libr5

Warning: copy(/conf/config.xml): failed to open stream: No such file or directory in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Co5
PHP Fatal error:  Uncaught exception 'OPNsense\Core\ConfigException' with message 'file not found' in /usr/local/opnsense/mvc/app/library2
Stack trace:
#0 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php(486): OPNsense\Core\Config->load()
#1 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php(281): OPNsense\Core\Config->restoreBackup('/usr/local/etc/...')
#2 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Singleton.php(49): OPNsense\Core\Config->init()
#3 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Singleton.php(70): OPNsense\Core\Singleton->__construct()
#4 /usr/local/etc/inc/config.lib.inc(82): OPNsense\Core\Singleton::getInstance()
#5 /usr/local/etc/inc/config.inc(33): parse_config()
#6 /usr/local/etc/rc.bootup(116): require_once('/usr/local/etc/...')
#7 {main}
  thrown in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php on line 302

Fatal error: Uncaught exception 'OPNsense\Core\ConfigException' with message 'file not found' in /usr/local/opnsense/mvc/app/library/OPNs2
Stack trace:
#0 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php(486): OPNsense\Core\Config->load()
#1 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php(281): OPNsense\Core\Config->restoreBackup('/usr/local/etc/...')
#2 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Singleton.php(49): OPNsense\Core\Config->init()
#3 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Singleton.php(70): OPNsense\Core\Singleton->__construct()
#4 /usr/local/etc/inc/config.lib.inc(82): OPNsense\Core\Singleton::getInstance()
#5 /usr/local/etc/inc/config.inc(33): parse_config()
#6 /usr/local/etc/rc.bootup(116): require_once('/usr/local/etc/...')
#7 {main}
  thrown in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php on line 302
rm: /var/run/booting: No such file or directory
Starting CRON... done.
grep: /conf/config.xml: No such file or directory
[: -gt: unexpected operator

Warning: copy(/conf/config.xml): failed to open stream: No such file or directory in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Co5

Fatal error: Uncaught exception 'OPNsense\Core\ConfigException' with message 'file not found' in /usr/local/opnsense/mvc/app/library/OPNs2
Stack trace:
#0 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php(486): OPNsense\Core\Config->load()
#1 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php(281): OPNsense\Core\Config->restoreBackup('/usr/local/etc/...')
#2 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Singleton.php(49): OPNsense\Core\Config->init()
#3 /usr/local/opnsense/mvc/app/library/OPNsense/Core/Singleton.php(70): OPNsense\Core\Singleton->__construct()
#4 /usr/local/etc/inc/config.lib.inc(82): OPNsense\Core\Singleton::getInstance()
#5 /usr/local/etc/inc/config.inc(33): parse_config()
#6 /usr/local/etc/rc.initial.banner(31): require_once('/usr/local/etc/...')
#7 {main}
  thrown in /usr/local/opnsense/mvc/app/library/OPNsense/Core/Config.php on line 302
Aug 30 17:18:04 getty[1514]: open /dev/ttyu3: No such file or directory
Aug 30 17:18:04 getty[1512]: open /dev/ttyu1: No such file or directory
Aug 30 17:18:04 getty[1513]: open /dev/ttyu2: No such file or directory

FreeBSD/amd64 (Amnesiac) (ttyu0)

login: Aug 30 17:18:04 getty[1516]: open /dev/ttyd0: No such file or directory
Aug 30 17:18:04 getty[1515]: open /dev/dcons: No such file or directory
root
Last login: Tue Aug 30 20:54:31 on ttyu0
FreeBSD ?.?.?  (UNKNOWN)

Welcome to FreeBSD!

Release Notes, Errata: https://www.FreeBSD.org/releases/
Security Advisories:   https://www.FreeBSD.org/security/
FreeBSD Handbook:      https://www.FreeBSD.org/handbook/
FreeBSD FAQ:           https://www.FreeBSD.org/faq/
Questions List: https://lists.FreeBSD.org/mailman/listinfo/freebsd-questions/
FreeBSD Forums:        https://forums.FreeBSD.org/

Documents installed with the system are in the /usr/local/share/doc/freebsd/
directory, or can be installed later with:  pkg install en-freebsd-doc
For other languages, replace "en" with a language code like de or fr.

Show the version of FreeBSD installed:  freebsd-version ; uname -a
Please include that output and any error messages when posting questions.
Introduction to manual pages:  man man
FreeBSD directory layout:      man hier

Edit /etc/motd to change this login announcement.
root@:~ #
Title: Re: install on zfs
Post by: dieterarn on September 06, 2016, 12:36:06 am
I thought of some more stuff to try like: duh why don't i try to apply the info from the guide on modifying pfsense to work with zfs that i had first found here:

https://forum.pfsense.org/index.php?topic=94656.0 (https://forum.pfsense.org/index.php?topic=94656.0)

so i cloned the virtual machine i've been playing with and booted into the live cd mode of freebsd (i found that idea at http://serverfault.com/questions/616991/freebsd-10-wont-boot-to-zfs-root-after-power-failure (http://serverfault.com/questions/616991/freebsd-10-wont-boot-to-zfs-root-after-power-failure))

and then took a look at mounting the zfs file system since the why it was done on the server fault page wouldn't work for me :-( . I had a look logical stuff like https://www.freebsd.org/doc/handbook/zfs.html (https://www.freebsd.org/doc/handbook/zfs.html) ,http://docs.oracle.com/cd/E19253-01/819-5461/ (http://docs.oracle.com/cd/E19253-01/819-5461/), and http://solarisinternals.com/wiki/index.php/ZFS_Troubleshooting_Guide (http://solarisinternals.com/wiki/index.php/ZFS_Troubleshooting_Guide) before i poked around, generated an error and found : https://forums.freebsd.org/threads/43983/ (https://forums.freebsd.org/threads/43983/)

i modified the suggested command a bit:
Code: [Select]
zpool import -f -o altroot=/mnt zroot since i just wanted the main pool (my volume was also called zroot but if you don't know it you can do just
Code: [Select]
zpool import and zfs will list all the pools it can see...)

after that i tried to start applying the steps from the pfsense article excluding the step where you mount the file-system since i had oviously just done that:
Code: [Select]
sed -i -e "s:cdrom:pfSense:" /mnt/etc/platform
mkdir -p /mnt/cf/conf
cp /mnt/conf.default/config.xml /mnt/cf/conf/config.xml
cd /mnt
rm -rf conf/
ln -s cf/conf ./conf
mkdir /mnt/tmp
chmod 1777 /mnt/tmp

uh oh.
Code: [Select]
/mnt/etc/platform dosn't exist. nor does:
Code: [Select]
/mnt/conf.default/config.xml
eventually i tracked down that opnsense has moved them. For ex: https://github.com/opnsense/core/commit/55db8dab0f19c5a9e882957087571f650608cfec (https://github.com/opnsense/core/commit/55db8dab0f19c5a9e882957087571f650608cfec) shows that
Code: [Select]
/conf.default/config.xml is now probably
Code: [Select]
/usr/local/etc/config.xml and similarly https://github.com/opnsense/tools/commit/132641c826914fccf87b1ac433b39d3ec09c9a46 (https://github.com/opnsense/tools/commit/132641c826914fccf87b1ac433b39d3ec09c9a46) shows that
Code: [Select]
/etc/platform is now (maybe)
Code: [Select]
/usr/local/etc/platform
so applying those changes i got something like:
Code: [Select]
sed -i -e "s:cdrom:OPNsense:" /mnt/usr/local/etc/platform
mkdir -p /mnt/cf/conf
cp /mnt/usr/local/etc/config.xml /mnt/cf/conf/config.xml
cd /mnt
rm -rf conf/
ln -s cf/conf ./conf
mkdir /mnt/tmp
chmod 1777 /mnt/tmp

... which still doesn't work. I assume cf stands for compact flash and cdrom stands for a read only file system. beyond that i don't have as much insight into what is going on as i would like to have... Feels kind close though... *sigh*.
Title: Re: install on zfs
Post by: franco on September 18, 2016, 11:33:26 pm
Hi there,

Thanks for looking into this! I don't see why most of the modification is needed. The simple truth is that the file system cannot be found when /usr/local/etc/rc is invoked:

https://github.com/opnsense/core/blob/master/src/etc/rc#L20

When you can make it mount the ZFS before it runs any other commands you're done, no need to fiddle with config.xml or "platform", which got removed a long time ago. :)


Cheers,
Franco