Limited Upgrade to save space for remaster

Forum Forums New users New Users and General Questions Limited Upgrade to save space for remaster

  • This topic has 12 replies, 8 voices, and was last updated May 9-11:32 pm by seaken64.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #58836
    Member
    seaken64

    I’ve looked around but haven’t found anything that is specific to my question. I guess I am really just looking for advice.

    On a few of my Frugal installs, or on some of my smaller Live USB installs, I sometimes only get a 2GB or 2.5GB rootfs size. If I don’t use the install for a while and then run an update/full-upgrade I sometimes get a LOT of files that are going to be upgraded. I have ran out of space in the past and have had to redo the Frugal and put it on a larger partition.

    Here’s my question – is there a way for me to split the full-upgrade into smaller “chunks” rather than doing it all at once? I have read that doing partial upgrades can cause problems. My original idea was to copy the terminal output to a text file and then split it into chunks and paste those chunks back into the terminal as a command something like:

    sudo apt upgrade 'chunk' ('chunk' = list of apps to upgrade pasted from file)

    Would that work or would this just cause trouble as a “partial” upgrade?

    Can Synaptic be used to select only a limted list of files to upgrade?

    I suppose I could just try it and find out. But maybe someone can say something about if this is a good or bad thing to do. If you say “no, that is a bad idea” I’ll wait and find some other solution, like moving to a larger partition.

    Seaken64

    #58838
    Member
    skidoo
    Helpful
    Up
    0
    :D

    copy the terminal output to a text file and then split it into chunks and paste

    That approach should be fine. Cherrypicking items to upgrade via synaptic should also be fine.

    #58839
    Moderator
    Brian Masinick
    Helpful
    Up
    0
    :D

    If you are using a Frugal environment I would only check for an update on a specific package you are using, such as a Web browser, a file manager, a terminal emulator or a text editor.

    It may not even be worth doing that if you only plug in your frugal devices when you are using them.

    Given their frugal nature, either update specific apps or create a new, up to date frugal device.

    Brian Masinick

    #58855
    Member
    seaken64
    Helpful
    Up
    0
    :D

    Thanks skidoo, that gives me more confidence to try it.

    Brian, are you saying it may be better NOT to do the “full-upgrade” at all and just upgrade the apps that I use regularly? After couple of years might I be missing some security updates? In general I’m usually not too concerned about that but I am curious about not doing full-upgrades when the general recommendation has always been to keep up.

    With that said, I do occasionally use an old antiX-16 system and see no ill effects when using the system that is no longer being upgraded. I guess it’s my level of understanding about what’s going on behind the scenes that makes me hesitate. I still don’t really know what is going on half the time – or maybe all the time 🙂

    Thanks to you both. I appreciate the advice.

    Seaken64

    #58864
    Moderator
    Brian Masinick
    Helpful
    Up
    0
    :D

    IF you are using removable media, either leave it alone or only update specific apps, If you have a hard disk installation, keep the entire system up to date with periodic sudo apt-get update; sudo apt-get dist-upgrade commands. Hint: if you su to root or sudo su, etc. antiX has a handy alias:

    alias ag=’sudo apt-get update;sudo apt-get dist-upgrade’

    With this, you can switch to root and type in ag and it’ll do the job for you quickly in a terminal emulator window.

    Brian Masinick

    #58899
    Member
    sybok
    Helpful
    Up
    0
    :D

    Hi,
    the alias can be improved to (probably safer)
    sudo apt-get update && sudo apt-get dist-upgrade.
    I.e. the dist-upgrade is performed only if the previous command exits without errors.
    How to pass this suggestion to developers?

    BTW, I use:
    sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get autoclean

    • This reply was modified 1 month, 2 weeks ago by sybok. Reason: Emphasize the question
    #58902
    Moderator
    ModdIt
    Helpful
    Up
    0
    :D

    thanks sybok, will add the autoclean, been using the alias commands you suggest for a long time.

    I call it with command “update” as all users I interact with seem to understand and remember that
    best.

    Agree it would be good to give alias as standard with the distro.

    #58903
    Member
    Xecure
    Helpful
    Up
    0
    :D

    IIRC we already have these alias set up on antiX in /etc/bash.bashrc

    #apt-get
    alias agu="apt-get update"
    alias agd="apt-get dist-upgrade"
    alias agc="apt-get clean"
    alias ag="apt-get update;apt-get dist-upgrade"
    alias aga="apt-get autoremove"
    
    #apt
    alias au="apt update"
    alias ad="apt dist-upgrade"
    alias ac="apt clean"
    alias aud="apt update;apt dist-upgrade"
    alias aa="apt autoremove"
    #58931
    Member
    Robin
    Helpful
    Up
    0
    :D

    I have adressed this problem some time ago, describing a workaround. The more differences to ISO file will come, the bigger gets this problem.

    Let me append some remarks to the upgrade of Live antiX (persistance). I noticed that meanwhile it is impossible to perform a complete upgrade on a fresh antiX 19.3 full on a computer with 2GB RAM installed. Some of the packages can’t get installed due to lack of free space, and it is impossible to remaster also. I’ve seen you have 3.6 GB RAM if I’m not mistaken, so maybe you ran into the same trap, which corrupted your system possibly. You should carefully watch whether all of the packages do install correctly, allways check the terminal output for this immediately.
    In case you also encounter the lack of memory problem on apt upgrade antiX, you’ll have to upgrade some packages in a first run (you need just to keep enough space left in memory for remastering), then save persistence and remaster, then reboot and again upgrade the next packages, save persistence and remaster and reboot again, and so on, until you have anything upgraded. And finally create a fresh backup copy of your upgraded system. This will keep you safe from experiences like what you have to moan about now.

    Maybe antiX developers could automatise this process of “chunk updating”, as proposed by seken64 in his original post starting this thread.

    #58933
    Moderator
    christophe
    Helpful
    Up
    0
    :D

    Would this work?
    1. When you see via apt update that you have probably too much to upgrade, don’t perform the upgrade now. Reamster immediately. Then reboot.
    2. When you reboot, be sure to reboot using STATIC PERSISTENCE, which doesn’t use RAM for storage, but saves directly to hdd/ssd/usb. In my experience, (nearly) all upgrade situation requires less than 1 gb space on disk this way. (I typically use a 1.0 to 1.5 gb root persistence file in such cases.) Then Remaster with your upgrades.
    3. Upon reboot, re-setup your persistence to work how you want it to operate, going forward.

    I’m sure you do this, but be sure to delete your old persistence files after your remastered system reboots & is working as expected. (Saves your disk space.)

    #59065
    Member
    seaken64
    Helpful
    Up
    0
    :D

    @Robin, yes, thank you. Your quoted message is addressing my issue, except that I don’t use RAM for persistence. But my disk file size was only 2.5Gb and I saw my “used” going up over 1.9Gb and was getting nervous. It ended up being okay but I got to thinking how I might deal with this and wondered if I could control the number of files in “chunks”.

    Personally I don’t need to automate this as long as I can confirm that breaking the file list up into chunks will be a safe way to run the upgrade. I can manage that myself with copy and paste.

    Seaken64

    #59066
    Member
    seaken64
    Helpful
    Up
    0
    :D

    Would this work?
    1. When you see via apt update that you have probably too much to upgrade, don’t perform the upgrade now. Reamster immediately. Then reboot.
    2. When you reboot, be sure to reboot using STATIC PERSISTENCE, which doesn’t use RAM for storage, but saves directly to hdd/ssd/usb. In my experience, (nearly) all upgrade situation requires less than 1 gb space on disk this way. (I typically use a 1.0 to 1.5 gb root persistence file in such cases.) Then Remaster with your upgrades.
    3. Upon reboot, re-setup your persistence to work how you want it to operate, going forward.

    I’m sure you do this, but be sure to delete your old persistence files after your remastered system reboots & is working as expected. (Saves your disk space.)

    Thanks @christophe. Yes, I already only use static persistence. But for some reason the last time I remastered I chose only a file size of 2.5Gb. I think I had not used this frugal install for about a year. The 2.5Gb size is fine if I use the system regularly since as you say the update usually does not get that big. But you are right. I should have remastered first before I did the dist-upgrade. I will try to make that my standard procedure from now on. But it’s good to know that my “chunks” idea will work if I need to.

    Seaken64

    #59067
    Member
    seaken64
    Helpful
    Up
    0
    :D

    IF you are using removable media, either leave it alone or only update specific apps, If you have a hard disk installation, keep the entire system up to date with periodic sudo apt-get update; sudo apt-get dist-upgrade commands. Hint: if you su to root or sudo su, etc. antiX has a handy alias:

    alias ag=’sudo apt-get update;sudo apt-get dist-upgrade’

    With this, you can switch to root and type in ag and it’ll do the job for you quickly in a terminal emulator window.

    Thanks Brian. Good tip. But I do prefer to enter the commands myself and then read the screen before proceeding. And I have taken to using apt instead of apt-get. I like the extra info I get on the screen with apt. My regular manual update is:

    sudo apt update
    sudo apt full-upgrade
    sudo apt autoremove

    Interestingly, when the GUI updater in MX fails I fall back on this same routine and it usually fixes it. Sometimes I use

    sudo apt full-upgrade --fix-missing

    Seaken64

Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.