Archive

Archive for the ‘Uncategorized’ Category

Skype on Fedora 16 64-bit

December 19th, 2011 No comments

For some odd reason, the guys over at Skype is refusing to release a pure 64-bit version of Skype for Fedora. Instead they ship an i586 version, without any dependencies defined for the 32-bit libraries is require. Here is what you need to install to make it work:

1
yum install -y libXv.i686 libXScrnSaver.i686 qt.i686 qt-x11.i686
Categories: Uncategorized Tags: , , ,

Gnome 3: Fixing weird workspace behavior on dual monitor setup

November 10th, 2011 No comments
1
$ gconftool-2  --set /desktop/gnome/shell/windows/workspaces_only_on_primary --type boolean false

Fedora 16 notes

November 10th, 2011 No comments

I’m an early adopter, so of course I’m giving the newly release Fedora 16 a go. This blog post will cover my basic setup woes and delights.

My system’s a pretty straight forward Intel i7-based setup with some kind of nVidia graphics adapter. Honestly, I don’t remember which model, but I don’t think it makes that much of a difference. Its rather large and looks more like a vacuum cleaner than a electronic device for producing shiny pixels. The box has 6GB of RAM and two monitors attached via DVI. There’s a Logitech HD webcam attached too. Other than this, it’s pretty much plain vanilla.

First issue: After burning the 64 bit install DVD, I rebooted and found that the installation process (Anaconda?) failed to provide me with the bottom part of the dialog window, meaning I can’t see the Back and Next buttons. I tried to make it through the process just by counting my tabs, but I finally gave in, rebooted and started the install with VNC by adding the parameters ip=dhcp vnc vncconnect={ip of laptop}. This issue could perhaps be is due to my dual monitor setup, and it could be a showstopper for many people who want to give Fedora a spin.

A picked a pretty basic installation – Graphical Desktop on a freshly formatted root partition with my old home partition preserved. I rarely do a lot of system wide customization on my office box, so reinstalling like this really isn’t a big deal for me.

Besides the dual monitor issue and the general confusion about the new data/install media dialog box – which didn’t seem to work – the installation process itself went without a hitch. When completed, I rebooted my system, and was presented with a blank screen and a blinking cursor.

I rebooted from the installation media in rescue mode, mounted the system and ran this:

1
2
3
4
5
6
$ cd /mnt/sysimage
$ chroot .
$ grub2-install /dev/sda
(many errors, and a finishing statement saying "No error reported")
$ exit
$ reboot

That seemed to do the trick – I expect my three hard drives got in each others way. First boot drags me through a lengthy SELinux relabelling, which annoys me since I’m probably going to disable it anyway.

After relabelling, the system rebooted and presented me with a text-mode login. Logging in as root and issuing “init 5″ seemed to fix that problem, and presented me with the usual graphical “Welcome” dialogue. I’m not sure if my previous boot problems caused this? Changes in the system now means that /etc/inittab isn’t the place to fix this – instead a symbolic link is required:

1
ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target

Next up – installing the right repositories:

1
2
3
$ yum install -y \
  http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm \
  http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm

Then make sure the system is fresh:

1
$ yum upgrade -y

Install drivers for my nVidia graphics card:

1
2
$ yum install -y akmod-nvidia
$ nvidia-xconfig

Make absolutely sure the open sourced nVidia driver – Nouveau – does not conflict with the proprietary driver:

1
2
$ mv /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)-nouveau.img
$ dracut /boot/initramfs-$(uname -r).img $(uname -r)

Disable (or partially disable) SELinux to allow Gnome Shell to use the nVidia driver:

1
$ sed -i s/SELINUX=enforcing/SELINUX=disabled/ /etc/selinux/config

Reboot, and the proprietary nVidia driver should be rolling. If you need dual monitor support, run nvidia-settings as root.

Various multimedia stuff that isn’t distributed with Fedora itself:

1
2
3
mplayer
ffmpeg
xbmc

Stuff that Fedora thinks I can live without, but I really think I need:

