Dual Booting Ubuntu in SSD alongside Windows

Rajneesh Sharma
6 min readJun 4, 2020

--

This article will be helping those who want to dual boot their system, have windows pre-installed and need to install ubuntu alongside windows and that too in SSD (in the same disk in which windows is installed). Also, I will be telling you how can you use ubuntu even if you have Nvidia graphic card installed, as there arises a freezing issue if you install ubuntu in a system with Nvidia Graphic card. I hope it will help at least a few of you.

Requirements: I won’t suggest to dual boot in SSD if it is less than 256GB. So follow this post only if you have ≥256GB SSD. Also, the system should have the Windows OS installed.
One important thing is to have the backup of your data. Even if you are 100% sure of whatever method you are going to use for dual-boot, backup your data.

Do a developer thing, dual boot your system.

Step #1. Making a partition in SSD to install Ubuntu.

Simply go to Disk Management in Windows and shrink the SSD according to your need. There are many ways to open Disk Management. I recommend to make a partition of at least 80–100 GB, if you can shrink your SSD up to that, then fine and switch to the next step.
If you cannot shrink up to that and can see this “You cannot shrink a volume beyond the point where any unmovable files are located.”, then follow this article. Now you should have an unallocated partition in SSD.

Step #2. Creating Bootable USB stick

Download the appropriate Ubuntu version and flash it into a USB-drive. You can do this using RUFUS. Click this to view how?
There will be a label: Partition scheme, below which will be a dropdown with GPT and MBR. It is recommended to choose that in which your windows is installed. You can check it in disk management. But that completely depends on you, both will work.

Step #3. Changing SATA operation

As we want to install ubuntu in SSD, and for that, while installing, ubuntu must detect SSD. This step is only necessary if you have Intel RAID drivers installed. (Please do check it in your BIOS before changing.) Some systems will have the Windows operating system installed using RAID drivers including the Intel Rapid Storage Technology. SSD drives typically perform better using AHCI drivers. There is in fact a way to switch operation from either IDE / RAID to AHCI within Windows 10 without having to reinstall. If you don’t follow these steps, you will have to reinstall your windows and there may be a loss of data. The steps are :

1. Click the Start Button and type cmd
2.
Right-click the result and select Run as administrator
3.
Type this command and press ENTER: bcdedit /set {current} safeboot minimal (ALT: bcdedit /set safeboot minimal)
4.
Restart the computer and enter BIOS Setup
5. Change the SATA Operation mode to AHCI from either IDE or RAID
6. Save changes and exit Setup and Windows will automatically boot to Safe Mode.
7. Right-click the Windows Start Menu once more. Choose Command Prompt (Admin).
8. Type this command and press ENTER: bcdedit /deletevalue {current} safeboot (ALT: bcdedit /deletevalue safeboot)
9. Reboot once more and Windows will automatically start with AHCI drivers enabled.

Now your SSD will be detected while installing Ubuntu.

Step #4. Booting with USB Stick

Reboot the system, change the booting order in BIOS, Disable the Secure Boot (important), Disable Fast Boot(Optional). Boot with Bootable USB Drive. It is recommended to boot with “Try Ubuntu” as at first, you can check how it is working in your system. Boot with this option if you don’t have an Nvidia graphic card.
Note: If you have an Nvidia graphic card, you may face a problem of freezing while booting, in order to avoid that, you need to make a slight change.

1. Select the "Try Ubuntu" option.(Don't click it).
2. Press e
3. A new screen will appear with some commands written. Go to the line where "quick splash" is written and at the end of this line add "nouveau.modeset=0" (without quotes).
4. Press F10 to boot into Ubuntu.

Step #5. Installing Ubuntu

Now we have booted Ubuntu from the USB drive and it’s time to install it. Click on “Install Ubuntu”, Steps are easy until you reach the below page.

This will be the first screen where you have to decide things.

Click on something else (Recommended) so that you can manually make partitions. There may also be an option “Install Ubuntu alongside Windows”. Choose it at your own risk, as you will lose control over the partition sizes. When you click Install now, the next screen will be:

Partition Screen (very important)

On this screen, select your SSD and make the following partitions:

1. Root Partition
Size:
30~50 Gb (min 30GB recommended)
Partition Type: Primary
Use as: ext4 journaling file system
Mount Point: /
2. Home Partition
Size:
30~50 Gb
Partition Type: Primary
Use as: ext4 journaling file system
Mount Point: /home
3. Swap Partition
Size:
1-2 times of your RAM. (if 8 GB ram, 8<=swap<=16GB)
Partition Type: Logical
Use as: swap
**If you have >= 16GB RAM, you needn't to make swap partition.
**If you are booting in UEFI mode (GPT), then you need to make an EFI partition also, which will tell the bootloader to boot Ubuntu. If you already have windows installed there might not be a need to make efi partition as you will already have one. It is recommended to have only one efi partition per disk. In case you don’t have it, make one.4. EFI Partition
Size:
256-512 MB
Partition Type: Primary
Use as: EFI system Partition

Click on Install Now, and the next steps will again be easy.

Step #6. Post Installation

After installing, reboot the system to check if everything is working fine or not. Also, you will again have to repeat the “nouveau.modeset=0” in grub every time you boot. Otherwise, just add this line into your grub file, or if you need to use the graphic card, then install Nvidia Proprietary drivers. Open he terminal and write:

$ sudo apt-get update && sudo apt-get upgrade

Type the password and this will upgrade your system. Congrats your Ubuntu is now installed.

  • If you want to add “nouveau.modeset=0” in grub file (i.e. you don't want to use the Nvidia graphic card), then do the following:
1. CTRL+ALT+T (open the terminal).
2. $ sudo nano /etc/default/grub
3. Go to the line-> GRUB_CMDLINE_LINUX_DEFAULT and change it as
GRUB_CMDLINE_LINUX_DEFAULT="nouveau.modeset=0"
4. CTRL+O
5. Enter
6. CTRL+X
7. $ sudo update-grub

Now you don't have to write this term every time when you boot. Enjoy your dual booted system.

I hope this article helps people as I faced a lot of problems while dual-booting Ubuntu. Keep coding, keep learning, keep sharing.
Thank you

Github: rajneesh44

--

--

Rajneesh Sharma

Software Engineer || Competitive Programmer || Backend Developer || Love writing code || C++, Python, GO || Machine Learning