Posts: 21
jsr
Joined: 04 Apr 2013
#1
I am using antix12, usb live with persistence. Everything was working well, including setting up root and home persistence and a few remasters. Problem started with dist-upgrade. I tried several times, but was never able to get through all the unpacking, always ending with"E: Sub-process /usr/bin/dpkg returned an error code (2)". Until the last attempt, I was always able to continue using antix with no problems. After last attempt, antix completely froze, and I had to use power button to restart. Now I cannot use root persistence. If I boot using root persistence, I get a desktop and menu, but no reaction to menu selections including exiting, requiring me to use the power button to shutdown. If I boot using only home persistence, antix seems to work perfectly.

I assume that the rootfs file is corrupted or broken. Should I try using a rootfs.bak or rootfs.old file? If so, how? Any other suggestions?
Posts: 1,308
BitJam
Joined: 31 Aug 2009
#2
I think the problem is that you've run out of RAM. On the Live system we store all filesystem changes in RAM which makes it very fast. When root persistence is enabled we store these changes in the rootfs file between reboots. I imagine that a dist-upgrade caused enough filesystem changes to eat up all of your available RAM and after that nothing much would work.

The way to _avoid_ this problem is to use the remaster-me program more frequently. This transfers all persist-root changes to the linuxfs file which clears up RAM usage. The existence of a rootfs.old file indicates that you might have run remaster-me sometime in the past. If you also have a linuxfs.old file then it is likely that you have. In this case you can boot with the"rollback" boot parameter which will take your system back to the state it was in the last time you ran remaster-me.

If rolling back isn't an option (or isn't a good option for you) then you could try to boot into command line mode (using a boot parameter"3" for run-level 3) and from there run the remaster-me program. Unfortunately, I doubt that booting into command-line mode will save enough RAM to free up the space needed to run remaster-me but it might work.

One final (untested) suggestion if all of the above fails. You can save even more memory at boot time by using the"bp=9" boot parameter which drops you to a busybox shell right before starting the init process. From there you can try running /usr/local/bin/remaster-me.

I apologize for not having anticipated this failure mode. I'll try to add some better workarounds in the next release but that probably won't help you now.
anticapitalista
Posts: 5,955
Site Admin
Joined: 11 Sep 2007
#3
It could also be due to lack of space either in the rootfs or on the device/partition itself.
Posts: 1,308
BitJam
Joined: 31 Aug 2009
#4
But jsr said:
jsr wrote:I tried several times, but was never able to get through all the unpacking, [...]
ISTM this indicates the problem was running out of RAM since the rootfs file is out of the picture until persist-save is run.
Posts: 21
jsr
Joined: 04 Apr 2013
#5
BitJam & anticapitalista, thank you for the quick replies.

Bitjam: Rollback worked! When I tried dist-upgrade, I had root persistence enabled. I suspected that the size of the rootfs file might be a limiting factor so I remastered before dist-upgrade. Maybe I sized the new rootfs file too small. I have 1g ram and 1018mb is max rootfs file size. What if I remastered again, size the new rootfs file at max, try dist-upgrade in stages, e.g., update libreoffice separately, and remaster again until I get all files updated? Worst case, I could just rollback again and live with it, since antix12 works great now and I don't know benefits of dist-upgrade anyway. Besides, antix13 will be out soon?

anticapitalista: I did not max size the new rootfs file after remastering. USB device is 7.6gb with 4.5gb available.
anticapitalista
Posts: 5,955
Site Admin
Joined: 11 Sep 2007
#6
How big is the rootfs?
Posts: 21
jsr
Joined: 04 Apr 2013
#7
anticapitalista wrote:How big is the rootfs?
I do not recall the size when I last tried dist-upgrade, either 512 or 768. Max size offered is 1018.
Posts: 1,308
BitJam
Joined: 31 Aug 2009
#8
jsr wrote:What if I remastered again, size the new rootfs file at max, try dist-upgrade in stages, e.g., update libreoffice separately, and remaster again until I get all files updated?
This.

You don't even need to have root persistence enabled when you do this. I'm so glad you thought ahead and did a remaster before doing the dist-upgrade.
Posts: 21
jsr
Joined: 04 Apr 2013
#9
BitJam wrote:You don't even need to have root persistence enabled when you do this.
I do not understand. I thought I could not save updates or dist-upgrade unless root persistence is enabled.
Posts: 1,308
BitJam
Joined: 31 Aug 2009
#10
jsr wrote:
BitJam wrote:You don't even need to have root persistence enabled when you do this.
I do not understand. I thought I could not save updates or dist-upgrade unless root persistence is enabled.
The remaster-me program directly saves whatever changes you've made to the filesystem whether you have root persistence enabled or not. If you don't run remaster-me and you don't have root persistence enabled then, of course, your changes will be lost. But you don't need both. If remaster-me was really fast and didn't take up extra disk space then there would be no need for root-persistence, we would just have people run remaster-me instead of running persist-save.

In fact, for your situation, I think you are better off without root persistence until you get through the dist-upgrade because it saves you from having to do a rollback if you run out of RAM before you are able to run remaster-me.
Posts: 21
jsr
Joined: 04 Apr 2013
#11
BitJam wrote:In fact, for your situation, I think you are better off without root persistence until you get through the dist-upgrade because it saves you from having to do a rollback if you run out of RAM before you are able to run remaster-me.
Thank you for clarifying how remaster works. Your suggestion makes sense - I will try it.
Posts: 21
jsr
Joined: 04 Apr 2013
#12
BitJam,
I tried dist-upgrade and even just libreoffice update without root persistence enabled - no success. Also tried from command line to minimize resource usage, since that is where antix boots, but still no go. I have 1gb ram and am now convinced that it is not enough capacity for the dist-upgrade. Will eagerly await antix13, assuming at release it will be more up-to-date and not require such a massive upgrade.
anticapitalista
Posts: 5,955
Site Admin
Joined: 11 Sep 2007
#13
What error do you get when doing a dist-upgrade without root persistence set?
How much is being upgraded?
Can you upgrade a few apps while running root persistence and reboot ok?
If so, then make a new remaster using the remaster-me application in the antiX control centre (don't forget to make a new-rootfs as well) and if that works, on next reboot, you can clean out all the old unused saved rootfs/linuxrc files. The persistence app in the control centre has this option.
Posts: 21
jsr
Joined: 04 Apr 2013
#14
anticapitalista: I will try your suggestion. However, I have another problem, cannot shutdown or reboot from Log Out window, so want to solve that first and will post new topic.