tensixtyone



Aug
18
Xen Stupidity

Last night I spent a few hours getting Liverpool LUG’s website on its own Xen VM, so hopefully we can provide some services to members, like webhosting and email aliases. This was my first venture into creating a Xen VM for myself, previously Chris has spent the time to set it up for me.

I’ll name this little adventure: Trip on the Fail Boat

Ok, so I was a little stupid. I didn’t read any existing documentation and bungled through it based on a few commands in the bash_history file. I know, stupid. For a while I hissed and cursed about incomplete setup which I thought debbootstrap would do, reading the documentation this morning has highlited how much of a monumental idiot I actually was. So now i’ll go through my idiotic bitching and explain why I was wrong…

1. 4Gb Fixup error messages
When I started up the VM I was assaulted by thousands of messages regarding a “4Gb memory fixup” or something to that nature. Of course, I was too busy trying to edit files in vi to actually look at the issue but was more than happy to shout and scream at my console formatting getting mixed up.

The fix? Install libc6-xen, or move /lib/tls to /lib/tls.disabled

2. Missing network config
The VM couldn’t see eth0, or lo for that matter. After hammering my head against the table checking the Xen config files I finally realised that updating /etc/network/inferfaces could help.

3. “Why is the hostname dom0?”
Stupidity ensues, thankfully I noticed before I issued the shutdown on dom0.

4. Services randomly failing to start up
Missing loopback network device, no actual 127.0.0.1. You would be suprised how much this can effect your system.

So for now, The VM is working. I’ll get round to posting some more details about LivLUG services soon, but for now i’m going to get some coffee…

filed under: linux, projects | comments (0) | read more...

Aug
7
Howto: Debian Lenny & Huawei E160G

So, in my last post I described how it was using the E160G with Debian. All in all it’s very good and i’ve not experienced any major issues, bar a few minor apt-get and NetworkManager issues. So, heres a quick rundown of how to get it on your machine.

So first, you need to get the hardware to work correctly under Debian. Plug in your E160G and check dmesg to see if the device recognises correctly. If you see ttyUSB0/ttyUSB1 appear you can skip this step.

First, you need to download USB_Modeswitch:

# wget http://www.draisberghof.de/usb_modeswitch/usb_modeswitch-0.9.4.tar.bz2
# tar jxvf usb_modeswitch-0.9.4.tar.bz2
# cd usb_modeswitch-0.9.4/
# ./compile.sh

Now you have the usb_modeswitch program, as this will be executed by udev it needs to be in a sensible location, personally i’d copy it to /usr/local/sbin/

# cp usb_modeswitch /usr/local/sbin/

Also, you need to grab the latest config file from the usb_modeswitch website and put it into /etc

# wget http://www.draisberghof.de/usb_modeswitch/usb_modeswitch.conf
# sudo mv usb_modeswitch.conf /etc/

Now, by default the config file comes with the section commented out, so edit the file and uncomment the section for the E220 (which is essentially the same device).

# sudo $EDITOR /etc/usb_modeswitch.conf

One last step, you need to add a small configuration file to udev to detect the E160G and run usb_modeswitch, put this file in you /etc/udev/rules.d/ folder:

SUBSYSTEM=="usb", SYSFS{idProduct}=="1003", SYSFS{idVendor}=="12d1", RUN+="/usr/local/sbin/usb_modeswitch"

Restart udev, and plug in your E160G…

sudo /etc/init.d/udev restart

and you should see something similar to:

[   16.085904] usb 5-3: GSM modem (1-port) converter now attached to ttyUSB0
[   16.086033] usb 5-3: GSM modem (1-port) converter now attached to ttyUSB1

So, the device is detected and you have your USB ports, first a quick overview. The E160G shows two serial ports, one is a data port, the other is for control signals. NetworkManager only makes use of one of these ports but the Vodafone Connection Manager uses both. Now you have a choice, install Network Manager 0.7 to gain native GPRS/UMTS data support or use another package. I went for Network Manager, while it’s still in beta and i’ve had a few run-ins in the past with it I decided to give it a go.

So, it was a simple case of adding the 0.7 repositories to /etc/apt/sources.list, updating, then installing the needed packages.

# echo "deb http://debs.michaelbiebl.de/ unstable main" >> /etc/apt/sources.list
# apt-get update
# apt-get -t unstable install network-manager

You might need to remove any old Network Manager packages before you do this, as network-manager-openvpn collides with the new package.

Hopefully thats give you the overview you needed, and you should be up and running!

filed under: linux, projects | comments (0) | read more...

May
28
Open Source City