1
2
3
4
5
6
7
8
9
10
11
12
$ yum install -y \
  thunderbird \
  pidgin pidgin-logviewer gnome-shell-extension-pidgin \
  gnome-do gnome-do-plugins-pidgin \
  VirtualBox-OSE akmod-VirtualBox-OSE \
  subversion git \
  gstreamer-plugins-ugly \
  gstreamer-plugins-bad \
  gstreamer-plugins-bad-nonfree \
  mplayer \
  ffmpeg \
  mkvtoolnix

That was easy, wasn’t it? :) I’m not so impressed with the installation process of Fedora 16 – even if it’s due to multiple hard drives and monitors on my system, someone should have caught the issues mentioned above before it was released. Once fixed though, the system seems to work find. Can’t seem to find the new “j” command mentioned in the release notes though.

UPDATE: Tried to install the office printer (HP Color LaserJet CP2025n), but the graphical setup tool said it couldn’t detect network printers without installing, enabling and starting firewalld. I did so, but it didn’t help much – I still had to select Search by address and punch in the printer’s IP.

UPDATE: Xorg seems to take up ~99% CPU at times according to top, and it’s really sluggish. Not sure what’s causing this.

UPDATE: VirtualBox-OSE seems to be broken – I get this error:

1
2
$ virtualbox
VirtualBox: supR3HardenedVerifyFileInternal: Failed to open "/usr/lib64/virtualbox/components/VBoxXPCOMBase.xpt": No such file or directory (2)

UPDATE: This morning my system greeted me with one black screen and one half gray. It turned out this was the locked screen dialogue, so entering my password and hitting return brought my desktop back. Still horribly slow, especially when changing focus to another window. Switching tabs in Firefox is just unbearable. I miss Fedora 15.

Pulse-Eight’s USB-CEC adapter – Part 1

November 7th, 2011 1 comment

Got the USB – CEC Adapter from Pulse-Eight and hooked it up to the office’s Sony Bravia TV. Output from dmesg:

[945751.683883] usb 2-2.3: USB disconnect, device number 5
[945756.456657] usb 2-2.3: new full speed USB device number 13 using ehci_hcd
[945756.543124] usb 2-2.3: New USB device found, idVendor=2548, idProduct=1001
[945756.543129] usb 2-2.3: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[945756.796580] cdc_acm 2-2.3:1.0: ttyACM0: USB ACM device
[945756.797164] usbcore: registered new interface driver cdc_acm
[945756.797167] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

Compiled and installed the latest Git-version of Pulse-Eight’s libCEC (note, add -b release to the git clone command), and fired up the cec-client. The device doesn’t show up in the Sony TV’s Bravia Link menu. All HDMI ports were tried on the TV.

$ cec-client
No device type given. Using ‘playback device’
CEC Parser created – libcec version 1.0
no serial port given. trying autodetect:
path: /sys/devices/pci0000:00/0000:00:1d.7/usb2/2-2/2-2.3
com port: /dev/ttyACM0

cec device opened
DEBUG: [ 0] trying to autodetect all CEC adapters
DEBUG: [ 18] connection opened
DEBUG: [ 19] communication thread started
DEBUG: [ 20] FindLogicalAddresses – device 0: type 4
DEBUG: [ 20] detecting logical address for type ‘playback device’
DEBUG: [ 20] trying logical address ‘playback 1′
DEBUG: [ 20] setting ackmask to 10
DEBUG: [ 24] command sent
NOTICE: [ 159] << 4 -> 4: POLL
TRAFFIC: [ 159] << 44
DEBUG: [ 164] command sent
DEBUG: [ 371] COMMAND_ACCEPTED
DEBUG: [ 371] COMMAND_ACCEPTED
DEBUG: [ 371] COMMAND_ACCEPTED
ERROR: [ 371] did not receive ack
DEBUG: [ 371] >> POLL not sent
NOTICE: [ 371] using logical address ‘playback 1′
DEBUG: [ 371] >> 4 changed physical address from ffff to 1000
DEBUG: [ 371] setting ackmask to 10
DEBUG: [ 376] command sent
DEBUG: [ 511] processor thread started
DEBUG: [ 511] COMMAND_ACCEPTED
DEBUG: [ 511] << powering on device with logical address 0
TRAFFIC: [ 511] << 40:04
DEBUG: [ 516] command sent
DEBUG: [ 819] COMMAND_ACCEPTED
DEBUG: [ 819] COMMAND_ACCEPTED
DEBUG: [ 819] COMMAND_ACCEPTED
ERROR: [ 819] did not receive ack
NOTICE: [ 820] << 4 -> broadcast: active view (1000)
TRAFFIC: [ 820] << 4f:82:10:00
DEBUG: [ 874] command sent
DEBUG: [ 1369] COMMAND_ACCEPTED
DEBUG: [ 1369] COMMAND_ACCEPTED
DEBUG: [ 1369] COMMAND_ACCEPTED
DEBUG: [ 1369] COMMAND_ACCEPTED
DEBUG: [ 1369] COMMAND_ACCEPTED
DEBUG: [ 1369] TRANSMIT_SUCCEEDED
waiting for input

