Linux side by side with windows

Side-by-side: Windows 10 & Ubuntu 16.04: Virtual & Native boot

It was always difficult for me to make my mind whether to use Windows or Linux for my everyday life. I am used to windows since this is what used for a long time now, nevertheless, Linux had been a necessity for my research and academic work and I do like it as well. And simply there has been not enough time to fully migrate from one to the other. Accordingly, I had to live with both of them coexisting alongside each other.
However, I couldn’t also make my mind how to make them aside, whether to have Windows as virtual machine with Linux native installation, or the opposite way around, or even have them both native installed and have dual boot system (and suffer from the necessity to reboot every time I need to use the other OS).

The ultimate way is to have booth native installation on the HDD, and at the same time allow them to boot each other in virtual environment. and this is what I will try to explain here.

P.S. This was made possible only with the great help of others, please find the References at the end of the post.

Why Windows 10, Ubuntu 16.04 LTS, VMWare Workstation 12.0 Pro

Why these, well for a very simple reason:

  • I have Windows 10 nativelly installed on my computer, provided by my university.
  • I like Ubuntu. 😉
  • Ubuntu 16.04 is the latest Long Term Support (LTS) distribution at the time of writing this post.
  • I am still a STUDENT, so I get a free license to use VMware products 🙂

System Characteristics

Again, this is MY system properties, and the instructions listed here worked for this particular system, I have no guarantee whether it will work for other system settings/configurations. So, please, if you are going to try this, be informed that I take no responsibility on the success/failure of your setup.

  • Single 512GB (actually, 476GB) SSD drive
  • EFI based BIOS.
  • Windows 10 Enterprise
  • Ubunrtu 16.04 LTS
  • VMWare Workstation Pro 12.1

Hard disk configuration:

In my case, Windows was pre-installed on the hard disk, and with only one partition occupying the whole disk space, I had to resize the partition to free space, both for a new data partition for Windows and for the Linux installation. Eventually I created a new Data partition for windows (310 GB) followed by about 80 GB of free space.

One thing to keep in mind is the limitation of FOUR primary partitions . In my case I had only two partitions created for windows which both are primary, and then I am left with two partitions for Linux.

Further shrinking partition size with unmovable files:

While trying to decrease the Windows OS partition size I had the problem that the partition couldn’t be shrink beyond specific limit, this is due to system-locked files at the edge of the partition.

This applies when you receive the message: “You cannot shrink a volume beyond the point where any unmovable files are located”.

To overcome this problem I had to do the following:

1. Disable Hibernation:

Open command prompt (as Admin) and type powercfg /h off

2. Disable Pagefile:

  1. In the “Run” command, write SystemPropertiesPerformance.exe,
    OR
    ,
    right click on “My Computer”, select “Properties” and then “Advanced system settings”
  2. Click on “Settings” in the “Performance” section, then go to the “Advanced” tab, then click the “Change” button in the “Virtual memory” section
  3. Set “No paging file” for the partition you want to resize.

3. Disable System Protection:

  1. Same as the first step above to get to system properties, then select the “System Protection” tab.
  2. Select the intended drive, then click the “Configure” button and select “Disable system protection”

4. Restart

5. Resize the partition

6. Re-enable System Protection, Pagefile and Hibernate.

Installing Ubuntu 16.04

I will not cover how to install windows as I have it already installed. Just one point to mention:

After I made the previous harddisk partitioning, I just plugged the Ubuntu 16.04 USB boot drive (I created it using the YUMI multiboot USB creator)

After the first screen (install updates and third party apps…), we have to select the installation type. Here I selected “Something Else”, this will allow me to have the full control on how and where to install Ubuntu’s different parts.

In the following window, all hard-drives with their partitions are listed. In my case “/dev/sda” is the harddisk I want to install Ubuntu onto. Also (as it is the only harddisk I have) this is where the Windows partitions (in this case /dev/sda1 and /dev/sda2) are, and it will also host the boot-loader (grub).

Читайте также:  Астра линукс xorg conf

Here, I select the “free space” line and click on the “ + “ button and the left-bottom side. This will allow me to create new partition. I repeat this step three times to create the following three partitions:

