Page MenuHomePhabricator

Configuration saved on a livecd cannot be carried over to the installed image
Needs testing, NormalPublicBUG

Description

Configuration changed before running install image is not carried over into the installation. On Vyos 1.1.8 you are asked which config to copy to the new installation, but on 1.2.0rc8 only the config.boot.default is available.

vyos@vyos:~$ configure
[edit]
vyos@vyos# set interfaces ethernet eth0 address dhcp
[edit]
vyos@vyos# commit
[edit]
vyos@vyos# save
Saving configuration to '/config/config.boot'...
Done
[edit]
vyos@vyos# exit
exit
vyos@vyos:~$ install image
Welcome to the VyOS install program.  This script
<...>
I found the following configuration files:
    /opt/vyatta/etc/config.boot.default
Which one should I copy to sda? [/opt/vyatta/etc/config.boot.default]:

Here I would like to select my updated configuration.

Details

Difficulty level
Unknown (require assessment)
Version
1.2.0-rc8
Why the issue appeared?
Will be filled on close
frolswe created this task.Mon, Nov 26, 10:30 AM
c-po added a subscriber: c-po.Mon, Nov 26, 11:59 AM

Have you tried specifying /config/config.boot instead?

The script won't accept anything but the detected config file.
/config/config.boot does not actually exist before booting from the installed image (even though it is mentioned when saving the config). As far as I can tell, the configuration is saved in /opt/vyatta/etc/config/config.boot but that is not accepted by the install image script either.

I found the following configuration files:
    /opt/vyatta/etc/config.boot.default
Which one should I copy to sda? [/opt/vyatta/etc/config.boot.default]: /config/config.boot                  <--- this does not exist
Which one should I copy to sda? [/opt/vyatta/etc/config.boot.default]: /opt/vyatta/etc/config/config.boot   <--- this exists
Which one should I copy to sda? [/opt/vyatta/etc/config.boot.default]: /opt/vyatta/etc/config.boot.default 

Copying /opt/vyatta/etc/config.boot.default to sda.
Enter password for administrator account
syncer assigned this task to UnicronNL.Thu, Nov 29, 8:29 PM
syncer triaged this task as Normal priority.
syncer edited projects, added VyOS 1.2.x (VyOS 1.2.0-rc10); removed VyOS 1.2.x.
syncer added subscribers: UnicronNL, syncer.

@UnicronNL can you look into that please

dmbaturin changed the task status from Open to Needs testing.Mon, Dec 3, 1:20 AM
dmbaturin added a subscriber: dmbaturin.

The root cause is that /config is not mounted on livecd anymore, due to the difference in startup scripts.

I've adjusted the variable and it seems to work now, need to test it with the newly built rc10 image of course before closing the task.

Copying squashfs image...
Copying kernel and initrd images...
Done!
I found the following configuration files:
    /opt/vyatta/etc/config/config.boot
    /opt/vyatta/etc/config.boot.default
Which one should I copy to sda? [/opt/vyatta/etc/config/config.boot]: 

Copying /opt/vyatta/etc/config/config.boot to sda.
Enter password for administrator account

...to be fair, I also think there should be a warning when trying to save a config on a livecd. We hear from people once in a while that they forgot they are running from a livecd and lose their config after reboot.

dmbaturin renamed this task from Configuration does not propagate to install image. to Configuration saved on a livecd cannot be carried over to the installed image.Tue, Dec 4, 3:27 PM

This works fine for me on rc10. Thanks.