Choose style:

Author Topic: Configure a Fresh Peppermint Install and Maintenance Tips  (Read 1310 times)

0 Members and 1 Guest are viewing this topic.

Offline cavy

  • Trusted User
  • Member
  • *****
  • Posts: 379
  • Karma: 50
  • Caveman
    • View Profile
    • PeppermentOS Pixies
  • Peppermint version(s): Peppermint Seven & Eight
Configure a Fresh Peppermint Install and Maintenance Tips
« on: April 28, 2017, 03:58:56 pm »
How to configure a fresh UEFI install, on a SSD and post maintenance tips

Most tips will work for Legacy installs and hard drives, don’t apply specific UEFI or SSD tasks I.e efibootmgr or fstrim, it will be invalid.

Update and Upgrade
Code: [Select]
sudo apt update && sudo apt upgrade -y
sudo apt dist-upgrade -y
reboot
Upon restart follow commands below

Check grub
Code: [Select]
sudo update-grub

Identifying if your Peppermint: has been installed in UEFI mode or Legacy mode
Code: [Select]
[ -d /sys/firmware/efi ] && echo "Installed in UEFI mode" || echo "Installed in Legacy mode"
It is an either or, answer. If dual booting, you will have to update your grub on both Linux disto’s, to ensure an accurate reading. Unsure about Micro$oft as I do not use it

Check current kernel
Code: [Select]
uname -a
uname -n
uname -o
uname -r
dpkg --list | grep linux-image

