Forum › Forums › General › Tips and Tricks › How to recover from Remaster Error (on frugal or liveUSB)?
- This topic has 0 replies, 1 voice, and was last updated Apr 5-1:41 pm by Robin.
-
AuthorPosts
-
April 5, 2022 at 1:41 pm #80682Member
Robin
Firstly: Even when describing the steps for a frugal install, this will work also on a live USB stick with insufficient space.
Well, I just ran into the very problem, after both my 64GB Live USB sticks (working and backup) ceased from working correctly due to I/O error all of a sudden. On these sticks I had plenty of space for creating remasters. But now I had to switch to a small 8GB partition on my hard drive with a frugal install, and predictable I ran into the remaster error after upgrading the system from the repos due to not enough disk space left for creating the new files:
antiX Live Remaster Error Have 346MiB available Need: 2040What can a user do in such a situation? Well, it is a bit difficult, since the remaster script needs to place a new linuxfs file of at least the same size (or even more) as the original one right next to it to be able of working. You have no option to let it create the new file in a different place, where you might have some storage available. Also it doesn’t allow you to overwrite the old file instead of keeping it (even if you have an external backup copy of it already elsewhere.) And obviously you also can’t outsource the homefs file in a different place than the rootfs file, they have to sit together in one persistence folder always.
So I’ll describe some steps you could try in order to complete your system update in such a situation. The trick is to free up temporarily some additional space on the boot device.
1.) boot with the frugal_only option before starting updating the system. (On LiveUSB you’d boot without any persistence here)
2.) move the files rootfs and homefs and all the files and folders with the extension .old from the boot medium away into an external backup for later re-use. In my case this freed up 4 GB (2GB homefs and 2GB rootfs file)
3.) Now perform the system update needed (e.g. sudo apt-get update and sudo apt-get upgrade).
After the update did it’s work flawlessly (watch carefully, you might get some errors due to not sufficient space left for writing files to the overlayed virtual file system, in this case you have to start over and perform the update in tranches not bigger your installed RAM allows, remastering after each of these tranches.)
4.) After the update (or a tranche update) was successful, from Control center perform the live remaster and reboot again into frugal-only.
5.) Only in case you had to update in tranches: Repeat this procedure until all trances of the system update are installed, this goes also for a kernel update or installation of new software packages.6.) After the final reboot, with everything you wanted to have included now remastered into the new linuxfs file, again move all the files with an extension .old away from the boot device to your backup place. Then copy back your homefs file (not the rootfs!) from backup you started with to its original position on the boot drive, again you need root privileges for this.
7.) Reboot, this time choosing again frugal_static (or whatever you were used to). The system will ask you now to create a new rootfs file, now you can let it have mostly all the left space on the boot device again, which was in my case 2GB again. Only make sure to leave at least some hundred MBs or maybe a GB free on the boot device for the additional files the live system needs to store there when running.After this you are back to normal, with a completely updated system, even when Live remaster would tell you originally you don’t have enough space for executing a Live remaster on your device.
Example: After the complete system update and installation of most recent kernel the disk shows on my system:
HDD Partition size: 8GB linuxfs: 3,5GB homefs: 2GB rootfs: 2GBSo there is enough space left on boot device for all the other small files living there.
Be warned, this is an ugly workaround for a special lack-of-space-on-boot-device situation only. Be carefully when following. And for each consecutive system update you’ll have to follow procedure again. (Probably I’ll repartition the hdd some day, combining some of the small 8GB partitions to a larger one. Goodness gracious! 8GB was plenty of space when I did the original partitioning…)
Additional remark:
My first attempt was to move away homefs file only, letting the update run into a static rootfs file before remastering. But it will not help either, in case you have not more space in this root file system than in RAM it will come up with errors on package updating at some point also. On contrary, it will stop the show in case you still ran out of disk space on the boot device when having the rootfs file in place while remastering. Eventually you might be able to handle successfully a complete system update in one single tranche this way, but in case the Live Remaster tells you to use xz compression instead of lz4 then: Just don’t let it do this, start over. It took several hours(!) to create the new linuxfs file system of 3GB only, depending on your hdd speed and the cpu power, instead of 12 Minutes when using the default lz4. So you are way better off with booting into fugal_only before, and moving the temporarily unneeded homefs and rootfs files away simply.Windows is like a submarine. Open a window and serious problems will start.
-
AuthorPosts
- You must be logged in to reply to this topic.