Archive for December, 2008

Quick and dirty upgrade Fedora Core via Yum

Thursday, December 18th, 2008

First off Fedora has an awesome FAQ for how to upgrade your OS with Yum. If you don’t care for all that reading and thinking, here is a quick and dirty set of notes I have been using to upgrade several servers.

This process is more likely to hose your config files, so make sure you have them backed up somewhere. (I use subversion for everything in /etc).

This also assumes you are runlevel 3. duh.

1. if you are connected via ssh, use screen. Screen will save your life during long running processes, and generally you should be using it all the time anyway.

screen

2. run an update first:

yum update

3. check what you have installed:

yum list | grep installed

4. remove anything you don’t need or use, it will just waste time and cause conflicts. For me, I often find things like OpenOffice or Audio Programs on headless servers. Sometimes I even remove stuff that I know is easy to add back later and isn’t required by the upgrade scripts. (firefox, cups, ImageMagick, crap like that)

yum remove openoffice.org

5. change your repository. The FAQ says you can do this with just installing the fedora-release-10-1.noarch.rpm. but that doesn’t seem to work for me. It gets a conflict that you also need the release notes. This seems to work better:

wget ftp://download.fedora.redhat.com/pub/fedora/linux/releases/10/Everything/i386/os/Packages/fedora-release-10-1.noarch.rpm
 
wget ftp://download.fedora.redhat.com/pub/fedora/linux/releases/10/Everything/i386/os/Packages/fedora-release-notes-10.0.0-1.noarch.rpm
 
rpm -U *.rpm

6. clear out the old caches and files so it can detect that you need to update:

yum clean all

7. At this point you can just run “yum upgrade” and cross your fingers. I like to do smaller updates of packages with a lot of dependencies. I have had good results with combination of upgrades like this:

yum upgrade kernel
yum upgrade httpd
yum upgrade mysql
yum upgrade perl
yum upgrade

The last one of course upgrading anything not already touched by the others.

8. Depending on your configuration and what you have installed you will probably still have some dependency issues that will need to be resolved. It wouldn’t be life without some issues though right?

Removing Parallels hdd lock file

Tuesday, December 16th, 2008

Parallels crashed on me this afternoon while Windows was installing patches and rebooting. When I tried to start the system up again I kept getting this error message:

Parallels Desktop is unable to access the virtual hard disk image file winxp3.hdd. The file is missing, corrupted, or used by other application.

I knew that the file wasn’t in use by any other application because Parallels was no longer running and I had rebooted my machine.

It took a bit of digging, but here is how to make it stop thinking the file is in use:

- Locate your .hdd file (usually in ~/Library/Parallels)
- Right click on the file and choose “Show Package Contents”

When the package is opened, look for a file called “DiskDescriptor.xml.lck”. This is the file it uses to determine if the disk image is in use. Toss this file in the trash and close the package. Parallels should now start up.