Size Type Location Use as Mount point
26.6 GB Primary Beginning ext4 /
14.3 GB Logical Beginning swap
25.6 GB Logical Beginning ext4 /home

At the end, the partition map should something like the following:

With this been done, we proceed with the installation of Linux, remove the installation medium and restart the PC.

Now, instead of directly booting to Windows, the grub2 screen will appear with booting to Ubuntu 16.04 selected by default. to change this default behavior we need to modify the grub menu settings. this can be dine either manually through Linux terminal, or by using the grub-customizer

Grub Customizer:

Is a graphical tool for managing the Grub boot entries order and settings (timeout, defaults,…etc)

Virtual boot Ubuntu from Windows:

Now, having both systems installed and running. and having also VMware Workstation 12 installed, we can configure a virtual machine to start the native Linux installation virtually within Windows.

The main point here is that: both operating systems cannot use (or even access) the same partition together, BUT they can access the same disk drive together given that they access different partitions.

But, what about the boot partition, this may create a problem as both systems must have access to the boot partition on the HDD. The solution to this is by creating a small (actually very small) virtual

The solution to this problem is by creating a small (really small) virtual harddisk that will host the bootloader of the virtual machine, accessing the Linux partitions of the actual physical disk.

Creating a new Virtual Machine

The steps to create this virtual machine are as the following:

  1. In VMware Workstation, select “File -> New Virtual Machine” and proceed with the “Custom (advanced)” option, and “Workstation 12.0” compatibility profile.
  2. In the installation screen, choose “I will install the operating system later”.
    Note: in fact we will be using the Ubuntu installation ISO file later, but if we select it here then VMware will automatically use the “Easy Install” feature that we don’t want.
  3. Proceed with the configurations (Guest OS, Virtual machine name & location, processors, memory, network, I/O controller)
  4. When you arrive to “Select Disk Type”, choose SATA as this will be faster dealing with RAW physical disk partitions.
  5. At the “Select a Disk” step, choose “Use a physical disk (for advanced users)”
  6. Select the physical drive from the list (mine is PhysicalDrive0) and select “Use individual partitions” option
  7. From the partitions list, select ONLY the Linux partitions (in my case Partition 3,4 and 5) and give the disk file a name.

At this stage, we have created an un-bootable Ubuntu virtual machine. Now to boot into this machine we need to create a bootloader and save it on a virtual disk:

  1. Go and Edit the virtual machine settings
  2. Click the “Add” button and select “Hard Disk”
  3. Any of the types will work find, probably here SCSI will be easier so you don’t deal with SATA disk order and stuff.
  4. Choose “Create a new virtual disk” and allocate a maximum of 200 MB (i.e. 0.2 GB) as a disk space, give the disk a name and close the wizard.
  5. Click on the CD/DVD entry in the Hardware devices, and select the ISO file of the Ubuntu installation disk.

Now, the Virtual machine is ready to start. When you boot the virtual machine, VMware will find no bootloader on the HDD so it will proceed to boot from the CD image file.

After you boot into Ubuntu, DO NOT INSTALL. Just proceed to the desktop, open a terminal window and start writing commands

Preparing the grub bootloader

First, we need to create a new partition in the virtual disk we have created. This partition will serve as the boot partition for the virtual machine.

In my case, the virtual disk was /dev/sda and the physical disk was /dev/sdb. Make sure you are using the correct reference to the disk by listing all available disks/partitions using the “ ls /dev/sd *” command

In the terminal window, write the following commands:

This will create a new partition”sda1″ of type “ext2” occupying the whole “sda” disk space and give it a name “msdos”.

Afterwords, we need to prepare the partition for chroot access by setting it up with a particular linux folder/file structure. This is accomplished using the following set of commands:

After we have done that, now we can chroot to the partition and install/update grub loader onto it.

Voilà, It is done. now we can boot into the native Ubuntu virtually from within windows, no annoying warnings or error messages.

Useful tools

In different stages of the setup, I tried and used the following tools, some of them solved problems or may be useful to solve other problems.

Linux Boot-Repair:

A simple tool to repair frequent boot issues you may encounter in Linux GRUB/EFI.
To install:

