Slim-down script?

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
KT-GB-12
Level 1
Level 1
Posts: 47
Joined: Thu Jan 28, 2021 11:18 am

Slim-down script?

Post by KT-GB-12 »

Does anyone have a slim-down script for Mint?

I have an old computer with only 2GB memory and 16GB hard drive. I have installed Mint+Cinnamon and it is leaving only 8.2GB of drive space.
As a test, I installed Ubuntu and selected the "compact" version at install and it gave 14.6GB free, but I'd rather stay with the Mint+Cinnamon I am familiar with.

I would like to trim out a lot of stuff I'll never need on this old PC. I have started removing stuff manually, sudo apt remove firefox but thought I'd ask.

I looked at the MATE and xfce downloads but they were only 0.1GB smaller than Cinnamon so figured they would not help much.
Ryzen 5 4500, 16GB, 500GB, ext4, LM-20.1, Cinnamon -- all stock-LM and updated daily.
KT-GB-12
Level 1
Level 1
Posts: 47
Joined: Thu Jan 28, 2021 11:18 am

Re: Slim-down script?

Post by KT-GB-12 »

And this helps me how?

Some people have a funny idea of how to promote Mint with new users moving from M$oft.
Ryzen 5 4500, 16GB, 500GB, ext4, LM-20.1, Cinnamon -- all stock-LM and updated daily.
User avatar
absque fenestris
Level 12
Level 12
Posts: 4110
Joined: Sat Nov 12, 2016 8:42 pm
Location: Confoederatio Helvetica

Re: Slim-down script?

Post by absque fenestris »

KT-GB-12 wrote: Sat Feb 20, 2021 6:35 pm Some people have a funny idea of how to promote Mint with new users moving from M$oft.
Yes

And this helps me how?
All right: 2GB RAM / 16GB hard drive ... ... ... bunsenlabs?
System requirements

The following requirements apply for both 32bit and 64bit systems:
  • RAM (minimum) >= 1G
  • RAM (recommended) >= 2G
  • Hard Drive (recommended) 20G

Depending on the applications and feature set you decide to use (especially if you do not run a graphical desktop), the system may run fine with less resources. An installation from the live ISOs uses approximately 2.1G of space on the hard drive.

https://www.bunsenlabs.org/installation.html
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Slim-down script?

Post by Flemur »

KT-GB-12 wrote: Fri Feb 19, 2021 2:01 pm Does anyone have a slim-down script for Mint?
"Termy" has one:
https://github.com/terminalforlife/Extra
see "simplify-ubuntu" at the bottom of the list. I ran it the other day, no problems, but I had already mostly removed the stuff I wanted to remove.
I have an old computer with only 2GB memory and 16GB hard drive. I have installed Mint+Cinnamon and it is leaving only 8.2GB of drive space.
My Mint 19.3 uses 5.3G disk, which includes 900M of wine, and about 200MB of memory at boot, with a few extras like conky.

See this: "New Arch install vs Mint 19.3"
viewtopic.php?t=342148
Since posting that, Arch uses more memory than Mint...dunno why.
I would like to trim out a lot of stuff I'll never need on this old PC. I have started removing stuff manually, sudo apt remove firefox but thought I'd ask.
Remove libreOffice! Remove the Mint-* icons! Remove all those silly fonts! (some or all of this can be done with "simplify-ubuntu")
I looked at the MATE and xfce downloads but they were only 0.1GB smaller than Cinnamon so figured they would not help much.
They both use less memory than Cinnamon; using a window manager will use even less than any desktop environment.

FWIW, I haven't found a "light" linux which uses fewer resources than a stripped-down Mint with a window manager, except for Puppy.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
User avatar
JoeFootball
Level 13
Level 13
Posts: 4673
Joined: Tue Nov 24, 2009 1:52 pm
Location: /home/usa/mn/minneapolis/joe

Re: Slim-down script?

Post by JoeFootball »

KT-GB-12 wrote: I have an old computer with only 2GB memory and 16GB hard drive.
For my old hardware, I use LM 19.2 Xfce as it defaults to the 4.15.x kernel, has a "lighter" desktop environment, and it's supported until April 2023.
KT-GB-12
Level 1
Level 1
Posts: 47
Joined: Thu Jan 28, 2021 11:18 am

Re: Slim-down script?

Post by KT-GB-12 »

