Posts

Showing posts from 2013

XBMC 12.3, Tvheadend PVR addon, unable to open live transcode settings menu

Can't access Tvheadend "Client specific settings" to enable on-the-fly transcoding on XBMC 12.3 Frodo? 

Connecting Samsung 9 Series 900X3C running Windows 7 x64 to Onkyo TX-NR626 amplifier using Bluetooth A2DP

After replacing incredible slow Sandisk SSD Samsung ships this model with Crucial CT240M500SSD3 and doing clean bloatware free Win7 install I noticed I couldn't connect to my Onkyo TX-NR626 using bluetooth anymore. Reason was that Microsoft doesn't provide required drivers for A2DP bluetooth profile required.

Ubuntu 13.10 x64 with emoncms

Install Ubuntu 13.10 x64 Server version with default settings and try to follow Emoncms docs . Didn't work that well, right? Well why don't you follow these instructions instead.

Remote conversion of 32-bit CentOS 6.3 to 64-bit Ubuntu 13.10

Pretty much any Linux should be fine as long as you have suitable scratch partition for temp Ubuntu install, in this example we're re-using 6GB swap partition. Process is two step, first we do minimal 32-bit Ubuntu install over swap partition, boot system, hack it to 64-bit and finally do final 64-bit Ubuntu install over old CentOS rootfs.

Changing Windows 7 aero colors on the fly

I needed to change colors of Windows 7 taskbar and window decorations from command line. Quick Googlioplaza search revealed AutoIT3 example , but it was bit lacking. See updated version below.

Creating differential backups with 7-Zip

This is so great I'm shamelessly copying command lines for my own archive (aka this blog) - but also providing link to original .

Ubuntu and broken or missing aufs with default kernels

Aufs included in Ubuntu kernels is broken, what a surprise. In addition it has been dropped from newer kernels with claims that overlayfs does exactly same thing. It doesn't and everyone knows it except that one developer who decided it does and can't admit he made mistake. It seems aufs (and overlayfs) in Ubuntu is not really supposed to be used but only be part of install process. If so you guys shouldn't include it outside installer.. WontFix you too.

USB keyboard doesn't work during initramfs with Ubuntu 12.04 / 12.10 / 13.04 after upgrading kernel

Add "ohci-pci" to /etc/initramfs-tools/modules and run "update-initramfs -c -k all". This problem occurs because unlike other USB drivers ohci-pci is compiled as module.

Updating Seagate ST3000DM001-9YN166 to CC4H firmware while in external USB 3.0 enclosure

Some time ago I purchased external 3TB USB 3.0 hard disks, TrekStor DataStation maxi light 3TB to be exact. It seem disk models and manufactures used by TrekStor vary, which is no surprise. Therefore I have externally identical disk enclosures with three different models of disks due making three separate purchases over few months.

Enable TRIM for SSD with ext4, dmcrypt and md

Depending on why you're encrypting your SSDs it might be acceptable to enable TRIM (aka discard). With this configuration observing raw content on SSDs will reveal which blocks are used and which aren't. Doesn't matter for me, but might not be same for you.

Ubuntu Server 12.04.3 / 12.10 / 13.04 / 13.10 with encrypted md mirrored rootfs and remote ssh unlock

My original plan was to boot from ZFS, but combining it with encryption and especially with mirrored disks turned out to be too troublesome. Yes, I did get it working and booting, but resulting configuration required manual fixing each time new kernel was installed. And don't even think about doing upgrade to next Ubuntu version.

Turning Dell PERC H310 to dumb biosless SAS / SATA controller

After realizing that LSI SAS1078 based controller wouldn't do what I want I ended up purchasing card from eBay, 65€ including shipping for unused, new in box Dell PERC H310. Prices are bit higher than I like, but this was acceptable knowing it will do exactly what I need. Despite trying hard card will still show up as DELL after making these changes but it's in IT-mode and accepts generic LSI firmware.

