Posts

Set folder dates to newest file inside (using PowerShell)

Someone (not me this time) screwed up and while transferring content from old server to new one ended up messing all folder timestamps. Folders now have date when copy was made instead of preserving original dates as intended.

DHCP tricks with Linux network namespace

Some notes from my experiments with fetching more than one IP address from DHCP for same physical ethernet adapter. Nothing too difficult and you don't even need netns for this, few policy route settings would be enough if dhclient (and especially dhclient-script) wouldn't be so broken. For example dhclient has nasty habit of hijacking udp/68 on all network interfaces rather than only those it controls. There's also issues in some cases due routing when DHCP server is not on local LAN but behind WAN like it's in corporate and ISP networks.

Installing Ubuntu 14.04 LTS to Wyse Z90D7 Windows Terminal

I recently posted how to update Wyze Z90D7 to latest available Windows firmware. Which is far from usable. Let's see how Ubuntu works on this hardware. Actual flavour I picked is Lubuntu, but hardware support should be same for all. TL;DR: What a piece of shit this is, don't waste your time just toss it to bin already.

Updating Wyse Z90D7 Windows Terminal from USB stick

I recently found old decommissioned Wyse Z90D7 Windows Terminal. Old BIOS, messed up OS, etc. So exactly how do I update this thing without all those complex management systems and active Wyse support contract?

Crossflashing Huawei B593s-22 from Sonera to Elisa firmware

My B593s had ancient Sonera branded firmware that has DNS issues when IPv6 is active. At least IPv6 reverse queries stall causing long delays. There's some rumors going that Sonera provides updated firmware over-the-air, but I couldn't trigger update despite trying hard. Might be because I was using Elisa SIM card. Since Elisa does have fairly recent firmware available for download I thought why not use Elisa firmware instead - get IPv6 bug fixed, have correct operator settings as default and also future updates should work without extra hacks.

"New Skype Meeting" option missing from Outlook 2013 calendar

Clean Windows 7 install with latest Office 2013 from Office 365 and latest Skype for Business 2015 (The Application Formerly Known As Lync) also from Office 365. Problem is that "New Skype Meeting" option is missing from Outlook calendar options. There's just empty space where ribbon bar button should be.

Ericsson (Dell, Lenovo, Panasonic, Toshiba) 3G WWAN modules hanging

Ericsson has manufactured probably millions of faulty 3G WWAN modules that hang after few minutes to few hours of use. There's driver and firmware updates out that may sometimes help but usually only by extending time before hang bit longer.

"Use your Start menu to check for updates" error on Windows 7

If you install IE 11 before enabling "Microsoft Update" feature of "Windows Update" on Windows 7 you'll be stuck with "Use your Start menu to check for updates" error message. Solution is to open IE, then hit ALT to show menus, go to Tools, Compatibility View settings and enable "Use Microsoft compatibility lists".

Running TFTP server on Ubuntu 14.04

# Install tftpd-hpa package apt-get update apt-get -y install tftpd-hpa # Fix config file broken by default # - use correct tftpboot directory rather than random location under /var # - chroot to tftpboot # - allow uploading of files but not overwriting existing # - listen IPv4 and IPv6 instead of IPv6 only # - enable logging mv /etc/default/tftpd-hpa /etc/default/tftpd-hpa.old cat <<'__EOF__' >/etc/default/tftpd-hpa TFTP_USERNAME="tftp"  TFTP_DIRECTORY="/tftpboot"  TFTP_ADDRESS=":69" TFTP_OPTIONS="--secure --create --listen --verbose" __EOF__ # Create tftpboot directory and use proper permissions mkdir /tftpboot chmod -R 1770 /tftpboot  chown -R root:tftp /tftpboot # Restart service service tftpd-hpa restart P.S. There's config file bug causing tftpd to listen only IPv6 connections by default... https://bugs.launchpad.net/ubuntu/+source/tftp-hpa/+bug/1448500