Thanks, it's been a while, I will try the older xcfe.
Ryzen 5 4500, 16GB, 500GB, ext4, LM-20.1, Cinnamon -- all stock-LM and updated daily.
User avatar
Moem
Level 22
Level 22
Posts: 16233
Joined: Tue Nov 17, 2015 9:14 am
Location: The Netherlands
Contact:

Re: Slim-down script?

Post by Moem »

KT-GB-12 wrote: Fri Feb 19, 2021 2:01 pm I have an old computer with only 2GB memory and 16GB hard drive.
I would look into MX Linux. Mint is not a lightweight OS. And for that hardware, you do want a lightweight OS.
Replacing the too-small HD with an SSD however might make it run a bit faster, and will give you more space.
Image

If your issue is solved, kindly indicate that by editing the first post in the topic, and adding [SOLVED] to the title. Thanks!
KT-GB-12
Level 1
Level 1
Posts: 47
Joined: Thu Jan 28, 2021 11:18 am

Re: Slim-down script?

Post by KT-GB-12 »

Moem wrote: Mon Apr 12, 2021 11:20 am Replacing the too-small HD with an SSD however might make it run a bit faster, and will give you more space.
Thanks, but it is pre-SATA.
Ryzen 5 4500, 16GB, 500GB, ext4, LM-20.1, Cinnamon -- all stock-LM and updated daily.
User avatar
absque fenestris
Level 12
Level 12
Posts: 4110
Joined: Sat Nov 12, 2016 8:42 pm
Location: Confoederatio Helvetica

Re: Slim-down script?

Post by absque fenestris »

https://slitaz.org/en/about/
Overview
  • Root filesystem taking up about 100 MB and ISO image of less than 40 MB.
  • Ready to use Web/FTP server powered by Busybox with CGI support.
  • Browse the Web with Midori, Firefox or Lynx in text mode.
  • Sound support provided by Alsa mixer, audio player and CD ripper/encoder.
  • Chat, mail and FTP clients.
LiveCD - Rolling version
SliTaz Rolling LiveCD is a constantly evolving version, fully usable, it allows you to test the latest improvements and packages, ask for new features or report bugs to help us to prepare for the stable version. SliTaz Rolling ISO released weekly.
SliTaz GNU/Linux Rolling (43 MB) - slitaz-rolling.iso [ md5 ]

Floppy boot disk
This floppy diskette can start SliTaz on old PCs with or without a CD-ROM. It can boot SliTaz from a usb flash drive, a SliTaz CD/DVD, a hard drive, the LAN by PXE and even the Internet with gPXE.
Floppy disk (1,44 MB) - image [ md5 ]
User avatar
AndyMH
Level 21
Level 21
Posts: 13736
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Slim-down script?

Post by AndyMH »

I wrote a custom script to take a vanilla install of LM20 to where I want it. You could do the same in reverse.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
motoryzen
Level 10
Level 10
Posts: 3481
Joined: Sun Dec 08, 2019 12:25 am

Re: Slim-down script?

Post by motoryzen »

AndyMH wrote: Sun May 16, 2021 7:14 am I wrote a custom script to take a vanilla install of LM20 to where I want it. You could do the same in reverse.
Where is that custom script please sir? :D
Mint 21.2 Cinnamon 5.8.4
asrock x570 taichi ...bios p5.00
ryzen 5900x
128GB Kingston Fury @ 3600mhz
Corsair mp600 pro xt NVME ssd 4TB
three 4TB ssds
dual 1TB ssds
Two 16TB Toshiba hdd's
24GB amd 7900xtx vid card
Viewsonic Elite UHD 32" 144hz monitor
User avatar
AndyMH
Level 21
Level 21
Posts: 13736
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: Slim-down script?

Post by AndyMH »

Be warned, my setup folder is 1.2GB, contains a lot of debs to be installed.
setup.JPG
I'll give you the header, rest of it is +1000 lines, inc. comments.

Code: Select all

#!/bin/bash
#-------------------------------------------------------------------------------
# Setup Linux mint 20 as required
#-------------------------------------------------------------------------------

#at some point apt cache reported by update mgr became corrupt?

# Started off running the script with sudo and then changed to embedding sudo
# as some stuff want to run as ordinary user.

