An App Store for everyone?
Posted by elbryan
This post offers my humble opinion so take it as a reflection on how the applications world is changing around us.
Posted in Apple | no comments |
Set up a new kernel: few hints
Posted by elbryan
There are few things that join various distros. One of such things is the kernel.
At first, configuring it, could be a very stressful task so here are a couple of suggestions:
- There's a website that can help you so damn much to find which modules are needed by your kernel in order to work. This website refers to Debian but you can completely ignore that. Just put into it an lspci -n and go check your kernel configuration.
- You can often use an already working kernel in order to understand what's important and what is not. Distros prepare kernels in order to have almost everything compiled as module. These modules are going to be automagically loaded by the kernel when the relative device is found, but most of those kernel modules are useless for your system. In order to see which modules are currently loaded on your system, you can issue lsmod but this command doesn't provide very much per-device informations. lspci provides a nice switch (-v) that shows what's the module that manages that device.
- In the newest kernel (>=2.6.32), developers have add a new make build target called localmodconfig that performs the task mentioned above, and adds automatically the needed parameters to the kernel configuration. In you want more information about this, I suggest you to take a look to the kernelnewbies site where you can find very cool information around kernel world.
Posted in Kernel | no comments |
Xen & PCI Passthrough
Posted by elbryan
Yesterday we have made the tree. Don't know what's the correct translation of that but, I mean, we have decorated the tree. You know.. when you put some fancy balls on a tree to celebrate Christmas properly.. Well, during this task I've discovered that I am not using my Wireless Phones so much so I was wondering about a way to make use of them.
So came to my mind brilliant idea to try to connect those phones to my XEN home-server. I rebooted the machine, enabled integrated audio in the BIOS and I started looking for a solution to pass the relative PCI audio controller to my virtual machine "aquaria" that is the one devoted to such a task.
By "Googleing" around I've found very few sparse information so I decided to blog about this, since I think PCI passthrough is a XEN point of strength.
PCI passthrough means the ability to literally pass a PCI peripheral to a domU domain in order to gave it the full control of that peripheral.
There are two ways to achieve this: using pciback or pcistub.
I'm going to consider only pciback in my post because I think it's the most elegant solution.
In order to make your dom0 providing such a feature you'll need CONFIG_XEN_PCIDEV_BACKEND=y in your dom0 kernel configuration. In order to make your domU acknowledging such device you'll need CONFIG_XEN_PCIDEV_FRONTEND=y in your domU kernel configuration. Please, double check your configuration. As far as I know, CONFIG_XEN_PCIDEV_FRONTEND, is available only in xen-patched kernel (so you won't find such parameter in your vanilla kernel). I think this is a huge limitation since I hadn't ever installed a xen-patched-domU kernel since yesterday. I hope someday it's going to be merged in mainline.
However this isn't enough to get your XEN environment working properly. To allow dom0 passing the PCI device you should collect its address:
$ lspci | grep Audio00:1b.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01)
$ lspci -n | grep 00\:1b\.000:1b.0 0403: 8086:27d8 (rev 01)
Once you gathered those informations, you have to edit /boot/grub/grub.conf file in order to tell dom0 to use pciback to handle that PCI controller:
root (hd0,1) kernel /boot/xen.gz module /boot/vmlinuz root=/dev/sda2 pciback.permissive pciback.hide=(00:1b.0)
The next step is to properly configure your domU so, open its configuration file and add
pci = [ '00:1b.0' ]
Theorically this should be enough to make your domU working properly.
This is my dom0 dmesg after being restarted:
pciback 0000:00:1b.0: seizing device pciback 0000:00:1b.0: PCI INT A -> GSI 22 (level, low) -> IRQ 22 pciback 0000:00:1b.0: PCI INT A disabled pciback: vpci: 0000:00:1b.0: assign to virtual slot 0
And these are my domU dmesg and lspci:
pcifront pci-0: Installing PCI frontend pcifront pci-0: Creating PCI Frontend Bus 0000:00
$ lspci -v00:00.0 Audio device: Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller (rev 01) Subsystem: Intel Corporation Device d604 Flags: bus master, fast devsel, latency 0, IRQ 22 Memory at 882a0000 (64-bit, non-prefetchable) [size=16K] Capabilities: [50] Power Management version 2 Capabilities: [60] Message Signalled Interrupts: Mask- 64bit+ Count=1/1 Enable- Capabilities: [70] Express Root Complex Integrated Endpoint, MSI 00 Kernel driver in use: HDA Intel
I hope this walkthrough has been useful to you. If someone more experienced than me in these things would contact me to fix some mistakes, I'd be glad to hear him/her out :)
Posted in Xen | no comments |
Deluge 1.1.9 and zlib crash
Posted by elbryan
Today I've rebooted my home-server and I discovered that deluged crashed at boot.
[ERROR ] 11:43:01 main:207 can't decompress data; zlib not available Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/deluge/main.py", line 204, in start_daemon Daemon(options, args) File "/usr/lib/python2.6/site-packages/deluge/core/daemon.py", line 56, in __init__ self.core = Core(options.port).run() File "/usr/lib/python2.6/site-packages/deluge/core/core.py", line 239, in run component.start() File "/usr/lib/python2.6/site-packages/deluge/component.py", line 198, in start _ComponentRegistry.start() File "/usr/lib/python2.6/site-packages/deluge/component.py", line 118, in start self.start_component(component) File "/usr/lib/python2.6/site-packages/deluge/component.py", line 125, in start_component self.start_component(depend) File "/usr/lib/python2.6/site-packages/deluge/component.py", line 125, in start_component self.start_component(depend) File "/usr/lib/python2.6/site-packages/deluge/component.py", line 130, in start_component self.components[name].start() File "/usr/lib/python2.6/site-packages/deluge/core/pluginmanager.py", line 69, in start self.enable_plugins() File "/usr/lib/python2.6/site-packages/deluge/pluginmanagerbase.py", line 84, in enable_plugins self.enable_plugin(name) File "/usr/lib/python2.6/site-packages/deluge/pluginmanagerbase.py", line 126, in enable_plugin egg.activate() File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2149, in activate self.insert_on(path) File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2252, in insert_on self.check_version_conflict() File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2291, in check_version_conflict for modname in self._get_metadata('top_level.txt'): File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2143, in _get_metadata for line in self.get_metadata_lines(name): File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1144, in get_metadata_lines return yield_lines(self.get_metadata(name)) File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1136, in get_metadata return self._get(self._fn(self.egg_info,name)) File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1201, in _get return self.loader.get_data(path) ZipImportError: can't decompress data; zlib not available Exception in thread Thread-1 (most likely raised during interpreter shutdown): Traceback (most recent call last): File "/usr/lib/python2.6/threading.py", line 525, in __bootstrap_inner File "/usr/lib/python2.6/site-packages/deluge/core/preferencesmanager.py", line 451, in run File "/usr/lib/python2.6/urllib.py", line 1228, in quote_plus File "/usr/lib/python2.6/urllib.py", line 1217, in quote <type 'exceptions.TypeError'>: 'NoneType' object is not callable Unhandled exception in thread started by Error in sys.excepthook:
There's an easy workaround to solve this issue, that consists in editing /usr/bin/deluged as follows:
--- deluged.old 2009-12-04 12:44:38.000000000 +0100+++ /usr/bin/deluged 2009-12-04 12:00:52.000000000 +0100@@ -2,6 +2,7 @@# EASY-INSTALL-ENTRY-SCRIPT: 'deluge==1.1.9','console_scripts','deluged' __requires__ = 'deluge==1.1.9' import sys+import zlibfrom pkg_resources import load_entry_point sys.exit(
I asked the guys upstream and I've been told that it's currently already fixed in the new 1.2.0 rc4. Since this problem seems not to be reproducible on every system, this is still a dirty (working) fix.
Posted in Linux, Apps | no comments |