USB booting on VMware Workstation 9 and 10

While VMware Workstation supports passthru of USB storage devices BIOS used for virtual machines is not USB boot capable. As a workaround download Plop Boot Manager , extract plpbt.iso, mount it as CD on your VM, boot from CD and then select boot from USB. Blah. Spinning media is so yesterday.

Reflashing LSI MegaRAID SAS 8708ELP (SAS1078)

I wanted to use Fujitsu OEM (D2516, "LSI Logic MegaRAID SAS PCI Express(TM) ROMB") of LSI MegaRAID 8708ELP in JBOD mode, which apparently is not possible . Out of MegaRAID products only 9240-4i and 9240-8i support true JBOD. Also 9260 and 9280 series can apparently do it via MegaCLI which is another beast to master. Rest of models can only do single disk RAID0 which isn't the same thing.

80GB Intel X25-M G2 SSD and Secure Erase

For whatever reason after updating my Intel X25-M G2 SSD to latest firmware (dated 2011) option to do secure erase disappeared. Yes, I know all about tricks of hot plugging disks etc. Secure erasing another identical X25-M G2 on same PC visible as /dev/sdb works fine. One with latest firmware simply no longer supports it which is also confirmed by hdparm -I.

Execute BGInfo when IP address changes

Updates IP on your BGInfo managed desktop background image when new network connection is detected. Notices also Cisco AnyConnect VPN connections. Import XML file with SchTasks.exe.

Updating HP elite 8200 bios without Windows

Quick dump of notes showing how to use Linux for creating bootable freedos usb stick with required files to upgrade HP elite 8200 bios.

Gaining root shell on Huawei B593 4G LTE router

Huawei B593 has "few" security issues. If you want to play around here's some tips.

NTFS undelete on Linux

To avoid damaging filesystem with files to be undeleted I created image of entire hard disk by booting live linux on source PC from USB and then making 1:1 copy of HDD with dd.

Fixing non-bootable CentOS 5 after VMware converter P2V

Did P2V for old CentOS 5.5 i686 install and it failed to boot. Recreating initrd helped. Also see thread on VMware support forums .

Disappearing show desktop button on Windows quicklaunch

There's bug in some Microsoft hotfixes that causes show desktop button to disappear from Win XP / Win 2003 quicklaunch bar. Run " regsvr32 /n /i:U shell32 " and logoff+logon to get it back.

Handbrake auto-crop and channel logos

Same as old post except with updated patch for fresh Handbrake SVN version. Handbrake does good job auto-cropping black bars from source and calculating resulting aspect ratio. However if you're encoding digital TV recordings it's common to have channel logo on otherwise black portion of image.

Smartmontools 6.1 on Ubuntu 12.04

Please see updated version:  http://blog.asiantuntijakaveri.fi/2015/07/smartmontools-v64-and-ubuntu-1204.html

Linux and unwanted disk spinups

Some process was spinning my suspended USB disks back up every few minutes which is bad, mmkay. To monitor processes accessing disks I used following commands

ZFS using USB3 disks

Intel Core i5-2400, 4GB RAM, 11 x Seagate 3TB USB hard disks connected via 4 x D-Link USB3 hubs to StarTech PEXUSB3S400 PCIe card. Ubuntu 12.04 with ZFS 0.6.1. Disks were configured as RAID-Z3 (triple parity). write: 137438953472 bytes (137 GB) copied, 250.822 s, 548 MB/s read:  137438953472 bytes (137 GB) copied, 197.451 s, 696 MB/s

Virtualizing headless Windows on headless Linux server

I have remote Linux server and needed to run some Windows-only utilities. Since Wine is as great as always I decided to virtualize Win7. Since remote Linux is headless not only I needed headless Windows but also headless virtualization.

Need faster urandom on Ubuntu?

