Page 1 of 1

to save or not to save: machine-id

Posted: 27 Sep 2024, 10:07
by rych
Using changes=EXIT: we can specify folders (not individual files) to be saved in the /etc/changes-exit.cfg, for example,
/bin
/etc
/home
/lib
/lib64
/opt
/root
/sbin
/usr
#Let's try to exclude var completely and see what happens
#/var
So, which live folders do we want on the next reboot and which are just easily reproducible junk, like cache etc.?

As you can see, I've excluded (omitted) the /var folder. Something broke this week. I've discovered one file which must be saved at least once, (or exactly once): /var/lib/dbus/machine-id. See https://unix.stackexchange.com/question ... machine-id and https://dbus.freedesktop.org/doc/dbus-uuidgen.1.html

If that file doesn't exist, then a new, randomly different machine-id is generated every reboot! Now, some of the host-limited licensed software will consider this a different machine and you'd have to somehow re-activate it each time! So, at least that file, that subfolder of the /var is better to be persistent.

to save or not to save: machine-id

Posted: 27 Sep 2024, 17:38
by Ed_P
2 Simple solutions: :)

1. Don't reboot.
2. Don't exclude the /var/lib/dbus folder.
2a. Include /var
2b. Exclude the 12 non /var/lib/ folders and the 21 non /var/lib/dbus folders you don't want. ! /var/... & !/var/lib/....

Personally I only exclude the !/var/run & !/var/tmp folders. :happy62:

to save or not to save: machine-id

Posted: 27 Sep 2024, 18:22
by AcnapyxoB
rych wrote:
27 Sep 2024, 10:07
So, which live folders do we want on the next reboot and which are just easily reproducible junk, like cache etc.?
Personally I use a different approach.
Instead of eliminating folders I add the ones that I need.
for example network settings, passwords, firefox and thunderbird:

Code: Select all

/etc/NetworkManager/system-connections/
/etc/shadow*
/home/guest/.mozilla/
/home/guest/.thunderbird/
!/home/guest/.mozilla/firefox/*.default-release/cache*
!/home/guest/.mozilla/firefox/*.default-release/minidumps/
!/home/guest/.mozilla/firefox/*.default-release/saved-telemetry-pings/
!/home/guest/.thunderbird/*.default/.parentlock
!/home/guest/.thunderbird/*.default/minidumps/
p.s. Because I use an encrypted save.dat file I keep only confidential information on it.
Other (non confidential) stuff I'm saving in modules.

to save or not to save: machine-id

Posted: 28 Sep 2024, 13:24
by reisub
AcnapyxoB wrote:
27 Sep 2024, 18:22
Instead of eliminating folders I add the ones that I need.
A good approach. :happy62:

to save or not to save: machine-id

Posted: 28 Sep 2024, 19:12
by Ed_P
reisub wrote:
28 Sep 2024, 13:24
A good approach.
Indeed. :o

So rych can keep his #/var and just add /var/lib/dbus. :good: A good suggestion AcnapyyxoB. :worship:

I assume with your code example you have deleted, or commented out, the /etc and /home lines in your changes-exit.conf.
AcnapyxoB wrote:
27 Sep 2024, 18:22

Code: Select all

/etc/NetworkManager/system-connections/
/etc/shadow*
/home/guest/.mozilla/
/home/guest/.thunderbird/

to save or not to save: machine-id

Posted: 29 Sep 2024, 10:39
by AcnapyxoB
"Due to the high interest" :D, my complete changes-exit.conf:

Code: Select all

/etc/changes-exit.conf
/etc/NetworkManager/system-connections/
/etc/openvpn/
/etc/shadow*
/home/guest/.cache/keepassxc/keepassxc.ini
/home/guest/.config/FreeTube/profiles.db
/home/guest/.config/keepassxc/
/home/guest/.config/kdeconnect/
/home/guest/.config/VeraCrypt/
/home/guest/.local/share/MikroTik/WinBox/
/home/guest/.mozilla/
/home/guest/.thunderbird/
/home/guest/.wine/drive_c/users/guest/AppData/Roaming/Mikrotik/Winbox/
/var/lib/bluetooth/
!/home/guest/.mozilla/firefox/*.default-release/*Cache
!/home/guest/.mozilla/firefox/*.default-release/cache*
!/home/guest/.mozilla/firefox/*.default-release/minidumps/
!/home/guest/.mozilla/firefox/*.default-release/saved-telemetry-pings/
!/home/guest/.thunderbird/*.default/.parentlock
!/home/guest/.thunderbird/*.default/minidumps/
!/var/lib/bluetooth/*/cache

to save or not to save: machine-id

Posted: 29 Sep 2024, 16:16
by Ed_P
AcnapyxoB wrote:
29 Sep 2024, 10:39
my complete changes-exit.conf:
So rather than tweaking the Porteus /etc/changes-exit.conf file you replaced it with your own version. :hmmm:
And you save it.
AcnapyxoB wrote:
29 Sep 2024, 10:39

Code: Select all

/etc/changes-exit.conf
:punk:

to save or not to save: machine-id

Posted: 29 Sep 2024, 17:02
by AcnapyxoB
Ed_P wrote:
29 Sep 2024, 16:16
So rather than tweaking the Porteus /etc/changes-exit.conf file you replaced it with your own version.
Yes, exactly :)