Preparing for Fedora 11: Installation on the Acer laptop



[Print This] By mjhammel ~ June 13th, 2009. Filed under: Fedora, Linux.

Fedora 11 was released this past week and I’ve already downloaded the various netinst and DVD ISO images for both 32bit and 64bit systems at home.  I’ve got 5 computers to upgrade: 1 development server, 1 MythTV server, my desktop, 1 Myth client and my laptop.   Since I’ve now got a nice quad-core in my office at home, I can start the upgrade process with the Acer laptop.

The first thing to do when starting the upgrade process is to review the release notes.  Most of the time there aren’t any major issues you’ll need to worry about when groing from Fedora X to Fedora X+1, but that may change if you’ve skipped a couple of releases.  I try to avoid that these days, but I did once go from Fedora 7 to Fedora 10.  This is another reason I never upgrade releases but actually reinstall each release.  See my Everyday Guide for Fedora Upgrades for dealing with that process.

Some of the things I found in the release notes that are of interest to me are:

  • PulseAudio is reported to be more tightly integrated with the rest of the system.  Or vice-versa.  Pulse Audio has been a pain the butt to me so far.  But we’ll see how this situation has changed wtih F11.
  • EXT4 is now the default filesystem.  That means the root filesystem will use EXT4 when I reinstall.  But I doubt there is anyway to get the EXT4 features on an existing filesystem.  Since I have no intention of pulling all that data off the system just to get a new filesystem, EXT4 won’t help me with day to day data (outside of the OS files) for some time.
  • MinGW is now included as a development tool.  This doesn’t mean that much to me at home since I couldn’t care less if my applications run on Windows.  But I have to work with JNI (Java Native Interface) code at work and having MinGW on my F11 installation means I don’t have to set up a development environment under Windows.  I just have to test under Windows.  Well, its as close as I can come to ignoring Windows while still having to support it.
  • Anaconda doesn’t allow changing disk partition sizes in text mode.  Say what?!?!  So anyone with nVidia cards that are misbehaving may be screwed.  Hmmm.  Well, supposedly the boot time graphic card support is better with F11 too so maybe this won’t be as big an issue as it used to be.  I know I need custom layouts and apparently only the graphical install will allow this now.  We’ll see.
  • Root logins are still disabled, but at least now there is some info provided how to get around this restriction.
  • PolicyKit has more control over printers.  I really hate PolicyKit.  It gets in my way.  I am the only user on these boxes.  Can’t I just disable the damn thing?
  • There is a wordpress RPM but I would never it.  It’s far too easy to install manually and that makes it very easy to test new configurations before taking them live.
  • Here’s an important one.  The X.org project is apparently disabling the Ctrl-Alt-Backspace keystroke to kill the X server.  Fortunately, you can easily fix this with minor edits to the xorg.conf file.  Apparently they did this because braindead emacs users couldn’t find the right keystrokes in their editor. Bunch o’ dorks.
  • gcc has been rev’d to 4.4.  Not sure if that will require any changes on my end, especially since I’ve been doing mostly (yuck) Java programming at work.  Of course this change comes with a warning that syntax changes may break things.
  • Oh oh.  DBus permissions have been tightened.  Anytime they do something like that I find something that doesn’t work like it used to.  I wonder what it will be this time….
  • Meld has been updated but I don’t see any functional improvements in the feature list.  Even so, if you don’t use Meld and your a programmer you should consider it.  It’s quite handy, especially if you’re like me and don’t rely on pansy-ass IDEs.
  • Netbeans and Eclipse have been updated.  Not that I care.  I write Java with vi and cscope.
  • Some interesting embedded support for Atmel and AVR parts.  We might like that at work.

I didn’t notice any mention of RPMFusion in the release notes.  It seems to be alive and has packages for F11.  So I guess they’re just not encouraging use of non-free codecs.  I also missed any reference to the intel driver updates.  I know that the intel graphics chips were the first to be ported to the latest X.org release using a new architecture that relies on some kernel updates.  Well, nows the time to put all those together and see if the intel driver has gotten any better at supporting multiple displays.  Personally, I don’t need this anymore.  My desktop uses an nVidia GeForce 8200 and has dual monitors.  My laptop has the intel chip, but I can always test the driver by using the extra LCD I have.  I may do that, if time permits.

Update: 2009-06-13 9:27pm

Most of the initial installation is going well on the laptop.  I’m using the Anaconda options from my notes on Migrating a MythTV server to F10.  I got to the point of custom partitioning and decided to use EXT4 for the root partition.  Turns out boot partitions cannot be on EXT4.  So I’m back to EXT3.  So much for experiencing the benefits of the new filesystem.

The selection of repositories is kinda weird.  They offer the installation repo (the DVD) along with i386 and i386-updates repos.  Clicking on those i386 repos just gives an error.  If they don’t work they should probably be removed.  Maybe its how I specified the anaconda options.  Maybe doing the install via an nfsiso repository mucks this up.

I’m doing a custom installation.  The units package is gone from Engineering and Scientific collection of the Applications packages.  It might be somewhere else.  I didn’t use this much, but its a nice tool to have around.

One thing that annoys me with the custom package selection is being forced to enable a collection in order to see what’s in it.  Why can’t I just see the list without having to enable anything first?