Version
Code: [Select]
cat /etc/*release

Check Memory Usage
Code: [Select]
sudo apt install htop
type "htop" to start
type "q" to exit

Other methods
Code: [Select]
free
free -m

Check partitions
Code: [Select]
df -a
df -h
df -k
df -l
df -m
df -P
df –help

Parted
Code: [Select]
sudo parted /dev/sda
type "print" shows current partition scheme
type “select /dev/sdb”
to show second disk (sdb) if applicable
type "q" to exit

Troubleshooting
Code: [Select]
dmesg | more
dmesg | grep Memory
dmesg | grep eth
dmesg -c (clears the buffer for next restart, fresh)

Purge old kernel always double-check and use with caution
Code: [Select]
Run dpkg --list | grep linux-image   lists all kernels installed. Currently the newest kernel is 4.4.0-75, keep this and at least one other, preferably two for emergency use 
sudo apt remove --purge linux-image-4.4.0-66-generic linux-headers-4.4.0-66 linux-headers-4.4.0-66-generic
Modify the above code on all three entries. I.e remove 4.4.0-21 through to 4.4.0-70, leaving the 4.4.0-71, 4.4.0-72 and 4.4.0-75. Please note it is an ongoing process or use Byobu

Purge by byobu
Code: [Select]
sudo apt install byobu
sudo purge-old-kernels

Disk Integrity run following separate commands in order
Code: [Select]
lsblk
ls -l /dev/disk/by-id
sudo dd if=/dev/sda of=/dev/null count=1

sudo dd if=/dev/sdb of=/dev/null count=1 (if applicable)
sudo dd if=/dev/sdc of=/dev/null count=1

Hardware and System
Code: [Select]
sudo lshw | head
sudo lshw -short
sudo lshw -businfo
Specific class
Code: [Select]
sudo lshw -class address
sudo lshw -class bridge
sudo lshw -class bus
sudo lshw -class communication
sudo lshw -class disk
sudo lshw -class display
sudo lshw -class generic
sudo lshw -class input
sudo lshw -class memory
sudo lshw -class multimedia
sudo lshw -class network
sudo lshw -class power
sudo lshw -class printer
sudo lshw -class processor
sudo lshw -class storage
sudo lshw -class system
sudo lshw -class tape
sudo lshw -class volume

inxi codes
Code: [Select]
inxi -Fxz         posting on forums
inxi -c 5         snaphot
inxi -c 5 -b      basic info
inxi -p           harddrive partitions
inxi -r           repos
inxi -F           full info
inxi -AG          sound and graphics info
inxi -ni          network

efi grub Warning: The command rm -rf DELETES code permanently, use with caution
Code: [Select]
sudo su
enter password
cd /boot/efi/EFI
ls
output of grub entries: I.e ‘linux distro' or microsoft
rm -rf Microsoft or linux distro removes an obsolete entry
cd
type “exit” to exit root

efi boot order Warning: The command efibootmgr -b xxxx -B DELETES code permanently, use with caution
Code: [Select]
efibootmgr shows current default boot i.e should be '0000'
sudo efibootmgr basic info
sudo efibootmgr -v full info
sudo efibootmgr -V shows version
sudo efibootmgr -b xxxx -B replace x's with i.e '0003' to remove obsolete entry

Check whether the scheduler is set to deadline Warning: always double-check and proceed with caution
Code: [Select]
Essential for SSD 
cat /sys/block/sda/queue/scheduler
The output should be: noop  [deadline] cfq
If deadline is not listed, edit following

gksu pluma /etc/default/grub
locate this line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
add elevator=deadline
GRUB_CMDLINE_LINUX_DEFAULT="elevator=deadline quiet splash"
Save file, update-grub and reboot

Disable the write action "access time stamp" Warning: always double-check and proceed with caution
Code: [Select]
Essential for SSD
gksu pluma /etc/fstab
Add "noatime" to /, /var and /home partitions: But not swap or the /boot/efi entries

UUID=f0ae2c59-83d2-42e7-81c4-2e870b6b255d /               ext4    noatime,errors=remount-ro 0       1

UUID=2468-A1A2  /boot/efi       vfat    umask=0077      0       1

UUID=f0ae2c59-83d2-42e7-81c4-2e870b6b255d /home           ext4    noatime,defaults        0       2

UUID=f0ae2c59-83d2-42e7-81c4-2e870b6b255d /var            ext4    noatime,defaults        0       2

UUID=f0ae2c59-83d2-42e7-81c4-2e870b6b255d none            swap    sw              0       0
Save file, update-grub and reboot

Manual trim
Code: [Select]
For SSD only
allow to finish, initial trim is slow
sudo fstrim -v /
sudo fstrim -v /var (only if applicable)
sudo fstrim -v /home

Trim anacron check
Code: [Select]
cat /var/log/syslog

Change cron tasks from weekly to daily
Code: [Select]
sudo mv -v /etc/cron.weekly/fstrim /etc/cron.daily
Update-grub and reboot Allow up to two hours, (with computer working/idling) before checking, I find a manual fstrim -v / confirms anacron has worked

Reduce Swap (the swap and pressure values share the same file)
Code: [Select]
cat /proc/sys/vm/swappiness
normally set at '60', ideal for a server, not desktop
gksu pluma /etc/sysctl.conf
scroll to bottom of file and add

#
#Reduce the swap tendency
vm.swappiness=1

Reduce Cache Pressure
Code: [Select]
cat /proc/sys/vm/vfs_cache_pressure
normally set at 100
gksu pluma /etc/sysctl.conf
scroll to bottom of file and add

#
# Reduce Cache Pressure
vm.vfs_cache_pressure=50
Save file, update-grub and reboot

Limit write actions of Google Chrome
Code: [Select]
Essential for SSD 
Settings → Show advanced settings → Section Privacy → then remove the tick for: "Use a prediction service to load pages more quickly"
Daily cache runs @ 200Mb plus, too heavy, use Firefox as daily browser

Firefox tweaks
Code: [Select]
Settings → preferences → advanced → network
default set to 350, reset to 0 (zero)

Then
Code: [Select]
Type "about:config" in the url bar (main address bar left hand side), agree to be careful, click on blue button
Type "sessionstore" then double click on x3 below, turning true to false
browser.sessionstore.restore_on_demand
browser.sessionstore.resume_from_crash
services.sync.prefs.sync.browser.sessionstore.restore_on_demand
Restart Firefox

Then
Code: [Select]
Type "about:config"
double click on browser.urlbar.maxRichResults reset to 0 (zero)
Restart Firefox

Clean start if your browser has become populated or you want clean slate
Code: [Select]
mv -v ~/.mozilla ~/.mozillabackup
cp -v -r /etc/skel/.mozilla ~/.mozilla

Restore
Code: [Select]
rm -v -r ~/.mozilla
mv -v ~/.mozillabackup ~/.mozilla
Restart firefox

Clear thumbnail cache
Code: [Select]
rm -v -f ~/.cache/thumbnails/*/*.png ~/.thumbnails/*/*.png

Then
Code: [Select]
rm -v -f ~/.cache/thumbnails/*/*/*.png ~/.thumbnails/*/*/*.png

Then
Code: [Select]
open dconf-editor
click on org → gnome → desktop → thumbnail-cache
click on maximum-age and set it to 30 days
click once on maximum-size and set it to 50Mb

Clear Recent Files
Code: [Select]
cat /dev/null > .local/share/recently-used.xbel

Install Libre Office
Code: [Select]
sudo apt install libreoffice
English GB language defaults are missing
sudo apt install libreoffice-l10n-en-gb hyphen-en-gb libreoffice-help-en-gb libreoffice-lightproof-en hunspell-en-gb then check read out before typing “y”
Check Synaptic: search box → libreoffice: then slowly scroll down looking for any GB language options, tick to apply, also choose extra icons, I.e Oxygen, Tango etc. Then install all.
Final check: open Libre Office go to: Tools → Options → Language Settings → Language: to see if the “tick and abc” default symbol is NOW shown

Install apps
Code: [Select]
Synaptic
Or via terminal, add separately, checking suggested and recommended packages, before typing “y”
Tip install vokoscreen after you have install libdvd-pkg

How to remove an app
Code: [Select]
For example purposes only, enter the following: 
sudo apt remove rhythmbox --purge && sudo apt autoremove
This removes the app and all its dependencies. So replace rhythmbox with the name of the app you want to remove
There are occasions when the app name is NOT recognised by apt, due to naming nuances, requiring a Synaptic software search, while you there, uninstall or note specific name used and go back to terminal

DVD playback
Code: [Select]
sudo apt install libdvd-pkg
sudo dpkg-reconfigure libdvd-pkg
Agree to licence

Ubuntu Restricted useful but can affect vokoscreen
Code: [Select]
sudo apt install ubuntu-restricted-extras 
To agree to licence, you may have to use tab key to move cursor to the okay button.

Remove Guest Log in session
Code: [Select]
sudo sh -c 'printf "\nallow-guest=false\n" >/usr/share/lightdm/lightdm.conf.d/50-no-guest.conf'

Laptop tools
Code: [Select]
http://www.noobslab.com/2013/07/how-to-improve-laptop-power-management.html
http://www.noobslab.com/2015/04/save-fix-ubuntulinux-mint-doesnt.html

Check boot up time
Code: [Select]
systemd-analyze time
systemd-analyze critical-chain

Check file and filesystem
Code: [Select]
sudo apt autoclean && sudo apt autoremove
sudo dpkg --configure -a
sudo apt clean

uptime
ls -ld /var/log/installer
ls -ld /lost+found

Useful Sites
https://forum.peppermintos.com/
https://peppermintos.com/guide/
https://linuxjourney.com/
https://help.ubuntu.com/
https://www.debian.org/doc/
http://lubuntu.net/
https://wiki.lxde.org/en/Main_Page
http://www.noobslab.com/p/tutorials.html
http://www.unixmen.com/grsync-gadmin-rsync-graphical-front-end-applications-rsync-tool/
https://sites.google.com/site/easylinuxtipsproject/Home
http://linuxbsdos.com/
http://aptitude.alioth.debian.org/doc/en/
http://linuxbsdos.com/2016/06/15/how-to-keep-your-boot-efi-partition-clean-of-old-linux-bootloader-folders/
http://distrowatch.com/
https://debian-handbook.info/
« Last Edit: June 27, 2017, 03:29:57 pm by cavy »
“We know what we are, but not what we may be.”

Desktop Intel Quad Core i7 240Gb-SSD 16Gb ram
Laptop    Intel  Dual Core i5 240Gb-SSD  8Gb ram

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 17113
  • Karma: 2071
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8 (64bit)
Re: Configure a Fresh Peppermint Install and Maintenance Tips
« Reply #1 on: May 03, 2017, 08:11:41 pm »
Some useful stuff in there cavy .. TVM :)
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline Nowinbob

  • nOOb
  • *
  • Posts: 3
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): Peppermint 7
Re: Configure a Fresh Peppermint Install and Maintenance Tips
« Reply #2 on: May 13, 2017, 10:06:18 pm »
No,cavey,I went cold turkey and have used nothing but Linux since June '16.(except for my Android phone)I have had a recurring issue regarding dual monitors.I think it may have to do with the fact that my second monitor is actually a TV(insignia 32 in)Ubuntu seems to be the only distro that will allow me to position the second monitor on the left side of the main monitor.Since the TV/second monitor is bolted to the wall,this is a problem.I have had this issue on two different computers so far.I'll see if the i7 tower does the same thing.

Offline cavy

  • Trusted User
  • Member
  • *****
  • Posts: 379
  • Karma: 50
  • Caveman
    • View Profile
    • PeppermentOS Pixies
  • Peppermint version(s): Peppermint Seven & Eight
Re: Configure a Fresh Peppermint Install and Maintenance Tips
« Reply #3 on: May 13, 2017, 10:13:26 pm »
Wish you luck with project  8) Plus converting your brother re original post: https://forum.peppermintos.com/index.php/topic,5541.msg55552.html#msg55552
“We know what we are, but not what we may be.”

Desktop Intel Quad Core i7 240Gb-SSD 16Gb ram
Laptop    Intel  Dual Core i5 240Gb-SSD  8Gb ram

Offline VinDSL

  • Global Moderator
  • Hero
  • *****
  • Posts: 3039
  • Karma: 620
  • Peppermint Mod
    • View Profile
Re: Configure a Fresh Peppermint Install and Maintenance Tips
« Reply #4 on: May 13, 2017, 10:18:36 pm »
I have had a recurring issue regarding dual monitors.I think it may have to do with the fact that my second monitor is actually a TV(insignia 32 in)Ubuntu seems to be the only distro that will allow me to position the second monitor on the left side of the main monitor.

Have you tried 'LXRandR' ?

I run 3 monitors (configured as 4) and the positioning works great !



Online zebedeeboss

  • Trusted User
  • Veteran
  • *****
  • Posts: 1784
  • Karma: 409
  • Life first... Peppermint a close 2nd :)
    • View Profile
  • Peppermint version(s): P8 x64 (Main) and P8 x64(Laptop)
Re: Configure a Fresh Peppermint Install and Maintenance Tips
« Reply #5 on: May 14, 2017, 01:40:08 am »
No,cavey,I went cold turkey and have used nothing but Linux since June '16.(except for my Android phone)I have had a recurring issue regarding dual monitors.I think it may have to do with the fact that my second monitor is actually a TV(insignia 32 in)Ubuntu seems to be the only distro that will allow me to position the second monitor on the left side of the main monitor.Since the TV/second monitor is bolted to the wall,this is a problem.I have had this issue on two different computers so far.I'll see if the i7 tower does the same thing.

You can achieve this quite simply by menu > Peppermint Settings Panel the click Hardware Section and then Choose Display Settings.   Look carefully - in there you can tell the monitors where to sit relative to each other (ie left or right)

Then, if your panel is in the wrong place go to panel properties and tell it what Monitor to appear on.
https://forum.peppermintos.com/index.php/topic,3950.0.html This Topic has screen shots for what I am saying.

Regards Zeb...

Be Kind Whenever Possible...   It is Always Possible - Dalai Lama

Linux User #565092
P8 x64 Desktop - Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz - 32Gb RAM - NVIDIA GTX 960 4Gb - 43" 4k 3840x2160
P8 x64 Laptop - Intel(R) Dual Core i5-4200U - 8Gb RAM - Intel Integrated Graphics - 15.6" HD 1920x1080

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 17113
  • Karma: 2071
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8 (64bit)
Re: Configure a Fresh Peppermint Install and Maintenance Tips
« Reply #6 on: May 14, 2017, 05:36:39 am »
If the above suggestions don't help, can you post the question as a new topic (with a descriptive title) in say the "Hardware" board so future searchers can more easily find it and benefit from any discovered solution .. TIA :)
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec