Sep 272019
 

It’s been a while since my last post!

I recently had to recover a dying USB stick that kept spitting out read errors. ddrescue‘s default parameters could only help so much as the flash controller would hang the instant it hit a bad read error, necessitating a unplug and replug of the USB stick before it could carry on.

I decided to hack up a little script so I could recover select areas of the USB stick first and control what blocks ddrescue was attempting. Using ddrescueview, I could see which blocks had and had not been attempted. Using the information from the Block Inspector, I could obtain a hex address of the block I wanted to start from.

Block Inspector

Copying the text from the blocks into my hex-to-decimal script gave me a block to start from.

$ ./gethex.sh 'Non-tried0x1EB10000 (491.06 MiB)0x001FCB40 (1.99 MiB)
> '
0x1EB10000
514916352

The gethex.sh script is just a simple bash script to extract the starting block from the output

#!/bin/bash
INPUT=$1
INPUT=${INPUT/> /}
STRING=$(echo $INPUT | cut -d ' ' -f 1)
STRING=${STRING/Non-trimmed/}
HEX=${STRING/Non-tried/}
echo $HEX
printf "%d\n" $HEX

That block number lets me use the -i parameter to set a starting point and -s to set sector size. Then I use a loop to scan through a certain amount of blocks at a time

START=514916352;for x in {0..20000}; do echo $(($START+512*$x)); ddrescue -i $(($START+512*
$x)) -a 1024 -s 512 -O -d /dev/sdx imagefile mapfile; if [[ $? -gt 0 ]]; then START=$(($START+512)); break;fi; done;START=$((
$START+512*$x+512));echo $START;

Share
Feb 192018
 

This guest post is proudly brought to you by Eltechs, the maker of ExaGear!

RetroPie: an introduction

RetroPie is a solution that enables running old(ish) video games (arcade, PC or home console) on your PC, Odroid or Raspberry Pi. (In fact, it is the most popular graphical front-end for Raspberry Pi). Working on open source OS, such as Debian and Ubuntu, RetroPie can run as a standalone OS from a specially prepared SD card or on top of existing one, such as Raspbian.

What makes RetroPie great? An evolution of good old EmulationStation of Arch Emulators, it incorporates the best features of almost every gaming emulator in existence. Not only it has a familiar user-friendly EmulationStation interface complete with an array of custom themes and 50+ most popular systems already installed in it, but also includes RetroArch (a Libretro application API that helps to launch games) and powerful Kodi media center.
Having grown out of EmulationStation, RetroPie developed into a large open source project for devices with ARM cores and received wide acclaim. With a range of extended features, it is perfectly compatible with Raspberry Pi 0/1 and 2/3, Odroid C1/C2, Odroid XU3/XU4 (the last two working on Ubuntu) and PC devices (running Ubuntu or Debian).

Continue reading »

Share
Feb 142018
 

I needed to get all MAC addresses without hyphens today so I could match against some MAC Address barcodes.
Ended up writing this one-liner to get what I needed. I’ve added some variables to make it a bit easier to read here.

$svrDHCP = "DHCP Server"
$scope = "10.10.0.0"
Get-DhcpServerv4Lease -ComputerName $svrDHCP -scope $scope | select IPAddress,ClientID,Hostname | ForEach-Object { Add-Member -InputObject $_ -name Mac -MemberType NoteProperty -Value $($_.clientID -replace "-",""); write-output $_} | out-gridview

Share
Dec 192017
 

The team at Eltechs, the makers of ExaGear have given me a heads up about their Christmas Sale this year!

They’re giving everyone 25% off ExaGear Desktop! This is the perfect chance to pick up a bargain on this great piece of software.
You can see the few things I’ve done with it in the past in the following posts:
ExaGear 2.0 Review
ExaGear and Steam Games
ExaGear and More Steam Games

The offer ends on December 25th (23:59 Pacific time) so make sure you grab it before the offer ends!
You can choose the package to buy through this link!

Share
Nov 232017
 

I bought a pair of cheap USB headphones yesterday so I could test out whether my sound issue on my computer was due to my sound card, or another issue.

The issue I after plugging them in however, was that I could not easily switch the sound output to the USB headphones.
I don’t run pulseaudio, so I was left with playing with configuration files to try and switch the audio over.

If I had been running pulseaudio, I’m sure this blog post would have been much shorter!
Continue reading »

Share