Installation has started.  Wait a awhile, then check back to see if my Acer laptop runs better or worse.

Update: 2009-06-14 3:20pm

Mauriat already has his F11 guide available.  Be sure to check that out for help on getting everything running.

Wireless networking still isn’t working right.  For some reason I can’t get the route automatically added for the wireless connection.  So I have to do it manually.

There are some loud clicks on my desktop session.  I have all desktop audio effects disabled so I’m not sure what’s causing that.

Everything else seems to be up and running at the moment.  I haven’t checked all features, like video.  But the basic system is running and I can access sudo from my user.  That means I can fix whatever is broken from that user.  I didn’t notice that sudo hangs if the network is not properly configured.  I really hate applications that hang because the network is not working even though the application is not doing anything on the network.  Ugh.

I am installing the fastmirror plugin for yum but will not install the presto plugin.  I need my systems in production mode (from my point of view) and will wait till others decide on the reliability of partial file transfers for package updates.

Overall, the process for reinstallation probably only took about 2-3 hours, tops.  And that’s with lots of breaks and distractions, plus the initial installation which was about 20-30 minutes of unattended processing.  It’s become pretty painless.  Total disk usage is about 5.2G on the root partition for installed packages, including a bunch of development stuff.  Not bad.  Leaves me with over 4G for additional Fedora managed apps.

Update: 2009-06-19 11:02am

I should note that after many releases of disabling it because it didn’t work, NetworkManager is now my preferred way to use wifi hotspots.  I tried it with F11 and was able to quickly and painlessly (sans my collection of shell scripts) login at a local Panera.  So I would recommend leaving NetworkManager enabled now if you use your laptop at wifi hotspots.

Related posts

3D graphics hardware for Linux



[Print This] By mjhammel ~ April 29th, 2009. Filed under: GIMP, Linux, NVidia, Wacom, X11.

Someone asked on the Boulder Linux User Group mailing list today for recommendations for video cards.  He wanted to avoid NVidia.  One of the responses pointed out this very handy web site: 3D Graphics hardware performance using Free Software drivers (X.Org DRI).

I noticed just recently that my NVidia GeForce 8200 based motherboard is not as stable with the latest updated for Fedora 10.  The first symptom is that my Wacom stops working and all brushes no longer function (even with the regular mouse) under GIMP.  I exit from all applications and then try to logout of the desktop and the video just freezes.  The system is still running, fortunately, so I can ssh in from another box and reboot.  But this behaviour is both annoying and new - it wasn’t happening before the latest F10 update.

Packages:

  • xorg-x11-drv-nvidia-180.51-1.fc10.x86_64
  • xorg-x11-drv-nvidia-libs-180.51-1.fc10.x86_64
  • kmod-nvidia-2.6.27.21-170.2.56.fc10.x86_64-180.51-1.fc10.1.x86_64

I used to be really happy with NVidia and then Intel.  Now I’m not all that happy with any of them.  Despite the best intentions, stability on the desktop is starting to turn into the nightmare of the BSOD, sans the blue screen.  If it locks up, its broken.  It’s that simple.  The interesting thing is that both NVidia and Intel now directly support those drivers.  So there’s no blaming the open source hackers for this anymore.  It’s your hardware - make it work.

Related posts

Quickies: Flash 64, fixing skipping audio, mapping keys to applications



[Print This] By mjhammel ~ March 26th, 2009. Filed under: Audio, Fedora, Linux, PulseAudio, x86-64.

I’ve been having problems playing flash video on my new system at home.  The system is a 64bit AMD running F10.  Flash video plays but the audio skips a lot.  I had similar problems with other applications but was able to get around it by using the right audio setup, such as using -A alsa when running Xine.  But the flash plugin doesn’t allow that sort of setting (at least not that I can find).

A little digging found a Fedora posting on using Flash.  This led to the Alpha version of a 64-bit Flash Player plugin for Linux.  This replaces the flash-plugin RPM (which you’ll need to remove using yum).  I installed the alpha plugin and it seems to work fine, but the audio skipping is still there.

A little more digging and I found that Pulse Audio needs a minor tweek (or complete removal if you want to go that route).  I edited /etc/pulse/default.pa and changed this line

load-module module-hal-detect

to this

load-module module-hal-detect tsched=0

and then rebooted.  Viola!  The audio skipping is gone in flash video.  Pulse Audio still has a way to go before it’s an ideal solution.  It sure seems to get in the way more than it helps.

The other thing I finally uncovered was mapping all those extra keys on my Logitech Internet Navigator keyboard to something useful.  Turns out that this keyboard is supported under Linux, specifically GNOME if you go to System->Preferences->Hardware->Keyboard.  That gets some of the keys working, like audio up and down, but most of the keys still don’t do anything even if you use the Keyboard Shortcuts option (System->Preferences->Personal->Keyboard Shortcuts).

What you need to do is find out they keycode for each key using xev (which comes in the xorg-x11-utils package). Once you have the keycode you use xmodmap (which comes in xorg-x11-server-utils) to map the keycodes to a key recognized by the X.org server (see /usr/include/X11/keysymdefs.h).  With the keycodes mapped to a key, you then have to map the key to an application using xbindkeys.   This is a little program that reads a configuration file, $HOME/.xbindkeysrc, which specifies what command to run when the key is hit.  To get this all working, I wrote a little script that I added to my startup session (see System->Preferences->Personal->Session) which runs xmodmap and xbindkeys for me.  Now when I log in I can use keys to launch a gnome-terminal, MythTV and various other applications.

You can find a little more detail on this process from this hotkey tutorial.

I haven’t checked but I’m pretty sure that if you update the .xbindkeysrc file to add new key-to-application mappings you’ll have to log out and log back in to have the mappings picked up for the current session.

Related posts

AcidRip mod: Fix for faulty previews



[Print This] By mjhammel ~ March 14th, 2009. Filed under: Audio, Hardware, Linux.

AcidRip hasn’t been updated in a long time.  In fact, I’m not even sure anyone is maintaining it anymore.  But I still use it quite a bit.  Today I noticed, after an yum update for F10, that the previews just wouldn’t work anymore.  So I looked at the debug window and found this was the line it was trying to run:

mplayer -vo gl2 -ao sdl  dvd://1 -dvd-device /dev/sr0 -alang English -chapter 3-3 -frames 10 -sstep 5 -nocache -vf crop=0:0:0:0,scale=261:-2 -wid 67109117

Running mplayer with the -vo and -ao options is something I configured in the Settings tab of AcidRip.  These are required to get proper video and audio output with mplayer on my system.  I’m no mplayer expert but a little trial and error uncovered that the problem with this command comes from the -frames and -sstep options.  If I remove them then the video and audio previews play just fine with mplayer.  So I dug into the AcidRip code and found that in acidrip.pm, lines 323-326 look like this:

my $frames = $::settings->{’ppc_bug’} ? 100 : 10;
my $sstep = “-sstep ” . int $length / ( 3 * $frames ) + 1;
$sstep = “-ss ” . int $length / 3 if $::settings->{’ppc_bug’};
$menc{’frames’} = “-frames $frames $sstep”;

Commenting out that last line and replacing it with the following line fixes the preview problems I’ve having with AcidRip.

$menc{’frames’} = “”;

These options supposedly only cause the preview to play a little faster and skip a little into the specified track.  But they both have to come out to get the previews to work properly on my system.

Your mileage may vary.

Another thing I discovered after the yum update is that mencoder was no longer compiled with lame support for audio.  I’m not sure why that change has occurred (maybe it was just a bad rebuild of mencoder?) but the solution from AcidRip’s point of view is to simply change the audio to twolame.  Rips appear to work fine with that.

Related posts

Multiple Firefox instances with different network settings



[Print This] By mjhammel ~ March 9th, 2009. Filed under: Audio, Fedora, Firefox, Linux, PulseAudio.

Prior to F10 I always created a second user that I allowed to display applications on my desktop that I use to launch a second instance of Firefox.  There are lots of reasons to want to do this.  The most obvious is that the second user is completely isolated from my desktop so I can use my desktop instance of Firefox for basic browsing and the second user for access to bank accounts, etc.  This completely eliminates any possibility of cross-site scripting issues.

At work I also used this method to have my desktop for basic browsing direct to the internet while the second user was configured to go through my proxy at home to access web services there.  This includes MythWeb and my development wiki (running off of PmWiki) where I keep notes on writing and software development projects along with important information like the model of blower motor in my A/C (which required replacement last summer and where I saved about $500 by doing it myself).

The problem arose when I tried to use MythWeb on that second user at work (never mind the “hey, aren’t you supposed to be working” issue - we have that all worked out).  I could easily watch a recorded program but there was no sound.  Turns out that PulseAudio, the new sound server for Linux which has been adopted by Fedora, doesn’t allow multiple users access to the sound drivers, at least not by default.  You can set up PulseAudio to run in a system-wide setting but the PulseAudio people say this is probably not a good idea (and give several reasons why).  Fedora follows their lead and runs PulseAudio from the session management for your desktop. This is why the second user cannot access the sound drivers.

My problem with this is obvious - the second user can’t play audio - and also not so obvious - why the hell would anyone build a “server” that only allows one user to connect to it?  That’s not a server, folks.  That’s a bottleneck.

I never got around to trying the system-wide configuration of PulseAudio because that required writing an init script that I would have to maintain privately.  I’m too lazy for that.  Fortunately, for this particular situation, I can eliminate the second user at work and simply use two independent Firefox profiles run from the same desktop.  This solution is much easier to deal with than the system-wide PulseAudio solution but it isn’t quite as isolated as the two-user method when dealing with cross-site scripting.  Still, for use with and without a proxy at the same time, it works great.

Setting up Profiles

firefoxprofilemanager1

Firefox's Profile Manager

You’ll need to exit out of your current Firefox session first.  Then open a terminal window.  From there, type the following command:

firefox –ProfileManager

This will launch the Firefox tool for managing your profiles.  All that is required is to pick a unique name.  The directory specified for the profile should be fine, though you may want to make sure it does not share the same directory as your default profile.  It shouldn’t, but a double check wouldn’t hurt.

Starting Each Profile

Each profile must be started with two arguments, as in this example:

firefox -P myProfile -no-remote

The -P argument specifies the name of the profile you want to launch, in this example the profile named myProfile.  The -no-remote is required to prevent firefox from attaching a new window to an existing firefox instance.  You must do this for all profiles or the desired behaviour (separate profiles) won’t happen.

