-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSysMainRoutine
More file actions
127 lines (84 loc) · 3.51 KB
/
Copy pathSysMainRoutine
File metadata and controls
127 lines (84 loc) · 3.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
step 1 the prep
check archlinux.org for news
sudo reflector --protocol https --age 3 --sort rate --number 5 --threads 6 --save /etc/pacman.d/mirrorlist
(took about 3 minute)
sudo pacman -Syy (refresh the mirrorlist)
step 1.5 (do monthly)
install archiso and iso.sig from archlinux.org
gpg --keyserver-options auto-key-retrieve --verify archlinux-version-x86_64.iso.sig # obsolete
pacman-key -v archlinux-version-x86_64.iso.sig
lsblk and ls -l /dev/disk/by-id/ to find the usb drive (it should be sdb)
previous: usb-SanDisk_Ultra_4C531146370827115364-0:0 -> ../../sdb
sudo dd bs=4M if=path/to/archlinux-version-x86_64.iso of=/dev/disk/by-id/usb-My_flash_drive oflag=sync status=progress
step 2 install and clean up
sudo pacman -Syu archlinux-keyring
sudo pacman-key --init
sudo pacman-key --populate archlinux
gpg --refresh-keys
gpg --list-keys
gpg --check-trustdb
sudo pacman -Syu (update pacman packages)
yay -Sua (update only AUR packages)
go into librewolf. KeePassXC-browser extension setting. check for update
yay -Yc (remove unwanted dependencies)
yay -Sc (remove unused cache packages)
sudo pacman -Rns $(pacman -Qtdq) (remove orphan/usused packages)
du -sh .cache/ (check the size of .cache)
rm -rf .cache/* (delete everything in the dir but not the dir)
sudo journalctl --vacuum-time=2week
sudo DIFFPROG=vimdiff pacdiff
step 3 check
shutdown -r now
journalctl -b | grep -E 'Error|error|Delay|delay|Timeout|timeout|Fail|fail'
systemctl --failed (check for failed unit)
sudo smartctl -t long /dev/sda (check disk health and potential malware)
pacman -Qe > explicit-installed.txt && pacman -Q > installed.txt
update neovim and mason packages
(wait then run
sudo smartctl -a /dev/sda | grep overall-health )
cd backup
./sync_backup
cd share
git add . & git commit & git push
step 4 misc
df -h / (check the size of root)
pacman -Qqm (list AUR packages)
step 4.5 snapper (monthly)
test restoring with undochange and rollback
sudo pacman -Rs (-check what will be removed and keep dependencies that other packages used)
snapper
sudo snapper -c root list (list root snapshots)
sudo snapper -c var_log list (list var_log snapshots)
snapper config are in /etc/snapper/configs
sudo snapper -c root status 80..81 (show file change between 80 and 81)
sudo snapper -c root diff 80..81 (more details)
sudo snapper -c root undochange 80..81 (go back to 80 from 81)
used when something break
in TTY (used when cant login to hyprland)
sudo snapper -c root list
sudo snapper -c root rollback --snapshot 10 (full rollback to snapshot 10)
reboot
Syncing password database in syncthing
.
├── par2
│ ├── Passwords.kdbx.vol0000+0001.par2
│ ├── Passwords.kdbx.vol0001+0002.par2
│ ├── Passwords.kdbx.vol0003+0004.par2
│ ├── Passwords.kdbx.vol0007+0008.par2
│ ├── Passwords.kdbx.vol0015+0016.par2
│ ├── Passwords.kdbx.vol0031+0032.par2
│ ├── Passwords.kdbx.vol0063+0064.par2
│ ├── Passwords.kdbx.vol0127+0128.par2
│ ├── Passwords.kdbx.vol0255+0256.par2
│ ├── Passwords.kdbx.vol0511+0512.par2
│ ├── Passwords.kdbx.vol1023+1024.par2
│ └── Passwords.kdbx.vol2047+1113.par2
├── Passwords.kdbx
└── Passwords.kdbx.par2
rm -rf par2/*
rm Passwords.kdbx.par2
par2 create -r200 Passwords.kdbx
mv *.par2 par2/
mv par2/Passwords.kdbx.par2 .
par2 verify Passwords.kdbx.par2 par2/*
par2 repair Passwords.kdbx.par2 par2/*