Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
23.1 Legacy Series
»
Enable permanent logging in nano
« previous
next »
Print
Pages: [
1
]
Author
Topic: Enable permanent logging in nano (Read 1308 times)
TheForumTroll
Newbie
Posts: 17
Karma: 5
Enable permanent logging in nano
«
on:
June 13, 2023, 03:02:29 pm »
Hi there
I just installed OPNsense on a SSD disk from a nano image via SSH. Booted right up which was pretty cool as I forgot a serial cable. Now I'm wondering how I change some logs from logging to RAM to logging to disk as in non-nano images?
I thought "Local Logging - Disable writing log files to the local disk" would be the setting used, but it is off in nano.
Logged
Patrick M. Hausen
Hero Member
Posts: 6795
Karma: 571
Re: Enable permanent logging in nano
«
Reply #1 on:
June 13, 2023, 07:09:22 pm »
AFAIK NanoBSD never writes to local disk but runs mostly from RAM. The configuration is all that it saves to disk.
Logged
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do.
(Isaac Asimov)
TheForumTroll
Newbie
Posts: 17
Karma: 5
Re: Enable permanent logging in nano
«
Reply #2 on:
June 14, 2023, 12:42:32 pm »
Thank you for your input. I might not have been very clear on my goal though. I want to, basically, turn a nano image into a non-nano image with the logging to disk functionality turned on instead of logging to RAM only as it does by default so the functionality that requires logs on disk will be available. I'm aware this is kinda a strange way to go about it, but I can't seem to get a stable serial connection and since I successfully installed to mSATA SSD with the installer I'd rather not touch that part again if there's an easy way to turn on the disk log.
Logged
Patrick M. Hausen
Hero Member
Posts: 6795
Karma: 571
Re: Enable permanent logging in nano
«
Reply #3 on:
June 14, 2023, 01:08:27 pm »
You cannot turn a nano image into something different except by reinstalling. NanoBSD is a "FreeBSD distribution" if you will with a particular disk layout running from memory. You cannot convert it after the fact.
Logged
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do.
(Isaac Asimov)
franco
Administrator
Hero Member
Posts: 17656
Karma: 1610
Re: Enable permanent logging in nano
«
Reply #4 on:
June 14, 2023, 02:06:18 pm »
I guess you were looking for System: Settings: Miscellaneous: Use memory file system for /var/log. Needs to be disabled and rebooted.
Cheers,
Franco
Logged
Patrick M. Hausen
Hero Member
Posts: 6795
Karma: 571
Re: Enable permanent logging in nano
«
Reply #5 on:
June 14, 2023, 02:30:31 pm »
Doesn't the nano image use memory for everything but read-only binaries and a dedicated configuration partition? At least that's the standard layout. Did you tweak it for OPNsense?
(I helped work on NanoBSD back in the days)
Logged
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do.
(Isaac Asimov)
franco
Administrator
Hero Member
Posts: 17656
Karma: 1610
Re: Enable permanent logging in nano
«
Reply #6 on:
June 14, 2023, 03:01:06 pm »
Historically the "nano" image borrowed the file system image procedure from NanoBSD but not much of its internal setup hooks post-boot (because the boot in *sense is not steered from the rc system very long). It also had a dual partition scheme for recovery which was half-implemented and had a static partition scheme and very small disk space.
At some point we simplified the "nano" stuff to:
1. A single MBR partition with a preinstalled version of OPNsense. (To support old embedded hardware in dual console mode.)
2. Settings for RRD were turned off, /var and /tmp MFS turned on by default. (Although that may have been the default anyway.)
3. Adding growfs to adapt to bigger disk after first boot. (Why the second partition had to go.)
So nowadays using a Nano image turning on the settings mentioned in point 2. will make your system like any other MBR-based install (which isn't in our default modes since we use ZFS or GPT there).
Cheers,
Franco
Logged
franco
Administrator
Hero Member
Posts: 17656
Karma: 1610
Re: Enable permanent logging in nano
«
Reply #7 on:
June 14, 2023, 03:02:15 pm »
Context for image/configuration modification:
https://github.com/opnsense/tools/blob/f57a81e9e5fcf13c142c6d1d430beb7df4d30439/config/23.1/extras.conf#L63-L89
Logged
Patrick M. Hausen
Hero Member
Posts: 6795
Karma: 571
Re: Enable permanent logging in nano
«
Reply #8 on:
June 14, 2023, 03:32:14 pm »
Makes sense. Thanks for clarifying, so I won't give people wrong advice
Logged
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do.
(Isaac Asimov)
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
23.1 Legacy Series
»
Enable permanent logging in nano