Smartmontools v6.4 and Ubuntu 12.04

I had to upgrade to new Smartmontools 6.4 on my Ubuntu 12.04 server as old version lacks Prolific PL2773 USB3 to SATA bridge support.

Controlling Anel Elektronik NET-PowerControl HOME from command line

There's probably proper api to do this, but everything is in German and all I wanted to do is toggle status of single power outlet from script. curl --data "F0=S" http://admin:admin@192.168.1.3/ctrl.htm -o /dev/null

Upgrading HP Proliant ILO100i firmware over network

Another nightmare product from HP with broken everything, including broken remote firmware upgrade process.

Windows 10 install from USB to Dell Latitude 10 Tablet

Dell Latitude 10 Tablet, identified as ST2 Late-2012 by Dell, really sucks. It's shipped with very first Win 8.0 build and after two years of updates it's barely usable with Win 8.1 + all available updates and fixes. I wanted to give Windows 10 try on it as already being worst tablet ever it can hardly get any worse, right? Reinstalling Win 8.1 goes exactly like Win 10 so below applies to both.

VMware ESXi 5.5 and LSI RAID monitoring

Adding LSI RAID controller status to VI client and connecting to ESX using MSM (Megaraid Storage Manager) running on Windows.

Adding pagespeed module to nginx 1.7.8 on Ubuntu 14.04

Wanted run fresh nginx version with Google Pagespeed on Ubuntu 14.04.

Installing Ubuntu 14.04 LTS with Cacti 0.8.8c

Ubuntu provides only Cacti 0.8.8b so we need to compile our own package with 0.8.8c after installing OS.

Virtualizing old Centos 5 server with software RAID disks

VMware Converter does decent job converting old physical servers to virtual machines, but it refuses to do anything to servers using software RAID. I really don't get why such arbitary limitation is in place. It really doesn't matter if physical server used RAID, software or not, because everything is copied by Converter on file lever rather than block level.

Remapping bad sectors with Linux and dd

I have one faulty non-RAID disk on server which I can't replace right now so I wanted to see if I could mask problems by manually triggering bad sector reallocation.

Using Sonera 6rd IPv6 with Cisco IOS router

Sonera recently started offering 6rd tunnels to their customers in Finland. Based on this Comcast example it was easy to get Sonera 6rd up with Cisco 892 running IOS 15.5(1)T.

Prefer IPv4 over IPv6 on CentOS 6

To prefer IPv4 (A) addresses over IPv6 (AAAA) on CentOS 6 you need to add new file named /etc/gai.conf with following content. Last line is what controls if IPv4 or IPv6 should be tried first.

Enable UserDir with Centos 6 and SELinux

I had unfortunate opportunity to play with RedHat / Fedora / CentOS distribution today. I have to say that as much as I hate Ubuntu, CentOS is even worse than it was few years ago when CentOS5 was still current. And now we're ignoring RHEL7 / CentOS7 where headless server installer requires GUI that's optimized for touch screen and tries to imitate Ipad. Recommended solution? Use VNC to connect installer. Aargh! I should probably have Ipad to run that VNC client - for improved user experience you know.

Remote conversion of 64-bit CentOS 6.5 to 64-bit Ubuntu 14.04

For 32-bit source to 64-bit see my older post . Old install was using software RAID-1, but did not have LVM. Small 200MB /boot partition, 8GB swap and rest as one root partition. We're redoing it completely so what it used to be doesn't really matter. All existing data on root will be lost.

Oddities of dnsmasq when used with IPv6 resolvers

# dnsmasq --version Dnsmasq version 2.68 Copyright (c) 2000-2013 Simon Kelley Compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth # md5sum dnsmasq* 8a704b6aa977df9485b3faf940cc5e35 dnsmasq_2.68-1_all.deb 60bafb9b863671bb02595505a447270c dnsmasq-base_2.68-1_amd64.deb There was odd " [icmp6 sum ok] ICMP6, destination unreachable, unreachable port " going out from my server every time DNS reply was received. Turns out it was because dnsmasq IPv6 support is buggy .

