In my frugal install, I've updated initscripts and... a bunch of other stuff (from testrepo, but that shouldn't matter). After being prompted to keep the old version of /etc/init.d/sendsigs, checkfs.sh and umount, I realized that the installed scripts in /etc/init.d were live scripts, and I was overwriting them with normal scripts.
This wasn't too bad as I restored the .dpkg-old versions, and there are only a few error messages. However, are there some -live package versions that I can install to restore the live-ness of my system? I see some scripts in /usr/local/share/live-files that seem to belong to mx-master, but aren't there some real packages to install with apt?
Recover live-ness of frugal install after updating initscripts
Re: Recover live-ness of frugal install after updating initscripts
No. AFAIK there are no packages that you can install with apt to overwrite installed versions of files with the live versions. I'm not an expert on the apt system but I think there is a problem when the same file belongs to more than one package. I think this was the case for many years but maybe something has changed recently.
What we've done historically is make the live system slightly different from the installed system so it works live. Then at install time we copy things around and over-write the live versions with the "real" versions. We have a script to take care of a lot of this (at least on antiX) called live-to-installed. The files under /usr/local/share/live-files/ were added later in order to provide a much more robust snapshot and live-remaster. They are primarily used by the script installed-to-live. This script uses those files and the magic of bind mounting to create a view of your installed system that looks like a live system while the installed system itself chugs along merrily not knowing that anything is any different. it's called by both snapshot and live-remaster.
It's not the most efficient thing in the world but I believe you could fix the problems of over-writing the live versions of files by doing a live-remaster. This calls installed-to-live and does the bind mount magic and creates a new compressed linuxfs file that holds all of your changes, including changes that were stored in root persistence. It's kind of wasteful to do all that compressing and writing a linuxfs file to just effectively copy a few files. OTOH, if your rootfs is filling up then it's a good thing to do anyway.
AFAIK, the only other option is to manually copy the files from /usr/local/share/live-files to your live system. If you are only interested in the /etc/init.d/ scripts then this should be safe and fast and easy. I suggest copying over all the etc files. Like:
BTW: I think /usr/local/share/live-files/ belongs to live-remaster.
What we've done historically is make the live system slightly different from the installed system so it works live. Then at install time we copy things around and over-write the live versions with the "real" versions. We have a script to take care of a lot of this (at least on antiX) called live-to-installed. The files under /usr/local/share/live-files/ were added later in order to provide a much more robust snapshot and live-remaster. They are primarily used by the script installed-to-live. This script uses those files and the magic of bind mounting to create a view of your installed system that looks like a live system while the installed system itself chugs along merrily not knowing that anything is any different. it's called by both snapshot and live-remaster.
It's not the most efficient thing in the world but I believe you could fix the problems of over-writing the live versions of files by doing a live-remaster. This calls installed-to-live and does the bind mount magic and creates a new compressed linuxfs file that holds all of your changes, including changes that were stored in root persistence. It's kind of wasteful to do all that compressing and writing a linuxfs file to just effectively copy a few files. OTOH, if your rootfs is filling up then it's a good thing to do anyway.
AFAIK, the only other option is to manually copy the files from /usr/local/share/live-files to your live system. If you are only interested in the /etc/init.d/ scripts then this should be safe and fast and easy. I suggest copying over all the etc files. Like:
Code: Select all
sudo cp -a /usr/local/share/live-files/files/etc/* /etc/
"The first principle is that you must not fool yourself -- and you are the easiest person to fool."
-- Richard Feynman
-- Richard Feynman
Re: Recover live-ness of frugal install after updating initscripts
Thanks! So any downsides to calling installed-to-live?
Re: Recover live-ness of frugal install after updating initscripts
Calling installed-to-live won't do anything to help you. The point of it is to make a "view" of the system using the magic of bind mounts while the actually system is not changed at all. Again, I suggest either a live-remaster or a manual copy. They are both good, easy solutions (assuming you have enough space on your frugal partition to do the remaster).
"The first principle is that you must not fool yourself -- and you are the easiest person to fool."
-- Richard Feynman
-- Richard Feynman
Re: Recover live-ness of frugal install after updating initscripts
By the way, is it possible to save the remaster elsewhere (e.g. on a different partition) via command-line switches (or GUI)?
Re: Recover live-ness of frugal install after updating initscripts
There is no such option. You could copy or move the newly created linuxfs.new file after the remaster is done. You could move it to a different partition and rename it to "linuxfs" if you want but that, of course, breaks the rollback option since there will be no old linuxfs file to roll back to.frmald wrote: Fri Dec 25, 2020 1:41 am By the way, is it possible to save the remaster elsewhere (e.g. on a different partition) via command-line switches (or GUI)?
"The first principle is that you must not fool yourself -- and you are the easiest person to fool."
-- Richard Feynman
-- Richard Feynman
Re: Recover live-ness of frugal install after updating initscripts
Yes, there is no other way that runs smoothly WRT rollbakcs. I understand that.
Problem is, you may run out of space on the mx-frugal partition (though you may have plenty elsewhere). It would be nice to have a simple `--target-dir` CLI option to save the remaster & new rootfs elsewhere (and deal with the implications manually).
I'm saying this as it's non-trivial to figure out a compatible mksquashfs command that takes care of excluded files etc, plus the corresponding command to create the new rootfs. I don't even know why there is an option to NOT create a new rootfs. A new linuxfs needs a new rootfs, period, right?
Problem is, you may run out of space on the mx-frugal partition (though you may have plenty elsewhere). It would be nice to have a simple `--target-dir` CLI option to save the remaster & new rootfs elsewhere (and deal with the implications manually).
I'm saying this as it's non-trivial to figure out a compatible mksquashfs command that takes care of excluded files etc, plus the corresponding command to create the new rootfs. I don't even know why there is an option to NOT create a new rootfs. A new linuxfs needs a new rootfs, period, right?