custom-root on 20.04

Asked by Anthony G

When looking into this question: https://answers.launchpad.net/cubic/+question/692402

I noticed that file system changes made inside the virtual environment do not always make it to the live image when using 20.04.1 as the base image. For example, when installing squid in the virtual environment, the installation goes fine. The install creates /var/log/squid/ for access and service logs, this directory appears in the virtual environment and in the project files/custom-root folder.

When I generate the custom ISO and boot it, the folder path does not exist, which prevents squid from starting on the live environment. systemctl status squid shows it failed to start because the log file could not be instantiated.

The same squid installation script in 18.04 results in the file system changes being present on the live image.

Question information

Language:
English Edit question
Status:
Answered
For:
Cubic Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Cubic PPA (cubic-wizard) said :
#1

I double checked the code, and Cubic does not explicitly exclude the /var directory.

Cubic does explicitly exclude /proc, /run, /tmp, .cache and history files from the home folder, and the swap file. So if you are looking for any of these, they will not make it to the generated ISO.

By definition, /var is intended to contain information that changes, and may not be consistent across system boots. See https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard: "Variable files: files whose content is expected to continually change during normal operation of the system, such as logs, spool files, and temporary e-mail files."

I would expect squid to simply create a log fie, if one does not already exist.
Does squid have write permissions in the live environment to /var/log/squid ?
While running in the live environment, is there enough available virtual disk space?

Revision history for this message
Anthony G (9-ant) said :
#2

In the live 20.04.1 environment with squid installed, the squid user and group (proxy:proxy) are not present. In the virtual session they are. the log directory under var has root:syslog permissions and the only member of syslog is root.

If I execute:

mkdir /var/log/squid
chmod 777 /var/log/squid/

I can start squid in the live environment.

In the virtual environment proxy:proxy both exist and can create files in /var/log/

I've also tested deleting default system groups and the changes don't stay in the live environment. Maybe it's not so much a filesystem issue as a user/group issue. Like I said, all of this works when 18.04.4 is the base image. It's definitely odd.

Revision history for this message
Cubic PPA (cubic-wizard) said :
#3

Just to double check, is the syslog group present in the live environment?

Revision history for this message
Anthony G (9-ant) said :
#4

correct, the syslog group is present in the live environment booted from the created ISO

Can you help with this problem?

Provide an answer of your own, or ask Anthony G for more information if necessary.

To post a message you must log in.