Headless Ubuntu 14.04 Server with full disk encryption, remote unlock, software RAID, LVM and EFI for over 2TB disk support

Image
Headless Ubuntu 14.01 LTS server with full disk encryption, remote unlock over SSH, software RAID, LVM and support for over 2TB disks with EFI and BIOS MBR boot. That's what this post is about. Oh, and pics are at the end.

Cisco EEM applet to monitor and repair broken DHCP leases

Dirty hack to renew DHCP lease on Cisco 881 if Internet access is lost. This can happen when Cisco has valid DHCP lease from ISP and then cable modem or DSL router is power cycled but switch between Cisco and upstream device keeps link-state up. Options are either to fix it manually (pull cable / change config / reboot Cisco) or hack something like below. I'm also pinging over VPN tunnel to Intranet as it would be shame to break this due Level 3 and Google blocking ICMP which might happen one day.

/31 aka 255.255.255.254 netmask with Windows

Windows GUI prevents you from setting this with helpful error message of "All of the bits in the host address portion of the IP address are set to 0". IP stack seems to be fine with /31 networks so just set it from CLI. netsh interface show interface netsh interface ip set address name="Local Area Connection" source=static addr=10.71.219.238 mask=255.255.255.254 gateway=10.71l.219.239

Moving VMs between datastores with free ESXi (and very fast GhettoVCB restores)

Trying to move virtual machine between datastores (local or remote) can be painful without vCenter and SVmotion. Easy and fast way is to use traditional VI Client to move contents of virtual machine directory via datastore browser (Move To feature). Processing stays within ESXi and goes quickly. VMware converter could also be used, but it's SLOOOOOW and everything goes via management PC which is dumb design. GhettoVCB restores aren't fastest either. This is quite obvious workaround, but I have to admit didn't realize this until today. Since backups are NFS mounted I can simply import VMX file from backup directory using datastore browser. Yes, this will result in changes to backup which is not that great, but at least it's quick - even biggest VM can be restored in couple minutes. And that issue with changes to backup could be easily solved with ZFS snapshots.

Making Intel 910 PCIe SSD bootable

Recently market has been flooded with 400GB and 800GB versions of Intel 910 Enterprise PCIe SSD priced just one tenth of original cost. Downside of this device is its inability to boot requiring separate SSD for system files and software RAID0 support from OS. Both obvious downsides for my intended use with ESXi.

Topfield TF500PVRc with TF510PVRc or TF520PVRc firmware

Latest firmware for Topfield TF500PVRc is 3.56 from 2010 while for TF510PVRc and TF520PVRc there's 3.96 from 2013. Can you flash Topfield TF510PVRc / TF520PVRc firmware to older TF500PVRc? Yes, yes you can after changing SysID with VegaPack and it will start and appear to work just fine. However since TF500PVRc has only 32MB RAM system will quickly run out of memory. First menus will disappear and soon entire system crashes. Flashing newer model firmware "works" only for DVB-C models. In DVB-T models (TF500PVRt / TF510PVRt / TF520PVRt) tuner was changed and while OS will run it won't be able to receive any channels.

Buffalo WLAE-AG300N, OpenWrt Barrier Breaker and auto power on

While looking for something else I spotted Buffalo WLAE-AG300N "range extender" in our IT "treasure room". Noticing it's OpenWrt supported decided to give it try.

Cisco CSR1000v 3.13 finally working on VMware ESXi 5.1

