Bits and Chaos

Icon

Between bits and chaos, a sysadmin stands.

MSI WIND Webcam for Fedora 9

MSI WIND has an integrated webcam, to configure it on Fedora 9 you’d better  have the latest firmware installed, available from MSI website. I’m not sure that this is actually required, but this is my configuration.

Check now that you have an uvcvideo kernel module installed:

lsmod | grep uvc

you should get something like this:

uvcvideo              49928  0
compat_ioctl32    5120    1   uvcvideo
videodev              29824   1   uvcvideo
v4l1_compat       15876   2   uvcvideo,videodev

If such, your webcam is probed but not correctly configured. To do so, type:

rmmod uvcvideo

modprobe uvcvideo quirks=2

You can test that everything works by using mplayer to display the webcam output:

mplayer -fps 15 tv://

Now, you can make changes permanent by editing /etc/modprobe.conf to add this line (the file does not exist if you have just installed the system, so create it):

options uvcvideo quirks=2

and test that works at the next reboot.

Links:

Linux UVC Forums

Filed under: fedora, , ,

Install Fedora 9 on a MSI WIND

I’ve recently bought an MSI WIND U100, it came with a pre-installed Windows XP and I started to install Fedora 9 on it, I will keep Windows as it could be useful in some environments, but my interest is in having Fedora running.

First step is in installing Fedora over it, the 80 GiB disk conveniently ha three partions, the first is for recovery, the second has Windows XP, so I splitted the third for a tiny boot partition (which is requested by Anaconda, altough BIOS is capable of booting from anywhere) and a large LVM volume, where I carved out a root partition and an encrypted home partition, a security wise solution as it’s a notebook which means that has the tendency to be shipped away from its legitimate owner. The LUKS passphrase used for the home directory was strong, so I can use a weak and distinct password for the system user.

Installation requires a Fedora respin that you can find here. I picked up a USB pen drive, then I use the livecd-iso-to-disk (yum install livecd-tools) to make it bootable. The process does not destroy any data on it, and at the installation prompt I gave linux askmethod, to choose the installation source (I opted for a HTTP based installation).

The installation went smooth, later I customized the system to have compiz installed (I can made very impressive presentation with it!) and updates are flowing. The only problem I’ve noticed is that sometimes on boot the system hangs at the ACPI discovery phase, don’t know why.

Filed under: fedora, ,

Fedora 9 bluetooth file sharing: I’m missing my menu

In Fedora 8, people that want to send a file from their cell phone to Linux via bluetooth have to connect their bluetooth dongle, click on the bluetooth icon to join the ad hoc network, and then on the “Internet Menu” (if I remember correctly) there was a “Bluetooth File sharing” that does exactly what it means.

Ok, it was not a very well integrated solution, but it seems to me that in Fedora 9 there’s a serious usability problem.

Here and now, there is no longer a “Bluetooth File sharing” menu item, instead you have to click on the “System Menu”, then the “Preferences” sub-menu, then the “Internet and Network” and finally you find two items, “Bluetooth” and “Personal File Sharing”, where you defines how to deal with Bluetooth.

It takes some time to figure that this is the intended procedure, i.e. that the disappeared “Bluetooth File Sharing” menu item was not disappeared due to a missing package, but as a result of a new design. Shouldn’t be better to allow for a “fake” menu item that tells the user about the new procedure? Or to add a button to the Bluetooth icon (that promptly appears after connecting the bluetooth dongle) where to fix and control how to send and receive files?

Filed under: fedora, ,

Upgrading Fedora 8 to Fedora 9: lot of pains

Today I decided that I must upgrade to Fedora 9 (lazy day…), and I choose to do that in the proper way (i.e. not using Yum but with Anaconda: this requires burning a DVD, something I feel unappropriate from an environmental point of view, as I will use that DVD only once).

Update was some of a disaster. Altough the installer didn’t complain at all, the Fedora 9 kernel wasn’t installed, and grub.conf was altered with root (hd1,0) in the place of root (hd0,0), which result in a GRUB shell after the reboot.

