Silent CORruption CHecker

A new tool designed to provide a workflow around hashing files and then checking them later in order to find corruption. Combined with external backup solutions (such as CrashPlan or Amazon Cloud) this tool lets you forgo heavier tools like SnapRaid which require dedicated drives. This doesn’t provide recovery of data. Only corruption detection.

https://github.com/trapexit/scorch

WTF?! #1: Kubernetes’ rbd_util.go

https://github.com/kubernetes/kubernetes/blob/release-1.4/pkg/volume/rbd/rbd_util.go#L57

po := path.Join(sys_path, name, "pool")
img := path.Join(sys_path, name, "name")
exe := exec.New()
out, err := exe.Command("cat", po, img).CombinedOutput()

Does Kubernetes not have code review? Fork/exec’ing cat to read content from files? This is embarrassing bad.

ChromeOS & OpenVPN: using ovpn files to setup OpenVPN on ChromeOS

  1. First you need to split the “ovpn” file into the CA cert, client cert, and client key. If you’re using Crouton with ChromeOS you can do this on the ChromeOS device. Otherwise you’ll need to do this on another machine. The below is from an Ubuntu desktop.

    I’ve also created a small script to do the same: split-ovpn

    $ ls
    client.ovpn
    $ awk ‘/<ca>/{flag=1;next}/<\/ca>/{flag=0}flag’ client.ovpn > ca.crt
    $ awk ‘/<cert>/{flag=1;next}/<\/cert>/{flag=0}flag’ client.ovpn > client.crt
    $ awk ‘/<key>/{flag=1;next}/<\/key>/{flag=0}flag’ client.ovpn > client.key
    $ openssl pkcs12 -export -in client.crt -inkey client.key -out client.p12

  2. Copy the files to your ChromeOS device via SD Card, USB stick, email, Google Drive, etc.
  3. Goto ChromeOS’s Settings menu
  4. In the Search bar next to “About Chrome OS” type “certificates” and wait for the “HTTPS/SSL > Manage certificates…” button to appear and click it
  5. Select the “Authorities” tab and click “Import…”
  6. Find and select the file “ca.crt”
  7. Select the “Your Certificates” tab and click “Import and Bind to Device…”
  8. Find and select the file “client.p12”
  9. Click “Done”
  10. Click “X” on the Search to bring you back to the main Settings
  11. Click on “Add connection” under “Internet connection”
  12. Select “OpenVPN / L2TP”
  13. Change “Provider Type” to “OpenVPN”
  14. Change “Server CA certificate” to that which you just added
  15. Change “User certificate” to that which you just added
  16. Fill in “Server hostname” with the value found in the original “ovpn” file with the line starting with “remote”. The line will look something like “remote my.hostname.com 1194”. The “Server hostname” would be in this case “my.hostname.com:1194”.
  17. Pick a “Server name”. Can be anything you like.
  18. Enter your client’s “Username” and “Password” if needed.

Notes:

  • Disable compression on your OpenVPN server

Backup, Recovery, & Maintenance Howtos

https://github.com/trapexit/backup-and-recovery-howtos

There is a lot of information scattered throughout the internet about creating backups of files, filesystems, hard drives, solid state drives, etc. However, there is really no one place where the different methods and technologies are described, compared, and packaged as full stack solutions. Recovery is almost a black art. Random tools you find talked about on miscellaneous forums.

Rather than using a wiki which can get messy I’ve created a git repo of Markdown files which try to walk through different backup solutions, end to end. From describing what they are to how to recover and maintain them.

I’ve started with a document on using mergerfs, snapraid, and CrashPlan given that’s my setup. Should be noted that I’m the author of mergerfs.

Pull requests are very, very welcome. All any any tech, platforms, setups are welcome.

Resetting / revirginizing your Wii to (almost) factory state

http://spawn.link/factory-reset-revirginizing-your-wii/

Resetting / revirginizing your Wii to (almost) factory state

  1. WARNING: This will completely erase everything on your system.
  2. You’ll need giantpune’s wiiqt tools. It appears they’ve been abandoned for some time so I’ve cloned the code to https://github.com/trapexit/wiiqt just in case. For Windows: ohneschwanzenegger, nandExtract, nandBinCheck, giantpune-tools-dlls. On other platforms they’ll need to be built locally.
  3. Use BootMii [hackmii_installer_v1.2] to acquire an up to date version of your Wii’s nand.bin. We want to make sure that the bad block list is up to date.
  4. Using ohneschwanzenegger:
    1. > Nand Dump > New nand…
    2. Click “Existing Nand…”
    3. Leave “Keys”, “Boot 1 & 2”, and “uid.sys” alone. (Set to “From old nand”)
    4. Click “OK”
    5. You should see:Set path to nand as <path>
      Created /shared2/test/testlog.txt
    6. > Content > FormatYou are about to format <path>This cannot be undone. Are you sure you want to do it?
      Click “Yes”Formatting nand…Created /shared2/test/testlog.txtDone!
    7. Set the “Local Cache” directory to some temporary directory. (“/tmp”, “c:\temp”, etc.)
    8. In the top text entry line enter “4.3U” or whichever OS version you wish to install.
    9. Click “Get It!”
    10. You’ll see lots of “Received a completed download from NUS” and matching “Installed title XXXXXXXXXXXXXX vXXXXX to nand” and finally “NUS object is done working”
    11. You’ll be presented with the same dialog box as when selecting > Content > Setting.txtProbably should change the “Code” and “SerNo” to what’s on the bottom of your Wii.Click “OK”
    12. > Content > Write meta entries
    13. > Content > Flush
    14. Exit ohneschwanzenegger
  5. Place the nand.bin file you created with ohneschwanzenegger on the SD card’s root directory. (Overwriting the previously dumped file.)
  6. Boot the Wii into BootMii using the SD card and  restore the nand
  7. If you expect to restore the nand in the future you may want to setup the Wii and then dump again.