Project

General

Profile

Actions

Bug #16176

open

Config restored during install can be overwitten by hardware specific default values

Added by Steve Wheeler 27 days ago. Updated 10 days ago.

Status:
New
Priority:
Normal
Category:
Installer
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Release Notes:
Default
Affected Plus Version:
25.03
Affected Architecture:

Description

When installing using the Net Installer an config existing config can be selected to use in the resulting install.

Parts of that config can be overwritten at first boot by the model specific default values despite the 'installer_copied_config' file being set correctly.

For example on a 6100 all interfaces are set to the default values except WAN and LAN:

@@ -118,49 +117,43 @@
             <ipaddrv6>track6</ipaddrv6>
             <track6-interface>wan</track6-interface>
             <track6-prefix-id>0</track6-prefix-id>
-            <spoofmac/>
+            <spoofmac></spoofmac>
         </lan>
         <opt1>
-            <enable/>
+            <enable></enable>
             <if>ix2</if>
-            <descr><![CDATA[WAN2_TEST]]></descr>
-            <spoofmac/>
+            <descr><![CDATA[WAN2]]></descr>
         </opt1>
         <opt2>
-            <enable/>
+            <enable></enable>
             <if>ix0</if>
-            <descr><![CDATA[WAN3_TEST]]></descr>
-            <spoofmac/>
+            <descr><![CDATA[WAN3]]></descr>
         </opt2>
         <opt3>
-            <enable/>
+            <enable></enable>
             <if>ix1</if>
-            <descr><![CDATA[WAN4_TEST]]></descr>
-            <spoofmac/>
+            <descr><![CDATA[WAN4]]></descr>
         </opt3>
         <opt4>
-            <enable/>
+            <enable></enable>
             <if>igc1</if>
-            <descr><![CDATA[LAN2_TEST]]></descr>
-            <spoofmac/>
+            <descr><![CDATA[LAN2]]></descr>
         </opt4>
         <opt5>
-            <enable/>
+            <enable></enable>
             <if>igc2</if>
-            <descr><![CDATA[LAN3_TEST]]></descr>
-            <spoofmac/>
+            <descr><![CDATA[LAN3]]></descr>
         </opt5>
         <opt6>
-            <enable/>
+            <enable></enable>
             <if>igc3</if>
-            <descr><![CDATA[LAN4_TEST]]></descr>
-            <spoofmac/>
+            <descr><![CDATA[LAN4]]></descr>
         </opt6>
     </interfaces>
-    <staticroutes/>
+    <staticroutes></staticroutes>
     <dhcpd>
         <lan>
-            <enable/>
+            <enable></enable>
             <range>
                 <from>192.168.23.10</from>
                 <to>192.168.23.245</to>

-        <time>1746215166</time>
-        <description><![CDATA[admin@172.21.16.8 (Local Database): Interfaces settings changed]]></description>
-        <username><![CDATA[admin@172.21.16.8 (Local Database)]]></username>
+        <time>1746217525</time>
+        <description><![CDATA[(system): Default hardware detection on first boot]]></description>
+        <username><![CDATA[(system)]]></username>
Actions #1

Updated by Georgiy Tyutyunnik 24 days ago

confirmed
tested on 6100
netgate-installer-v1.1-BETA-amd64-20250429-0600.img

Actions #2

Updated by Reid Linnemann 10 days ago

  • Assignee set to Reid Linnemann

There is code in place on the initial boot when importing the installer config to touch the 'assign_complete' file that is checked by rc.bootup prior to executing check_for_alternate_interfaces() (and netgate_hardware_setup() on plus), which I initially expected to be the code in question that squashed the interface configuration based upon the default interfaces defined for the platform, but I think we can rule that out.

Actions #3

Updated by Reid Linnemann 10 days ago

I think I understand the issue now. The installer lays down the installer settings file which has the installer configuration for the interfaces, and it also restores a config. At that point, since a config has been restored the first boot should be prohibited from loading the installer configuration since that is no longer the desired initial configuration. I think I can easily fix this by removing the installer settings file when the configuration is restored.

I'll also have a look at how this interferes with the automatic config restore on boot from removable media.

Actions

Also available in: Atom PDF