Wandering Thoughts archives

2011-02-21

How to get automatic volume management on Fedora 14 without Gnome

One of the nice things about a modern Linux machine is that if you plug in a USB key or stick a CD-ROM into your DVD drive, it will automatically get noticed and mounted for you. Well, let me amend that; this is what happens if you run Gnome or KDE (and possible XFCE as well), because they take care of all of the necessary magic for you. If you are crazy enough to run some sort of hand-crafted environment, you get to set up something to do this yourself.

In the old days you could just run the Gnome program that did all of this magic and everything worked. By the time Fedora 10 rolled around, this no longer worked for me and I had to find another solution. The best one that I found is a program called halevt.

Halevt basically works just like gnome-volume-manager used to. You start it during your session initialization (backgrounded) and it automatically mounts new volumes that show up for you. The only difference is that you use halevt-umount to unmount volumes, instead of gnome-umount, and it has slightly different command line options.

However, there is a hitch. Halevt is packed for Fedora 14, but unfortunately the package is broken by default because it no longer includes a necessary configuration file. The version of halevt packaged for Fedora jumped significantly between Fedora 13 and Fedora 14, and I don't think the packaging has caught up; the Fedora 13 version packaged and used a suitable default configuration file, and the Fedora 14 version doesn't really.

Fortunately we can fix this in a relatively simple way; we just need to extract the configuration file from the Fedora 13 version of the halevt RPM and then put it where halevt will find it. The procedure for that goes like this:

  • make sure that you have the yum-utils RPM installed so that you have the yumdownloader command.
  • get a copy of the Fedora 13 RPM:
    cd /tmp
    yumdownloader --releasever 13 halevt

    (I will pause to sing the praises of --releasever some more, because it's made trivial something that would otherwise be a huge pain in the rear.)

  • extract the file:
    rpm2cpio halevt-* | cpio -id ./usr/share/halevt/halevt.xml

  • copy it to where halevt expects to find it:
    mkdir $HOME/.halevt
    cp usr/share/halevt/halevt.xml $HOME/.halevt/

You can modify the halevt.xml configuration file if you want to. Personally, I changed the mount options by taking out 'sync' and adding 'relatime,shortname=lower'.

(I hate having MS-DOS filesystems shout at me, even if it is theoretically their natural state.)

Fedora14MediaMounting written at 01:51:39; Add Comment

2011-02-17

My latest crazy plan to upgrade my home Linux machine

My home Linux machine has a little problem in that it's still running Fedora 8 and I now really want to upgrade it. (I was quite enthused about Fedora 13, but I am now somewhat less enthused about Fedora 14.)

Now, I will admit that the real solution is to buy more or less all of a new machine to replace my now four and a half year old and slightly flaky hardware, install Fedora whatever on that hardware, take it home, and copy all of my data over. But, well, buying hardware for Linux is kind of a pain so I keep coming up with crazy upgrade plans so that I can avoid it.

The latest crazy plan relies on the twin facts that I have unused duplicate system partitions and that my home workstation is basically a clone of my office workstation in the first place. It goes like this:

  • buy a large hard drive in a USB enclosure; I need one for backups anyways.
  • dump my office workstation's system filesystems to the drive and take it home.

  • restore the office system filesystems to the unused system partitions. Since my office workstation is an up to date Fedora 14 system, this will give me the filesystems of an 'upgraded' system; it just won't have my home machine's customizations.

  • at my leisure, customize these filesystems to have the changes I need for my home machine.
  • when customization is complete, boot from the Fedora 14 filesystems instead of my existing Fedora 8 install. If it works, great, I'm done; if not, I can boot back into Fedora 8 and do more work.

This will give me a somewhat tangled machine, but it's not as if my current Fedora install is a beautiful clean thing; after all, it dates from 2006 and has been upgraded successively since then.

(I know that Fedora recommends reinstalling from scratch instead of upgrading, but I find that both infeasible and too annoying. If I was going to do that regularly, I would need a rather different system setup than I currently have.)

CrazyFedoraUpgradePlan written at 00:59:44; Add Comment


Page tools: See As Normal.
Search:
Login: Password:
Atom Syndication: Recent Pages, Recent Comments.

This dinky wiki is brought to you by the Insane Hackers Guild, Python sub-branch.