How to Install Linux Dual-Booting with Windows 10
The PC--
Lenovo Thinkpad E590 Laptop with a 64-bit Intel i7 processor, running pre-installed Windows 10.
Introduction--Why would anyone want to do this?
Generally speaking, it is a good thing to have a Linux backup system on your laptop. Windows has always been prone to crashing and viruses. It has happened to me more than once that a virus got through the antivirus programs that I paid for to keep my Windows files secure. But because I had Linux on the machine, I was able to boot up in Linux, scrub the virus from the Windows side of the computer, and repair it.
So when I got a new laptop, the first thing I did was to install Linux in a dual-boot configuration. It did not go smoothly. In fact, it seemed much more difficult than the last time I did this, several years ago.
1. Pick a Linux Distribution.
Find out what is the minimum disk space you need to install Linux. Generally, you will need to end up with three partitions; One for the Linux Operating System, One for the Data, and one for Swap Files.
I wanted to install Ubuntu Linux 18, since I am most familiar with that distro. Unfortunately, that was not to be. More on that later....
Download the ISO image for your Linux Distribution, and burn it to a DVD.
OR you can download the “Etch” utility to load the ISO onto an empty USB thumb drive. This is likely a much faster way to load Linux–But I had lots of blank DVDs and no empty USB drives of adequate size, so I burned the DVD.
2. Use Windows to make partitions on your Hard Drive.
Reference: Google “Windows 10-How to Partition Hard Drives.”
Click the Gear for Control Panel, then
Admin
Admin Tools
Computer Management
Storage
Disk Management – This location lists the Hard Drives on your system.
My C:\ Drive has 489 GiB
[Right Click] on the drive to shrink the volume. This will open up space for the Linux Operating System.
Win 10 displays this as “Space to Shrink in MB.”
You have to decide how much data you think you will be storing on the Linux side, then add that to the MB needed for the operating system and swap file. Keep in mind that whatever you dedicate to Linux will no longer be available for Windows.
I picked 200 GiB. Win 10 expressed this as ‘Space to Shrink in MB 200000.’ Give or take a zero.
At the end of the process, you will see a big piece of the hard drive labeled ‘Space Unallocated.’ This is a good thing. Time to install Linux.
3. Install Linux
Reference: Its FOSS Linux Blog, “How to Dual Boot Ubuntu 18.04 and Windows 10"
Put your Linux installation DVD in the DVD drive, and restart the computer.
Interrupt normal start up [by pressing (Enter) in the Lenovo laptop, then selecting “Boot from Disk]. The computer will boot from the Linux Disk.
3A. Fail to get Ubuntu Linux to Install or boot.
I got an error message when I tried to boot from Ubuntu Linux, in tiny white type on my Black Screen Of Death (BSOD):
Failed to open EFI\BOOT\mmx64.efi
Failed to load image EFI\BOOT\mmx64.efi not found.
Failed to start MokManager
Something has gone seriously wrong
import-mok state failed(): not found.
I tried burning another disk from ISO, re-downloading the ISO and making another disk. These gave me the same results. The backslashes indicate that it is a problem with Windows 10.
3B. Disable Win 10 Security Systems that
Prevent You from Installing Linux beside Win 10.
I tried disabling Secure Boot, a setting in the Boot menus;
Secure Boot prevents other operating systems, like Linux, from being used to start the computer.
However, it is necessary to disable Bitlocker first.
BitLocker encrypts your Windows Hard Drive so that, when you eventually recycle your computer, no one else can read the drive unless they have the BitLocker Recovery Key. Did YOU get a recovery key with your new Win 10 Laptop? Neither did I. I tried to find the recovery key for my brand new computer, but it was nowhere to be found. Yet if something goes wrong one day with your computer, you must have this recovery key to save your hard drive or recover your data.
SOOO.... Back on the Windows side, Click the Control Panel Gear
Search for Bitlocker.
Click Manage Bitlocker.
Click Disable Bitlocker.
It will take a long time, even on a mostly empty hard drive, to decrypt the drive and disable Bitlocker, but finally you will see the message,
‘Windows C: Bitlocker off’
Reboot the system, Interrupt normal startup and go to the boot menu to disable Secure Boot.
Hit [F10] to save settings. Try installing Linux again.
3C. Fail to Install Ubuntu Linux--AGAIN!
Same mysterious error message comes up with all Ubuntu Linux 18 installation disks. I can’t figure it out, and was unable to find any discussion of this difficulty on the Internet. Sooo... Sorry Ubuntu! Time to try another Distro.
3D. Install MxLinux
Reference: markontech.com/linux/how-to-dual-boot-windows-10-and-mx-linux
Get ISO for MxLinux
Burn MxLinux DVD
Boot from MxLinux Disk
When you boot from this distro, some of the same error messages come up, but it eventually works anyway.
Run MxLinux Installer from Linux desktop, Upper Left Corner.
Click ‘Custom Install on existing Partitions.’
Click ‘Run Partition Tool.’ –Note: This is the Linux partition editor , gparted.
You will see the Unallocated Space that you opened up long ago in Windows.
Click the space, and make three partitions;
Root 20.5 GiB
Home 179 GiB
Swap 500 MB
These are the proportions I chose for my installation. Designating a separate “Home” Partition to hold the data requires some fiddling later, but will allow me to update the Linux OS in the Root Partition with much less risk of losing data files. Swap is optional, but recommended. The default method for installation is to put everything into Root with a Swap partition.
When you have your partitions set, click the [check mark] at the top to apply partition changes.
Close gparted. If you don’t close it, MxLinux will not let you select a partition to install the system.
Assign Root for MxLinux installation, and Swap for Swap files. Home is for data files.
Click [Next] to install the system.
Boot Method:
[check] Install GRUB for Linux and Windows
Select UEFI to install on ESP
UEFI is the Unified Extended Firmware Interface. If your computer is new (in 2020, at this writing), you have UEFI.
4. Restart in Both Operating Systems
You will restart the computer and remove the installation disk.
When it reboots, you will see a menu with MxLinux at the top and Windows as the second or third option.
Use the up and down arrows to select which OS you want.
Hopefully both will work for you!
5. Things that went wrong for me.
A. Selected Linux, the system beeped loudly and then booted Windows 10.
Solution: Secure Boot prevented me from booting into Linux.
Disabled Secure Boot.
Linux Booted without trouble.
Windows hung at the boot, and demanded that I enter the Bitlocker Encryption Key–Which I could not locate. If you have one, perhaps you can keep Bitlocker.
I had to disable Bitlocker.
With Bitlocker disabled AND Secure Boot disabled, the dual boot system worked the way I wanted it to work.
6. Other Things I Discovered Along the Way
Debloating Windows 10
Reference: https://www.christitus.com/debloat-windows-10/
For the full process, go to the Chris Titus blog link above.
Download DebloatWIN10 – a Power Shell Script
R Click the Windows Icon
Admin: Win Power Shell
Y – Allow changes
Run DebloatWIN10
Download O&O Shutup
Ctrl Shift ESC to Task Manager.
Conclusion:
That's all for now. It was a real wrestling match, and at times I could not escape the feeling that Win 10 had been designed to make it more difficult to dual-boot. Ah well. Since I am not yet ready to go all-Linux, I guess I will have to put up with it. Can't be easy, right?
The PC--
Lenovo Thinkpad E590 Laptop with a 64-bit Intel i7 processor, running pre-installed Windows 10.
Introduction--Why would anyone want to do this?
Generally speaking, it is a good thing to have a Linux backup system on your laptop. Windows has always been prone to crashing and viruses. It has happened to me more than once that a virus got through the antivirus programs that I paid for to keep my Windows files secure. But because I had Linux on the machine, I was able to boot up in Linux, scrub the virus from the Windows side of the computer, and repair it.
So when I got a new laptop, the first thing I did was to install Linux in a dual-boot configuration. It did not go smoothly. In fact, it seemed much more difficult than the last time I did this, several years ago.
1. Pick a Linux Distribution.
Find out what is the minimum disk space you need to install Linux. Generally, you will need to end up with three partitions; One for the Linux Operating System, One for the Data, and one for Swap Files.
I wanted to install Ubuntu Linux 18, since I am most familiar with that distro. Unfortunately, that was not to be. More on that later....
Download the ISO image for your Linux Distribution, and burn it to a DVD.
OR you can download the “Etch” utility to load the ISO onto an empty USB thumb drive. This is likely a much faster way to load Linux–But I had lots of blank DVDs and no empty USB drives of adequate size, so I burned the DVD.
2. Use Windows to make partitions on your Hard Drive.
Reference: Google “Windows 10-How to Partition Hard Drives.”
Click the Gear for Control Panel, then
Admin
Admin Tools
Computer Management
Storage
Disk Management – This location lists the Hard Drives on your system.
My C:\ Drive has 489 GiB
[Right Click] on the drive to shrink the volume. This will open up space for the Linux Operating System.
Win 10 displays this as “Space to Shrink in MB.”
You have to decide how much data you think you will be storing on the Linux side, then add that to the MB needed for the operating system and swap file. Keep in mind that whatever you dedicate to Linux will no longer be available for Windows.
I picked 200 GiB. Win 10 expressed this as ‘Space to Shrink in MB 200000.’ Give or take a zero.
At the end of the process, you will see a big piece of the hard drive labeled ‘Space Unallocated.’ This is a good thing. Time to install Linux.
3. Install Linux
Reference: Its FOSS Linux Blog, “How to Dual Boot Ubuntu 18.04 and Windows 10"
Put your Linux installation DVD in the DVD drive, and restart the computer.
Interrupt normal start up [by pressing (Enter) in the Lenovo laptop, then selecting “Boot from Disk]. The computer will boot from the Linux Disk.
3A. Fail to get Ubuntu Linux to Install or boot.
I got an error message when I tried to boot from Ubuntu Linux, in tiny white type on my Black Screen Of Death (BSOD):
Failed to open EFI\BOOT\mmx64.efi
Failed to load image EFI\BOOT\mmx64.efi not found.
Failed to start MokManager
Something has gone seriously wrong
import-mok state failed(): not found.
I tried burning another disk from ISO, re-downloading the ISO and making another disk. These gave me the same results. The backslashes indicate that it is a problem with Windows 10.
3B. Disable Win 10 Security Systems that
Prevent You from Installing Linux beside Win 10.
I tried disabling Secure Boot, a setting in the Boot menus;
Secure Boot prevents other operating systems, like Linux, from being used to start the computer.
However, it is necessary to disable Bitlocker first.
BitLocker encrypts your Windows Hard Drive so that, when you eventually recycle your computer, no one else can read the drive unless they have the BitLocker Recovery Key. Did YOU get a recovery key with your new Win 10 Laptop? Neither did I. I tried to find the recovery key for my brand new computer, but it was nowhere to be found. Yet if something goes wrong one day with your computer, you must have this recovery key to save your hard drive or recover your data.
SOOO.... Back on the Windows side, Click the Control Panel Gear
Search for Bitlocker.
Click Manage Bitlocker.
Click Disable Bitlocker.
It will take a long time, even on a mostly empty hard drive, to decrypt the drive and disable Bitlocker, but finally you will see the message,
‘Windows C: Bitlocker off’
Reboot the system, Interrupt normal startup and go to the boot menu to disable Secure Boot.
Hit [F10] to save settings. Try installing Linux again.
3C. Fail to Install Ubuntu Linux--AGAIN!
Same mysterious error message comes up with all Ubuntu Linux 18 installation disks. I can’t figure it out, and was unable to find any discussion of this difficulty on the Internet. Sooo... Sorry Ubuntu! Time to try another Distro.
3D. Install MxLinux
Reference: markontech.com/linux/how-to-dual-boot-windows-10-and-mx-linux
Get ISO for MxLinux
Burn MxLinux DVD
Boot from MxLinux Disk
When you boot from this distro, some of the same error messages come up, but it eventually works anyway.
Run MxLinux Installer from Linux desktop, Upper Left Corner.
Click ‘Custom Install on existing Partitions.’
Click ‘Run Partition Tool.’ –Note: This is the Linux partition editor , gparted.
You will see the Unallocated Space that you opened up long ago in Windows.
Click the space, and make three partitions;
Root 20.5 GiB
Home 179 GiB
Swap 500 MB
These are the proportions I chose for my installation. Designating a separate “Home” Partition to hold the data requires some fiddling later, but will allow me to update the Linux OS in the Root Partition with much less risk of losing data files. Swap is optional, but recommended. The default method for installation is to put everything into Root with a Swap partition.
When you have your partitions set, click the [check mark] at the top to apply partition changes.
Close gparted. If you don’t close it, MxLinux will not let you select a partition to install the system.
Assign Root for MxLinux installation, and Swap for Swap files. Home is for data files.
Click [Next] to install the system.
Boot Method:
[check] Install GRUB for Linux and Windows
Select UEFI to install on ESP
UEFI is the Unified Extended Firmware Interface. If your computer is new (in 2020, at this writing), you have UEFI.
4. Restart in Both Operating Systems
You will restart the computer and remove the installation disk.
When it reboots, you will see a menu with MxLinux at the top and Windows as the second or third option.
Use the up and down arrows to select which OS you want.
Hopefully both will work for you!
5. Things that went wrong for me.
A. Selected Linux, the system beeped loudly and then booted Windows 10.
Solution: Secure Boot prevented me from booting into Linux.
Disabled Secure Boot.
Linux Booted without trouble.
Windows hung at the boot, and demanded that I enter the Bitlocker Encryption Key–Which I could not locate. If you have one, perhaps you can keep Bitlocker.
I had to disable Bitlocker.
With Bitlocker disabled AND Secure Boot disabled, the dual boot system worked the way I wanted it to work.
6. Other Things I Discovered Along the Way
Debloating Windows 10
Reference: https://www.christitus.com/debloat-windows-10/
For the full process, go to the Chris Titus blog link above.
Download DebloatWIN10 – a Power Shell Script
R Click the Windows Icon
Admin: Win Power Shell
Y – Allow changes
Run DebloatWIN10
Download O&O Shutup
Ctrl Shift ESC to Task Manager.
Conclusion:
That's all for now. It was a real wrestling match, and at times I could not escape the feeling that Win 10 had been designed to make it more difficult to dual-boot. Ah well. Since I am not yet ready to go all-Linux, I guess I will have to put up with it. Can't be easy, right?
Defeating the MOKmanager roadblock.
ReplyDeleteThanks to jerbob92's excellent guide, I was able to figure out how to get around the mokmanager problem.
jerbob's guide can be found at the link below. If your BIOS matches jerbob's, it will probably fix you right up;
https://jeroen.pro/2019/05/how-to-fix-failed-to-start-mokmanager-import_mok_state-failed-after-failed-ubuntu-installation/
My Windows 10 system did not match it, but I found a work-around that works for me. What I should have done, starting with step 3C above:
My System:
UEFI BIOS Version: R0YET35W (1.18)
UEFI BIOS Date: 2019-09-06
Make: Lenovo ThinkPad E590
CPU: Intel Corei7-8565U
Click [F1] at startup to go to the BIOS Menu, aka "ThinkPad Setup"
Select [Startup] tab.
Down Arrow to UEFI/Legacy Boot]
[Enter] to select;
Choose [Both] for Legacy and UEFI
Choose [Legacy First] for Boot Priority
[F10] to Save and Exit
I used Belena Etch to put the ISO for Ubuntu 18.04 onto a flash drive, and also set the boot loader to load from a flash drive first.
Finally, I was able to log onto Ubuntu Linux from the flash drive--and hopefully complete my dual-boot installation!
After several hours of work and two successful installations of Ubuntu 18.04, I have the following results:
Delete1) Ubuntu 18.04 has been installed on the laptop without any problems.
2) The laptop boots directly to Windows, without the option to boot to Ubuntu.
When I find a way to fix this, I will post it here. If you, Gentle Reader, know how to fix this problem, feel free to leave a comment...
The good news-- I was able to install Ubuntu Linux 18.04.
ReplyDeleteThe bad news-- I can't get the bootlogger to start up Ubuntu when I turn on the computer. It goes straight to Windows.
This is apparently because Windows is installed under UEFI booting, and Ubuntu is installed under Legacy.
It is possible for me to use SuperGrub to start Linux, but that seems like a clunky way to do things.
Ultimately, it looks like I will need to find a way to install Linux under UEFI. As I said before, MxLinux will actually do this, so there is likely a way to get Ubuntu to work as well...