Updates from May, 2012 Toggle Comment Threads | Keyboard Shortcuts

  • MD1032 4:31 pm on May 14, 2012 Permalink  

    Script to convert a SYMPA mail archive to mbox format (sympa2mbox) 

    Export the mail archive using the SYMPA web interface, extract the zipfile and run the following script over the mail directory. You need to have “formail” installed.

    #!/bin/bash
     
    # This scripts takes a sympa email archive and converts it into a
    # single mbox file
     
    path="$1"
    dest="$2"
     
    function die()
    {
    	echo "$1"
    	exit
    }
     
    # ensure arguments are passed
    [ -z "$path" ] && die "Pass archive directory as first argument."
    [ -z "$dest" ] && die "Pass destination mbox file name as second argument."
     
    # sanity checking
    [ ! -d "$path" ] && die "Can't find '$path'"
    touch "$dest" || die "Can't write to '$dest'"
     
    # we rely on directories being name in alpha order oldest -> newest 
    for dir in $(ls "$path"); do
    	if [ -d "$path/$dir" ]; then
    		echo -n "Working on $path/$dir..."
    		files=$(ls "$path/$dir" | sort -n)
    		for file in $files; do
    			formail -ds < $path/$dir/$file >> $dest
    		done
    		echo "done"
    	fi
    done
     
  • MD1032 3:40 pm on May 4, 2012 Permalink  

    Remove failing VMs in OpenStack 

    Occasionally OpenStack VMs fail to spawn or fail to terminate and cannot be removed from the VM list. Deleting the VM using the command line or web interface has no effect, they are stuck in the “spawning” or “deleting” state. To get rid of these zombie entries I remove them from the database using the following bash script (pass the machine UUID as parameter):


    #!/bin/bash
    mysql -uroot -ppassword << EOF
    use nova;
    DELETE a FROM nova.security_group_instance_association AS a INNER JOIN nova.instances AS b ON a.instance_id=b.id where b.uuid='$1';
    DELETE FROM nova.instance_info_caches WHERE instance_id='$1';
    DELETE FROM nova.instances WHERE uuid='$1';
    EOF

     
    • jhalter 3:16 pm on May 13, 2012 Permalink

      Thanks, this saved me a lot of time!

    • askstack 6:41 am on May 16, 2012 Permalink

      thanks! I spend at least 4 hours on this problem.

    • davidpc 12:39 am on May 23, 2012 Permalink

      thanks for sharing!

    • love_essex 1:05 pm on October 25, 2012 Permalink

      thanks a lot

    • jeff 2:13 pm on October 26, 2012 Permalink

      thank you!

    • Max 11:10 pm on November 8, 2012 Permalink

      Thank you very much! Helped a lot

  • MD1032 6:20 pm on March 31, 2012 Permalink  

    Force library refresh on Nook Simple Touch 

    If you have rooted a Nook Simple Touch e.g. using http://forum.xda-developers.com/showthread.php?t=1343143, you may want to run some scripts to download some books directly onto your device. The problem is that these books you saved to /media or /sdcard only show up in the library after you reboot the Nook.

    To force a library refresh, create a script containing the line

    busybox killall vold

    of course you need to have busybox installed through Google Play and you have to run this script with root permissions.

     
  • MD1032 5:56 pm on November 21, 2011 Permalink  

    How I built my custom Mac 

    Here’s a list of the parts:

    Intel Core i7 2600K $335.00
    Corsair Vengeance CMZ16GX3M4A1600C9B 16GB (4x4GB) DDR3 $149.00
    Antec Sonata IV with 620W $187.00
    Crucial M4 SSD 256GB $439.00
    LG CH12LS28 12X BD-R Blu-ray DVD Combo Drive $69.00
    Arctic Cooling Freezer 13 Pro CO CPU Cooler $59.00
    Gigabyte GA-Z68MX-UD2H-B3 Motherboard $165.00

    First I had to update the BIOS to F12 and configure a few settings:

    • enable HPET in 64bit mode
    • Set all SATA controllers to AHCI
    • give 64MB of memory to the integrated graphics
    • turn off the SATA RAID BIOS
    I then prepared a UniBeast stick on my other Mac, according to the instructions here. I followed the guide but could not get to the Lion installer. After fiddling around with a few parameters I realised that passing PCIRootUID=1 on the UniBeast loader did the trick. After partitioning and formatting the SSD I was able to install Lion and boot it through the USB stick.
    I then installed Multibeast with the DSDT for my mainboard. After rebooting Lion got stuck on the white apple screen. To go ahead I passed GraphicsEnabler=false to the boot loader and got into Lion at a low resolution. System Info reports that the machine is a Mac Pro, and that was the problem since the Mac Pro doesn’t have an Intel HD 3000 graphics card. So I ran Multibeast again and installed the Mac Mini System Definition. I had to add it to my /Extra/org.chameleon.Boot.plist:

     

    < ?xml version="1.0" encoding="UTF-8"?>
    < !DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    	<key>GraphicsEnabler</key>
    	<string>Yes</string>
            <key>Timeout</key>
            <string>2</string>
            <key>Legacy Logo</key>
            <string>Yes</string>
    	<key>SMBIOS</key>
    	<string>/Extra/smbios.plist</string>
    	<key>EthernetBuiltIn</key>
    	<string>y</string>
    </dict>
    </plist>

    After a reboot I got it running in full resolution. What was still missing is the USB3 driver and the Lnx2Mac RTL81xx driver from MultiBeast, which installed with no problems. Everything is working now, even the sound and the USB Bluetooth stick. It’s a rock stable system overclocked to 4GHz and I have never seen a faster Mac. And it is silent, too. CPU core temperature never goes over 60 degrees, even overclocked & under full load.

     
  • MD1032 6:21 pm on November 11, 2011 Permalink  

    Mounting Drobo b800i on Linux using iSCSI 

    iSCSI support in the new Drobo is a really neat feature. Here’s how to mount the Drobo as a block device in Linux:

    • install some hard disks and connect the Drobo via USB cable to a Windows or Mac computer
    • open the Drobo Dashboard and create a volume. I recommend to set it to 16TB size, no matter how many disks you actually have installed. This allows you to grow the filesystem later when you add more disks.
    • give the Drobo a static IP address on the iSCSI1 interface and connect it via Ethernet cable to your Linux machine (directly or using a gigabit switch)
    • unplug the USB cable
    • in Linux you need to install the iSCSI daemon. On Ubuntu just become root and run apt-get install open-iscsi
    • make sure your Ethernet card is configured to be on the same network as the Drobo
    • run iscsiadm -m discovery  --type sendtargets --portal 169.254.2.0 where the IP address is your Drobo iSCSI1 IP address
    • you should now see your volumes listed, like 169.254.2.0:3260,0 iqn.2005-06.com.drobo:b800i.tdb1119b0269.id1
    • connect to your id1 volume by running iscsiadm -m node --targetname iqn.2005-06.com.drobo:b800i.tdb1119b0269.id1 --portal 169.254.2.0 --login
    • run dmesg | tail to see whether the block device was detected by the Linux kernel
    • run parted /dev/sdb to partition your device. Use mklabel to create a GUID partition table (GPT). Then use mkpart to create a partition. Drobo apparently does not support ext4, but ext3 works fine for me.
    • the block device will appear to be of size 16TB. However your actual useable space depends on the number and size of the disks you are using and the amount of redundancy you selected. Make sure that the partition you create is smaller than the actually available space. You can calculate the capacity of your Drobo here. Leave the rest of the 16TB disk as free space.
    • exit parted and format the disk using mkfs.ext3 /dev/sdb1
    • mount /dev/sdb1 and enjoy blazing fast storage
    • for automatic iSCSI target login on boot, run iscsiadm -m node -T iqn.2005-06.com.drobo:b800i.tdb1119b0269.id1 -p 169.254.2.0 --op update -n node.startup -v automatic
    • If the target login fails, it helped me once to disconnect the USB cable
    • If the Drobo volume should mount on boot, add an entry to the /etc/fstab with options auto,_netdev
     
    • Keith Bradnam 1:50 pm on September 13, 2012 Permalink

      Is everything still working with you b800i? Can I ask how far apart your Drobo and server are, i.e. are they on the same local network or separated by various networks?

    • Christoph 3:59 pm on September 14, 2012 Permalink

      Yes it’s working on a local network, haven’t tested it across subnets

  • MD1032 4:59 pm on October 15, 2011 Permalink  

    XBMC & Lirc & Ubuntu 11.10 oneiric 

    After upgrading to Ubuntu 11.10, my MCE remote stopped working in XBMC. Since XBMC did not get an update (it’s coming from a separate PPA), I assume the LIRC button naming for the “mceusb” driver has changed in the new lirc package. It doesn’t match the “mceusb” section in XBMC’s Lircmap.xml anymore.

    What I had to do to get my MCE remote working again in XBMC was to create a new file ~/.xbmc/userdata/Lircmap.xml and insert the remote button codes that I gathered from running “irw” and pressing the buttons. Make sure that the “lirc” package is installed and choose the “Windows Media Center Remote” when it asks you for the type of remote you have.

    This is mostly the default mapping, with a few customisations for my personal preferences. Note that this is for the “mceusb” driver, if you use a different driver, you have to change the “<remote device=”mceusb”>” line and gather the correct codes from “irw”.

    <lircmap>
    	<remote device="mceusb">
    		<left>KEY_LEFT</left>
    		<right>KEY_RIGHT</right>
    		<up>KEY_UP</up>
    		<down>KEY_DOWN</down>
    		<select>KEY_OK</select>
    		<start>KEY_HOME</start>
    		<back>KEY_BACK</back>
    		<record>KEY_RECORD</record>
    		<play>KEY_PLAY</play>
    		<pause>KEY_PAUSE</pause>
    		<stop>KEY_STOP</stop>
    		<forward>KEY_FORWARD</forward>
    		<reverse>KEY_REWIND</reverse>
    		<volumeplus>KEY_VOLUMEUP</volumeplus>
    		<volumeminus>KEY_VOLUMEDOWN</volumeminus>
    		<pageplus>KEY_CHANNELUP</pageplus>
    		<pageminus>KEY_CHANNELDOWN</pageminus>
    		<skipplus>KEY_NEXT</skipplus>
    		<skipminus>KEY_AGAIN</skipminus>
    		<subtitle>Teletext</subtitle>
    		<mute>KEY_MUTE</mute>
    		<power>KEY_POWER</power>
    		<myvideo>KEY_VIDEO</myvideo>
    		<mymusic>KEY_AUDIO</mymusic>
    		<mypictures>Pictures</mypictures>
    		<mytv>LiveTV</mytv>
    		<one>KEY_1</one>
    		<two>KEY_2</two>
    		<three>KEY_3</three>
    		<four>KEY_4</four>
    		<five>KEY_5</five>
    		<six>KEY_6</six>
    		<seven>KEY_7</seven>
    		<eight>KEY_8</eight>
    		<nine>KEY_9</nine>
    		<zero>KEY_0</zero>
    		<red>KEY_RED</red>
    		<green>KEY_GREEN</green>
    		<yellow>KEY_YELLOW</yellow>
    		<blue>KEY_BLUE</blue>
    		<select>Aspect</select>
    		<info>More</info>
    		<title>Guide</title>
    		<menu>KEY_DVD</menu>
    		<clear>KEY_CLEAR</clear>
    		<enter>KEY_ENTER</enter>
    	</remote>
    </lircmap>

    The above file maps the buttons on the remote to XBMC button names. If also want to change the mapping of XBMC buttons to XBMC functions, you need to create another file, e.g. ~/.xbmc/userdata/keymaps/remote.xml . I like to use the “play” button to display a context menu on the selection screens and codec statistics during playback. The following file overrides the default XBMC mapping to enable this:

    <keymap>
      <global>
        <remote>
          <play>ContextMenu</play>
        </remote>
      </global>
      <fullscreenvideo>
        <remote>
          <play>CodecInfo</play>
        </remote>
      </fullscreenvideo>
    </keymap>
     
    • Logan 4:18 am on October 16, 2011 Permalink

      Thanks for posting that. It’s just what I needed. I’d narrowed it down to lirc but had no idea how to revert back to an old version or fix this one. Appreciate folks like you who post helpful things for the benefit of others.

    • dash 9:56 am on October 16, 2011 Permalink

      Thanks a lot !, that’s exactly what I needed to make my remote work again with XBMC .

    • Richard 6:44 am on October 21, 2011 Permalink

      Thanks a lot! That worked for me!
      Just made a minimal install of Ubuntu 11.10 with XBMC Nightly and the only thing that didn’t work until now was my mce remote.

      Keep posting stuff like this….. kept my out of the dark cold late nights searching the web 😉

    • Roberto 2:17 am on October 22, 2011 Permalink

      Thanks. This works for everything lirc. From Rhythmbox to mplayer and pulseaudio.

    • Vincent 9:29 pm on October 24, 2011 Permalink

      Thanks too, Works perfectly now on 11.10

    • fr0sty 1:44 am on November 18, 2011 Permalink

      This fixed it for me, but now i seem to have double keypresses in XBMC. IRW gives me double keypresses, for example when going through the menu in XBMC it moves 2 options instead of 1

    • Mark Anderson 2:19 am on November 28, 2011 Permalink

      Thank you so much!!! I thought I broke my lirc with 11.10 update, only to find it did the exact same thing with a fresh install. With these instructions, I had my HTPC working in no time.

    • Elliot Nathanson 7:25 am on January 9, 2012 Permalink

      Yes – thank you! Lirc also broke with my 11.10 update.

    • Daniel D 8:47 am on April 21, 2012 Permalink

      I have a Rosewill RRC-126 and i wasn’t sure how to map it fully in XBMC thank you so much all buttons work how i want now!

  • MD1032 11:32 am on September 23, 2011 Permalink  

    Openfire & Ubuntu & more than 1000 XMPP users 

    Openfire on Ubuntu may get into a state where it doesn’t accept incoming connections anymore. The process is still there, the log files do not give any hints, but new XMPP clients just hang at the connection attempt.

    The reason for this behaviour may be a limit on a user’s maximum number of file descriptors. On Ubuntu, it defaults to 1024 (check with ulimit -n). To lift this limit, edit /etc/security/limits.conf and add the lines:

    root		soft	nofile		100000
    root        	hard    nofile          100000

    to raise the limit to 100K file descriptors and restart openfire. Since you are running the openfire init script as root, the limits need to be applied to root. Even though the process is started as user openfire, the ulimit from the parent process (run as root) seems to get inherited.

    Update: This does not work when openfire is started at boot through an init.d script. The limits.conf is only applied by a PAM module at login. Modify the init script to include “ulimit -n 100000”. This does not need limits.conf since the init scripts are run as root.

     
  • MD1032 10:57 pm on September 17, 2011 Permalink  

    XBMC and Radeon: scrambled desktop on exit 

    When quitting XBMC or when switching from full screen to windowed mode, the desktop becomes scrambled and unusable. This happens on Ubuntu 11.04 with the fglrx drivers for Radeon cards. The fix is to turn off  the “tear-free” feature in the Catalyst control panel.

     
  • MD1032 2:26 pm on August 5, 2011 Permalink  

    Linux on ALDI / Medion LT 9888 

    The Medion LT 9888 laptop was sold at ALDI Germany in 1998. I’ve been using it as a Linux Server for more than 10 continous years now and it just refuses to die. In order to boot Linux on it, I’m using the following kernel command line options:

    vga=0x305 pci=irqmask=0x8fff

     
  • MD1032 12:21 pm on July 7, 2011 Permalink  

    T-Mobile USA Prepaid & iPhone & unlimited data for $1.49/day 

    Since the folks in the T-Mobile store were clueless, I had to figure out myself how to get mobile internet on my iPhone using a T-Mobile prepaid SIM (or pay-as-you-go, as they call it here).

    • Ensure your iPhone is not locked to a provider
    • Buy a $10 T-Mobile pay as you go SIM. I could only find them at T-Mobile shops, Radioshack and CVS didn’t have them. It comes with around $3 worth of credit. You need to top it up with at least another $10 in store, so the total cost of the SIM will be at least $20 plus tax.
    • Have the store clerk use a SIM stapler to convert your SIM card into a microSIM (in case you use iPhone 4 or iPad)
    • If they don’t have a SIM stapler, just use scissors to cut it into shape
    • Insert the SIM into your iPhone and enter Settings – General – Network. Disable 3G to save battery power, since T-Mobile will only allow your iPhone on their 2G EDGE network. Cellular Data needs to be on, Data Roaming should be off (even though the store clerk insisted it needs to be on).
    • In the Cellular Data Network menu, Reset Settings at the bottom. Then enter the “epc.tmobile.com” into the APN field on the top
    • You should see the EDGE “E” or a circle “o” on the top left next to the word “T-Mobile”. If you don’t see it, enable and disable airplane mode, or reboot the phone.
    • Open Safari and go to “m.web2go.com”, then choose “My Account”
    • Subscribe to the daily web pass for $1.49 per 24h
    Update: The Web Pass has been discontinued. There is now a daily plan for unlimited talk, text and 2G web browsing for $2 per day. It’s an ongoing subscription but can be canceled on a daily basis.
     
    • LK 2:25 am on July 23, 2011 Permalink

      I recently got an unlocked iPhone 4. I had been using AT&T plan but I am no longer interested in using them if I can get a cheaper plan from T-Mobile. 3G is not a big concern for me since I will be mostly on WIFI connection anyway.

      I’ve never used T-Mobile / Prepaid service before, so if you can explain a bit about this, I would be greatly appreciated.

      Specifically, I’d like to know if I can get cheap talk / text as well on top to this 1.49/day DATA plan.

      Thanks in advance and feel free to contact me through the email.

c
Compose new post
j
Next post/Next comment
k
Previous post/Previous comment
r
Reply
e
Edit
o
Show/Hide comments
t
Go to top
l
Go to login
h
Show/Hide help
shift + esc
Cancel