I tried to get some feedback on Pulse-Eight’s IRC channel, but most people there seemed to be idling I was horribly impatient and they didn’t fix my problem in the first 60 seconds ;-) One thing was worth mentioning though – the HDMI ports on the device are labeled “IN” and “OUT”, but according to one user it actually doesn’t matter which port you use.

Stay tuned for part 2, where I will be taking this mysteriout device with me home and hooking it up to my Panasonic Viera TV. Fingers crossed.

Getting Munin’s MySQL plugin working under CentOS

September 14th, 2011 No comments

Install missing packages:

1
yum install -y perl-Cache-Cache perl-IPC-ShareLite

First, make sure that the user munin has the proper rights in MySQL:

1
2
3
4
5
GRANT USAGE ON *.* TO munin IDENTIFIED BY "AwesomePassword";
GRANT SELECT ON mysql.* TO munin;
GRANT PROCESS ON *.* TO munin;
GRANT SUPER ON *.* TO munin;
SHOW GRANTS FOR munin;

Now, add the credentials to the MySQL section of /etc/munin/plugin-conf.d/munin-node:

1
2
3
[mysql*]
env.mysqluser munin
env.mysqlpassword AwesomePassword

Check the output from /usr/sbin/munin-node-configure –suggest and look for MySQL:

1
mysql_                     | yes  | yes (bin_relay_log commands connections..)

If the output looks good, write a new configuration file for munin-node with this command:

1
/usr/sbin/munin-node-configure --shell --remove-also | sh

Restart the service:

1
/sbin/service munin-node restart

Try to fetch a MySQL variable by connecting to munin-node with telnet:

1
2
3
4
5
6
7
8
9
10
11
12
$ telnet localhost 4949
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
# munin node at ...
fetch mysql_myisam_indexes
Key_read_requests.value 46370071
Key_reads.value 28880
Key_write_requests.value 27113469
Key_writes.value 6936
.
quit

All is well.

Categories: Uncategorized Tags:

Linux partitioning – my 2 cents

July 13th, 2011 No comments

Our ISP provides us with a nicely priced dedicated servers fitted with 2 x 250G SATA drives and CentOS. They’re available shortly after purchasing, but unfortunately not with the partitioning that I’m looking for. I prefer to bundle the two drives as RAID1 and add LVM on top of that. This is a shot of a recent partitioning during a remote re-installation of CentOS 6.

Since swap redundancy isn’t really needed, I might consider creating a 2 or 4G partition on each of the drives outside of the RAID and LVM setup next time.

Categories: Uncategorized Tags:

Reinstalling CentOS 6.0 remote

July 13th, 2011 No comments

Download images and add entry to Grub boot loader. Make sure you put in the right networking values:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
cd /boot
mkdir centos6-x86_64
cd centos6-x86_64
wget http://mirror.leaseweb.com/centos/6.0/os/x86_64/isolinux/initrd.img
wget http://mirror.leaseweb.com/centos/6.0/os/x86_64/isolinux/vmlinuz
/sbin/grubby
  --add-kernel /boot/centos6-x86_64/vmlinuz
  --initrd=/boot/centos6-x86_64/initrd.img
  --args="ip=x.x.x.x netmask=y.y.y.y gateway=z.z.z.z dns=n.n.n.n
    ksdevice=eth0
    method=http://mirror.leaseweb.com/centos/6.0/os/x86_64/
    lang=en_US
    keymap=us
    vnc
    vncpassword=foobar
    headless"
  --title="CentOS Reinstall"