I place a GNOME Custom Application Launcher for each profile into a GNOME Drawer using the same Firefox icon and a different Name for each.  You can add the custom launcher by right clicking on a GNOME panel and choosing the Add to Panel option.

Problems

The drawback to this method is that if you used a desktop icon or menu item to open another window for firefox then the updated method will launch a new instance of firefox instead.  The difference (higher memory use) is noticable if you have a slower system (I have a quad-core at home and dual-cores at work with 4GB memory so it’s less noticable).

Related posts

XM Radio and Linux? Who cares.



[Print This] By mjhammel ~ March 4th, 2009. Filed under: Audio.

I got an email from XM Radio last month stating that my multi-radio discount would be going away in March.  I have two radios subscribed (though we actually have more radios than that, they just aren’t all turned on right now), both in our cars.  The increase in price is minimal - $2/month for one of the radios (the other apparently won’t change).  Along with this notice came an offer to lock in rates and lock in free access to the online version of XM.

So I scouted the online site for information on how to lock in.  What I’ve discovered is that I really don’t care enough about online access to XM to want to pay for it.  While I used to listen sporadically at work over the net, I seldom do so anymore now that my daughter bought me an iPod Nano and I’ve loaded it with the 400 CDs we own.  What’s worse, XM has slid downhill after the merger with Sirius.  Too many channels have the inane chatter of DJs.  I used to love XM because it was just music.  Nothing else.  Except for the places where talk had meaning - clips from movies on Cinemagic or audio analysis of sporting events.  But the music channels were just music.  But not anymore.  Now they’re advertising for overpriced concerts and meaningless drivel about the artist’s lives.  I don’t really care who they’re dating. Especially since the music I listen to is from the 80’s and 90’s and those people have all moved on to other things besides music.  Their lives are as mundane as mine.  It’s just the music that lives on in importance.

I often check my Wordpress stats to find out what search terms people use to find my site.  Using XM with Linux is a common request.  And while I’ve got posts related to how to do this with the online site, I’m no longer interested in keeping that information up to date.

Because I’m simply not going to pay twice for the same content.  I already pay them for access with my radios.  If that’s not enough, fuck ‘em.  I’ve got plenty of music I’ve already paid for to keep me happy.

Related posts

Dawning of a new age: A Quad-Core system finds a new home



[Print This] By mjhammel ~ March 1st, 2009. Filed under: Acer Aspire 1690i, Fedora, Hardware, Linux, MythTV, NVidia, Video, x86-64.

For the past 4 years I’ve worked happily at home with my Acer laptop.  I’ve discussed many of the issues I’ve had with running this laptop with Fedora.  For the most part, despite how those posts may sound, I’ve actually been pretty happy with both the laptop and with running Fedora on it.

But times change and so have my computing needs.  I now find it too difficult to work on multiple projects simultaneously on the laptop, even with dual monitors attached to it.  The power of the mobile Intel processor is just not sufficient to do builds, run MythTV, update my blogs and rip DVDs all at the same time.  Not to mention it doesn’t suffice to run a JBoss application server and run the companies Java clients at the same time on the laptop.  Those practically melt the CPU.

So I’ve got a brand new shiny box with all the fixins, as we say in Texas (or as I used to say, now that I’m in Colorado).  And it rocks.  Mostly.  But it wasn’t an out of the box solution.  Let me show you what I mean.

The Hardware

The whole thing was ordered as parts online through NewEgg.com.  NewEgg is my main source of hardware parts for the multiple servers I run at home.  I’ve never had any problem getting items delivered quickly and correctly from them and the few times I needed to RMA a part back to them have been handled quickly and without issue.

The hardware for my new toy is as follows:

Total cost without shipping: $718

The case is not fancy or top of the line but it’s very well designed.  The drive bays all have the sliders that make screws unnecessary - the DVD drive, multicard reader and disk all slide in and snap firmly in place.   Kudos to Cooler Master for the case design.  The front panel pops off very easily and pops back on securely.  If I’d improve on anything I think I’d like a small storage box in the bottom drive bay to save extra parts like wires and screws.

Motherboard ports

I installed the CPU with the supplied heat sink in a few minutes.  It’s always easier to install the CPU and memory with the motherboard on a table before installing into the case.  The motherboard itself fit neatly into the case with the supplied backpanel from the motherboard retail box.

The motherboard has a 6 USB ports on the back panel along with VGA, DVI and HDMI ports.  The monitors are connected to the VGA and DVI ports.  I’ve not tried the HDMI connection but based on my experience with the sound hardware I’m not expecting it to work.  There is no IEEE 1394 connector on this motheboard though the case supplied a port for it.  Just tuck the wires out of the way for this.

The power supply has both 20+4 and 12V connectors.  This was a little confusing since the 4 pin connector that associates with the 20pin was not physically attached and I didn’t (at first) notice the 12V connector.  Since both have 4 pins I was c0nfused about which connector on the motherboard it belonged to.  Fortunately, if you simply try to connect it the 12V only fits in one of the available connectors and the 4 pin only fits on the open pins next to the 20pin.  So even if you don’t know what you’re doing, trial and error works here.

Multicard reader and DVD drives

The multicard reader uses a USB connector attached to an open motherboard USB port.  It installed easily in both the case and on the motherboard, where there are 3 additional USB ports (beyond the ones on the back panel).

The DVD drive has a SATA connector.  The motherboard has a single IDE connector where I attached a second DVD drive.

Fedora 10 64Bit installation

It didn’t make much sense to me to install a 32bit OS on a quad core 64bit CPU.  Most posts that I’ve read about migrating to 64bit Linux seem to imply that F10 has made the migration pretty painless.  I have 64bit at work on an Intel Xeon but the installation always locked up trying to install as 64bit on an Intel P4.  I never figured out why and ended up installing 32bit on the P4 instead.  Having had varies success, but seeing that most people seem to have no problem, I decided I should go with 64bit F10.

I ran the installation using the Anaconda command line options I used to install on my MythTV server.  My first problem was that the ethernet port was not found, I think, because the BIOS did not automatically test for a connected wire.  Enabling this in the BIOS appeared to enable the network installation in F10 though I’m not positive about that since I made some other BIOS changes that I didn’t keep notes on.  The motherboard has an NVidia 8200 graphics chip which Fedora does not support out of the box.  So I ran the installation in text mode only.  This wasn’t a problem until I rebooted after the install completed.  Once installation started it took less than 10 minutes across my local wired 100Mb network using an NFS exported copy of the F10 x86-64 DVD.  It was, by far, the fastest installation I’ve ever done.

On reboot the network did not come up automatically.  I had to login as root at the console and start the network service to bring it up.  The text mode install caused the installed system to come up in init state 3, which does not run GDM (re: a graphical login).  To get the desktop running I manually installed the NVidia drivers (see below) and then changed the inittab runlevel to 5.  At this point the FirstBoot process was completed (still in text mode).   Then I rebooted.   The desktop comes up after this though the boot runs in a text mode unless you configure grub to use vesafb to get a graphical display at boot time.

NVidia Configuration

NVidia support always requires additional work with Fedora.  Fortunately the process has gotten easier now that the main NVidia distributions are being included in the RPMFusion repository (though they’re just a little behind NVidia’s releases).  So all that is required is a yum command:

yum install kmod-nvidia

Unfortunately it’s not quite that simple and you have to identify which version of the NVidia package to install.  You can get additional information about this from the FedoraForum FAQ. Additional detailed information on this process can be found in Mauriat Miranda’s Fedora Nvidia Driver Install Guide.

The driver pretty much works out of the box but the multimedia settings (Xine, MythTV, etc.) I used for my Intel-based laptop didn’t work.  After solving my audio problems (see below) I found I had lots of skipped video.  While various research provided examples on how to fix this, in the end the problem turned out to be audio related and not video related.

In the end I found that the NVidia GeForce 8200 works well with XVideo based video rendering.  So whatever application you use that needs it, make sure you use the XVideo option for video output.

Audio problems

My motherboard is an Asus M3N78-VM.  The only real problem with this setup was getting audio output working.  I have very limited audio needs.  2-channel output is run through a single line to an external amplifier (standard home audio equipment).  This Asus board has up to 8 channels of audio using the GeForce 8200 chip.  But I was unable to find any way to get the audio to work.

Many of the posts I found related to this motherboard or chip were related to using HDMI and the high end audio.  A number of people said it worked fine with Ubuntu or OpenSUSE 11.  The reports were not very promising, however, and certainly not consistant.  After a number of hours trying to get any audio at all I finally gave up and dropped in a 32 bit Creative Labs PCI audio card in the box and disabled the onboard audio.  Fedora/Linux recognized the card and configured it immediately.  Sound worked, though as I experimented a little more I found I had some tweaking to do in some applications.

MythTV

I run a MythTV frontend on this box.  My solution for audio required that I also switch the audio configuration in MythTV to use /dev/dsp instead of ALSA:default in the Setup->General->Audio page for the Audio output device.  With the latter setting I would get messages about audio buffer overflows and the video would skip.  When I switched to the former the overflows stopped and the video now plays smoothly with no skips.

Video playback is setup without OpenGL vertical syncing (Setup->TV Settings->Playback->General Playback).  I also disabled the OpenGL setting Sync to VBlank in the GNOME Menu Applications->System Settings->NVidia Display Settings tool.  I also created a new Playback Profile in MythTV (Setup->TV Settings->Playback->Playback Profiles) called NVidia that has a single entry.  This entry has the following settings:

  • No match criteria set
  • Decoder: Standard, Max CPUs: 2
  • Video Rendered: xv-blit, OSD Renderer: softblend; OSD Fade is set
  • No Primary or fallback Deinterlacer and no custom filters

I also use mplayer as the default video player with the -vo xv option set so it uses XVideo as the video output renderer.  In Xine, I use -V xv -A alsa (I run Xine outside of MythTV, however).

So that’s it.  The system is up and running, sans the high end audio.  I was able to rip multiple DVDs while watching MythTV, updating my blog and running a large Java build all at the same time, and the cpu meter never even got close to pegging.  I think I’ll be able to get more work done at home now.

Related posts

F10 update bug: libmarble (kdeedu libs) conflicts on x86-64



[Print This] By mjhammel ~ February 26th, 2009. Filed under: Fedora, Linux.