I fixed it, restarted the system, ran grub-install, and then see that Python has been broken, so Yum doesn’t work (with the infamous “No module named _sha256” error). As I’m accustomed with this problem, I manage to download Pyhton and Python-libs RPMs from a Fedora 9 repository, force the removal of the old ones and then install the brand new packages, and then I was able to run a massive “yum update -y”, that downloaded 1.2 GB of binaries (638 packages), requires to manually remove some conflicting packages (lirc and qt4) and then, after one hour of work give me a working system.

It appears that, somehow, the installer wasn’t able to remove all the Fedora 8 packages, this causes the Python/Pyhton libs version mismatch, and probably stops the upgrade processes.

I can accept the Python problems (it’s not the first time I encounter them, and they could be related to something I made maybe years ago on this system, leaving it in a unconventional configuration that the installer is unable to understand and manage properly) but I find completely unacceptable that Anaconda breaks GRUB configuration. Yes, I asked to do a new configuration of GRUB during installation time, but Anaconda should understand which hard drive is hd0 and which is hd1. At least, it should allow me to manually edit the configuration file, while in fact the entire installation process appears to me too much “streamlined”, i.e. we do it for you, we know what to do, and this was too optimistic an assumption.

These are for the pains, not sure about the gains. It seems to me that Gnome takes considerably more time to start, and Firefox 3 doesn’t seem so faster than Firefox 2.

Filed under: fedora, , , , ,

Fedora Party in Rome

For many years, the only event devoted to promoting Linux in Italy was the Linux Day: at the end of October, in hundreds of cities all around Italy there’s a day on Linux: talks, demos, people gathering to know and chat each other. It’s quite impressive that such a spontaneous flow of people meets to talk about an operating system: I wouldn’t say that everything was ok, some talks were horrible and some others fabolous, some LUG are quite capable of putting in place a convention whilst others need more time and practice, but the results are globally more than positive. I had a talk in the past three Linux Day, so I’m definitely in the business 🙂

The only limit that I have experienced was that you put in the same place people with differerent expectations: from the open-minded person, who knows a little (if any) of Linux, to the enterprise user, from the slackware-is-my-religion tech guy to the won’t-ubuntu-be-too-difficult-for-me newcomer.

So I’m happy that, on a smaller scale, more focused meeting are going to take place. I’ve heard something for Ubuntu, but as I don’t use it I wasn’t interested in. I’m a long-time Fedora user, so this Fedora 9 party in Rome struck some chords within me.

Altough I’m buried in finalizing my Ph. D. dissertation, I can hardly wait, as there are people in this meeting I’ll be glad to know and have some ideas exchange.

Depending on the weather, I may or may not wear my Red Hat Polo, so you have some good reason not to worry about your clothing.

Filed under: fedora, , ,

Pinnacle 50i with Fedora 8 64bit

Problem statement: I have a Pinnacle 50i and I want it working on Fedora 8 64 bit.

Symptoms:

  • The card works well with Windows XP, I have audio and video, so if audio is missing on Linux it’s not a cable problem;
  • On Linux, I got the video but not the audio. On Fedora 6, the audio was present but feeble, which suggests that the problem is part due to kernel module configuration and part to Pulseaudio.

Solution steps:

  • On /etc/modprobe.conf, tell the system that we want to use a saa7134 card plus the module to get its audio output feed into the ALSA subsystem:

options saa7134 card=77 video_nr=1 vbi_nr=1 radio_nr=1
install saa7134 /sbin/modprobe –ignore-install saa7134; /sbin/modprobe saa7134-alsa

  • As root issue: modprobe saa7134-alsa. Check that you have the card as an audio source:

$ arecord -l

**** List of CAPTURE Hardware Devices ****
card 0: CK8S [NVidia CK8S], device 0: Intel ICH [NVidia CK8S]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: CK8S [NVidia CK8S], device 1: Intel ICH – MIC ADC [NVidia CK8S – MIC ADC]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: SAA7134 [SAA7134], device 0: SAA7134 PCM [SAA7134 PCM]
Subdevices: 0/1
Subdevice #0: subdevice #0

  • You have to make some kind of magic sound rerouting, instructing sox to connect the output of the card to the input of the ALSA subsystem:

$ ls -l /dev/dsp*

crw-rw—-+ 1 root root 14, 3 2008-01-27 12:50 /dev/dsp
crw-rw—-+ 1 root root 14, 35 2008-01-27 13:31 /dev/dsp2
$ sox -c 2 -s -w -r 32000 -t ossdsp /dev/dsp2 -t ossdsp -w -r 32000 /dev/dsp

  • Now you can start your tv viewer of choice (yum install tvtime kdetv to have them both). It’s possible that tvtime search for a /dev/video0 device whilst you have /dev/video1. If this happens, issue tvtime-configure -d /dev/video1 to fix for the configuration file.
  • Enjoy watching tv, which is something impossible on Sunday afternoon in Italy due to the very poor quality of what’s aired.

Some interesting links:

Read the rest of this entry »

Filed under: fedora, , , , , ,

Mongrel integration for RHEL, Fedora and derivatives: new release

I have made a new release of my script for controlling mongrel instances in RHEL, Fedora and derivatives.

The most important thing is that now you can selectively choose which instances start or stop. To do so, after the start or stop directive, you can add a prefix, each filename starting with that prefix (and ending with .conf, as usual) will be processed.

As an example, if you have these instance description files in your /etc/mongrel:

testsite.internal.example.com.conf
newapp.internal.example.com.conf
newportal.internal.example.com.conf
fileserver.extranet.example.com.conf

a command line as service mongrel start test will start each instance described by a filename like test*conf, so for the above example you’ll start the instance(s) described in testsite.internal.example.com.conf. In the same way:

  • service mongrel start new will start instances described in newapp.internal.example.com.conf and newportal.internal.example.com.conf;
  • service mongrel stop newapp will stop instance(s) described in newapp.interna.example.com.conf (newportal.etc won’t be touched);

If you don’t specify any prefix, the command will be applied on all files. Note that service mongrel status will ignore any prefix.

Click on the link to download the mongrel service script.

EDITED: The script is available here, but you can better use mod_passenger, which embed a Ruby interpreter in an Apache or NGINX web server.

Filed under: fedora, rhel, ruby on rails, , , , , ,

Upgrading from Fedora 6 to Fedora 8 via yum

I’ve successfully perfomed an update from Fedora 6 64bit to Fedora 8 64 bit, this won’t be a news except that, to make things more spicy, I choose to perform this update by yum.

I read that Anaconda has some troubles in updating from previous releases to Fedora 8 (it hangs with packages fromdifferent repositories) and, more important, I am too lazy to download a whole DVD and prefer doing things the fancy way, so I decided to go along the yum way.

First, I installed the Fedora Release RPM (see here), then I eagerly launched yum to see if it’s capable of deploying such a massive upgrade (yes, I’m doing this in the spirit of testing). Yum found that 1350+ packages must be downloaded, for a grand total of 1.4 GB of new software. After download, it started the upgrade process, made of 2700+ steps.

This wasn’t without some harshness, because yum need some help from me: I manually remove some packages, they conflict with packages from Fedora 8 that yum was pulling in. In this ward there are mostly packages from third party repositories that I installed once and the forgot to have.

Unfortunately, yum stuck at step 1950 circa, I guess because I submitted from another console a simple rpm -qa statement: it’s sad to say, but still today we – inhabitants of the RPM world – are experiencing deadlocks. So I choose to remove all the packages from Fedora 6, and I define this sets as “all the packages with “.fc6″ in their name”. By this definition, I remove keyutils-libs, and as a result after the boot SSH server, X Server, yum failed to start.

Yum reports a cryptic message, complaining about a SHA256 missing module, good for me that SSH server startup fails with a more informative string. I installed the package, fixed the entry in /etc/fstab (no more /dev/hd<n> for us! Labels everywhere) and now I’m posting about it.

(Thinking about it, I devised that the best way to find no longer used packages is the package-cleanup –orphans command)

First impressions: Firefox (which is now the 64 bit application shipped with Fedora, not the 32 bit application downloaded the site I used to have) is really faster, and I have the distinctive feeling that the whole desktop is more responsive. Getting help for a 64 bit installation (which is somewhat less mainstream) is as easy as googling for it and going to Fedora 64 web site.

Two years ago the landscape was completely different, but Red Hat is no longer the leader in the desktop market, Ubuntu holds the sceptre. A problem for Red Hat, because the boys that today are using Linux on their desktop are the men that tomorrow will use Linux on their server (think of Microsoft). They need to regain popularity, and it seems to me that they are headed in the right way.

Filed under: fedora,