Assuming the new Grub entry is the first one (0), ask Grub to boot pick it next reboot:

1
echo "savedefault --stage2=/boot/grub/stage2 --default=0 --once" | grub --batch

Now reboot and be patient. It could take several minutes before the server is back up. Use your favorite VNC client to connect to the server:

1
vncviewer x.x.x.x:1

Check out this post about partitioning – maybe you agree with me, maybe you don’t.

Categories: Uncategorized Tags:

Avoiding non-64-bit packages on CentOS 64-bit install

June 9th, 2011 No comments

Unless you have a damn good reason for it, having binaries and libraries of a different architecture on your server isn’t such a hot idea. Some distros may handle it better than others, but I prefer to just avoid this situation all together by removing all “foreign” packages.

First of all, prevent yum from installing packages with the wrong architecture by adding this to /etc/yum.conf:

1
exclude=*.i386 *.i586 *.i686

.. then query the RPM database for packages and grep for i[3456]86:

1
2
rpm -qa --queryformat='%{n}-%{v}-%{r}.%{arch}\n' |
  grep '\.i[3456]86$' | sort

If this looks right – and you better check it twice – remove them by issuing this command:

1
2
3
rpm -qa --queryformat='%{n}-%{v}-%{r}.%{arch}\n' |
  grep '\.i[3456]86$' |
  xargs rpm -ev

Running the above commands on other architectures than x86_64 may yield interesting results.

Categories: Uncategorized Tags:

Reinstalling CentOS 5.6 remote

June 7th, 2011 No comments

Download images and add entry to Grub boot loader. Make sure you put in the right networking values:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
cd /boot
mkdir centos5-x86_64
cd centos5-x86_64
wget http://mirror.leaseweb.com/centos/5.6/os/x86_64/isolinux/initrd.img
wget http://mirror.leaseweb.com/centos/5.6/os/x86_64/isolinux/vmlinuz
/sbin/grubby
  --add-kernel /boot/centos5-x86_64/vmlinuz
  --initrd=/boot/centos5-x86_64/initrd.img
  --args="ip=x.x.x.x netmask=y.y.y.y gateway=z.z.z.z dns=n.n.n.n
    ksdevice=eth0
    method=http://mirror.leaseweb.com/centos/5.6/os/x86_64/
    lang=en_US
    keymap=us
    vnc
    vncpassword=foobar
    headless"
  --title="CentOS Reinstall"

Assuming the new Grub entry is the first one (0), ask Grub to boot pick it next reboot:

1
echo “savedefault --stage2=/boot/grub/stage2 --default=0 --once” | grub --batch

Now cross your fingers, pray to your preferred deity or lack thereof and reboot. If your karma is good, the server should come up in a few minutes. Now connect to it with the VNC client of your choice. Example:

1
vncviewer x.x.x.x:1

If you’re lucky, you should be presented with something along the lines of this:

Now it’s all up to you. Based on my experience, I recommend making good use of RAID and LVM and keep your /root and /home partitions separate, but it’s all up to you. Be careful though – once you’ve started messing with the partition table, your disk is wiped and there is no way back – you have to finish the installation before you can give the remote reinstall another go.

Fedora 14 and choppy Flash sound

March 17th, 2011 No comments

This bothered me like crazy, as I thought the problem was my setup or some bug in pulseaudio. Turns out a recent optimization in memcpy() and a bug in Adobe Flash means that audio in Flash 10 under Fedora 14 can give choppy/jerky sound. Apparently the only thing Adobe has to do, is change calls to memcpy() to memmove() instead, but Linux development seems to be moving at a non-existing pace at Adobe.

Ray Strode from Red Hat got sick of waiting and wrote a somewhat hacky script that will go through the Flash .so and replace calls to memcpy() with calls to memmove(). Get it here: memcpy-to-memmove.sh.

Categories: Uncategorized Tags: , ,