This tutorial is about installing a Ubuntu 22.04 desktop OS on a windows computer and booting them freely.
1. Prerequisite
- A computer running Windows 11 OS.
- An empty USB stick
2. My Environment
- My computer: MSI GE76 12UHS (12 gen intel cpu, Nvidia 3080Ti)
- USB: Kingston 128gb
3. Download Ubuntu 22.04 ios file online.
From this webpage https://ubuntu.com/download/desktop, you can download the Ubuntu 22.04 desktop ios file.
The name of the file should be like ubuntu-22.04.1-desktop-amd64.iso
4. Create bootable drives from the iso file.
-
Download the USB formatting utility
rufus-3.20.exe
from github: https://github.com/pbatard/rufus/releases -
Use rufus to create a bootable drive on your USB stick.
Partition scheme: GPT
Target system: UEFI
5. Create a free space (by shrinking the current disks, e.g. C:) on your computer using Disk Management.
Omitted.
6. Change BIOS settings
- Disable fast boot
- Set administrator password
- Disable Secure Boot
- Other settings
7. Install Ubuntu 22.04 OS
-
Change bios booting order and boot from the USB
-
Install Ubuntu (refer to https://www.youtube.com/watch?v=QKn5U2esuRk)
-
-
-
Use the free space to create a root partition:
- Again, use the free space to create a home partition:
- Use the remaining free space to create a swap partition:
- Follow the instruction to install Ubuntu.
8. Set the BIOS again
After installing Ubuntu and removing the USB stick, restart the computer and go to BIOS setting.
- Change the boot setting:
- Save and restart the computer. You will see the boot options:
9. Remove Ubuntu from the computer and retrieve the original windows system
If you would like to remove the Ubuntu OS installed and retrieve the original windows system, the following step could help.
9.1. Start Windows system and use Disk Management to delete all of the three partitions created for Ubuntu OS from the right to the left:
9.2 Remove Grub boot loader:
-
Open Terminal (run as administrator)
-
Run the following commands one by one (change the number based on the disk number):
diskpart list disk select disk 0 list partition
The output should be like:
-
Run the following commands one by one (change the number based on the partition number):
select partition 1 assign letter=x exit x: dir cd EFI dir rmdir /s ubuntu
The output should be like:
10. Format the USB stick to allow it storing data again.
- Download SD Card formatter and install.
- Quick format the USB stick.
11. Problems I have encountered after installing Ubuntu 22.04 on my laptop.
As my laptop was quite new (MSI GE76 12gen Intel with RTX 3080Ti), I have encountered several strange problems:
-
WIFI service doesn't work and the laptop can not connect to the internet from WIFI.
Solution: Use a RJ45 cable to connect your computer to your router. After getting the internet, update to the newest kernel could solve this problem. On my laptop, kernel 5.18 was installed and running:
- My Nvidia Driver on Ubuntu desktop was problematic (even with the newest 515 version). Sometimes the computer was stuck on the startup screen after booting Ubuntu. After I change the driver to X server, this has never happened again: