Dual-booting and virtualization of the same OS!
(this is my second post, and its part of my efforts on being more active on blogging and sharing experiences)
Sticking and using just one OS, in my naïve opinion it has a lot of drawbacks!
As a developer, there are many tools designed/targeted to a specific-platform first, then cross-platform second. Which means, for that specific platform, those tools are far superior. And being developer, you always are hunting for the ones that make your workflow easier and faster. I guess any developer/coder or hacker for that matter, knows what I am talking about.
I like to think of myself that I am not strongly connected to any OS. I started using computer when win95 was around (it was the time when GUI became a thing, and actually I was 7 years old, so I don’t remember much). But I started heavily using PC between win98 and winXP (during the time winME was trying to become a thing and never could). I had a PC with 128MB RAM and 20GB or HDD. After winXP, I jumped into Linux world. Debian, more precisely. It was the time when “DRIVERS WOULD NEVER WORK, AND YOU HAD TO FIND THE WAY AROUND IT”. I jumped around into many distros during Vista thing for couple of years. When win7 came along, I wanted to buy my new laptop with win7, but to my surprise I got a Mac Book as a present, I think it was MB2010. I loved it but somehow I always wanted to get to Windows world. I did it when the Windows Insider program was launched!
Anyways, enough with chit-chat. Point being, using many OSes gives you more depth understanding into the whole computer science thing.
I own a DELL XPS 15 9550 upgraded with 32GB of RAM, quad-core Intel i7 processor and two disks (one NVMe 512Gb and one SSD 512GB). And its my ultimate machine :). Windows occupies one drive with it’s boot loader, while the other drive has GRUB2 with Ubuntu. So, by default the system starts with Windows drive and normally gets into Windows (I use Windows for research and writing papers). However when i need to use development tools i go with Ubuntu, by entering boot menu of PC and selecting second drive to boot from, simple as that.
So the setup is like this:
- sda1 ~250GB: ntfs- Windows 10
- sda2 ~250GB: ntfs- for other OS Virtualization (macOS, KALI, AndroidX86 and other…)
- sdb1 ~250GB: ext4- Ubuntu 17.04
All my documents live in the cloud :) (OneDrive 1TB Office365 subscription)
Short virtualization history
IBM’s early 60's investment on time-shared solution pave the way to the robust solutions we have today. However, the software emulation VM did not come until late 80s with the SoftPC. This was the first emulator that would allow DOS applications to run in UNIX mainframes. After the stunning increase of popularity of Windows 3/95, more and more computers started running Windows. Thus companies started shifting and making apps for it and not UNIX. Apple in late 90’s created VirtualPC to let DOS/WIN apps run on UNIX systems. Later on, just before entering new millennia, a company called VMware was created (the current leader in virtualization technologies). Along the way many other companies joined the party: Oracle, Citrix and so on…
Virtualization of the same OS that used for dual booting
On Windows, is installed VMware Workstation. One of the best tools for virtualization (and in my opinion better than VirtualBox and Hyper-V). I have it set up with many Virtual OSes. All of them are with their proper VHD (Virtual Hard Drive). Well, apart from Ubuntu. It uses the physical drive sdb1 as a virtual drive.
I usually (almost always) start UbuntuVM when i start the Windows. And most of my development is done in this way: research and other things are done mostly in Windows and the code, the compilers, languages, libraries, and all other tools are run in Ubuntu inside VM. Its good this way, so when i mess up something, i don’t loose the research and other things i am doing outside VM.
Sometimes i need more CPU power and more intense GPU work (Gazebo and ROS) so i turn off the PC and restart and enter only in UBUNTU.
Cloning partitions and drives — “Clonezilla” magic
I just have to mention this. And i found out few months ago!
Well, sometime, i need to move all my OS (with all local data) to another drive, or sometimes another PC. So i was researching how to do it. And i came across a tool called “clonezilla”.
I was able to backup OSes, to clone drives, partitions and so on, which is great and simple. But then, i needed something more. Copying OS from VHD (virtual hard drive) to a physical drive, and vice versa. And it turned out, using “clonezilla” its the same simplicity as with physical drives.
I would simply mount the ISO file as CD in my VM, and then mount the drive where i want to deploy or copy from. Booting the VM from CD into “clonezilla”, would then list physical drives and virtual drives all the same. Then you jut proceed as usual.
Well, This is all :)
(i started writing this post few weeks back, there was a point i had written five times more than is written now, then deleted, changed, added, and so many thing, until i decided just to post like it is)