Skip to content

Instantly share code, notes, and snippets.

@cxzero
Last active June 1, 2021 18:37
Show Gist options
  • Save cxzero/6b4a205404d579c5e9fadca0ce7c29f2 to your computer and use it in GitHub Desktop.
Save cxzero/6b4a205404d579c5e9fadca0ce7c29f2 to your computer and use it in GitHub Desktop.
Install Ubuntu 20.04 LTS alongside dual boot with Windows 10

Recently I have found a little harder to set up a dual boot installation Ubuntu 20.04 LTS / Windows 10 in a laptop. It involved:

  1. Switch SSD operation mode from RST to AHCI
  2. Prepare usb stick for Ubuntu iso image to load in UEFI mode (BIOS does not support legacy mode)
  3. Shrink Windows 10 partition
  4. Ubuntu 20.04 installation, create encrypted LVM partition
  5. Enjoy the set up

1 - Switch SSD operation mode from RST to AHCI

The default BIOS setting was to use hard disk in RAID configuration. Ubuntu installation guide comes already with a notice that could not access SSD through RST and some changes at BIOS was necessary to proceed. A good read about it is: https://help.ubuntu.com/rst/.

The solution provided there was not so useful for me (the BSOD showed up after those modifications on registry) and I had to recover Windows installation (a recovery point was fine as well as rollback to set RST in BIOS).

The one which worked for me is this one: https://support.thinkcritical.com/kb/articles/switch-windows-10-from-raid-ide-to-ahci:

_On Windows installation configure next boot to start in safe mode:

  • Type this command and press ENTER: bcdedit /set {current} safeboot minimal
  • Restart the computer and enter BIOS Setup. Change the SATA Operation mode to AHCI from either IDE or RAID
  • Save changes and exit Setup and Windows will automatically boot to Safe Mode.
  • Rollback changes: type in cmd bcdedit /deletevalue {current} safeboot
  • Reboot once more and Windows will automatically start with AHCI drivers enabled_

2 - Prepare usb stick for Ubuntu iso image to load in UEFI mode (BIOS does not support legacy mode)

Download image from http://releases.ubuntu.com/focal/, verify sha256 signature and simple use "Startup Disk Manager" utility from another Ubuntu installation. It could be possible to use Rufus in Windows, but in my case the usb stick was not being loaded at boot time (who knows what happened ..)

3 - Shrink Windows 10 partition

Found so easy to use Disk Management utility from windows installation. Useful video: https://www.youtube.com/watch?v=tJiakVgAtn4 Another way could be using GParted iso image.

4 - Ubuntu 20.04 installation, create encrypted LVM partition

I wanted to encrypt the ubuntu partition but not the whole disk as I wanted to preserve the current Windows partitions. So in my case two partitions were set up (of course there are many other advanced possibilities, I just wanted the more convenient one)

  • boot partition, assigned aprox 250 - 500 MB (mount point /boot)
  • main partition, selected file type "encrypted device" (a new volume at the top will be created and this one should be assigned the / mount point)

Other references:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment