Getting rid of an old email address…

Just if anyone wonders by chance, I’ve deleted one of my old Emailaddresses, which was called ‘phoenix@minhiriath.org’ (2004-2017 rest in peace, now without spam).

It just grew to a spam honeypot lately and I already stopped using the address actively in 2013, as far as I remember.

I held it active for the unlikely chance that anyone would have wanted to get in contact with me, who hasn’t got my current addresses. Now I don’t care anymore, it’s deleted.

Integrity checks of different file types after hard disk crashes

So, your hard disk crashed?

You rescued it with ddrescue/other tools?

Now you don’t know if the files are still intact?

Here some solutions for some media file formats:

  • Movies (avi, mpeg, mp3, mkv, webm, … everything ffmpeg can decode.)
    • ffmpeg -v error -i "$1" -f null - 2>"$1".log
    • decodes a movie or audio file and reports all errors into a logfile, so if you do that for every of your files you get a bunch of logfiles which you can grep for Read errors, then you have an idea which movies are damaged.
    • #!/bin/bash                                 
      
      if [ ! -e "$1.log" ]; then                  
              echo "Checking file: $1"            
              ffmpeg -v error -i "$1" -f null - 2>"$1".log                                    
              ls -l "$1".log                      
      else                                        
              echo "$1 already checked."          
      fi

      find . -type f -size +1M -exec ./check.sh "{}" \;

  • Pictures (png, jpg/jpeg)
    • Use pngcheck for pngs
    • Use jpeginfo -c for jpgs
  • Music (flac)
    • Just use flac -t to test a flac file

When I find some other useful integrity check methods for other file types or media I may add some.

Fuck you, probability!

So why do we nerds use NAS/Server storage with RAID systems? Because we know hardware can fail, especially mechanical hardware.

And there are different variants of RAID (redundant array of independent disks) systems

  • RAID 0 (All disks just appear as one)
  • RAID 1 (One disk is mirrored to another one)
  • RAID 10 (Half of the disks is mirrored to the other half)
  • RAID 5 (Redundant parity information is stored so that 1 out of N disks can fail without data loss)
  • RAID 6 (Same as RAID 5 with one additional spare disk, so that 2 out of N can fail)

Back to topic, why am I writing ‘FUCK YOU, probability’?

The idea for RAID 5/6 came out of the typical probability how often a mechanical disk may fail. So if you’re almost paranoid you’re choosing RAID 6 for your Data to be ‘absolutely’ sure you won’t loose data.

Yeah, of course, until you come to that point, like me, when over a fucking weekend 3 out of your 5 disk RAID 6 system fail.

(more…)

Rescuing data from a damaged Windows HDD pt.II

When I did and wrote the first post I did not know of ddrescue.

And it worked like a walk in the park, it just took eight and a half hours…

/tmp # ddrescue -d -r3 /dev/sdd2 blah.img blah.logfile
GNU ddrescue 1.21
Press Ctrl-C to interrupt
     ipos:  113173 MB, non-trimmed:        0 B,  current rate:       0 B/s
     opos:  113173 MB, non-scraped:        0 B,  average rate:   5280 kB/s
non-tried:        0 B,     errsize:    1362 kB,      run time:  8h 28m  5s
  rescued:  160990 MB,      errors:     1259,  remaining time:         n/a
percent rescued:  99.99%      time since last successful read:      1m  6s
Finished

Just 1362kB couldn’t be recovered. Everything of importance could be viewed/retrieved. Perfect.

The Browser Struggle

I were a long-time Firefox user because of the unique addon called ‘tree style tabs’ and this browser is still the only one implementing this feature the right way.

Basically there’s no alternative, period.

So now I’m facing the problem that Firefox gets slower and slower.

First of course I’m a tab whore, 50-100 tabs are normal, because I also use tabbed websites for some kind of ‘read-later’ feature. Tree style tabs come in handy here, because you’re able to collapse a tree and forget it for some time until you need those tabs again. So this is the explainable slowdown of my so beloved Firefox.

Second, it gets slow loading websites – wtf? – that’s not really explainable, all other browsers I’ve tested, even with alot of tabs still load pages fast. And Firefox has even the feature (also with plugins) to not load pages until you activate them. So a lot of concurrent page loadings can’t cause that slowdown.

Last but not least, Firefox is eating ALOT of RAM, I even got problems at my workstation @work with 16GB RAM, swapping like hell. Of course the browser isn’t my only application running… but when you read the stats and the browser is eating more than one third of your memory you’re beginning to ask questions…

