Dual Booting Ubuntu in SSD alongside Windows

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.

Step #2. Creating Bootable USB stick

Step #3. Changing SATA operation

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

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

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

$ 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

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