Peter pointed out on the ManLUG mailing list that Liverpool will play host to a “micro-festival” on open source software in media production. The Open Source City festival is running from the 17th – 22nd of June at Mello Mello and various other sites across the city centre. This event has twigged interest from me due to the presentation on open source software from a speaker on IP from the Green Party, i’ve always known that the greens are very pro-open source but i’ve never heard it “from the horses mouth”.

So, my name is down and it’s booked into my calendar. Drop me a message if your also visiting.

filed under: home, linux, technology | comments (0) | read more...

Mar
31
Input based EeePC ACPI module

The eee-acpi module, hacked by Asus from the asus-laptop module, currently manages the kill switches for the various extra hardware (wifi, cardreader, webcam) and also handles the extra Fn keys via ACPI events.

While hotkeys via ACPI are well supported by acpid and its ilk it is no longer the best way to handle these types of keys. Generally, the drivers for the mainstream laptops (ibm/lenovo, hp) have moved over to the input framework to communicate these key presses, usually displaying as an extra input device under /dev/input. These input devices can be handled by HAL and notifications of key presses send over the dbus allowing for desktop environments such as GNOME to handle these events without any strange hackery and fakekeys calls.

Thanks to the previous work of the asus-laptop developers there’s a patch that exists to disable the existing ACPI events and provide a input device for the extra keys, I’ve managed to hack together a version of the eeepc-acpi module using the Debian 1.01 source to export the “Asus Extra Buttons” input device.

After you have the inputs available, it’s a simple matter of producing a FDI for HAL to identify the device and map the scan codes to the actual keys. After the initial FDI was created I could use the volume keys without any extra software and also map the two application buttons (marked as VGA switch, and AP button) in GNOME to call scripts. The wifi key (Fn+F2) presented more of a problem, while it was mapped to “wifi” HAL didn’t know how to actually switch off the Atheros card. The killswitch for the card would need to be implemented as a program that listens to dbus, something a little outside my skill set.

The other buttons on the keyboard (sleep, brightness) are pure ACPI calls. This presents a problem that the keys produce events via the input layer and the ACPI layer at the same time, so for example you hit the brightness down button and HAL will pickup the notification and display the brightness OSD, but it quickly goes out of sync as what HAL sees and what the ACPI are doing are completely separate. Again, this is outside my skill set but I’d probably approach it by filtering out the keys in the kernel and let the ACPI events do their work.

The guys over at Fedora have a similar idea of moving over to an input based module, but for the moment no source has been produced. Due to the numerous little issues I’ve had I’ve decided to put this little project on the back-burner until I see what the Fedora people have produced, after all they’ll have people that are more experienced in this type of thing, whereas I am not.

I’ll get round to posting the source deb for the modified eee-acpi tonight or tomorrow.

filed under: home, linux, projects | comments (0) | read more...

Mar
27
EeePC, Suspending, and Debian Lenny

After initally setting up my EeePC to run Debian Lenny I quickly encountered a issue were the madwifi drivers wouldn’t resume correctly. The card would be unable to operate as it has lost sync with the kernel drivers, removing and reloading the related modules solved the issue.

Some people on the EeeUser forums ripped out the existing script from the default Xandros install, a simple acpi script that jumped through some hoops to disable the modules and clear everything down. The script worked as part of the existing acpi-support package and worked when using the acpi suspend options, now i’ve got GNOME and HAL installed it turns out these are no longer used, therefore still causing the issue.

After a little research it seems that the suspend support within Debian is currently in a state of flux, and a few bug tickets have been raised about the various issues. This provided my first hint of how to resolve it, a quick script in pm-utils, much like the acpi one, will fix this for good.

Simply, place this script into your /usr/lib/pm-utils/sleep.d/ folder, I’ve got it as 45eee-wifi that way if the script fails for some reason at least your video will be resumed.

#!/bin/bash

PWR=$(cat /proc/acpi/asus/wlan)

load_modules() {
   modprobe ath_pci
   modprobe wlan_wep
   modprobe wlan_tkip
   modprobe wlan_ccmp
}

unload_modules() {
   rmmod ath_pci
   rmmod wlan_scan_sta
   rmmod wlan_tkip
   rmmod wlan_wep
   rmmod wlan_ccmp
   rmmod ath_rate_sample
   rmmod wlan_acl
   rmmod wlan
   rmmod ath_hal
}

wifi_on() {

   if [ "$PWR" = "0" ]; then
      modprobe pciehp pciehp_force=1
      sleep 3
      echo 1 > /proc/acpi/asus/wlan
      sleep 2
      load_modules
      sleep 1
   fi
}

