linux

Test HDD, SSD, and USB Read/Write Speeds with dd

Test HDD, SSD, and USB Read/Write Speeds with dd

wretchedghost
I have found a fancy way to test the speeds of my media devices by using the dd tool. For those that don’t know what the dd command stands for or does, Disk/data Duplicator is a tool that was used in the old BSD/AT&T days but still has great functionality today. Mostly dd is used for writing a .iso to a USB to be used to boot into a Linux distro or what have you.
Setting a GTK Theme from Dark to Light

Setting a GTK Theme from Dark to Light

wretchedghost
After setting up my latest theme based on the vimix-dark-amethyst on my i3-gaps I have grown to love it. That being said I prefer a light theme when it comes to writing in LibreOffice and Obsidian. I’m old school in the fact that I used microsoft word for school growing up and the white and bright theme is what my eyes prefer to use when writing more than a few sentences.
Weird Issue with Tailscale and How to Fix it on Arch Linux

Weird Issue with Tailscale and How to Fix it on Arch Linux

wretchedghost
On my distro of choice, Arch BTW, I had a weird issue where I couldn’t find a proper solution for. My Tailscale would not let me turn it on and would give me an error where the server and the installed version were mismatched. After doing some research I found that the backend, the installed version, and the CLI version must have the same versions. I did not find a way to choose a previous version other than the git version which is actually newer than the one you get with tailscale through the AUR.
Latest MakeMKV Broken, Downgrade Needed

Latest MakeMKV Broken, Downgrade Needed

wretchedghost
As of 20220926, MakeMKV is broken on Arch Linux due to glib and various other files being updated in Arch but not in MakeMKV. To fix this issue which shows up as a “Fatal error”, you must install downgrade from the AUR. yay -S downgrade Once that is complete you will need to downgrade a few files. sudo downgrade glibc=2.35-6 lib32-glibc=2.35-6 gcc-libs=12.1.0-3 gcc=12.1.0-3 The main AUR Arch Linux page for MakeMKV show the same process found here: https://aur.
Bringing Rsnapshot Back From the Dead on Debian

Bringing Rsnapshot Back From the Dead on Debian

wretchedghost
For those of us who use rsnapshot, moving to another backup solution is really not a pleasant thought. Debian 11 Bullseye brought along new features, updated packages, and a new kernel. Unfortunately it also dropped support on some packages, namely rsnpashot. This was done, I’m sure with a purpose to keep packages that are still being developed running in the latest distro. And since Debian usually runs for about two years between major update version it was made that rsnapshot was to not be added the the Debian 11 release due to rsnapshot not being maintained for two years.
Reduce SSD Wear When Running ZFS: Plus Extra Tips

Reduce SSD Wear When Running ZFS: Plus Extra Tips

wretchedghost
A few tricks to reduce SSD (NOT NVMe/M.2) wear when running ZFS: Remember to enable autotrim option on the pool. You should also setup a cron job to run zpool trim tank0 weekly or bi-weekly. Replace tank0 with your tank/dataset name. zpool get autotrim tank0 # check trim zpool set autotrim=on tank0 # enable trim on tank0 zpool trim tank0 # run trim manually Use a large ashift of at least 12 but 13 is better.
Proxmox Backup

Proxmox Backup

wretchedghost
After running Proxmox on my server in my homelab as well as for work for several years now, I have looked into ways to backup the essential files for an easy reinstall if and when needed. Since most Proxmox setups run on bare metal hardware recover is a little more involved than just creating a snapshot or backup and reverting to an earlier point in time. I often backup the files with rsnapshot, but sadly Debian 11 has dropped rsnapshot from their repo due to the fact that rsnapshot hasn’t been maintained in over two years.
Custom Git Commit Push Alias

Custom Git Commit Push Alias