I did a yum update on my F10 x86-64 box at work today and discovered a minor bug in the packaging:

Transaction Check Error:
file /usr/lib64/libmarblewidget.so.4 conflicts between attempted installs of kdeedu-libs-4.1.2-2.fc10.x86_64 and kdeedu-marble-4.2.0-7.fc10.x86_64

A google for this found only one mention on a fedora forum, but it was in German.  Fortunately the Google translation was clean enough for me to decipher the solution.  The KDE EDU libs are apparently needed by digikam-libs.  Removing this package first and then doing the update will allow the update to complete successfully.  You can then install digikam-libs again without error.

The forum messages suggest the bug has not been reported to bugzilla.redhat.com so I attempted to make the report today. Unfortunately I’d made a login on that site long ago but don’t seem to have password handy.  Asking bugzilla to contact me so I could update the password didn’t seem to work either.  So I wan’t able to report the problem.

Update:  2009-02-26

I was able to login to bugzilla and file the report.  I did additional testing and found the I could not reinstall digikam-libs after the update completed.  That’s not important to me since I don’t use that library on that system, but I noted it in the bug report.

Related posts

The Internet needs no bailout



[Print This] By mjhammel ~ February 22nd, 2009. Filed under: Open Source, Politics, Security, Software Development.

I was reading Slashdot this morning and ran across a link to a story about the Internet instability last week caused by minor bugs in two routers that propagated across the planet in something like 30 seconds. While the story itself is interesting (a good read if you’re into how poor software implementation can lead to very strange problems on a network), it was the author’s summary of the situation that is both humorous and dead on accurate:

The happy ending to this story is that the community quickly rallied and worked together to both identify and mitigate the problem. No meetings were held, no bailouts were requested and not a single lawyer was needed to draft an agreement. The Internet was back to normal in short order.

Earl Zmijewski, renesys.com

If you ever need to wonder why things like open source and open protocols are better for the world than company owned proprietary solutions, you need to see how this problem was solved.

Related posts

The Everyday Guide to Fedora Upgrades



[Print This] By mjhammel ~ February 18th, 2009. Filed under: Fedora, Linux, Personal.

I’ve been working with the various incarnations of Red Hat Linux, including Fedora, since before the company went public.  In that time I’ve done more than just a few upgrades from one release to another.  With each upgrade I learn just a little more about administering my own Linux system.   I’m not always pleased with each release but I learn to live with the quirks introduced and the ones removed.  In the end, after having used most of the other popular distributions and even in spite of my constant complaining, I’m still happy with my Fedora.

The tips and tricks to making an upgrade go smoothly are not hidden masters secrets.  They are simply the things we learn by doing.  Do them enough, you learn to do things right.  There are good ways and bad ways of doing an upgrade.  The bad ways are often the clever ways.  The good ways are usually less glamorous.  But they work.  And they work well.

Tip #1:  be mundane.  An upgrade should not be clever.

So how does one go about being mundane with an upgrade?  Follow along and I’ll tell you.

Note that the following instructions are well suited for the average user at home using Fedora.  They are not necessarily well suited to someone who administers large numbers of computers with lots of users or for other Linux distributions.  And if you follow these steps and screw up your systems, don’t blame me.  This is just how I do it and it works for me.  Caveat reader.

Step 1:  The Plan

The problem with upgrades is the incompatibilities you find between the old version and the new version.  Some application depends on some library and the new version changes the library but not the application because the application didn’t come with the distribution you’re using.  You got it later from some other repository.  This problem isn’t something to blame on the Linux distribution, it’s a systems administration problem. As it turns out, it’s usually not hard to fix for the average home user.

Tip #2:  Don’t upgrade.  Reinstall

To avoid the problem of incompatible applications and libraries, don’t do an upgrade. Wipe the old installation and install the new version in its place.  This isn’t actually hard to do and, if you plan correctly, won’t trash your personal data.  But you have to prepare yourself for this process.  The first step is to create separate partitions for systems files and your personal files.

Tip #3: Make separate partitions for / and /home.

All your personal data, including your web servers and (if possible) your databases should go under /home.  That way the distribution update will only wipe the systems files and won’t touch your personal data.  It also means you can remove any rootkits or other nasties that found their way onto your system through system files.

So the plan is:  reinstall.  But before you can do that you need to save off some important bits and pieces from the system directories.  Typically this amounts to configuration files and, as in my case, databases.

Step 2:  Backups

Before you start, you need to backup configuration files for the system tools you use on a regular basis.  This includes such things as the hosts, password and group files from under /etc, along with a slew of others depending on your situation.  Since there is no way to know exactly what files are important to you, I created a little shell script that can be edited to grab the files and directories that are important.  I call this script configfiles.sh and I run it as a cron job so that I’m always backing up those files in case of emergency.

Config files