# 1.  modify fstab - ultrabay, synology & synology music folder
# 2.  add support for LG ultrawide monitor
# 3.  samba and copy in smb.conf with support to talk to LM19 PCs
# 4.  gparted without password
# 5.  printers - HL-L8260CDW, HL4140CN
# 6.  fonts - font manager, fonts and delete unwanted fonts
# 7.  file sync with unison - unison & unison-gtk
# 8.  password manager - keepass2
# 9.  conky - fix for python2, install metoffer
# 10. virtualbox 6.1
# 11. crossover 18.0
# 12. graphics - gthumb, shutter, gnome-web-photo, gcolor2, pinta, krita, lazpaint, inkscape, dia
# 13. encryption - veracrypt, encfs, molch encfs manager
# 14. browsers - chromium from buster, chrome, vivaldi & google earth
# 15. VPN - PIA
# 16. email - evolution
# 17. network - filezilla, etherape, linssid, wireshark, nomachine
# 18. sound - pavucontrol, audacious, audacity, asunder, easytag, lame
# 19. monitors & video - read-edid, edid-decode, cheese, vlc
# 20. DVDs - ffmpeg, handbrake, makemkv, regionset, unbuntu-restricted-extras, udftools
# 21. DVD/usb tools - xfburn, mkusb
# 22. PDFs - gscan2pdf, qpdfviewer, posterazor
# 23. backintime
# 24. Misc GUI - autokey, blueman, catfish, convertall, fslint, gnote, dconf-editor, hardinfo
There is also a 'helper' script to install packages, e.g. in the main setup script pkginstall veracrypt /usr/bin ppa:unit193/encryption:

Code: Select all

#!/bin/bash
# Installs a package from the repos, a deb file or ppa
#
# syntax
# pkginstall package-name executable-folder deb/ppa/anything executable
#
# Parameters passed
#
# 1 = package to install
# 2 = path to search in /usr for command, normally /usr/bin or /usr/sbin
# 3 = three options 
#       deb so look in package folder for deb 
#       ppa to install
#       anything else - dummy and ignore, only present if 4 parameters are passed
# 4 = the executable to search to test if already installed, used when
#     the package name and the executable are different, e.g. read-edid is the
#     package but the executable is get-edid
#
# exit = 0, the package was installed
# exit = 1, the package was not installed
# $# is the number of arguments passed

#setup text colour output for terminal
red=`tput setaf 1`
grn=`tput setaf 2`
yel=`tput setaf 3`
def=`tput sgr0` #default or reset

# check if correct number of parameters passed (min should be 2)
if [ ${#} -lt 2 ]; then #error incorrect number of params passed
    echo "ERROR - wrong number of parameters passed for install"
    exit 1
fi

#If 4 parameters, then #4 is the executable to search for
if [ ${#} -eq 4 ]; then #executable is different from package name
    search=$4
else
    search=$1
fi

#is it already installed
test=`whereis $search | grep $2/$search`

if [ ${#test} -eq 0 ]; then #package not installed
    #is it a deb or ppa
    if [ ${#} -lt 3 ]; then #normal install
        echo $yel"installing" $1 $def
        sudo apt install -y $1
        exit 0
    else
        if [ $3 == deb ]; then #install from deb file
            #get the deb file, assumed to be in a subfolder with $1 folder name
            #it will install any deb files it finds
            for i in $( ls $PWD/$1 ); do
                #check entries to see if end with deb
                valid=`echo "$i" | grep deb$`    
                    if [ ${#valid} -gt 0 ]; then #found a match
                        echo $yel"installing" $1 "from" $i $def
                        #fix warning message when installing from deb with permissions for user _apt
                        sudo chown _apt:root $PWD/$1/$i
                        sudo apt install -y $PWD/$1/$i
                    fi
            done
            exit 0
        else
            ppa=`echo $3 | grep ppa`
            if [ ${#ppa} -gt 0 ]; then #ppa install 
                echo $yel"installing" $1 "from" $3 $def
                sudo add-apt-repository -y $3
                sudo apt update
                sudo apt install -y $1
                exit 0
            else #normal install but executable search is different from package
                echo $yel"installing" $1 $def
                sudo apt install -y $1
                exit 0
            fi
        fi
    fi
else #package already installed
    echo $yel$1" already installed..." $def
    exit 1
fi
It took me a couple of weeks to do on and off, and I did it because I could (helps being retired). It does mean that I can install mint and then run setup and a couple of hours later have it with everything installed I want and setup how I want. Does help having a separate home partition so I don't have to worry about all the config files.

If interested can post/email more, but would have to redact some of the script (pwds).
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
Locked

Return to “Installation & Boot”