wretchedghost
I normally don’t create nor use tons of aliases in my .bashrc file. I have a few that tweak how grep and ls show color in the prompt and others where I can change directory by typing .. or … which perform cd ../ and cd ../../ respectively, but because of my roaming nature, where I bounce around from one computer/server to another where it may or may not have a configured .
That's What I Sed

That's What I Sed

wretchedghost
sed (Stream EDitor) is a super simple program that can be used to replace text for another in a file. Let’s first view the contents of the file greetings.txt with cat. $ cat greetings.txt hello wilkommen hola We can see that the words hello, wilkommen, and hola exist in the text file greetings.txt. If we wanted to swap out hello for bonjour using sed we could run: $ sed -i 's/hello/bonjour/' greetings.
Best ZFS Snapshot Scripts

Best ZFS Snapshot Scripts

wretchedghost
I came upon a very powerful and simple script when I was searching for a good way to automate the ZFS snapshots. I have found this to the best one so far in terms of how I can edit the script and tweak it for my use very easily. I know that other scripts and programs exist such as sanoid by Jim Salter, which you can find at his GitHub page here jimsalterjrs/sanoid, but I have found iceflatline’s script to be quite good at what it does which is a basic ZFS snapshot creator.
Backing Up to Google Drive Using Rclone

Backing Up to Google Drive Using Rclone

wretchedghost
After I recently setup rsnapshot as my backup solution, which can be found here https://blog.wretchednet.com/post/rsnapshot/ I started looking at options on how to remotely backup my workstation. I used Backblaze for a while but I wasn’t too happy with their interface. I looked at getting another cloud backup solutions but each one would either cost quite a bit more per month and or had similar or worse user interfaces. I decided to go with Google Drive since I’ve had it for years, its free for up to 15 GB, and the interface is simple to index and use.
Git Init Pull

Git Init Pull

wretchedghost
Creating a new git repo is a little more involved than one that is already setup but here are the simple steps to get one rolling. I prefer to use SSH over HTTPS due to security and ease of use from the command line. Setup We need to first do a few things to make a commit as easy as possible. Create a ssh key if you haven’t already. This will be placed in ~/.
Using Arch Linux Downgrade to Fix Broken Programs

Using Arch Linux Downgrade to Fix Broken Programs

wretchedghost
After performing a new Arch install I found that the 1.6.1 version of rofi was not available to be installed due to it never being installed previously. After doing some research I found a cool packaged called downgrade from the AUR. I installed it via yay and ran it: $ yay -S downgrade $ sudo downgrade rofi Which produced a ton of versions to choose from. I chose the 1.6.1 version.
Replace HDD in Server Chassis on Linux

Replace HDD in Server Chassis on Linux

wretchedghost
In this scenario I want to replace a HDD in my ZFS tank0 pool. The pool has grown from 4 TB across 3 HDDS to 8TBs. I have swapped out two of the HDDs in the pool but I’m needing to swap out the last one to finally start using 8TB of storage where right now I’m stuck at 4TB. Now, I have several things I can do to swap out this hard drive but since I didn’t use the /dev/by-disk or /dev/by-id labels and all of my HDDs in my zpool pull are labeled as /dev/sdx, I don’t know which one it currently is I’m needing to replace.
Save a File as Sudo Without Exiting Vim

Save a File as Sudo Without Exiting Vim

wretchedghost
I have often opened a file which I did not first run as sudo in vim, edited the file, then to only find out that it is in read-only mode. I would then have to close the file then re-open it as superuser then make the changes needed. I found this to be very frustrating and found out there are several ways to get the file edited by inserting commands in command-mode using vim.
Rsnapshot

Rsnapshot

wretchedghost
I think of myself as an advanced Linux users. I have been using it exclusively for over 10 years plus and as a homelab enthusiast and a network/system administrator for my job, I use it every single day. But I hadn’t taken the time to sit down and really give rsnapshot a decent try. I have worked with rsync and scripting during all of this time but now that my needs are expanding, rsync is not keeping up with the scale.