Category: Machine

Technology stream. IT and other technical aritcles.

  • Broken rpmdb strikes again

    After my EeePC 901 decided to take a nap during software upgrade via:

    # yum update

    I ended up dealing with broken dependencies and such even after running things like

    # yum-complete-transaction

    So after some digging turns out I’ve got double entries for many packages having their pre-update and post-update versions seemingly installed at the same time. Looks like solution was pretty simple:

    # yum install yum-utils

    # package-cleanup –cleandupes

     

  • Eclipse, EGit, GitHub and headaches…

    I have been using Eclipse as my Python Development Environment ever since KDevelop folks decided to abandon Python platform (which is a pitty – I liked KDevelop featureset better than PyDev in Eclipse). Anyway I’ve got multiple projects on-the-go and going through the hassle of setting up SourceForge accounts for them is not something I look forward to (especially that those are small projects). So I decided to take the plunge and explore GitHub.

    Now creating the account on GitHub was fairly straight-forward and I also created/imported my SSH key along the way. However making Eclipse to talk to it was one heck of a hassle. I started off following Lars Vogel’s tutorial (really you need to read all of it including GitHub section) however I couldn’t “push” back my changes to GitHub getting “Authentication error” messages. That wasn’t what I have expected so I read through GitHub tutorial, did the “manual” set up of git repo from command line (successfully), yet after removing and re-adding project to Eclipse from scratch yielded no positive results. That’s when I got to EGit Wiki and realized that since I’ve got “custom” key created for the development purposes I have to add it to the list of keys Eclipse is aware of. So, under “Window” > “Preferences” > “General” > “Network Connections” > “SSH2” I have added my key and… oh miracle! I’ve got the prompt for my password. From that point on it looks like GitHub is functioning for me, now I have to figure out how to properly use Git 🙂

  • Headphones, what could be simpler?

    Intrigued by Ten… noise-cancelling headphones I spent all of last night combing through the internet looking for the headphones for our family. Lots of things surprised me, like open vs closed design etc. Now that I am (marginally) smarter here are the choices that seem to fit the bill (and knock you dead with the price tag):

    • AUDIO-Technica ATH-M50
      • cheap
    • Sennheiser PXC 450
      • lots of control and function
    • Bose Quiet Comfort 15
      • very Apple-oriented and won’t function without noise cancelation. Cheaper than PXC 450

    Looks like noise-canceling properties is something really personal as I read two independent pilot accounts about **the same** phones claiming opposite results (ultra quiet vs utterly useless). Also audio qualities are contested for every single model. Noise cancelation comes in two forms – low pitch is handled by all sort of doo-dads while high pitch is handled by… snug fit.

    Out of non-cacleling crowd sounds (nice punt, eh?) like those brands deserve closer inspection:

    • Monster Beats by Dr. Dre
    • Denon
    • AKG
    • Shure SRH-940

    Some brands fell off on “sturdy” factor – if those are going to be used by kid – they better not be flimsy.

    Some interesting resources are:

     

  • Fedora 16 LXDE Xorg keyboard layout switching

    I was trying to set up a laptop with Fedora 16 & LXDE to have alternative layouts and it turned out LXDE was pretty spartan when it comes to such things. So back to Xorg setup. On-the-fly change:

    $ setxkbmap -option ” -option grp:switch,grp:alt_shift_toggle ‘us,ru(phonetic)

    and a bit more permanent solution is (obviously) in /etc/sysconfig/keyboard :

    KEYTABLE=”us”
    MODEL=”pc105+inet”
    LAYOUT=”us,ru(phonetic)”
    OPTIONS=”grp:switch,grp:alt_shift_toggle”

    With addition of LXDE applet via

    “Right click on the panel → select Add / Remove Panel Items → Add → select Keyboard Layout Switcher and click Add

    use the Up and Down buttons to move the plugin to the desired position.

    You can now switch layouts by using the keyboard shortcut or by clicking on the xkb plugin”

     

  • Fedora MD RAID check WTF

    Today, out of the blue my box decided to do the RAID check on my MD devices. I can’t remember seeing it before while I was running Gentoo, but now with Fedora things feel somewhat different. Fedora does automate quite a few things out of the box – the things I have omitted in my previous Gentoo experience.

    What have caught my attention was both high load on machine (out of the blue) and:

    # cat /proc/mdstat
     Personalities : [raid1] [raid0]
     md126 : active raid1 sdc6[1] sda6[0]
     308793280 blocks [2/2] [UU]
     [========>............] check = 40.7% (125758464/308793280) finish=43.7min speed=69702K/sec

    which lead me to a nearby Google outlet where I immediately borrowed some wisdom on a somewhat related subject: disks and S.M.A.R.T.:

    # smartctl --health /dev/sdc
    smartctl 5.41 2011-06-09 r3365 [x86_64-linux-2.6.38.8-32.fc15.x86_64] (local build)
    Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net
    
    === START OF READ SMART DATA SECTION ===
    SMART overall-health self-assessment test result: PASSED
    Please note the following marginal Attributes:
    ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
    190 Airflow_Temperature_Cel 0x0022   053   040   045    Old_age   Always   In_the_past 47 (2 51 47 25)

    so after enjoying rather interesting feature (smartctl that is) I have also checked around and found out that in some configurations it’s an “automatic behavior”. Which lead me to further discoveries this time from Ubuntu-land and ended up in glorious discovery of “magic device” in my posession:

    # cat /etc/cron.d/raid-check
    # Run system wide raid-check once a week on Sunday at 1am by default
    0 1 * * Sun root /usr/sbin/raid-check

    …back to sorting out the rest of my Gentoo -> Fedora migration…

  • My saga of exodus to Fedora

    After successfully installing Fedora Core 15 on my home box I am moving all my stuff from Gentoo to Fedora. I’m still questioning my move, but lately I have less and less time to dedicate to proper maintenance of Gentoo, not to mention that at work I run RedHat servers so I’m much more familiar with RedHat insides than Gentoo’s at the moment (wasn’t like that a year or two ago). I still think Gentoo is a brilliant distro and taught me a lot about inner workings of things; I didn’t want to go Ubuntu (I really does piss me off how it gets in my way all the time) so Fedora was more like a happy medium between Gentoo and Ubuntu and it would provide some learning grounds for my office use of RedHat. Prior to my home move I moved my office machine with no problems whatsoever, but then my office setup was not as elaborate as the one at home. I have already tried migrating to Fedora at home once and failed thanks to LiveCD’s. This time I’ve got a system that works and doesn’t show too many signs of instability. Another thing is to keep Gentoo around in a VM just in case I have to fall back to it for some apps/functions.

    Plan of actions:

    • add/migrate all filesystems from Gentoo to F15
    • make F15 boot from a sandwich I ran in Gentoo: RAW->MD-(raid1)->LVM
    • enable SELinux
    • depending on success: migrate Gentoo into a VM

    Couple of interesting hurdles/glitches:

    • Lightspark is way more unstable in fedora vs Gentoo
    • my NVidia sound keep throwing some odd messages in F15 (not in Gentoo)
    • I have to deal with sytemd startup (quite a bit of learning here)
      • MD RAID and LVM issues
    • I have to deal with SELinux
      • NFS issues
      • ReiserFS issues

    So here’s the story so far…

    Installing flash I ended up with 32bit Adobe crap bolted via nsplugin-wrapper (lightspark turned out to be quite unstable in Fedora). But at least it works…

    To know where my problems start you’d have to know where am I coming from. So on my Gentoo box I’ve been using ReiserFS for quite some time now due to effectiveness of it on systems with lots of small files. I also have a NAS where most of my stuff lives (or is synced to) mounted over NFS.

    After installing F15 on a fresh new partition[s] and making sure install is functional it was the time for migration of the systems. Couple of problems I ran into on the first go:

    • SELinux wouldn’t let me use ReiserFS partitions as they don’t support Extended Attributes
    • As soon as I plug-in Gentoo entries into /etc/fstab all goes to hell and systemd rebels against me

    First one was easy – SElinux operates in “permissive” mode now and I slowly collect it’s reports and combine fixes either into a policy or fix contexts etc. on-disk. Very tedious task. Couple of really useful tips:

    from Dan Walsh:

    If he had the te files from the previous run, he could use audit2allow to add rules to the te file.

    # audit2allow >> myexim.te << /var/log/audit/audit.log,

    I haven’t realized that every time I ran “audit2allow -M” it was leaving .te file for me in root’s home directory. So instead of generating gazillion tiny policies I ended up buffing up one generated by audit2allow further and further. Cuts down on clutter and keeps things neat.

    Fedora SELinux pages have quite a bit of info too and were quite helpful in understanding what I’m dealing with so far.

    My NFS shares from NAS mounted ok as root, but when I got to user access I discovered that I can’t view anything on NAS. Which naturally pissed me off. Then it dawned on me that NAS has groups out-of-sync with my workstation so I have to create nas-like group on my machine and get myself into it. So after simply adding;

    nas_users:x:102:me,myself,myfamily

    to /etc/group and re-logging in things started to look bit better.

    Next punch was delivered by systemd – it clearly gets ahead of itself and tries to mount MD RAID/LVM volumes prior to their initialization. So my first attempt was to get mounts into systemd-like form by crafting things like that:

    $ cat /etc/systemd/system/mnt-gentoo.mount
    #  This file is part of systemd.
    #
    #  systemd is free software; you can redistribute it and/or modify it
    #  under the terms of the GNU General Public License as published by
    #  the Free Software Foundation; either version 2 of the License, or
    #  (at your option) any later version.
    
    [Unit]
    Description=Gentoo root
    After=dev-md124.device
    Requires=dev-md124.device
    
    [Mount]
    What=/dev/md124
    Where=/mnt/gentoo
    Type=ext3
    # Options=bind

    which looks and feels as an abomination to me. So it took me some time and effort and my last (but not least hackish) attempt looks like this: we initialize all MD/LVM devices from boot string via dracut – truly a strike of evil genius:

    title Fedora (2.6.40.3-0.fc15.x86_64)
            root (hd0,0)
            kernel /vmlinuz-2.6.40.3-0.fc15.x86_64 ro root=/dev/mapper/vg_gamer-rootfs rd_luks=0 rd.dm=0 LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYTABLE=us nodmraid nouveau.modeset=0 rdblacklist=nouveau rd.md.uuid=61111111:11111111:11111111:dd6f447f rd.md.uuid=21111111:11111111:11111111:3ac2a021 rd.md.uuid=f1111111:11111111:11111111:96e591a2 rd.md.uuid=f1111111:11111111:11111111:bb65be89 rd.lvm.vg=rvg rd.lvm.vg=vg_gamer rd.lvm.vg=backup
            initrd /initramfs-2.6.40.3-0.fc15.x86_64.img

    If that doesn’t look evil – I don’t know what does…

  • Customizing Samsung Galaxy S II (I9100) under Linux (pt. 2)

    After some time with LiteningROM I did notice that my idle (stand-by) battery use decreased (good thing) – allowing me to get 2d of moderate use out of the phone. However I did notice that LiteningROM was memory hungry and it also looked like any interactivity caused immense power drain in the system.

    Today I re-flashed with new Cognition 1.0.8

    First observation: memory footprint does seem to be smaller (I couldn’t get “used RAM” under 400M with LiteningROM and with new CognitionROM I get into sub-300M zone. nice)

    Now, I wait and see whether power consumption goes down to the levels of LiteningROM or below and then decide which one I’m going to stick with until CyanogenROM produces stable image for SGS2.

  • Fedora Core 15 install (I hate LiveCD’s)

    I’ve been using Fedora on my workstation at the office for quite a while and was pretty happy with it but when it came to install on home machine I was never able to complete setup for one reason or another.

    What really surprised me is how flaky LiveCD’s were when it comes to my system and setup. I had installer crash on me in random places and overall quality of installed system being below what I have on my workstation at the office. After multiple failed attempts and aggravation caused by Fedora’s inistance on renumbering of my MD devices which causes annoying inconvenience booting Gentoo back, I have arrived at a setup option that looks workable: Install from DVD. Not liveCD! Fedora didn’t make it an apparent choice – it’s burried in their download screens under “alternative media”. Installing F14 I used that option which explains why I never had problems with that install. Now after using F15 Installer DVD I think it should’ve been the default option and liveCD should be a fall-back.

    Here’s the difference – liveCD already has a pre-installed version of the OS that you may or may not agree with and apparently some settings there didn’t quite agree with my system design. Now that I went through full install and was able to customize system at install time (not to mention net install option where you install up-to-date system) things look much brighter.

     

  • SpeakOut, Rogers and my beautiful SGS2

    Looks like Data usage on SpeakOut may be an issue (or may be not..). I started gathering some info on configuring appropriate APN.

    Picked up some wisdom from howardforums :

    Name: Rogers
    APN: goam.com
    Proxy: <not set>
    Port: <not set>
    Username: wapuser1
    Password: wap
    Server: <not set>
    MMSC: <not set>
    MMS proxy: <not set>
    MMS port: <not set>
    MCC: 302
    MNC: 720
    Authentication type: None
    APN type: <not set>

    and it looks like that would limit use down to Mozilla and other browsers that have proxy settings.

    # Run Fennec, and in address bar type: about:config. This will take you to the advanced configuration panel.
    # Now you need to find proxy entries, to simplify that you can filter it out by taping proxy in the field below address bar.
    # Modify network.proxy.http and network.proxy.http_port to your proxy server and port. (Proxy 10.128.1.69, Port 80)
    # You can also modify network.proxy.ssl and network.proxy.ssl_port to be able to access https addresses. (Proxy 10.128.1.69, Port 9203)
    # Set network.proxy.type value to 1.

    So fun is not over just yet…. It also looks like above IP is the same IP that pops from default Rogers APN when you reset device. I’ll have to get “browsing” activated to tinker with it a bit more…

  • Wireless shenanigans with android (on SGS2)

    While I was busy beating the dust out of my new SGS2 and tinkering with ROM’s, I came across quite a few “hidden features” that were not known to me.

    *#*#4636#*#*

    above will give you “test mode” in which you can run things like “ping test” etc. Nice for testing your data connection without actually connecting anywhere 🙂

    *#9900#

    that looks like debugging screen in which you can manipulate logs etc. for reporting, and “Disable dormancy” for better battery life.

    *#1234#

    above will produce phone information – very handy for reporting and looking up issues etc.