Optimizing your experience
unsplashunsplash
Gradient background

Setting up my environment in Fedora

Clarice Bouwer

Software Engineering Team Lead and Director of Cloudsure

Saturday, 20 October 2018 · Estimated 2 minute read

I needed to format my HDD because ... reasons. 😁 For a change, I decided to play around with Fedora instead of Ubuntu. The installation was painless and the user experience is much like what I am used to.

I had a few hiccups on this journey mainly due to my ignorance in the Linux domain.

It started with difficulties with backing up my home directory. Eventually I came right by creating a new directory and copying what I wanted into it. This came with the risk of losing data.

Then I faced issues with my hidden files so I created a dotfiles directory and copied what I wanted to it and un-hid them using a script I wrote inspired by a TecMint post because they wouldn't tar.

#!/bin/bash
#print usage
if [ -z $1 ];then
echo "Usage :$(basename $0) parent-directory"
exit 1
fi
for name in $1/.*; do
if [ $(dirname "${name}") != "." ]; then
new_name="$(dirname ${name})/$(basename "${name}" | cut -c 2-)"
echo "Renaming" $(dirname ${name})/$(basename "${name}") "to" ${new_name}
mv "${name}" "${new_name}"
fi
done
exit 0
# inspired by https://www.tecmint.com/rename-all-files-and-directory-names-to-lowercase-in-linux/
view raw unhide.sh hosted with ❤ by GitHub

I know I must have been doing something wrong but my approach worked for what I needed, it just took time and effort.

I archived the folder using tar and copied it to a virtual machine I own using rsync and to an external HDD. The copies were slow and somehow the copy to the HDD failed and I didn't verify its existence.

Of course, the only backup of my SSH key was in the archive on my server which only had SSH access at the time. That was an ice cold feeling that I got when I wanted to get my file back. I had to go into rescue mode on my VM and enable password access. I added my new SSH key ssh-keygen to the authorized_keys on the VM and used rsync to get my backup across to my machine.

I installed and configured everything until I noticed something strange with my HDD and mindlessly deleted a partition which resulted in a glorious destruction of HDD accessibility and my machine would not boot when I restarted.

Fresh format and install, again. The steps I took were fresh in my mind so I made a note to document it.