Hi all. I’ve been wanting to release this for a long while now, but I’ve only just had time to write this all up. I should start by talking about what this is, and what this isn’t. This is a tutorial showing you how to set up Cygwin on Windows 7 or later, in order to run an initial, stripped down version of DDRescue-GUI. This is not an easy installation, and it isn’t free of bugs and other issues, but I hope that it’s enough to get you started running DDRescue-GUI on Windows.
NOTE: This video and post expect a small amount of knowledge about how Linux and Windows work. It’s possible to follow the tutorial without this, but it may make your life significantly harder. If you aren’t very technically minded, this may not be the tutorial for you.
System Requirements and Prerequisites
You need to have:
- Windows 7 or later (32-bit or 64-bit).
- At least 2 GB free disk space to install Cygwin.
- A (preferably fast) internet connection.
- At least 2 GB of RAM, but preferably more.
- A few hours to set up Cygwin.
It may be possible to do this on Windows Vista, but I don’t support that configuration as Vista is end-of-life.
If you have a faster machine with a good internet connection, it may be significantly quicker, but expect this to take at least 2 hours in total to get it set up.
Installing the Cygwin packages and dependencies for DDRescue-GUI
Temporarily disabling antivirus software
As demonstrated in the early parts of the video, Cygwin is not popular with antivirus programs because of the way it works. As a result of this, it is necessary to temporarily disable your antivirus program when installing Cygwin, and then create an exception after the base packages have been installed.
Disabling your antivirus is usually simple. You can often click an icon in the system tray and use the menus, but if not, you may need to open the main window and look in the settings section. If in doubt, search online for instructions for your antivirus product.
NOTE: Make sure not to browse the internet with your antivirus disabled! As soon as the Cygwin installation steps have been completed, you should re-enable your antivirus and add an exception for Cygwin as is detailed later.
Downloading and installing the base Cygwin packages
Next, head to http://www.cygwin.org and download the Cygwin setup program. I used the 32-bit version, but the 64-bit version will work fine as well, as long as your system has 64-bit Windows installed. If in doubt, use the 32-bit version.
After downloading, simply click through the Cygwin installation wizard and click “Okay” where needed to install the base packages as shown in the video.
At this point, it’s a good idea to check that Cygwin is working – open the Cygwin Terminal and check that you get a command prompt.
Installing dependencies for DDRescue-GUI
Next, re-open the Cygwin installer, and find and select the following packages for installation using the search box:
ddrescue, python2-wx, python2-wxversion, python27-requests, wget, libnotify, xauth, xorg-server, xinit
Make sure not to install any versions of packages labelled “Test”. Installing these may take a while. If you need additional instruction, see the relevant part of the video which walks you through this.
Defining an exception for Cygwin in your antivirus program
This is likely to be a bit more complicated to do, but generally there’s an “exceptions” area in the settings where you can define files and folders to ignore. You want to head here, and add a exception for C:\Cygwin (or C:\Cygwin64, if you installed 64-bit Cygwin).
As before, if you’re not sure how to do this, your best bet is to find instructions for your specific antivirus program.
Installing DDRescue-GUI in Cygwin
Head to https://www.hamishmb.com/html/downloads.php?program_name=ddrescue-gui, or https://gitlab.com/hamishmb/ddrescue-gui/tree/initial-cygwin to download the Cygwin version of DDRescue-GUI. Once done, you should extract the folder using Windows Explorer, and then open a cygwin terminal as administrator by right clicking on it and choosing the “Run as Administrator” option from the menu. You may be prompted for authentication.
Once opened, you should run the following commands one line at a time to install DDRescue-GUI:
mkdir /usr/share/ddrescue-gui cd /usr/share/ddrescue-gui cp -rv /cygdrive/c/Users/<yourusername>/Downloads/ddrescue-gui-initial-cygwin/ddrescue-gui-initial-cygwin/* ./ cp -v images/Logo.png ../pixmaps/ddrescue-gui.png
If you need any more instruction, please watch the relevant part of the video, or drop me an email.
A final few commands are needed to start DDRescue-GUI each time you want to run it:
cd /usr/share/ddrescue-gui startxwin & DISPLAY=:0 python2 ./DDrescue_GUI.py
You may see a load of output from the startxwin command, but that is normal and can be ignored. To type the next command, you can press enter first. You may also see a taskbar icon for the XWin Server.
Once started, DDRescue-GUI looks and runs very much like how it does on Linux and macOS, with two exceptions:
- Disk Information is not available.
- You cannot yet mount output files using DDRescue-GUI.
Neither of these problems stops you from using the GUI, but you’ll just have to figure out which devices in “/dev/” correspond to the Windows drive letters. This can be done by plugging in the drive to recovery from while browsing /dev, and seeing which files are added. To mount output files you will have to use Windows’ built-in tools, or other third-party tools.
This has been a very extensive blog post, but I hope it has helped anyone who wants to run DDRescue-GUI on Windows, until I get a polished release with an installer out. That’s it for now, but stay tuned – the PXE booting series is due to be finished very soon!