Although I backup a number of files and directories with configfiles.sh, I find that on reinstallation I only need a few of them.  The rest I keep for reference so I can hand edit files or merge them after the reisntall completes.  Of the files I backup, the following are almost always used on the upgraded system either verbatim or merged with the new version:

  • /etc/hosts
  • /etc/password
  • /etc/group
  • /etc/resolv.conf - to avoid using my ISPs name servers I used open access, public name servers
  • /etc/X11/xorg.conf - to support dual head or special configurations, depending on which machine is being upgraded.
  • /etc/sane.d - Scanner configuration files
  • /usr/local/ssmtp - a simplified replacement for sendmail used solely for outbound email
  • /usr/local/fonts - my locally installed fonts used with the GIMP
  • /etc/php.ini - I run various web servers at home that often require minor tweaks to allow large files via PHP scripts.
  • /etc/my.cnf - Minor tweaks to the MySQL configuration are also required for web services or for some work related projects I do at home.
  • /etc/httpd - I run multiple web servers at home, including wikis, blogs and MythWeb.
  • /etc/ssh, /etc/hosts.allow, /etc/hosts.deny - My systems are protected by a firewall but they are also protected via ssh and tcp_wrapper configurations.
  • /etc/wpa_supplicant - hand tweaked configurations for wireless communications with, for example, the local library.
  • /etc/squid - Squid configuration files used on the server from which ssh tunnels incoming from the internet can access inside resources.

My printer configurations (/etc/cups) is also backed up but it seems I always have to redo these after each upgrade because the administrative tools for dealing with printers are evolving faster than other parts of the system and, usually, get easier to reconfigure manually with each upgrade.  Then again, I don’t do much printing at home.

Databases

The default database directories are in the system directories so that could cause some problems.  I could back up those directories but I find it easier to make dumps of the databases and then reload them after I reinstall.  The dumps are done by a the same shell script that handles all my nightly backups (see next section) which is run by cron.  This script rotates the database backups on a weekly basis.  So I always have the last 7 days of database dumps.  The dumps are stored on the /home partition so they won’t get trashed on the reinstall.

A regular backup plan

Backups should be part of any home users plans.  You can do backups to DVD or CD if you only have a single system.  Or if you’re like me and have multiple systems at home you can attach an external USB drive to one of them and backup to that system.  This is exactly what I do.  For the paranoid you can use two USB drives and duplicate the backups (I do this at work) just in case one drive fails.  I use Western Digital MyBook’s, 500GB and 1TB models, both at home and at work.  I’ve had zero failures with these and they work right out of the box with Linux (I reformat with Linux filesystems).  I’ve had terrible luck with Maxtor USB drives and would highly recommend you not use them.

My backup script is pretty much the same on every system.  I actually use one script to prep an outbound email using ssmtp that then runs the real backup script.  The backup script is configured for each system it is run on.  It requires manual updates for each system but I only need to do this once (or very seldom).  All the backups are run via rsync.  The trick with rsync, especially now that GNOME has added that nasty GVFS mount point on your users home directory, is to build proper exclude lists.

These scripts will not run on your system without modification.  You’ll need to read the scripts and update them for your personal setup.

Since the backups are stored on a remote USB drive, which can be moved to another system easily if the server it is connected to fails for some reason, I can easily restore necessary files after an reinstall.  This typically just means the database backups unless something catastrophic happens like the disk dies on the system being reinstalled.

Cron jobs

The backups are run nightly from the root user (so I can grab directories my regular user doesn’t own) using cron.  The entry looks like this:

30 1 * * * /home/user/bin/configfiles.sh /home/user/backups/hostname 2>&1 > /dev/null
30 3 * * * /home/user/bin/mail-backup.sh

The configfiles script is run first and stores the configuration files into a backup directory under my regular user.  This makes sure they get backed up when the backups are run.  The mail-backup script runs later and mails me the results of the backup process.

Step 3:  Installation

If you don’t already have your /home directories on a separate partition then backup everything under /home to an external device before proceeding.  You can create the separate partitions on this reinstallation and then copy all the files from the backup into /home.  You’ll want to backup in archive format, which means maintaining permissions, ownership and timestamps.  Check the rsync and cp commands for help on that.

Download the boot disk for the latest Fedora release and burn it to a CD.  You can copy over the DVD installation disk to another system and export it via NFS if you like, or burn it to a DVD and install from it.  You can even install from the boot disk alone via a network install across the internet, but this last option can take much longer to complete and is not something I would recommend.

Grub/Anaconda boot options

I’ve already covered the basic installation process for Fedora in my post on migrating a MythTV server to  F10.  I suggest reading that post for details on how to install Fedora if you’re doing it from a remote server with the DVD exported via NFS, as I do.  This will cover the plethora of options available to anaconda during installation.  If you install directly from the DVD, then you shouldn’t have to worry about any of that.

Partitions and filesystems

When you get to the disk partitioning section of the installation be sure to do a custom partitioning.  You only need about 20GB for the root partition (maximum, if you install absolutely everything known to Fedora and mankind).  Leave a swap space equal to twice the size of the total amount of memory you have and then the rest of the disk should be your /home partition.

Once you have the partitions set up like this then you won’t have to remake them on future reinstalls, but you’ll still do a custom partitioning so that the partitions are correctly mapped to their original mount points.

You’ll also want to make certain that the /home partition is NOT reformatted (unless this is the first time you’re creating this partition).  You should reformat the root (re: /) partition and swap space on every reinstall, however.  That’s your guarantee of cleaning out everything, plus you can change the root partition filesystem type at this point to use newer, better and faster filesystems.  At the moment I’m quite happy with ext3 but I’ve heard about some newer ones (ext4, I think, plus a few others) that may become the default in Fedora.  The safe bet it to use the default partition type on the root partition.  It’s likely to be the most stable and, as most modern file systems are journaled anyway, reliable and recoverable from the unlikey event of a system crash or power outtage.