After many, many months of waiting Cisco finally managed to build new version of CSR1000v 3.13 that is compatible with VMware ESXi 5.1. Another quiet release without release notes. As with earlier 3.13 versions this new 03.13.01S build is available only in OVA format without purchasing license (csr1000v-universalk9.03.13.01.S.154-3.S1-ext.ova). Not to worry as you can extract ISO image and even BIN images if needed for upgrading older install from OVA. If you're coming from 3.12 or older with eval license (which allowed creation of eval license locally) you'll need new licenses. Usual two month license is available from Cisco portal  but it's extra step compared to 3.12.  Another difference is performance levels for unlicensed and eval licensed modes. Unlicensed 3.12 is 2,5Mbit/s, eval licensed 3.12 is 50Mbit/s, unlicensed 3.13 is 0,1Mbit/s and eval licensed 3.13 is 10Gbit/s.

Upgrading HP Proliant firmware is easy... NOT!

Server in question was HP Proliant DL320 G6 from 2010 without any firmware upgrades ever made. Those old versions have multiple known issues, both usability, stability and hardware component compatibility related. Downtime required to perform these steps will be around 3 hours.

LTE 450MHz performance

Seems Ukkomobile has fixed their provisioning setup. LTE network itself came up last week, but only DNS traffic was allowed and all tcp/80 traffic was hijacked to infinite 302 redirect loop between www.ukkoverkot.fi and www.ukkomobile.fi.

Inside Ukkomobile 450MHz LTE router - Huawei B593s-31A

Image
450MHz LTE is alive!

Cisco CSR1000v 3.13 crashes on VMware ESXi 5.1

Initial version of Cisco CSR1000v 3.13 (csr1000v-universalk9.03.13.00.S.154-3.S-ext) was broken and kept crashing while booting on VMware ESXi 5.1, but apparently does work on ESXi 5.5. Cisco has silently replaced it with 3.13S0a version (csr1000v-universalk9.03.13.00a.S.154-3.S0a-ext) without providing any release notes or even updating filedates. Which is exactly as broken as old one - stuck in infinite reboot loop. Download is here , but for some reason for 3.13 only OVA packaged one is available after free registration. If you need ISO simply unpack OVA with 7zip and use ISO you can find inside for install. And then it will fail. Perhaps something to do with crazy nested virtualization CSR uses. Thanks guys.

Export all SMTP addresses from Exchange using PowerShell

Tested with Exchange 2010. You'll need Exchange Management shell but no need for exchange admin rights. Get-Recipient -ResultSize unlimited | Select Name -ExpandProperty EmailAddresses | Where-Object {$_.SmtpAddress -ne $null} | Select Name,SmtpAddress,IsPrimaryAddress | Export-csv -Encoding unicode -NoTypeInformation AllEmailAddress.csv

How to change Atheros AR9xxx aka ath9k EEPROM values

One of my Atheros AR9280 minipcie cards had some odd undefined regulatory domain (0x6B) configured. This caused even latest Linux ath9k driver to break so I wanted to change it to valid regdom. Which ath9k developers think is sin and are trying to prevent people from doing, but luckily our old friend iwleeprom has Atheros support letting us to fix this.

Modifying Huawei B593u firmware images using FMK

Nothing special here in my opionion, but I've seen few comments saying that FMK  doesn't work with Huawei B593u. Just follow instructions below and you end up with normal firmware image having one important difference - you can telnet in as admin from LAN side of device.

Inside old Motorola (Symbol) AP-5131 access point

Image
I found couple Motorola AP-5131 802.11a/g access points today. It's old design from Symbol Technologies dating back to 2005 with manufacturing date from 2010.

Netdisco2 on Ubuntu 14.04

Netdisco is neat tool to collect layer-2 forwarding database from switches, match MACs with layer-3 ARP table from router and present it over searchable webui. Old "Netdisco 1" was quite horrible to setup, but it did still do its job. Recently "Netdisco 2" was released making admins life much easier and also bringing fancy new look for webui. So here's my notes about installing new virtual machine with Netdisco 2.

Huapwn - Backdoor on your Huawei B593u

Public Huawei document I linked couple days ago mentioned factory diagnostics tool called  " Huawei deviceLocker V0.1" that will grant access to root shell on router. I got curious on how this would actually work and came to conclusion it must be something extremely simple and insecure, it IS Huawei after all. Did some poking around /bin/web process I figured this out - it's all there in clear-text for anyone to read. And that admin password is in Huawei docs, not exactly secret either. In case you didn't realize there's no need for authentication to exploit this. Protip: Try to hide you backdoors a bit better next time.

Persistent customizations to Huawei B593u with stock firmware

Perhaps you're fairly satisfied with Huawei stock firmware but would like to fix some security problems and remove spyware installed by factory. There's fairly easy way to do this.

Unpacking Huawei B593u compressed Broadcom CFE bootloader

Sorry, one more B593u post but felt this is worth documenting. While hacking my way into Huawei B593u I had big problem with Huawei crippled CFE bootloader. It was not talking to me and when I finally did get it to talk to me it was only one way. All I could see was CFE> prompt after smashing ^C but nothing else.

Latest modem.bin LTE dongle firmware for Huawei B593u-12

Latest modem.bin firmwares currently available are T-Mobile customized 11.533.03.03.748 (2013-09-30) from SP105 and generic 11.433.61.00.00 (2012-12-04) from Polkomtel SP103. While these are customized for EM920u according to few forum posts I've found they work equally with Huawei USB LTE dongles such as E392 part of same MDM9200 family.

Differences of Huawei B593u and B593s

I got few B593u models and it's pretty straight forward Broadcom BCM5358 based router with Linux. As usual GPL sources were never published by Huawei crooks. LTE modem side is simply Qualcomm MDM9200 based Huawei USB dongle connected internally to Broadcom SoC over USB.

How to capture LTE WAN traffic for diagnostic purposes on Huawei B593u and not so much of security

Found this document on Huawei webpage you might be interested. It's in Microsoft Word .docx format. http://www.huawei.com/ecommunity/3msimage/download-10060827-10000297-9bca6ae8ffa54796a5245e6650b0e607.bin?type=bbs

Serial console on Huawei B593u

Image
Here's location of Huawei B593u TTL serial console. Settings are usual 115200 8N1.

What's inside Huawei B593u-12 LTE router?

Image
There ain't many pictures showing innards of B593u around and even less ones with any details. This obviously needs to be fixed.

Well, that was easy

I think ethernet switch and wireless aren't supported by opensource drivers so even with OpenWrt booting on Huawei B593u-12 it's not much use. USB connected LTE module is not detected, my guess is that some GPIO needs to be toggled to enable it. PCA9555 GPIO expander would need some work too. Also 256MB NAND-flash is missing, only 16MB SPI flash is found.

Teaser on Huawei B539u hacking

CFE> boot -elf -tftp 192.168.1.100:openwrt-brcm47xx-mips74k-vmlinux.elf

Updating Ubuntu 12.04 LTS kernel to 3.15.8 with latest ddbridge DVB drivers

Set Excel 2013 cell size in millimeters (or inches for those relics living in US)

Open new excel sheet. Select desired paper size (A4 or A3... of course), orientation and set margins. Open View tab. Click Page Layout under Workbook Views. Press Ctrl+A. Open Home tab. Click Format under Cells. Select Row height and enter desired size with mm suffix (or "in" for rednecks) Click Format under Cells Select Column width and enter desired size. Open View tab. Click Normal under Workbook Views. Done.

SID HISTORY: AD

Last steps with fixing SID history.

SID HISTORY: Fixing file servers

File servers are easy thanks to Microsoft tool.

SID HISTORY: Fixing SQL

SQL server logins may have old SIDs. This doesn't fix them (because we didn't have this particular problem at work) but shows if there's any that need to be fixed.

SID HISTORY: Fixing Exchange

Dumping my notes about fixing SID history at work. Use at your own risk. These worked for me but won't work for you without some adjustments.

Adding aufs support to Ubuntu LTS 14.04 with 3.16-rc5 kernel