Читайте также:  Не вводить пароль linux mint

References

I would like to thank the following posters who where a great help to me:

Источник

Linux distro to run side-by-side with Windows 10

Brand Representative for Keeper Security

48 Replies

I have recently been looking for a free laptop OS that could be used for a number of different things.

Photo editing using LightZone and Gimp, access to my work computer with Teamviewer, Kodi, VMware workstation running windows 10, Google Play Music and a few other applications.

Whilst i could do all the above in windows i wanted something which was free, fast and easy to update.

My final choice was Ubuntu Gnome. Why? it just did all of the above very easily. VMware Workstation and Lightzone had to be installed from a shell but was very easy following the instructions from the websites.

2nd Choice would be either Fedora or Debian Gnome versions.

3rd choice if you want something which looks like windows would be Makulu Aero 10.

Looking for a linux distro to run side-by-side with Windows 10.

I’ll be pretty new to Linux so looking for something easy — sounds like Ubuntu is a good start. I have no other reason for switching other than I’m curious and want to expand my technical knowledge.

Should I just run from a USB stick to start and then if I like it, install and choose the OS when booting?

Any advice is appreciated.

I have recently started using Linux on the desktop as well. I went all in and got rid of Win 10 entirely though. I have tried a couple of Ubuntu based distros and Ubuntu itself.

I started with Zorin OS, as it gives you some Windowsesque desktops to choose from. I found it very buggy though.

I loaded Ubuntu (v. 14) after that. I had used it in the past and found it very stable but I do not like the Unity interface.

Lastly I loaded Elementary OS, which I have been using for over a month now and really like it. It’s very similar to the Mac OSX interface, simple with a dock along the bottom. I use it for web browsing (Firefox), media (Plex server/Kodi), and basic tasks (LibreOffice and webmail). My only gripe is that my printer doesn’t work (Canon all in one), but I haven’t really looked into it yet.

I have read very good things about Mint, but have not tried it out yet.

Edited Oct 28, 2015 at 14:04 UTC

Windows 10 comes with native Hyper-V, so you could just spin up a linux VM INSIDE of Windows 10. Fedora is good to learn with

I’ve been using and recommend Manjaro, an Arch based distro. Nice and streamlined without all the bloat. Used to use Ubuntu years ago and gave up on it due to the horrid Unity implementation. Xubuntu is much better if you want to stay Debian. But I do highly recommend Manjaro. Unfortunately they don’t have a live CD version with persistence file to save your settings.

No need to dual boot and get your hard drive all confused and clustered, unless you want to learn how to do that. The best way to go about doing this in the cleanest fashion would be to download virtual box https://www.virtualbox.org/ from Oracle and then download a linux distro. I prefer Ubuntu biggest its one of the most popular, has the most support, and is easy to use desktop and server wise.

If you dont like Ubuntu you can download another distro and test them all in VirtualBox instead of formatting your hard drive or anything like that.

Virtual under Windows? Sure, it’ll work — but then your Linux partition goes on holiday while Windows plays around doing all its updating and constant rebooting. I’d sooner run Windows virtually under Linux. (I’ve had Linux machines running without rebooting for months at a time.)

Have an older PC or laptop lying around (who in our field doesn’t)? I recommend using a separate machine. I’ve found that I’ve wiped and re-wiped many a linux install over the years.

Forget the dual boot. Nothing but trouble.

Run linux from USB? Works maybe 3/4 the time. Use a spare PC.

I’ve used many distros over the years. Nowadays, for older machines I use Lubuntu (actually I like it’s old-school, simpler interface) if 2GB.

Edited Oct 28, 2015 at 20:01 UTC

If you are using UEFI BIOS and secure boot you are unlikely will to be able to dual boot WIndows and another OS.

If you install the WIndows Operating System in legacy mode, you will be able to dual boot with Linux. But you will need a licence key as the key in the UEFI bios is not accessable in legacy mode,

If using an OEM key and UEFI bios I would recommend runing Linux as a VM under your windows install. Remember to switch on Virtualization on in the BIOS. Make sure you ahve enough processor performance , RAM and disk space.