Finish up the install and wait for the reboot.  I don’t create a user at this point because I create it manually later so it maps to my existing /home directory using the same userid and groupid.  This is easy to do from the command line but, as far as I can tell, impossible to do from the graphical install process.  So skip it when doing your reinstallation.  Just log in as root later.

Step 4:  Post Install Setup

Okay, installation has completed and you’ve rebooted and run through the First Time setup screens.  Now you’re fully rebooted and ready to use the system.  But you need to reconfigure it the way it was before.  This amounts to reconfiguring your old user (so you don’t do everything as root), configuring your network and graphics driver and copying or merging old configuration files.

Reconfigure your old user

Now it’s time to put some things back in from your previous installation, starting with your non-root user.  Look at the backup of /etc/password and /etc/group to get the information you need.  The important bits are the userid (uid), groupid (gid) and home directory.

  • Group entry example (last number is the gid):  userid:x:5150:
  • Password entry example (first number is the uid):  userid:x:5150:5150:Your Name:/home/userid:/bin/bash

Notice that I’ve used the same id for gid and uid.  I find it easier to track my files if I always use the same uid and gid.

Once you have the necessary information you simply create a group using the gid for your old user and a new password entry, then add your password for the new login:

groupadd -g <gid> userid

useradd -d/home/userid -c”Your name” -s/bin/bash -u <uid> -g <gid> userid

passwd userid

At this point you should do yourself a favor and add yourself to the sudo users.  As the root user just type

visudo

to edit the users file.  If you aren’t familiar with this, read the man page for more details.

Network start up and installing from backups

Now the network needs to be brought up.  Configure the network using the desktop tools - this is typically easier than trying to understand the configuration files, which for wireless configurations can get messy.  However, you can simply copy over the hosts and resolv.conf files from you backups into the /etc directory if you use static IP addresses on your networks at home.  If your system is connected directly to the internet and uses DHCP to get an IP address from your ISP then don’t copy these in from your backups - just let your ISP set them for you.

Install meld

Once the network is back up you can either mount up your remote backups or load the CD/DVD backups and copy in or merge the files from your backups.  Merging is actually pretty easy in most cases.  But you need to install meld.

This package is very useful to non-developers.  It’s a graphical program that allows you to see the differences between two files.  It’s perfect for viewing the old version of a configuration file and comparing it with the new version.  You just find your old configuration options and copy them over.  It’s pretty much point and click and works well with most simple configuration files.  The only one that took some serious though for me was squid, whose configuration file is a major pain in the butt anyway.

Installation for Fedora just requires yum:

yum install meld

You’re running as root at this point because we’re still reconfiguring and aren’t ready to login as our normal user.

Merge configurations

With meld installed you can now copy over your old configurations or merge them with the new ones.  The ones you can just copy over include:

  • /etc/hosts
  • /etc/resolv.conf
  • /etc/hosts.allow
  • /etc/hosts.deny

The format of the /etc/hosts.allow and /etc/hosts.deny files has not changed much recently so you’re probably safe copying those over verbatim, but to be safe you can always run them through meld to merge instead.  Most of the rest of the saved configuration files you should merge using meld.

In the case of httpd, you should be in the habit of configuring your local web servers as virtual hosts and placing those configurations in /etc/httpd/conf.d/custom.conf, which will allow you to just copy over that configuration without having to merge anything.

Distribution update

The next step is to make sure the installation is actually up to date with respect to security and bug fix updates from the Fedora repositories.  This is easy enough but it might take a little while to complete depending on how old your installation DVD is:

yum update

Run this and sit back for awhile.  When it’s done you can move on to the next step.

X Updates

The latest versions of the X.org server and the associated video drivers no longer require the use of an xorg.conf file.  The server is now able to figure out much of what it needs for basic operation given the chipset (aka video cards) your using.  However, to get extended features like dual head (re: multiple monitors) or to deal with some of the intricate details that have come up with the Intel drivers (which are newer and utilizing more advanced server features, and thus tend to cause more people confusion than, say, the nVidia drivers) you’ll need to configure an xorg.conf file.  Now would be the time to deal with this issue.

Personal configuration

The last step in your personal upgrade of Fedora is to set your firewall, selinux and services configurations.  These can all be done from the desktop menus.  I disable the firewalls on my system because I have a firewall running between them and the outside world that I maintain separately.  I also disable SELinux because it tends to require more administrative work than I’m willing to deal with at home.  There are a number of services that can be disabled, like ISDN.  You should see Mauriat Miranda’s excellent write ups on Fedora services for details on these.

Advanced:  User Migration

If you need to migrate multiple users you can do it just like you did with your personal user or simply write a script that merges the relevant information from /etc/password, /etc/group and /etc/shadow in your backups into your new installation.  Note that you can simply copy the relevant lines from /etc/shadow over - the passwords will simply work as they did before.  However, if you use some other password mechanism (re: you edited your PAM authentication mechanisms) then this won’t work.  Most users, however, don’t do this unless they’re connected to something like LDAP, and most home users not connected to such things.

Related posts