Adding aufs support to 3.16-rc5 is little different than what is was for older kernels. Below works for Ubuntu LTS 14.04.

Ubuntu Server 14.04 LTS with encrypted md mirrored rootfs and remote ssh unlock

This post is just to let everyone know old process described here in my earlier post still works and also survives upgrade from older Ubuntu version to 14.04 LTS.

Export Bitlocker recovery keys from AD using PowerShell

This exports list of BitLocker recovery keys from AD. Found it somewhere from web.

Export out-of-office (OOF) autoreplies from Exchange 2010 with Powershell

Quick and very dirty export out-of-office (OOF) autoreplies from Exchange 2010 with Powershell.  get-mailbox -resultsize unlimited | get-mailboxautoreplyconfiguration | where {$_.autoreplystate -ne "disabled"} | select identity,autoreplystate,starttime,endtime,@{NAME='InternalMessage';Expression={$_.InternalMessage -replace ("`n") -replace("</p","/<") -replace("<.*?>") -replace("&nbsp;","") }},@{NAME='ExternalMessage';Expression={$_.InternalMessage -replace ("`n") -replace("</p","/<") -replace("<.*?>") -replace("&nbsp;","") }} | Export-Csv -Encoding unicode -NoTypeInformation outofoffice.csv

Collaboration Data Objects (CDO) 1.2.1 with Outlook 2010 and 2013

Many vbscripts use old Outlook / Exchange CDO components for MAPI access. Without CDO you'll get "ERROR: ActiveX component can't create object (MAPI.Session)" error message. Unfortunately CDO works only with 32-bit Outlook 2007. If you're running 32-bit Outlook 2010 or 2013 in either 32-bit or 64-bit OS following might come handy.

Flashing BeagleBone Black (rev B, 2GB eMMC) with Ubuntu 14.04

You're supposed to be able to use "BBB-eMMC-flasher" images to flash new OS directly from SD card. For whatever reason this sometimes fails to work. People blame power supplies which probably is one reason but not this time. In my case when trying to use BBB-eMMC-flasher image BBB started flashing all four user leds in sync without ever even attempting to flash image to eMMC.

Ubuntu 13.10 with TCP-IR (TCP Instant Recovery / FEC) enabled kernel v3.4.83

How would FEC (Forward Error Correction) enabled TCP/IP stack for Linux sound like? Yep, I know you're interested and want it. Start by checking these two links. http://www.ietf.org/proceedings/87/slides/slides-87-tcpm-8.pdf http://tools.ietf.org/html/draft-flach-tcpm-fec-00

Digi One, PortServer etc. and double enter problem

There's annoying problem with Digi RS232 - Ethernet products (also sold BlackBox branded). Many if not most telnet clients are incompatible with their server implementation and treat single enter press as two enter presses. Incompatible clients are at least SecureCRT, Putty and one Microsoft includes with Windows. Teraterm works ok.

Measuring temperature with OpenWrt and submitting values to EmonCMS

I'm using OpenWrt with following customizations to send temperature readings to EmonCMS. Hardware is noname Ralink RT3052 router (WR512-3GN) and Dallas DS9097U compatible USB 1-wire adapter. Main reason for going with Image Generator instead of compiling custom firmware was to keep binary and API compatibility with packages from stock OpenWrt repository. Package selection below leaves 168kB free on JFFS2 filesystem. Drop editor, Luci etc. and you'll have a lot more free. If you don't need to patch init scripts like I did due bug in WR512-3GN support you can simply install packages and apply scripts over top of official OpenWrt release flashed to your router.

Updating Samsung SSD firmware without Windows

My attempts to update Samsung 840 EVO to new EXT0BB6Q firmware kept failing with "WDOSX Win32 subsystem: Abort from unhandled exception" error message. This seems to be due outdated FreeDOS Samsung uses. Old version is probably incompatible with newer motherboard or something.

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.