Monday, October 13, 2014

Seagate GoFlex Home NAS - Git server installation

While quite comfortable with SVN and happy with the previous SVN server installation on the Seagate GoFlex Home NAS, I'd like to take things a bit further and try out a Git server. Some of the things looking forward to are local commits while away or when the NAS is sleeping, and pushing those changes at a later stage when connected. So, here we go.

Prerequisites


See previous post where we installed ipkg (will use it to install the Git software) and we setup a system account for HDD storage (will use it to store the Git repositories).

Git software


bash-3.2# ipkg install git
Installing git (1.8.4.2-1) to root...
Downloading http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/stable/git_1.8.4.2-1_arm.ipk
package git suggests installing git-manpages
Configuring git
Successfully terminated.

bash-3.2# git --version
git version 1.8.4.2

Git user group


Creating a user group called git to which will add user apache (see later section) and to which will give write access to the repositories, or you could use to add real users to if you want to use ssh and real users for access.
bash-3.2# groupadd git
bash-3.2# usermod -a -G git apache
bash-3.2# id apache
uid=48(apache) gid=48(apache) groups=48(apache),100(users),500(www),104(fuse),508(git)

Git repositories


Preparing the location to store the git repositories and will create a firs repository called MyProject.git. You can create another level inside repos to group your applications, e.g. mobile or android, and then create repositories inside that.
bash-3.2# mkdir -p /home/0loop0/srv/git/
bash-3.2# ln -sv /home/0loop0/srv/git/ /srv/
create symbolic link `/srv/git' to `/home/0loop0/srv/git/'

bash-3.2# cd /srv/git
bash-3.2# df -h .
Filesystem            Size  Used Avail Use% Mounted on
/dev/loop0            985M  150M  785M  17% /home/0loop0

bash-3.2# mkdir repos
bash-3.2# chgrp git repos
bash-3.2# chmod g+ws repos
bash-3.2# ls -ld repos
drwxrwsr-x 2 root git 4096 Oct 13 12:58 repos

bash-3.2# cd repos
bash-3.2# git init --bare MyProject.git
Initialized empty Git repository in /home/0loop0/srv/git/repos/MyProject.git/
bash-3.2# chmod -R g+w .

 

Git server (http://)

 

There are a few protocols to choose from and while at first I was going go to do ssh:// for security, that looked a bit more complicated and the fact that Seagate GoFlex Home NAS requires those long SSH usernames including the serial number, I decided to go for unsecured HTTP access as after all most of us do not expose this over the internet and you're probably the only user that knows about it :-), although you could go further and secure it yourself through HTTP basic authentication.

Edit /etc/httpd/conf/httpd.conf to add the lines below:
#
# Git
#
SetEnv GIT_PROJECT_ROOT /srv/git/repos/
SetEnv GIT_HTTP_EXPORT_ALL
SetEnv REMOTE_USER $REDIRECT_REMOTE_USER

ScriptAlias /git/ /opt/libexec/git-core/git-http-backend/

<Location "/git">
    AuthType None
    Require all granted
    Satisfy Any
</Location>
Restart web service:
bash-3.2# service httpd restart
Stopping httpd:                                            [  OK  ]
Starting httpd:                                            [  OK  ]

From a client machine take the project down and try a first commit (using GitHub's GitShell on Windows here):
R:\temp> git clone http://goflex_home/git/MyProject.git
Cloning into 'MyProject'...
warning: You appear to have cloned an empty repository.
Checking connectivity... done.

R:\temp>cd MyProject

R:\temp\MyProject [master]> echo "contents" > first.txt

R:\temp\MyProject [master +1 ~0 -0 !]> git add first.txt

R:\temp\MyProject [master +1 ~0 -0]> git commit -m "First commit"
[master (root-commit) 8db2238] First commit
 1 file changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 first.txt 

R:\temp\MyProject [master]> git push
Counting objects: 3, done.
Writing objects: 100% (3/3), 231 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To http://goflex_home/git/MyProject.git
 * [new branch]      master -> master 

Git backup


Similar to previous SVN post, you probably want to backup the git repositories regularly so we're going to use our own system GoFlex Home Backup location for it.

First we'll create the script to backup a single repository:
bash-3.2# cd /srv/git
bash-3.2# cat > git-backup << EOL
#!/bin/bash

if [ -z "\$1" ]; then
  echo -e "Usage:\n   \$0 repository-name"
  exit 99
fi

GIT_REPOS_DIR=/srv/git/repos/
GIT_BACKUP_DIR=/home/system/GoFlex\ Home\ Backup/git/
GIT_BACKUP_FILE=\$1.git-bundle-\$(date +"%Y%m%d-%H%M%S")
KEEP_DAYS=31

echo -e "\n*** (1/5) Creating temporary clone..."
cd "\$GIT_BACKUP_DIR"
git clone "\$GIT_REPOS_DIR/\$1"

echo -e "\n*** (2/5) Creating bundle..."
cd "\$1"
git bundle create "../\$GIT_BACKUP_FILE" --all

echo -e "\n*** (3/5) Verifying bundle..."
git bundle verify "../\$GIT_BACKUP_FILE"

echo -e "\n*** (4/5) Deleting temporary clone..."
cd "\$GIT_BACKUP_DIR"
rm -rf "\$1"

echo -e "\n*** (5/5) Trimming backups - older than \$KEEP_DAYS days..."
find "\$GIT_BACKUP_DIR" -name "\$1.git-bundle-*" -mtime +\$KEEP_DAYS -exec ls {} \; -exec rm {} \;
EOL

bash-3.2# chmod a+x git-backup
Now create the backup location:
bash-3.2# mkdir "/home/system/GoFlex Home Backup/git/"
With that done, we're ready for a test:
bash-3.2# /srv/git/git-backup MyProject
*** (1/5) Creating temporary clone...
Cloning into 'MyProject'...
done.

*** (2/5) Creating bundle...
Counting objects: 6, done.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (6/6), 461 bytes | 0 bytes/s, done.
Total 6 (delta 0), reused 0 (delta 0)

*** (3/5) Verifying bundle...
The bundle contains these 4 refs:
9a0f0ff039cb631ce62218e39d976015c8a6778b refs/heads/master
9a0f0ff039cb631ce62218e39d976015c8a6778b refs/remotes/origin/HEAD
9a0f0ff039cb631ce62218e39d976015c8a6778b refs/remotes/origin/master
9a0f0ff039cb631ce62218e39d976015c8a6778b HEAD
The bundle records a complete history.
../MyProject.git-bundle-20141013-151323 is okay

*** (4/5) Deleting temporary clone...

*** (5/5) Trimming backups - older than 31 days...
Finally, we can add the job to run daily:
bash-3.2# cat > /etc/cron.d/git-backup << EOL
0 22 * * * root /srv/git/git-backup MyProject
EOL
The end.

Saturday, October 4, 2014

Windows 10 Technical Preview on ASUS R2H

8 years later is still going: Windows 10 Technical Preview on ASUS R2H.

Installation steps:

ASUS R2H-BG059T

Drivers:
  • Intel Inf Update v9.2.0.1030
    Download
    from Intel, run infinst_autol.exe and if needed manually update drivers for:
    • Intel(R) 82801FB/FBM Ultra ATA Storage Controllers - 266F
    • Intel(R) 82801FB/FBM USB Universal Host Controller - 265x
    • Intel(R) 82801FB/FBM USB2 Enhanced Host Controller - 265C
  • Graphics 
    Original OEM drivers won't install anymore, running on default Windows "Microsoft Basic Display Adapter" driver
  • Wireless
    Working with original OEM Windows Vista drivers: ASUS USB Wireless Network Adapter, v2.0.0.130

Notes:
  • Speccy fails to install due to incompatibility issues
  • Winaero WEI Tool reports 0 / unrated, appears assessment doesn't complete.






Friday, July 25, 2014

Maven - Checking for dependency updates

If you're using Maven with your Java or Android projects you can leverage its ability to check for new library versions using versions:display-dependency-updates goal, instead of doing that manually through search.maven.org or using services like changedetection.com.

Withing Eclipse, you can create an internal Run Configuration (Run > Run Configurations... > Maven Build):


[INFO] Scanning for projects...
[INFO] 
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building MyApplication 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- versions-maven-plugin:2.1:display-dependency-updates (default-cli) @ myapplication ---
[INFO] The following dependencies in Dependencies have newer versions:
[INFO]   com.squareup.okhttp:okhttp ........................ 2.0.0-RC1 -> 2.0.0
[INFO]   com.squareup.okhttp:okhttp-urlconnection .......... 2.0.0-RC2 -> 2.0.0
[INFO]   com.squareup.picasso:picasso .......................... 2.3.2 -> 2.3.3
[INFO]   commons-io:commons-io ..................................... 2.2 -> 2.4
[INFO]   org.apache.commons:commons-lang3 ........................ 3.1 -> 3.3.2
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.555 s
[INFO] Finished at: 2014-07-25T21:57:33+00:00
[INFO] Final Memory: 10M/166M
[INFO] ------------------------------------------------------------------------


Resources:

Sunday, July 20, 2014

Windows 8.1 Enterprise Evaluation on ASUS R2H


Windows 8.1 Enterprise Evaluation (90 days) running on the old ASUS R2H boy!

Installation steps:

ASUS R2H-BG059T

Drivers:
  • Intel Inf Update v9.2.0.1030
    Download
    from Intel, install running infinst_autol.exe and if needed manually update drivers for:
    • Intel(R) 82801FB/FBM Ultra ATA Storage Controllers - 266F
    • Intel(R) 82801FB/FBM USB Universal Host Controller - 265x
    • Intel(R) 82801FB/FBM USB2 Enhanced Host Controller - 265C
  • Graphics 
    Original drivers won't work anymore, running on default "Microsoft Basic Display Adapter" driver
  • Wireless
    Working on Windows default driver (ASUS USB Wireless Network Adapter)


 



    Monday, June 30, 2014

    Kingston SSDNow V300 120GB - Desktop/Notebook Upgrade kit (SV300S3B7A/120G)

    This is practically the same drive I got back in February, which ended up in my Shuttle SG33G5 deskop and my missus really appreciated the improved loading times, so now I decided to buy this again in the upgrade kit package, which comes with a 3.5" mounting plate and screws (plus SATA power and data cable) to finish the job on the desktop while this new SSD drive will end up in my Dell Latitude E6420, with the internal Seagate HDD in the Kingston USB 2.0 enclosure.



    Now some could say why buy this one when you can get the bare drive and shop for a separate 2.5" drive adapter, SATA power and data cable and instead get a faster USB 3.0 enclosure. Well, it's a nice little package for ~74 euro from Amazon, the same I paid back in February just for the drive, but if you're looking for better USB performance you should probably look at a different enclosure (see below).

    Kingston SSDNow V300 (SV300S37A120G)


    Drive came flashed with the latest firmware (525ABBF0) out of the box, and compared to the previous tests it performs as advertised. A lot of people seem to complain about performance but without saying or maybe even knowing on what version of SATA interface they tested it on.

    Some loading timings:
    Seagate Momentus Thin
    (ST250LT007)
    Kingston SSDNow v300
    (SV300S37A120G)
    Windows 8.1 Pro (x64) boot to desktop (incl POST)1m4s15s
    Eclipse 4.4 x64 standard (empty workspace)23s9s
    World of Tanks v0.9.11m5s33s

    * these are "cold" application start times, with the application starting the first time, or in my case in order to repeat the test cleared the "standby" / file manager cache using using RAMMap (see RAMMap - Freeing up memory). "warm" starts are a lot faster due to Windows caching files.


    Where before we tested it on a Dell Vostro 1520 with a SATA II interface performance topped at around 250MB/s, on a Dell Latitude E6420 sporting a SATA III interface it went even a little higher than the advertised 450MB/s speeds, that's always nice.

    Dell Vostro 1520 (SATA II)
    Dell Latitude E6420 (SATA III)


    Kingston SNA-DC/U USB


    This is a USB 2.0 drive enclosure and it does a decent job at around ~20 MB/s write and ~30 MB/s read. You can find unboxing reviews on YouTube to have a look at it, I liked this one.


    Here are some performance tests, with the old Seagate HDD in the USB enclosure and internally to compare.

    Kingston SNA-DC/U USB Device



    Monday, June 9, 2014

    Eclipse: Setting "derived" folders (Groovy Monkey script)

    Using Eclipse with Java or Android projects you may have noticed "Open Resource" (CTRL+SHIFT+R) showing files from "bin" folder(s) that you don't want to edit as Eclipse will overwrite them on next build.


    Per Eclipse documentation for Derived resources:
    A derived resource is a regular file or folder that is created in the course of translating, compiling, copying, or otherwise processing other files. Derived resources are not original data, and can be recreated from other resources. It is commonplace to exclude derived resources from version and configuration management because they would otherwise clutter the team repository with version of these ever-changing files as each user regenerates them.
    You could manually update the flag on each resource (Properties) but that is not persisted in a source repository so it is not set automatically when downloading a new project or will get lost when removing and recreating the particular resource.


    This Groovy Monkey script will help you set the "derived" flag on chosen resources quickly, especially handy if having multiple projects in the same workspace. Copy and save into a "monkey" folder inside of your project.

    /*
     * Menu: Set "derived" folders
     * Script-Path: /Your project/monkey/SetDerivedFolders.gm
     * Kudos: Dan Dar3 <dan.dar33@gmail.com>
     * License: EPL 1.0
     * LANG: Groovy
     * Job: UIJob
     * DOM: http://groovy-monkey.sourceforge.net/update/net.sf.groovyMonkey.dom
     */
    
    import org.eclipse.core.resources.IFolder;
    
    def derivedNames = [ "bin", "gen", "libs", "target" ]
    
    out.println("");
    out.println("Derived folders:");
    out.println("~~~~~~~~~~~~~~~~");
    
    def projects = workspace.getRoot().getProjects();
    for (project in projects) {
      if (project.isOpen()) {
        for (member in project.members()) {
          if (member instanceof IFolder) {
            if (derivedNames.contains(member.getName())) {
              out.println(member.getFullPath().toString()); 
              member.setDerived(true);
            }
          }
        }
      }
    }

    If you have installed the Groovy Monkey plugin (see links at the end) you will get the script in the Groovy Monkey menu at the top where you can run it from.



    Run it again whenever you see generated resources creeping into the "Open Resource" listings (making sure you don't have the "Show derived resources" checked though :-)


    Resources:

    Monday, May 26, 2014

    My "new" Dell Latitude E6420

    When buying the Dell Latitude E6410 only a couple months back I thought it would take a few more months before E6420's would show up on the second-hand market, knowing that my work one was going out of warranty after 3 years in two months from now in July. But this Tuesday I got the email notifications I setup on eBay and I thought I wouldn't pass this one.

    I really like my work Dell Latitude E6420, I think it's a great work laptop with a very good design - the solid enterprise level laptops from Dell Latitude line, but this time with a design that makes you attach to it. It's the usual 14" screen but instead of a 14" chassis it is actually as wide as 15" and it does make sense. The material around the keyboard is sort of rubbery and due to the wider design and merging and moving the keyboard keys at the top right corner you get more space to rest your hands when writing those long emails or coding for hours and it feels good. Also moving the volume / mute buttons on the right makes sense, you don't have to reach for them all the way up at the top anymore.

    On the keyboard redesign, yes, it might take a couple of weeks to get used to, but once I did was perfectly fine - it's good to see they kept same layout for newer models so all that adjusting effort won't be in vain. Home / End / Insert / Delete keys stayed at the top, but they are now merged with SysRq, Print Screen and Pause. That makes Ctrl + Alt + Print Screen ("current window" screenshot in Windows which I do quite a bit at times) a bit tricky when you have to use Fn function making it a four key press (3 left hand and one right hand). True, with Windows 7 and later you have the Snipping Tool if you are not a keyboard person.

    Ports layout is good as always, away from your hands at the back and sides, with the nice addition of HDMI along the usual VGA port, plus a mixed USB/eSATA port (already have a USB/eSATA Vantec NextStar3 enclosure I bought a few years ago to put older hard drives from upgrading the desktop).

    Speakers are quite decent, although a bit muffled as positioned underside towards you. Also regarding sound, a frustrating design change was merging the audio input and output jack - that works fine just for headphones, but if you want to use your traditional headset with separate connections, you will require an additional audio splitter cable. Annoying if you don't have one around, but same as with the keyboard layout change, they stuck with it with later models so you will get to reuse it.

    Another interesting feature of this model is the Nvidia Optimus technology, where you have two graphic chips - Intel and Nvidia - and you get to choose which application runs on which through the NVIDIA Control Panel or the right-click context menu for an application.

    Overall, I really like this laptop and I'm glad I could finally get one - same as before, I got it from the UK based it-zone-2 seller on eBay, very happy with it and although it was a bit of a rushed buy I don't regret it (~350 euro incl shipping). The entire laptop is in very good condition, UK keyboard (important for me) looks new, screen clean and bright (possibly new or replaced as well) and for me it was the seller point with its 1600x900 resolution. Also a bonus point is that it came with one 4GB RAM module with a slot ready for upgrade (check with seller first if not obvious from item description or BIOS screenshots), making it cheaper to upgrade to 8 GB by adding another used module for 20-30 euro or a new one for 40 euro (I could swap the memory with E6410) - it does make a difference with Windows making it a smoother experience, especially if you are going to hit it with work tasks at times (things like Eclipse or VMs or setting up RAM disks).

    Dell Latitude E6420 (eBay)
     






    Temperatures after playing World Of Tanks (minimum settings), ambient 18 °C

    Thursday, March 27, 2014

    Intel HAXM 1.0.6 crashing Windows 8.1

    Intel Hardware Accelerated Execution Manager (HAXM) 1.0.6 is the last version that is delivered by Android SDK (check android-sdk\extras\intel\Hardware_Accelerated_Execution_Manager\Release Notes.txt) but this one is causing BSODs with Windows 8.1. Intel has fixed the issue since, but you will have to install the old version and then download the new 1.0.7 version from Intel's website yourself.

    Intel® Hardware Accelerated Execution Manager
    http://software.intel.com/en-us/android/articles/intel-hardware-accelerated-execution-manager/

    Intel(R) Hardware Accelerated Execution Manager (HAXM)
    with Intel(R) Virtualization Technology (VT) 
    for faster Android* Emulation
    
    Version 1.0.7
    ----------------------------
    Changelog
    ----------------------------
    Hot fix for OS X Mavericks (10.9) and Windows 8.1


    windbg> !analyze -v
    *******************************************************************************
    *                                                                             *
    *                        Bugcheck Analysis                                    *
    *                                                                             *
    *******************************************************************************
    
    CRITICAL_STRUCTURE_CORRUPTION (109)
    This bugcheck is generated when the kernel detects that critical kernel code or
    data have been corrupted. There are generally three causes for a corruption:
    1) A driver has inadvertently or deliberately modified critical kernel code
     or data. See http://www.microsoft.com/whdc/driver/kernel/64bitPatching.mspx
    2) A developer attempted to set a normal kernel breakpoint using a kernel
     debugger that was not attached when the system was booted. Normal breakpoints,
     "bp", can only be set if the debugger is attached at boot time. Hardware
     breakpoints, "ba", can be set at any time.
    3) A hardware corruption occurred, e.g. failing RAM holding kernel code or data.
    Arguments:
    Arg1: a3a01f58992ad4f7, Reserved
    Arg2: b3b72bdeebaad53e, Reserved
    Arg3: fffff800820b3000, Failure type dependent information
    Arg4: 0000000000000003, Type of corrupted region, can be
     0 : A generic data region
     1 : Modification of a function or .pdata
     2 : A processor IDT
     3 : A processor GDT
     4 : Type 1 process list corruption
     5 : Type 2 process list corruption
     6 : Debug routine modification
     7 : Critical MSR modification
    
    Debugging Details:
    ------------------
    
    
    DUMP_FILE_ATTRIBUTES: 0x8
      Kernel Generated Triage Dump
    
    CUSTOMER_CRASH_COUNT:  1
    
    DEFAULT_BUCKET_ID:  WIN8_DRIVER_FAULT
    
    BUGCHECK_STR:  0x109
    
    PROCESS_NAME:  System
    
    CURRENT_IRQL:  2
    
    ANALYSIS_VERSION: 6.3.9600.16384 (debuggers(dbg).130821-1623) amd64fre
    
    LAST_CONTROL_TRANSFER:  from 0000000000000000 to fffff8008055eca0
    
    STACK_TEXT:  
    ffffd000`235d31c8 00000000`00000000 : 00000000`00000109 a3a01f58`992ad4f7 b3b72bde`ebaad53e fffff800`820b3000 : nt!KeBugCheckEx
    
    
    STACK_COMMAND:  kb
    
    FOLLOWUP_IP: 
    nt+14dca0
    fffff800`8055eca0 48894c2408      mov     qword ptr [rsp+8],rcx
    
    SYMBOL_STACK_INDEX:  0
    
    SYMBOL_NAME:  nt+14dca0
    
    FOLLOWUP_NAME:  MachineOwner
    
    MODULE_NAME: nt
    
    IMAGE_NAME:  ntkrnlmp.exe
    
    DEBUG_FLR_IMAGE_TIMESTAMP:  52718d9c
    
    IMAGE_VERSION:  6.3.9600.16452
    
    FAILURE_BUCKET_ID:  0x109_nt+14dca0
    
    BUCKET_ID:  0x109_nt+14dca0
    
    ANALYSIS_SOURCE:  KM
    
    FAILURE_ID_HASH_STRING:  km:0x109_nt+14dca0
    
    FAILURE_ID_HASH:  {8339dd0b-1f09-c6df-317e-b65c941183a4}
    
    Followup: MachineOwner
    ---------

    Friday, March 7, 2014

    My "new" Dell Latitude E6410

    Over the years I used a few Dell laptops at work and I must say I like the Latitude E line for a few reasons - build quality, layout and design is quite different from the Inspiron (consumer) line and even the Vostro (small business) line, so you can easily access and replace components, they are compact and sturdy, good screen resolutions, solid keyboards and overall good workers. My current one is a Dell Latitude E6420 and on top of that I think it is a bit of a looker too.

    Back in January I was looking for a new laptop and the new Dell Latitude 5000 line seemed interesting, but even with the January sales and fairly minimal customizations (1600x900 resolution, 8GB RAM) it went around to around 1000 Euro incl. VAT and shipping. Although good value overall, with economy noadays and money pressure it felt like a bit of a splurge as I couldn't justify the upfront cost.

    And then it hit me - I've always taken good care of my work laptops and have been wondering what are companies doing with the old hardware once it was "refreshed" every 2-3 years when coming out of warranty. I remember I've asked my own company IT people a couple of years ago whether there was an option to buy them after that and they said no, probably to avoid the hassle where things could easily get mixed up and bring them more work / trouble then needed.

    And they I thought, if my company doesn't sell them (employes or otherwise) it doesn't mean other companies don't do it, right? And so I've taken the search to eBay.com, then I found eBid.net and finally it appears that even Amazon.com sold used / refurbished laptops now!

    Somehow it made more sense to get a used Latitude for 300 euro, get one more year or so out of it, then go to the next model, even if the yearly cost would be similar, at least if a better deal came along I didn't feel like I was stuck with it, I could give this one to someone in the family and move up.

    My first "mistake" was that I started looking for a Latitude E6420 or E6430 cause I knew they were nice machines - then I realized that mine still had a few months of warranty and probably there wasn't a whole lot of them on the market, so eventually after a few weeks of searches and few missed bids I lowered my expectations and aimed for E6410, knowing though they would a slightly older generation of CPUs and chipsets, but still good Intel Core i5 machine.

    My other "mistake" was to concentrate on US, cause the $  prices and their conversion to Euro was quite appealing, even including shipping costs, to find out later with a bit of a disappointment that importing them into Ireland from outside EU would mean paying import VAT at 23% from declared value + shipping charges + insurance, which overall made the option less appealing - that plus whether the product had a problem meant paying quite a back to ship it back, on top of having to use a UK power adapter and possibly not getting along with a US keyboard, although I found quite a few replacements online at a cost.

    And so last week on a Tuesday evening I found more or less by accident about 10-15 Dell Latitude E6410 machines just freshly thrown on eBay by an UK seller (it-zone-2), exactly what I was looking for - not very picky, but I was looking for a few key points: a screen resolution of 1440x900 or 1600x900 (enough for Eclipse use), an Intel Core i5 (virtualization) and 4-8GB of RAM. They were getting a lot of attention - carefully picking and reading the item description (some were described as having scratches), but generally the same specs - and so I finally bought this one for 290 euro!

    Dell Latitude E6410 (eBay)

    Arriving 3 days later on Friday I was very nicely impressed, not only by the speed of the delivery but also by the condition of the machine - maybe I was just lucky, but I'd like to think that it was just good business sense on the behalf of the seller.
    • new keyboard (coming from a UK seller it meant I didn't have to replace it, saving 30-40 euro)
    • screen in very good condition
    • single 4GB RAM module (meaning I could easily install a new module and bump it up to 8GB, now this was luck :-)
    • clean CPU fan, possibly newly replaced (your regular not cleaned CPU fan looks like this :-)
    • generally in very good condition, bar a couple of scratches on the cover lid, absolutely fine with that, didn't buy it for looks).

    Already done or planning to do some small  changes :
    • Windows 7 Home Premium for Refurbed PCs 32 bit came preinstalled only seeing 3.4 GB  of RAM. In preparation for the RAM upgrade, I've downloaded and installed the 64 bit version instead.
    • update BIOS from A06 to A16 (gradually going through A09 then A11 as Dell recommends in the instructions).
    • install another 4GB RAM module (Samsung M471B5273CH0-CH9 from FlexxMemory.co.uk at ~40 euro, free shipping).
    • replace DVD drive with a 2nd HDD caddy to install the Kingston SSDNow V300 as the primary OS drive while keeping the Seagate HDD for project files, temp files, logs, general storage etc.
    • improve cooling for heavy use through a range of cheap and cheesy methods :-) This model has got quite short rubber feet, although the heat distribution on the bottom seems to be quite wide, which is good, just needs better air flow.
      1. furniture pads - cheap and somewhat effective to shave a couple of degrees C. Found a large set for 2 euro in a local shop but they are slippery on a kitchen table or a desk, should be careful though, still looking for some rubber ones.
      2. external laptop fan - haven't done this one yet, I'm sure it'll look tacky hanging on the side of the laptop and will have to find a way to disable that LED, but it looks cheap enough and might be effective if we get another good summer here in Ireland :-) This laptop has the heatsink on the left side, probably wouldn't mind it so much if it was at the back behind the screen.
      3. laptop cooling pad - this will probably be the most effective method, best looking, although the downside will be the cost as well as raising the laptop and possibly at an angle, needs more researching.

    And that's all folks! Although there is a good chance most people are not going to go for anything like this, I know it was frustrating for me at times and felt like dropping the towel and buying one of the shelf, although at the same time it was an interesting experience and thought maybe someone else will find it useful, who knows...









    Windows 7 Home Premium (x64)
    Windows 8.1 Enteprise Evaluation (x64)

    Sunday, March 2, 2014

    Android SDK Tools on Ubuntu 14.04 beta x64

    Android SDK Tools require 32 bit libraries and normally you are recommended to install ia32-libs package, which is not available for Ubuntu 14.04 anymore.
    $ sudo apt-get install ia32-libs
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Package ia32-libs is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    However the following packages replace it:
      lib32z1 lib32ncurses5 lib32bz2-1.0
    
    E: Package 'ia32-libs' has no installation candidate
     

    Android Debug Bridge (adb) 

    $ ~/android-sdk-linux/platform-tools/adb
    /home/dandar3/android-sdk-linux/platform-tools/adb: error while loading shared libraries: 
    libstdc++.so.6: cannot open shared object file: No such file or directory

    Install lib32stdc++6 package:
    $ sudo apt-get install lib32stdc++6
    [...]
    The following NEW packages will be installed
      lib32stdc++6
    0 to upgrade, 1 to newly install, 0 to remove and 0 not to upgrade.
    [...]
    Preparing to unpack .../lib32stdc++6_4.8.2-16ubuntu4_amd64.deb ...
    Unpacking lib32stdc++6 (4.8.2-16ubuntu4) ...
    Setting up lib32stdc++6 (4.8.2-16ubuntu4) ...
    Processing triggers for libc-bin (2.19-0ubuntu2) ...
    adb should work fine now.
    $ ~/android-sdk-linux/platform-tools/adb version
    Android Debug Bridge version 1.0.31

    Android Asset Packaging Tool (aapt)


    aapt requires both lib32stdc++6 as well as lib32z1 (which in fairness it was suggested above).

    $ sudo apt-get install lib32z1
    [...]
    The following NEW packages will be installed
      lib32z1
    0 to upgrade, 1 to newly install, 0 to remove and 0 not to upgrade.
    [...]
    Preparing to unpack .../lib32z1_1%3a1.2.8.dfsg-1ubuntu1_amd64.deb ...
    Unpacking lib32z1 (1:1.2.8.dfsg-1ubuntu1) ...
    Setting up lib32z1 (1:1.2.8.dfsg-1ubuntu1) ...
    Processing triggers for libc-bin (2.19-0ubuntu2) ...

    Testing again it should work now:
    $ ~/android-sdk-linux/build-tools/19.0.2/aapt version
    Android Asset Packaging Tool, v0.2


    Resources:


    Sunday, February 16, 2014

    Kingston SSDNow V300 120GB (SV300S37A/120G)

    Finally decided to bite the bullet and get a solid state disk which have come down in price quite a bit over the last couple of years, settling on Kingston SSDNow V300 120GB (SV30037A/120G) at ~74 euro from Amazon. The product is listed as "with adapter" which is a plastic raiser, very important for a laptop installation.

    Trying it first in my ageing Dell Vostro 1520 (2010) - a SSD is probably the cheapest (and maybe final) upgrade before getting a new laptop. Here are the specs:
    There is no software delivered with the unit, but you can download the SSD Toolbox from Kingston's website. When you run it (v2.0.7A) it might tell you there is no newer firmware available, although it will tell the firmware version the unit has (mine had 521ABBF0), also printed on the label on the unit. Oddly enough if you download the newer 525ABBF0 package, that includes a newer SSD Toolbox with a subdirectory which looks like the new firmware files, so it is likely the software doesn't check online, meaning that you will have to, if you're the type.



    To the unit itself, things load noticeably faster and as a nice surprise, quieter as well - not only because the SSD is completely silent as expected, but also the laptop fan seems to kick in less often. Probably because loading things quicker it allows the CPU to spend less time at higher frequency and keep the CPU temperature lower.

    Some totally empirical load timings in Windows:

    Seagate 7200.4Kingston SSDNow v300
    Windows 8.1 Pro (x64) boot to desktop (incl POST)50s20s
    Firefox 278s3s
    Chrome 3210s2s
    Eclipse 4.3.1 x64 standard (empty workspace)33s12s
    Microsoft Visual Studio Express 2013 for Desktop23s5s



    The SSD drive tops at 250 MB/sec and that seems to be in line with the SATA revision 2 (300 MB/s) interface, as shown by PC Wizard 2013 below. I will install this in my desktop as well and see how it performes in there, Kingston is rating it up to 450 MB/s with SATA revision 3 (600 MB/s) interface.


    Finally, WEI rating for primary hard drive went up accordingly from 5.9 to 7.7.





    Tuesday, January 21, 2014

    VMware Player 6.0.1 on Ubuntu 14.04 alpha - Modules compile error

    Updating Ubuntu 14.04 (alpha / development) with latest 3.13.0-x kernels will require recompiling the modules for VMware Player 6.0.1 which will fail as per below. The solution is based on Garrett Skjelstad's "VMware modules & kernel 3.13" blog post.
    $ sudo lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu Trusty Tahr (development branch)
    Release: 14.04
    Codename: trusty
    
    $ uname -a
    Linux VOSTRO 3.13.0-4-generic #19-Ubuntu SMP Thu Jan 16 18:10:11 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
    
    $ vmplayer --version
    VMware Player 6.0.1 build-1379776



    [...]
      CC [M]  /tmp/modconfig-7ykUGm/vmnet-only/filter.o
    /tmp/modconfig-7ykUGm/vmnet-only/filter.c:206:1: error: conflicting types for ‘VNetFilterHookFn’
     VNetFilterHookFn(unsigned int hooknum,                 // IN:
     ^
    /tmp/modconfig-7ykUGm/vmnet-only/filter.c:64:18: note: previous declaration of ‘VNetFilterHookFn’ was here
     static nf_hookfn VNetFilterHookFn;
                      ^
    /tmp/modconfig-7ykUGm/vmnet-only/filter.c:64:18: warning: ‘VNetFilterHookFn’ used but never defined [enabled by default]
    /tmp/modconfig-7ykUGm/vmnet-only/filter.c:206:1: warning: ‘VNetFilterHookFn’ defined but not used [-Wunused-function]
     VNetFilterHookFn(unsigned int hooknum,                 // IN:
     ^
    make[2]: *** [/tmp/modconfig-7ykUGm/vmnet-only/filter.o] Error 1
    make[2]: *** Waiting for unfinished jobs....
    make[1]: *** [_module_/tmp/modconfig-7ykUGm/vmnet-only] Error 2
    make[1]: Leaving directory `/usr/src/linux-headers-3.13.0-4-generic'
    make: *** [vmnet.ko] Error 2
    make: Leaving directory `/tmp/modconfig-7ykUGm/vmnet-only'
    Failed to build vmnet.  Failed to execute the build command.
    Starting VMware services:
       Virtual machine monitor                                             done
       Virtual machine communication interface                             done
       VM communication interface socket family                            done
       Blocking file system                                                done
       Virtual ethernet                                                   failed
       VMware Authentication Daemon                                        done

    To fix this we will need to apply this patch to filter.c in VMware Player module sources. Start with saving the diff below (download):
    205a206
    > #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
    206a208,210
    > #else
    > VNetFilterHookFn(const struct nf_hook_ops *ops,        // IN:
    > #endif
    255c259,263
    <    transmit = (hooknum == VMW_NF_INET_POST_ROUTING);
    ---
    >    #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
    >       transmit = (hooknum == VMW_NF_INET_POST_ROUTING);
    >    #else
    >       transmit = (ops->hooknum == VMW_NF_INET_POST_ROUTING);
    >    #endif
     

    Or download directly to the system:
    $ wget https://sites.google.com/site/dandar3blogspotcom/vmware-player-601-on-ubuntu-1404-alpha-filter.c.diff \
           -O /tmp/filter.c.diff --no-check-certificate

    Next will apply the patch to filter.c in vmnet.tar (extract, patch, update archive):
    $ sudo -E -s
    
    # cd /usr/lib/vmware/modules/source/ 
    
    # cp vmnet.tar vmnet.tar.original
    
    # tar xvf vmnet.tar vmnet-only/filter.c 
    vmnet-only/filter.c
    
    # patch vmnet-only/filter.c < /tmp/filter.c.diff 
    patching file vmnet-only/filter.c
    
    # tar -uvf vmnet.tar vmnet-only/filter.c 
    vmnet-only/filter.c
    
    # rm -rf vmnet-only/
    And now you're ready to restart VMplayer, which will ask you to re-compile VMware Player modules, successfully this time.