Dry run in a virtual environment

When installing Linux for the first time, it can seem quite intimidating. When installing it for the 10th time it can still be intimidating, depending on the distro of your choice, but at least you'll already know what you're in for. Debian does fit the latter description for many.

When you have never tried it before, and especially if you want to dual boot it with another OS, it's probably worth giving things a try before going all-in, in case you want to feel more confident, experience it first, and make sure you can do it without accidentally wiping out all the data from your computer.

Nothing beats a full backup. Always do a full backup, even when you are a seasoned old-timer. That is basically the only way that can prevent data loss, and even that is not 100% sure.

Enter the Virtual Machine

The idea of virtualization had been around since the 1960s, the time of time-sharing mainframe computers when computing power was a premium resource. Since then it had evolved along with computers, and while it's still in use for purposes similar to the original application, virtualization is now also present in the world of personal computing.

With the help of virtualization software, you can essentially emulate a complete PC. It would create and manage virtual CPU(s), hard disk(s) optical drive(s), video card(s), all sorts of peripherals and connectors, and just about everything a normal PC would have. Then, on the virtual machine, you can install and run another operating system, without having to reboot your PC.

So, if this is already possible, why not virtualize all the time? Why worry about dual booting? The question is valid, and the answer is simple: You can even do that, given your hardware is powerful enough. You must, however, take into account that the virtual machine would often claim the allocated resources for itself.

E.g. if you have allocated 2GB of ram to your virtual machine, and your main system has 4 GB in total, your base system will be left with only 2GB, and the virtual machine would occupy (and use) the other 2 GB. If you have a lot of RAM, like e.g. 8GB or even better, 16GB, this would be less of a problem. You are also better off with a multi-core CPU with preferably 8 or more cores. When these are present, nothing stands in the way of "full time" virtualization, in which case you can forget about fiddling with the dual booting process. The downside of this approach is, when there is any problem with your base OS, it would affect your virtualized OS as well, as it will be dependent on its host.

Virtualization solutions

There are plenty of solutions for virtualisation: KVM/Qemu (Linux), Xen, Hyper V (Windows), etc. for servers, or Parallel (Mac), Boot Camp (Mac), VirtualBox, VMWare, etc. for Desktops are all serious contenders. For cheap (free), and easy setup, the option for your Debian dry-run to go for would be Oracle's VirtualBox.

VirtualBox can be installed on any operating system, and it can host almost any operating system in its virtualised environment. You can create multiple virtual machines, and even run them in parallel, each in its own window, or make a virtual system full-screen, essentially hiding the fact that it's running in a VM.

There are many online guides available about how to set up a virtual environment in the software of your choice, a simple online search will bring you results. Going into much detail is a little beyond the scope of this document, and as there are so many choices and factors, you'll sort of have to figure out what suits you best. Oracle has a very detailed user guide for VirtualBox, from which you can learn just about anything about the software and its usage.

This MakeUseOf article provides a rather detailed guide, and even walks you through how to install Windows$ Ubuntu Linux and macO$ in a virtual machine, so go ahead and read it. But don't forget to come back and get on with your Debian journey.

Dry running Debian in a Virtual machine

Once you have familiarised yourself with your technology of choice, create a virtual machine, fire it up, and follow the installation guide to go through the moves of installing Debian. You can even do it more than one time, trying different options, or approaches, or test different desktop environments this way. The experience you gain will be really useful when attempting to install Debian on your PC for real.

If you are planning to dual boot Debian with another system, be it Window$ or macO$, you can try this scenario in your virtual machine as well. Fire up your virtual machine, install the original OS, e.g. Micro$oft Wndow$ into it, in a similar set-up your PC has. (E.g. if your PC has two hard drives and three CD drives, make sure you create a VM with similar amounts of storage.)

Then follow the dual booting and partitioning guides in the chapters that follow, and install Debian besides the original OS in the virtual machine. If you've managed to install Debian and keep both systems accessible in your virtual machine, you are ready to go "live"' and install Debian GNU/Linux in a real dual booting environment.