WIP: Notes
This commit is contained in:
@@ -73,10 +73,12 @@ set -Ua fish_user_paths /home/$USER/.local/bin
|
||||
|
||||
```bash
|
||||
# Login to portal
|
||||
sudo iscsiadm -m discovery -t st -p freenas.dnet
|
||||
iscsiadm -m discovery -t st -p driveripper.reeselink.com
|
||||
|
||||
# Mount all targets
|
||||
sudo iscsiadm -m node --targetname iqn.2022-02.freenas.dnet:framework-backup -p freenas.dnet:3260 -l
|
||||
iscsiadm -m node --targetname iqn.2023-01.driveripper.reeselink.com:2023-framework-backup -p driveripper.reeselink.com:3260 -l
|
||||
|
||||
iscsiadm -m node --loginall all
|
||||
|
||||
# Mount at boot
|
||||
vim /etc/iscsi/nodes/iqn.2022-02.freenas.dnet:manjaro-backup/10.1.2.200,3260,1
|
||||
@@ -85,7 +87,7 @@ vim /etc/iscsi/nodes/iqn.2022-02.freenas.dnet:manjaro-backup/10.1.2.200,3260,1
|
||||
node.startup = automatic
|
||||
|
||||
# Log out of all sessions
|
||||
sudo iscsiadm -m node -u
|
||||
iscsiadm -m node -u
|
||||
```
|
||||
|
||||
## Gnome Tweaks
|
||||
@@ -217,7 +219,7 @@ WantedBy=timers.target
|
||||
|
||||
### Test, Start and Enable service
|
||||
|
||||
Test your service:
|
||||
Test your service:the available storage space on our NAS to the iSCSI target and the other half
|
||||
|
||||
```bash
|
||||
sudo btrbk -c /etc/btrbk/btrbk.conf -v run
|
||||
@@ -230,3 +232,160 @@ sudo systemctl start btrbk.timer
|
||||
|
||||
sudo systemctl enable btrbk.timer
|
||||
```
|
||||
|
||||
### Minecraft
|
||||
|
||||
1. You can find extra java versions at /etc/alternatives
|
||||
2. You need to `dnf install xrandr` to launch any modpacks
|
||||
3. You can create a desktop icon by putting this at ~/.local/share/applications/*.desktop:
|
||||
|
||||
```
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=Technic Launcher
|
||||
Exec=/usr/bin/java -jar /home/ducoterra/Applications/TechnicLauncher.jar
|
||||
Icon=/home/ducoterra/.icons/minecraft-launcher.png
|
||||
Type=Application
|
||||
Categories=Games;
|
||||
```
|
||||
|
||||
### Firewall CMD
|
||||
|
||||
1. Enable firewall
|
||||
|
||||
```bash
|
||||
systemctl start firewall-cmd
|
||||
systemctl enable firewall-cmd
|
||||
```
|
||||
|
||||
2. Set default behavior to drop everything
|
||||
|
||||
```bash
|
||||
firewall-cmd --set-default-zone=drop
|
||||
systemctl reload firewall-cmd
|
||||
```
|
||||
|
||||
### Resources
|
||||
|
||||
Network monitoring: https://linuxconfig.org/how-to-monitor-network-activity-on-a-linux-system
|
||||
|
||||
## Backups
|
||||
|
||||
### Full system backup
|
||||
|
||||
In the event you need to restore your system from a disaster do the following:
|
||||
|
||||
1. Reinstall fedora via a live image
|
||||
2. After install, disk should be mounted at /mnt/sysimage
|
||||
3. Copy the new fstab and crypttab to somewhere safe
|
||||
4. rsync -av [etc, home, opt, root, usr, var]
|
||||
5. `mount /dev/Y /mnt/sysimage/boot`
|
||||
6. `mount /dev/Z /mnt/sysimage/boot/efi`
|
||||
7. `mount --bind /dev /mnt/sysimage/dev`
|
||||
8. `mount --bind /proc /mnt/sysimage/proc`
|
||||
9. `mount --bind /sys /mnt/sysimage/sys`
|
||||
10. `chroot /mnt/sysimage`
|
||||
11. Edit fstab and crypttab so they match the new partitions
|
||||
12. Update /etc/default/grub to match the new luks uuid
|
||||
13. grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg
|
||||
14. reboot
|
||||
|
||||
## Libvirt
|
||||
|
||||
### Snapshots on secure-boot VMs
|
||||
|
||||
```bash
|
||||
# list snapshots
|
||||
qemu-img snapshot -l win10.qcow2
|
||||
|
||||
# create a snapshot
|
||||
qemu-img snapshot -c 1-welcome win10.qcow2
|
||||
|
||||
# restore a snapshot
|
||||
qemu-img snapshot -a 1-welcome win10.qcow2
|
||||
```
|
||||
|
||||
### Connecting to Truenas via virt-manager
|
||||
|
||||
You should be able to use the following custom URL:
|
||||
|
||||
```text
|
||||
qemu+ssh://root@driveripper.reeserelease.com/system?socket=/run/truenas_libvirt/libvirt-sock
|
||||
```
|
||||
|
||||
This assumes the correct socket path from `/etc/libvirt/libvirtd.conf` and ability to log in as the root user via ssh.
|
||||
|
||||
## bluetooth
|
||||
|
||||
### Airpods
|
||||
|
||||
Edit: /etc/bluetooth/main.conf
|
||||
Set ControllerMode = bredr
|
||||
|
||||
restart bluetooth service
|
||||
connect airpods
|
||||
comment line out
|
||||
restart bluetooth service again
|
||||
|
||||
## ZRAM
|
||||
|
||||
Edit /etc/systemd/zram-generator.conf
|
||||
|
||||
```conf
|
||||
[zram0]
|
||||
zram-size = min(ram / 2, 16384)
|
||||
compression-algorithm = lzo-rle
|
||||
options =
|
||||
writeback-device = /dev/zvol/tarta-zoot/swap-writeback
|
||||
```
|
||||
|
||||
## Automatic Disk Decryption with TPM2
|
||||
|
||||
https://gist.github.com/jdoss/777e8b52c8d88eb87467935769c98a95
|
||||
|
||||
```bash
|
||||
# Add decryption key to tpm.
|
||||
systemd-cryptenroll --tpm2-device=auto --tpm2-pcrs=0+2+4+7 /dev/nvme0n1p3
|
||||
|
||||
# Wipe old keys and enroll new key. You have to execute this command again after a kernel upgrade.
|
||||
systemd-cryptenroll /dev/nvme0n1p3 --wipe-slot=tpm2 --tpm2-device=auto --tpm2-pcrs=0,2,4,7
|
||||
|
||||
# Add tpm2 configuration option to /etc/crypttab
|
||||
luks-$UUID UUID=disk-$UUID none tpm2-device=auto,discard
|
||||
|
||||
# Add rd.luks.options=tpm2-device=auto to grub
|
||||
grubby --args="rd.luks.options=tpm2-device=auto" --update-kernel=ALL
|
||||
|
||||
dracut -f
|
||||
```
|
||||
|
||||
## Firefox GPU Rendering
|
||||
|
||||
https://community.frame.work/t/linux-battery-life-tuning/6665
|
||||
|
||||
```bash
|
||||
dnf install intel-media-driver intel-gpu-tools
|
||||
```
|
||||
|
||||
Type in about:config in the address bar and hit enter.
|
||||
|
||||
Set media.rdd-ffmpeg.enabled, media.ffmpeg.vaapi.enabled and media.navigator.mediadatadecoder_vpx_enabled to true.
|
||||
|
||||
Close and reopen your browser
|
||||
|
||||
Run the command sudo intel_gpu_top, play a 4k video and check whether the Video section is above 0.00%
|
||||
|
||||
## Gnome Software Updates (packagekitd and software)
|
||||
|
||||
To prevent Gnome Shell from starting Software open Settings->Search and disable Software from there.
|
||||
|
||||
Disable auto-updates
|
||||
|
||||
```bash
|
||||
dconf write /org/gnome/software/allow-updathe available storage space on our NAS to the iSCSI target and the other halftes false
|
||||
dconf write /org/gnome/software/download-updates false
|
||||
```
|
||||
|
||||
## Hibernate + Secure Boot
|
||||
|
||||
713676533760/4096 = 174237435
|
||||
|
||||
Reference in New Issue
Block a user