Date: July 12, 2012

Introduction

Fedora 17 has been out for long enough that I am ready to upgrade my most critical machine at work. I choose to do a full fresh reinstall because I can pick xfce instead of gnome (which I now hate) at install time and have a much smoother running system.

First, I make a tarball of etc.tar on a partition that I will keep after the reinstall. Then I burn an install DVD, boot from it, and let the install reformat my root and /boot partitions.

A truly wise person would make some additional backups.

I did not do so, and now count this among the stupidest decisions that I have ever made. Yes, despite my best intentions there were a number of valuable things in my root partition that got lost. Here is a partial list, that may get longer as I discover problems.

By far the best thing in the future would be to make a tarball of the entire root partition -- it can always be deleted later once everything is up and going -- having one would have definitely have saved my butt this time.

If I am too stupid in the future to make a tarball of all of root, I might at least make a tarball of /var as well as /etc.

I have addressed two of the above issues for the future. I restored what I could of the lost user account and moved it to my /u1 partition, making a link in /home (as I always should do). I also edited /etc/my.conf and moved the datadir for the mysql database to /u1/mysql.

The install goes smoothly. I watch carefully when it gives me the option of which packages to install to click the inconspicuous "customize now" checkbox. Then I deselect Gnome, select Xfce, and blaze ahead.

Get the machine back on the network

Once I am up, I edit /etc/selinux/config and disable selinux. I also do a yum erase NetworkManager, then reboot. Then I edit /etc/sysconfig/network-scripts/ifcfg-eth0 and basically copy my old static configuration from my backup /etc directory. I need to explicitly set the GATEWAY variable to get a default route (GATEWAY0 did not cut it), and then I am on the air. A check of the resolv.conf file shows it as being OK.

Some weird business showed up later though. See this discussion of Fedora network device renaming.

Do a yum update

This drags in over 450 new packages, including a new kernel I reboot to run. After the reboot, I have to do service network restart by hand. This could be related to ditching network manager.

Get my home directory back

I edit fstab to mount my old /u1 partition (which has my home directory). I make a link from /home/user to /u1/user and log out and back in to make that home directory active. I also bite the bullet and change my UID from 104 to 1004 to comply with the new Fedora convention of reserving the first 1000 UID values for system use. I do a chown -R command on the entire /u1 partition to make things consistent, and this does not take all that long.

Get my web server back online

I copy my old /etc/httpd/conf/httpd.conf file into place and try a service httpd restart. I get into trouble with my rails virtual hosts. Rails is always trouble. I will need to find and install the passenger package (yum fails me here), but for now I comment out some RailsEnv settings and make a symbolic link for my document root (which is also in my /u1 partition, and I am on the air.

Grub2 and rhgb

Since I did a fresh install, I get grub2, and I no longer just go into the /boot partition and edit files nice and easy (sigh!). Now I edit /etc/default/grub and after editing, type the command: grub2-mkconfig -o /boot/grub2/grub.cfg .

Firewall rules

Copy my old /etc/sysconfig/iptables file and restart the iptables service. Before this, port 22 was open and that was all.

ssh host identity

Copy the file /etc/ssh/ssh_host*.

After this something odd arose, namely I could not ssh to this machine using keys from machines that formerly could do so. It turns out this was a setting in /etc/ssh/sshd_config that was telling sshd to look only at the authorized_keys file and not authorized_keys2. I just commented out the following line and now everything works as before:

#AuthorizedKeysFile     .ssh/authorized_keys

mysql database restoration

As mentioned above, I lost the contents of /var/lib/mysql. I had an old copy of this directory, which I restored into /u1/mysql. I am determined NOT to just put this back in /var/lib where it will be forgotten and deleted again someday.

I edit /etc/my.cnf to specify the new location of the database files. (I simply set datadir=/u1/mysql).

user crontab entries

I lost these, they were in /var/spool/cron. I will have to regenerate them by hand.

tracker-miner is a CPU hog

My machine seems extremely sluggish and running top shows me two processes with huge CPU utilization, namely tracker-miner-fs and tracker-store. What the heck are these and what is the fastest way to get rid of them? Apparently you can configure them (whatever they are) by installing tracker-ui-tools. Apparently this is more broken software brought to us by the gnome team.

Here are some suggestions:

Even after all this, I had to kill the tracker processes by hand, now things seem much better.

Get my rails web stuff back on the air

I am putting this in my collection of rails notes since it gets somewhat long, hairy, and ugly.
Have any comments? Questions? Drop me a line!

Adventures in Computing / [email protected]