While burn-in testing my new USB 3.0 ZFS RAID array on Ubuntu 12.04.1 I wanted to fill disks with random data. Not zeroes from /dev/zero, but random data to catch any flakey disks or USB cables. Well it quickly turned out that reading from urandom was slowing process down a lot. Since quality of randomness doesn't matter much in this case frandom was easy solution.

Automatic US / UK VPN connection with XBMC, iPlayer, Hulu and Free Cable

XBMC has addons for various geolocked services, Hulu and iPlayer being among most popular. Switching between VPN connections manually gets boring quick so I hacked following script that will automatically connect and disconnect VPN to US / UK on demand. Tested with XBMCbuntu and XBMC 12.0 Frodo.

Activating extroot on OpenWrt 12.09-rc1

Enabling extroot on OpenWrt 12.09-rc1 is bit tricky. Likely reason you're trying to enable extroot is lack of free space i.e. router with 4MB flash. Problem is that unless you're interested in creating custom firmware images there's no space left for tools to enable extroot using old procedure. Following has been tested with TP-Link MR3220 v1. It's ar71xx with 32MB RAM and 4MB flash being lowest end of currently supported OpenWrt compatible devices.

Multipath OLSRd (SEREADMO)

Some years ago patch for OLSRd v0.5.6-r2 surfaced that added support for loadbalancing single flow over multiple paths. Documentation on how to set it up is scarce. I did get it working to some extent. It's somewhat unstable and doesn't really like single mesh node having multiple network interfaces, but it does loadbalance traffic over multiple paths as promised.

Measuring one-way network latency, jitter and packet loss on Linux

Ping can tell you round-trip or two-way latency, but if you want to know if it's upstream of downstream that's slowing down you need something else. You need OWAMP (One-Way Ping).

Compiling ntp v4.2.7 for Ubuntu 12.10

Compiling ntp v4.2.7 for Ubuntu 12.10

Dumping process memory in Linux

Sometimes when troubleshooting misbehaving applications having complete dump of process memory comes handy. Here's small script that does exactly that on Linux. Run it with pid of process you're interested as parameter.

Replacing WLAN card on HP nc6000 laptop

Atheros WLAN card on my hack laptop HP nc6000 died sometime ago. No problem I thought as I had unused Intel 2200BG. After swapping card I was greeted with 104 unsupported wireless network device error. While 2200BG was one of original options for nc6000 one I installed had wrong PCI subsystem ID. Quick googling showed multiple people killing their nc6000 after flashing hacked firmware requiring soldering iron and eeprom programming device to recover. Nothing wrong with that and that most certainly has higher hack value, but not for me this time. Since card itself was ok for BIOS I started thinking if I could somehow change ID supplied by card to one HP BIOS accepts...

Fixing HP LaserJet 600 M602 with error 49.38.03

New HP LaserJets are like Windows PCs. Operating system is bloated and buggy. Recently I had to fix HP LaserJet 600 M602 that said "49.38.03 error, turn power off then on" each time you tried to access network settings via menu - and via ethernet it was completely dead. To fix this turn printer on, press (X) button when all three leds on front illuminate, login as admin, clean entire disk and reload firmware from USB stick.

Enable Windows Remote Desktop remotely from command-line using PSEXEC

Need RDP access to remote Windows server or workstation, but forgot to enable it after installing OS? If there's no firewall blocking and required components are installed (as they are by default) run following command as user that has admin rights on target PC. PSEXEC.EXE -s \\HELSI1136 CMD.EXE /C "REG.EXE add ^"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server^" /v fDenyTSConnections /t REG_DWORD /d 0 /f"

XBMC and overlapping subtitles with iPlayer addon

There's often overlapping subtitles with XBMC and BBC iPlayer addon. Rather than modify actual addon and losing changes every time it's updated I hacked up script that edits SRT file after it's downloaded from BBC site but before XBMC reads it.

strongSwan 5.0.1 on Ubuntu 12.04 and 12.10

Could we get any older versions included in distros? kthanksbye