If you are wanting to try out a few different flavors of Linux, personally I would avoid going through all the hassles of creating a VM. Yes, they are easy to work with but if you are going to try out multiple variants, you will have multiple VHDs to manage and fill up your disk.

Читайте также:  Linux tcp port process

Most Linux installers these days have a live-boot option built in to the ISO which means all you have to do is burn the disk and reboot your computer. Booting off the disk makes no changes to your system and if you don’t like it, you can just reboot back in to Windows or the next variant you want to try.

Coming from Windows, I would highly recommend trying Linux Mint , Ubuntu , ZORIN OS , Red Hat Enterprise Linux 5 & Novell openSuSE (in no particular order).

Aside from the distribution, you will also want to pick a preferred desktop environment. Most distributions will give you the option of KDE or Gnome and some have custom variants. (Generally speaking, KDE is laid out more like Windows and Gnome is more similar to Mac.)

My personal favorite is Mint with the Cinnamon (KDE-Based) desktop.

Thanks guys. Just a desktop to play with to start off but would eventually would like to move into server. I’ll check out Mint.

Any suggestions for a virtual machine manager?

I’m seeing people suggesting Hyper-V to try Ubuntu in. Not that I think Hyper-V is bad, but why that instead of VirtualBox? Personally, my suggestion would be VirtualBox because it’s simple to use and lets you customize your VMs pretty easily. It’s also nice if you’re used to VMware Workstation. While it’s not the same as VMware, there’s less of a learning curve with VirtualBox vs Hyper-V.

Linux Mint has the same foundation as Unbuntu but with a much better UI

Looking for a linux distro to run side-by-side with Windows 10.

I’ll be pretty new to Linux so looking for something easy — sounds like Ubuntu is a good start. I have no other reason for switching other than I’m curious and want to expand my technical knowledge.

Should I just run from a USB stick to start and then if I like it, install and choose the OS when booting?

Any advice is appreciated.

Download and burn a «live CD» and try a version directly on your hardware. I’ll join the chorus against a dual-boot setup and also for using VirtualBox. As others have said, VB is very easy to learn, setup, run, and is portable across platforms/OSs. I’ve installed and supported quite a few Linux systems and find Linux Mint with Cinnamon the most approachable and closer to being a Windows desktop replacement due to the inclusion of some proprietary software. You can get Mint in multiple flavors so older hardware works as well. There is an LTS version that will receive security updates until 2019. I personally use LMDE (Linux Mint Debian Edition) which is a continuously updating release, but would not recommend this for anyone just starting out.

For servers running Linux, try Ubuntu Server LTS.

Just my 2 cents.

I’m seeing people suggesting Hyper-V to try Ubuntu in. Not that I think Hyper-V is bad, but why that instead of VirtualBox? Personally, my suggestion would be VirtualBox because it’s simple to use and lets you customize your VMs pretty easily. It’s also nice if you’re used to VMware Workstation. While it’s not the same as VMware, there’s less of a learning curve with VirtualBox vs Hyper-V.

I agree that VirtualBox is great and easy to use but I think the main reason Hyper-V is suggested it that it is native — you just have to turn on the feature rather than hunt down, download, & install. Also, you mention there is a learning curve but I personally see very little difference between the 2 and have found Hyper-V to be rather intuitive (for the most part).

Personally, I do prefer VB slightly above Hyper-V but both are great products with their own strengths and weaknesses.

That said, I still think it is a bad idea to use either until you have chosen which Distro and Desktop Environment you want to dive deeper in to.
Just download the ISO for the one you want to try out and burn it to CD (or create bootable USB drive if you don’t have an optical drive on your system) and boot to it to kick the tires for a bit. If you don’t like it, no harm — just try the next until you got one you really like.
After that, if you want to dive deeper in to the OS and get more familiar with it, then you install it in a virtual environment (of your choice) and mess with it for a while like that.

The biggest problem with dual booting or installing it on an older system off to the side is you are less likely to want to switch between systems after a couple weeks. Running it as a VM gives you the convenience of being able to start it up on a whim without having to close out what you are working on or move over to the other system — it will just run in a window on your current system.

Источник

Оцените статью