wifi_off() {
   if [ "$PWR" = "1" ]; then
      unload_modules

      echo 0 > /proc/acpi/asus/wlan
      sleep 1
      rmmod pciehp
      rmmod pci_hotplug
   fi
}

case "$1" in
        hibernate|suspend)
                wifi_off
                ;;
        thaw|resume)
                wifi_on
                ;;
        *)
                ;;
esac

The scripts in the “Arch acpi-eee” package provided the basis for this script, and it also works alot better than the existing scripts provided on eeeuser.com.

filed under: home, linux | comments (0) | read more...

Dec
31
Local LUGs

As part of a new year resolution (of a sort), I’ve decided to become more involved in the Linux community and one of the big stepping stones is the local LUGs. While ManLUG is active and quite easy to attend and keep up to speed with, some of the smaller local ones have fell into decline over the last few years. I guess a major issue is that we have such a well respected LUG within a few miles, Manchester LUG has been formed since 1994 and theres people in that group who have helped with major milestones in Linux (such as the MCC Interim releases). So today, I posted on the Liverpool LUG mailing list in a attempt to stirr up some action. Hopefully in the next few days we can get something organised, even if its just a pub meet it’ll be better than nothing.

filed under: home, linux | comments (0) | read more...

Sep
28
MythTV Channel Icons

I hate adding channel icons, in MythTV is one of my pet peeves. Since the last time I rescanned it has improved a little and the uk_rt XMLTV grabber now offers up lyngsat logos for the channels Radio Times cover.

Knowing of the impending doom, this time I tried to avoid it. I’ve now created a PHP script which will look through a data file, download the channel icons to the required path, and spit out a SQL script. At the moment it is very simple in that it doesn’t connect to MythTV and check what channels you have, it just blanket downloads all that it knows about.

I’ll get round to posting it in the next few days.

filed under: home, linux | comments (3) | read more...

Jul
17
Is Windows insecure?

In the past I’ve mentioned about how insecure Windows is, generally I try and avoid it for any end users wherever possible. Today I spotted a article on Digg regarding the new Samsung printer drivers, and its got me wondering now, is it actually Windows that’s insecure or the developers who can’t be bothered developing correctly for the platform?

Usually, vendor provided drivers for Linux aren’t the best, and are only used in dire circumstances that a free driver hasn’t been wrote, Samsung’s April 2007 now contain a disturbing “setup” script that essentially gives setuid privileges to XSANE, OpenOffice and possibly a few other applications.

Take a look a this script on linuxfr.org

Without seeing the suwrap script I can’t be sure what it’s actually doing, but I assume its modifying the lib path with the specific Samsung drivers, the initial setup script is just punching massive holes in the security of linux, users would be able to edit /etc/passwd or /etc/shadow with these permissions.

So, are all Windows issues down to the OS?

filed under: home, linux, soapbox | comments (0) | read more...

Jul
12
CUPS "bought"

I just spotted a post by Nik Butler on Pownce saying that CUPS (a widely used printing system for *BSD, Linux and OSX) has been bought by Apple, no licenses will be affected and it’ll remain GPL2, but for how long?

I wonder how exactly Apple can buy this project, It seems that the Dev has been hired by Apple and he’s handed over the rights to Apple. So with Apple at the helm what can we expect? Personally, while i’m not anti-apple, I do feel that theres something to worry about here. With Apple being in control of the copyright it may be relicensed under the Apple opensource license or worse, close sourced.

filed under: home, linux, soapbox | comments (1) | read more...

Jul
5
MythTV archiving and transcoding

I’ve been running my MythTV box for a few weeks now and its slowly getting bogged down with numerous recordings that I want to keep, Non auto-expiring recordings are taking over the majority of my hard drive and I need to setup a system of getting them off the box and onto DVD.

MythArchive, i hear you scream, unfortunatly i’ve not got a DVD-R drive in the Myth box. So which method to use? MythTranscode or Nuvexport? My previous experiments with Nuvexport have outputted low quality rubbish no matter what settings i’ve been using, I must be doing something wrong. MythTranscode on the other hand seems to convert my DVB Mpeg2 recordings to Nuv format with little size difference.

I’ve hunted around previously for settings and processes but got nowhere, can anyone advise me on their setup or point me the in the right direction? All my recordings are from pure DVB sources so i’m working with MPEG2 files.

filed under: home, linux, projects | comments (2) | read more...

« Older Entries
© 2008 tensixtyone | Theme by DemusDesign and Theme Lab | Powered by WordPress