Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

external config.xml import on boot #1372

Closed
fichtner opened this issue Feb 3, 2017 · 11 comments

Comments

@fichtner
Copy link
Member

commented Feb 3, 2017

FAT32 / one partition (standard Windows layout), always automatically import from install media in this case (and on factory reset).

via: https://forum.opnsense.org/index.php?topic=4394.0

@fichtner fichtner added the feature label Feb 3, 2017
@fichtner fichtner added this to the 17.7 milestone Feb 3, 2017
@fichtner fichtner self-assigned this Feb 3, 2017
@EugenMayer

This comment has been minimized.

Copy link
Contributor

commented Feb 5, 2017

That would be actually pretty neat, also during the installer

@fichtner

This comment has been minimized.

Copy link
Member Author

commented Feb 26, 2017

First step done. Extracted importer code from the installer as a shell script: https://github.com/opnsense/core/blob/974ff9420d99e641f419021f6aa61a4426537d3d/src/etc/rc.importer

@EugenMayer

This comment has been minimized.

Copy link
Contributor

commented Feb 26, 2017

@fichtner those are cool news, very handy for the cloud appliances GCE/AWS whatsoever, or provisioning with packer

fichtner added a commit that referenced this issue Feb 27, 2017
@fichtner fichtner modified the milestones: 18.1, 17.7 Jul 21, 2017
@fichtner fichtner modified the milestones: 18.1, 18.7 Dec 27, 2017
@fichtner fichtner removed this from the 18.7 milestone Feb 28, 2018
@fichtner fichtner added this to the 18.7 milestone Jun 23, 2018
@mircsicz

This comment has been minimized.

Copy link

commented Jun 25, 2018

@fichtner THX for adding it to the Milestone

And as a cross reference: Forum-Thread

@fichtner fichtner closed this in eb95e8f Jun 26, 2018
fichtner added a commit that referenced this issue Jun 26, 2018
(cherry picked from commit eb95e8f)
(cherry picked from commit c425bcd)
@EugenMayer

This comment has been minimized.

Copy link
Contributor

commented Nov 20, 2018

its seems like this is not working for me at least. Are there any docs?

Using a MBR or GPT absed MSDOS usb drive with either config-hostname...xml or config.xml right under root but i get "no prevision configuration was found on device"

(did not yet open a new issue since i am not sure i am just missing the docs, and i guess since this is number one on google, an answer on docs here would be cool)

@fichtner

This comment has been minimized.

Copy link
Member Author

commented Nov 20, 2018

it's /conf/config.xml -- opnsense-importer expects a "real system" layout

@fichtner

This comment has been minimized.

Copy link
Member Author

commented Nov 20, 2018

2454014 added it to the manual page and the import error message for clarity

@EugenMayer

This comment has been minimized.

Copy link
Contributor

commented Nov 20, 2018

@fichtner great, thank you! Shouldn't we also add it to https://docs.opnsense.org/manual/install.html since that is what i was actually using to find out (since opnsense-importer --help did not work) .. out of any reason i did not pick man.

Maybe its reasonable to you

@fichtner

This comment has been minimized.

Copy link
Member Author

commented Nov 20, 2018

Is this a 18.7 image import? I'm getting:

opnsense-importer --help
opnsense-importer: illegal option -- -
Usage: man opnsense-importer

Eventually it should be added to the docs page as well, but may require a bit of effort to split the page... pretty big already so easy to miss this even if on the page.

@EugenMayer

This comment has been minimized.

Copy link
Contributor

commented Nov 20, 2018

I was on 18.7.0 ( image version ) but i am not sure what was displayed actually. Since i upgraded to 18.7.7 before reading that, i cannot actually retry, sorry

Overall the process was a bit clunky in terms that the version you get from the installer is 18.7.0 but my box i am migrating from is obviously the latest patch version (18.7.7).

To get my box online, i have to import the config first - if i do so, aliases and more are not imported since it is actually not supported in 18.7.0 (format change in 18.7.0+) and things are fairly broken, since the whole firewall does not work now.

I would suggest, but this is for an different issue / discussion, to refresh the installer image everytime your patch-release is more then a patch release and is incompatible with the configuration from the lower versions. This ensure disaster recovery actually works, since in most cases, we will install from the iso right .. kind of hen/egg otherwise

@fichtner

This comment has been minimized.

Copy link
Member Author

commented Nov 21, 2018

Fair point. Alias transition was planned for 18.7.0 so that would have aligned with image... I'll try to release 18.7.8 images after that's out... planned for tomorrow so images could follow next week. Will check internally if that makes sense, but it should. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.