Sunday 15 December 2019

Spinrite 6.0 on Virtualbox (Linux)



I have found a significant difference in performance depending how the VM is configured in VirtualBox (IDE vs SATA). This is the process I follow to scan hard disks connected via USB adaptors on a Virtual Machine:

Create the VM
  1. Type: Other, Version: DOS
  2. System: Disable Floppy; Memory: 128MB
  3. Storage
    1. Remove the IDE Storage Controller
    2. Add a SATA Controller, enable Host I/O Cache
    3. Add an Optical Drive and choose the Spinrite.iso
    4. Insert the USB drive
    5. As root type dmesg on the command line and identify the device, for example /dev/sdb
    6. chmod o+rw /dev/sdb
    7. As the user running VirtualBox run:
      VBoxManage internalcommands createrawvmdk -filename VirtualBox/sdb.vmdk -rawdisk /dev/sdb
    8. Add a Hard Disk to the SATA Controller > existing disk: sdb.vmdk
  4. Sound: Disabled.
  5. Network: Disable the Network adapter.
VirtualBox Storage configuration


Using the default IDE storage controller slows down the scan by a factor of 10 (approx)

The lack of support for GPT partition tables of the current version of Spinrite (6.0) is a major drawback. I still use it for checking hard disks and data recovery with my old drives, or with new ones, as long as I initiate them with a MBR partition table.

Friday 17 May 2019

Avoid losing the OpenVPN's CA data on EdgeOS

After updating the firmware of an EdgeRouter 8 to v2.0.1, all CA data stored initially at /usr/lib/ssl/misc/demoCA was lost:

- cacert.pem
- careq.pem
d certs
d crl
- crlnumber
- index.txt
- index.txt.attr
- index.txt.attr.old
- index.txt.old
d newcerts
d private
  - cacert.key
- serial
- serial.old

Luckily, I had the CA's certificate and private key stored at /config/auth, but not the rest of the files. In order not to lose these files next time I upgrade the firmware, I have moved the newly created demoCA directory to /config/auth, and updated the configuration file /etc/ssl/openssl.cnf. Where it says:

dir      = ./demoCA

I have changed it to: 

dir      = /config/auth/demoCA