So I just do not get around the fact that I have to find another browser supporting my needs. That goes so far that I’m really going beyond my so fuc**ng needed tree style tabs plugin and that I’m ready to ditch it. (more…)

Jenkins Pipeline: using string keys of a map to unstash artifacts in a loop

Just using my blog as my permanent public notepad.

def my_keys = build_result.keySet() as List;

for (int i = 0; i < my_keys.size(); ++i) {
  def key_to_unstash = my_keys[i];
  print 'Unstashing ' + key_to_unstash;
  unstash "${key_to_unstash}";
}

my_keys = test_result.keySet() as List;

for (int i = 0; i < my_keys.size(); ++i) {
  def key_to_unstash = my_keys[i];
  print 'Unstashing ' + key_to_unstash;
  unstash "${key_to_unstash}";
}

 

 

Rescuing data from a damaged Windows hdd

A neighbour talked to me on the street lately that his laptop hard disk may be damaged, because his laptop didn’t even boot anymore. The data on the disk is important to him so he asked if I may take a look.

So that’s what I did with this hdd, a WD 500GB.

  1. Put it into my harddisk docking station and checking if my system recognizes the hdd.
    • Yay. At least the partition table isn’t damaged, and it’s not a headcrash. I can access all partitions and mount them.
    • Ohoh, Windows partition damaged! SATA read errors on this one, so maybe damaged blocks. (used dmesg -w)
    • Backup partition readable without erros and transferred all data to another disk.
  2. Attempt to rescue data from the damaged partition
    • *Uses dd magic* {dd bs=1M conv=sync,noerror if=/dev/sdd2 of=/media/data/win7.img}
    • After dd has finished, setting up the loop device ({losetup /dev/loop2 /media/data/win7.img}).
    • Generating a vmdk for virtual box to be able to load the image as a disk for my Windows 7 VM.
      • {VBoxManage internalcommands createrawvmdk -filename /tmp/test.vmdk -rawdisk /dev/loop2}
    • Starting the VM and let windows do the task of repairing the damaged ntfs partition, let’s hope there’s something to rescue after that step…
    • … while waiting for that step to finish, my neighbour brought me his 3TB external hard drive to transfer the data on.
      • Which was formatted with FAT32 *sigh*, saved the data, reformatted to NTFS and copied the data back.
    • The NTFS chkdsk took almost more than 72h!
    • And after that 72h, nothing useful was there to rescue. The “User” folder was just empty. 🙁
      • Well, after a second look some days later i remembered that windows ntfs chkdsk saves data in “found.000”, so i checked that again and found at least some files which were recovered, hopefully enough for my neighbour. 🙂
  3. finish.

 

6 years, finally my PC system is too slow.

In November or December 2010 I bought a i7 950 with 3.0GHz, over time I upgraded the RAM to 24GB and the graphic card stopped at a nvidia GeForce 760 GTX. Six years of well enough performance for everything I could think of, programming, 3D graphics, gaming.

Finally this is over.

I bought Deus Ex: Mankind Divided (err.. yes I know that this game is a graphic whore!) and realized that even on low graphic preferences some scenes result in a dia show, despite other completly fluent parts. And because of that stuttering combat parts I gave up playing on my current machine.

Thinking about new PC components now…

Qualys SSL Labs: SSL Report: A+

Yes, I’ve got it back!

After my ssl certificate provider startssl.com upgraded the root certificates with the power of SHA256withRSA instead of SHA1, I’ve got my A+ rating for SSL secured websites back.

Here the link for verification: https://www.ssllabs.com/ssltest/analyze.html?d=mmo.to

With the upgrade of my account at startSSL on May, 28 I could create a new certificate which gained all the benefits of the upgraded signature algorithm, so to say, not rated ‘weak’ anymore. 😀

Why I did not check my rating earlier? Well, lazy?! Other more important tasks to do?! 😛

Elliptic-curve cryptography for TLS certificates still not quite usable

Today I tried to just chose a elliptic curve for my TLS certifcate which I thought to be suitable, but was very disappointed about the browser support for those curves. I generated a key with a 521 bit curve but realized afterwards that browsers like M$ ones and chromium (wtf?) only support two curves recommended by the NSA.

Okay, sorry, I don’t really care what the NSA recommends, but I can’t put some major browsers before the doorstep. Well, so I reverted back to the 4096bit RSA key, because of the wide adoption.

Maybe I’ll provide a key with P-384 later on.

You know, you’re thinking about some future proof solution, at least for some years, but you’re stopped by slow technology adoption… quite disappointing.

At least I still got my A+ on ssllabs.com:

https://www.ssllabs.com/ssltest/analyze.html?d=mmo.to

Some links: