Dual boot Windows 10 & Mint 18.3 (Cinnamon) on a 64-bit Lenovo ideapad

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
nrnugteren
Level 1
Level 1
Posts: 4
Joined: Sun Feb 25, 2018 10:07 pm

Dual boot Windows 10 & Mint 18.3 (Cinnamon) on a 64-bit Lenovo ideapad

Post by nrnugteren » Mon Feb 26, 2018 12:06 am

Hi,

I've been struggling 'a bit' with this configuration and any help would be much appreciated.
I'll try to formulate the scenario as precise as possible, also to match potentially similar scenarios for other people facing the same issue
(sorry in advance if that causes this post to be somewhat long).


What I try to achieve:
When the laptop starts up, a boot menu shows and either Linux Mint 18.3 (cinnamon) or Windows 10 pro can be selected.
Preferably Linux Mint would be the default.
If UEFI prevents any kind of selection menu from showing (be it Grub or rEFInd), but both OS'es can still be selected by pressing F12 (showing the boot options),
then that would already be a great first step.
Bonus:
Ideally I would like to have Secure and Fast boot enabled, but if that's technically not possible, I can live with that.


THE SHORT VERSION OF THE ISSUES:
In scenario 1, using the standard installation options, my installation gets stuck at the part where Grub gets installed.
In scenario 2, installing Linux Mint without Grub, I cannot boot back into the successful Mint install, in order to make some Grub or rEFInd menu working.


THE DETAILED EXPLANATION OF THE ISSUES:

My personal background and knowledge level:
  • I've worked with and supported all kinds of computers for about 20 years, but mostly Microsoft configs;
  • Since recent years I've been fiddling a bit with Ubuntu, both graphical desktop as well as console server configs - think LAMP/XAMPP setups using Virtual Machines, in order to develop WordPress sites;
  • I have no experience with Linux Mint so far, but I figured it would be a nice way to introduce Linux to my girlfriend while getting familiar with Mint myself, with a safe way for her to escape to Windows when necessary - hence the dual-boot setup. :)
  • I am comfortable with most basic and general Linux commands, but I am not experienced enough to fix installs when they hang, or tweak GRUB(2) or rEFInd configs in order to make them work.

The machine:
  • The laptop is a LENOVO ideapad 320, bought in the store 3 days ago;
  • It's a 64-bit system, has a UEFI BIOS, 1 TB single harddisk and 4 GB of RAM.

Steps I've taken before installing Linux Mint:
  • Secure and fast boot are both disabled in the 'BIOS' (can be entered using F2) and F12 gives the options to start from either Windows or DVD, when the live DVD is inserted;
  • The laptop came without OS, so I first installed Windows 10 professional on it (64-bit, English), knowing that any Linux installation should come after that, in order to prevent boot issues.
    This installation boots and works fine.
  • Initially I divided the 1 TB hard disk in 3 sections: ~330 GB for Windows (ntfs), ~330 GB for Linux Mint (unused) and ~330 GB intended to be shared by both OSes (ntfs).
  • I downloaded and burned the following file to DVD: linuxmint-18.3-cinnamon-64bit.iso. Ran an integrity test which was fine.


SCENARIO 1:
Booted up the laptop using F12 and was able to select the Live DVD and start the installation using the icon on the desktop: so far, so good.
The first problem is that the installation hangs when it gets to the part of installing GRUB2. I've kept it running for a whole night, but to no avail.

I tried the option to automatically install it next to the existing and correctly detected Windows OS, as well as the option to manually partition the volumes, as follows:

50 GB for /
8 GB for swap
the rest (~290 GB) for home

As said, all goes well until it reaches the GRUB2 installation, then it hangs.
I tried installing the Linux bootloader straight to the sda (although I think that's incorrect) as well as onto sda2, where the EFI partition is at
(found some hints here and there, instructing to do so).

If I then abort the installation, reboot the laptop and press F12, I do get to see another option: ubuntu.
However, when choosing that option, all I get to see is a Grub command screen.


Deleting the Linux Mint install, and start all over:
To reset the whole config and start from scratch (countless times so far :D ), I did the following:
Booted into the Live DVD, started GParted, removed the 3 Linux partitions that I manually created during install and then reboot.
Then followed the instructions as explained in this post at askubuntu.com (the 2nd solution, specifically for UEFI):
  • Run a cmd.exe process with administrator privileges
  • Run diskpart
  • Type: list disk then sel disk X where X is the drive your boot files reside on
  • Type list vol to see all partitions (volumes) on the disk
  • Select the EFI volume by typing: sel vol Y where Y is the SYSTEM volume (this is almost always the EFI partition)
  • For convenience, assign a drive letter by typing: assign letter=Z: where Z is a free (unused) drive letter
  • Type exit to leave disk part
  • While still in the cmd prompt, type: Z: and hit enter, where Z was the drive letter you just created.
  • Type dir to list directories on this mounted EFI partition
  • If you are in the right place, you should see a directory called EFI
  • Type cd EFI and then dir to list the child directories inside EFI
  • Type rmdir /S ubuntu to delete the ubuntu boot directory
This way I could retry some steps from scratch, eventually leading me to the next scenario.


SCENARIO 2:
I followed the steps from this helpful post.
The idea behind this approach is to initially skip the Grub part during installation, using the command

Code: Select all

ubiquity -b
This approach was promising, at least the install finished for the first time - big smile on my face.

After the Mint install, according to the instructions one should install rEFInd in order to replace the Windows bootloader and the Grub menu - at least, that's my assumption.
I did that using the following commands in a Terminal session (instead of using Gdebi, as per instructions):

Code: Select all

sudo add-apt-repository ppa:rodsmith/refind
apt update
apt install refind
After mounting the EFI partition and installing rEFInd, I was asked if I wanted to automatically install it into the earlier mounted EFI partition (as per instructions), which I answered with Yes.

However, when I arrive at the step to reboot the laptop (3. Shutdown, 4. Boot the computer) it goes straight to Windows.
Also, when I enter the boot menu using F12 during boot, there is no Ubuntu installation. Only the Windows bootloader and booting from DVD are there.
It should be mentioned that the instructions in that post are not meant for a dual-boot config, but I still think that using rEFInd is the preferred route to take.
That assumption is based on the fact that the Mint installation itself at least finishes successfully, but also based on the fact that I've seen some posts stating that certain Windows Updates can mess up Grub.


If anyone can come up with some suggestions as to fix either scenario 1 or 2, resulting in some boot menu for both OS'es, I would be happy to try them out or give more info if needed.
Lenovo ideapad 320
Celeron CPU
4 GB RAM
1 TB HDD

User avatar
michael louwe
Level 8
Level 8
Posts: 2235
Joined: Sun Sep 11, 2016 11:18 pm

Re: Dual boot Windows 10 & Mint 18.3 (Cinnamon) on a 64-bit Lenovo ideapad

Post by michael louwe » Mon Feb 26, 2018 4:05 am

@ nrnugteren, .......
nrnugteren wrote:...
.
Please counter-check your install procedures below ...

For some guidance on dual-booting LM alongside Win 10/8.1 in UEFI and GPT-disk mode, please refer to .......
viewtopic.php?f=42&t=163126 (dual-booting UEFI computers)
http://linuxmint-installation-guide.rea ... en/latest/
https://ubuntuforums.org/showthread.php?t=2147295
https://sites.google.com/site/easylinux ... ct/windows
https://sites.google.com/site/easylinux ... nt-install
https://www.tecmint.com/install-linux-m ... uefi-mode/ (note step 17 - if Win 8.x/10 could not boot, <sudo update grub>)
viewtopic.php?f=42&t=122276 (manual partitioning Tutorial for Legacy BIOS mode and MBR/ms-dos disks)[use as a guide]

Ensure that Secure Boot, Fast Boot and CSM(or Legacy BIOS) are disabled in BIOS setup, Fast Startup is disabled in Win 10/8.1(>Control Panel >Power options), the Live LM media(DVD or USB-stick) is booted in UEFI mode in BIOS setup.

To dual-boot, you only need to pre-shrink the Windows partition if you intend to use the manual "Something else" install method, ie no need to do so if you intend to use the automatic "install LM alongside Windows Boot Manager" method, which will be followed by the LM Installer auto-partitioning the disk and auto-installing the Linux Grub bootloader onto the Windows ESP. Only a root / and swap partition will be auto-created with a total default size of about 20GB. The user will be given the option to increase this default size by moving a slider on the colored Partition table, subject to the maximum available free space in the Windows partition.

For the "Something else" install method, manually partition the pre-shrunk free space accordingly, eg 50GB for / or Root, 1.5X RAM size for Swap(at the end of this space) and 200GB for Home; and ensure that the "Device for boot loader installation" is the Windows EFI System Partition(= ESP = fat32/about 104MB/mount point is or flagged as boot/efi) which is usually dev/sda1.

nrnugteren
Level 1
Level 1
Posts: 4
Joined: Sun Feb 25, 2018 10:07 pm

Re: Dual boot Windows 10 & Mint 18.3 (Cinnamon) on a 64-bit Lenovo ideapad

Post by nrnugteren » Mon Feb 26, 2018 11:09 am

Hi Michael,

First, thank you for your quick reply :)

From what I read in your suggestions, I did everything like that, except for some small points (see below) which I doubt are the culprit in these 2 scenarios.
I will of course run your suggestions step by step and come back with the results to exclude as many factors as possible, because I'm starting to suspect that there is something in this setup that just doesn't work out-of-the-box as intended.
  • I haven't disabled Fast Startup in Windows, will try that
  • I didn't shrink a Windows partition. The disk was empty, so I simply kept 1/3rd of it (~330 GB as posted) unused.
    During both options ('alongside Windows' and 'Something else'), the installation utilized this free space correctly.
    Is there something specific about 'shrinking' that I should know about as opposed to keeping unused space free, because imo keeping unused space should work fine, can you confirm this please?
  • I tried both options (as posted) for installing the boot loader: Directly to sda (as per given choice by default, but not correct imo) as well as the way you described, straight into the Windows EFI partition. In my case that was pre-configured as sda2 during the Windows installation, and it shows as a vfat partition.

A new update however:
After my initial post I managed to actually get into a Mint installation (not a live session), yay! This is what happened:
  • I ran the install without Grub (ubiquity -b), choosing the 'Alongside Windows' option
  • I mounted the efi partition and installed rEFInd to it, this didn't have any desired effect so far
  • I rebooted into the live DVD session (ubuntu install didnt show during boot), chrooted the install (/mnt) as per these instructions and then managed to install part of a Grub installation, but this hang again during configuring the Grub configuration file.
  • I rebooted again, and this time I díd see the ubuntu installation! However, I ended up in an empty Grub shell.
  • I managed to manually boot into my actual Mint installation (not the Live DVD session), using these instructions and tried installing
    apt-get install grub-efi grub-efi-amd64
  • I went to bed, and that install now still hangs at 'Installing for x86_64-efi platform.'

Summarized:
  • I still have no boot manager during startup
  • I can now manually select the Mint installation when pressing F12
  • This doesn't boot me into Mint, but into grub
  • The grub for efi installation hangs and the only thing I can now do is 'sudo dpkg --configure -a' which attempts to finish that grub installation.
Will post pack with the results after running through your steps.
In the meantime, can anyone tell me for sure if there's a difference between 'Shrinking a 100% used Windows partition' or 'reserving 30% of the total disk space preliminary'?
Could this effect the installation in any way?
Lenovo ideapad 320
Celeron CPU
4 GB RAM
1 TB HDD

nrnugteren
Level 1
Level 1
Posts: 4
Joined: Sun Feb 25, 2018 10:07 pm

Re: Dual boot Windows 10 & Mint 18.3 (Cinnamon) on a 64-bit Lenovo ideapad

Post by nrnugteren » Mon Feb 26, 2018 12:20 pm

So, I have 2 questions for the moment:
- Is there a significant difference which could affect the result, between method 1 (shrinking a 1.000 GB Windows partition to 50% and then run the installation from Live DVD) and method 2 (installing Windows on 1/3rd of the harddisk and keeping 1/3rd of the harddisk 'unused' for Linux)?

- In my partition tables I see that sda1 is Windows' Recovery Partition and sda2 is the EFI System Partition (ESP).
Is there any way I can physically switch those 2 around, so that EFI physically sits on the first part of my HDD, but also so that it gets assigned sda1 which makes it conform all the howto's that can be found online?
Lenovo ideapad 320
Celeron CPU
4 GB RAM
1 TB HDD

User avatar
michael louwe
Level 8
Level 8
Posts: 2235
Joined: Sun Sep 11, 2016 11:18 pm

Re: Dual boot Windows 10 & Mint 18.3 (Cinnamon) on a 64-bit Lenovo ideapad

Post by michael louwe » Mon Feb 26, 2018 2:51 pm

@ nrnugteren, .......
nrnugteren wrote:
Mon Feb 26, 2018 12:20 pm
So, I have 2 questions for the moment:
- Is there a significant difference which could affect the result, between method 1 (shrinking a 1.000 GB Windows partition to 50% and then run the installation from Live DVD) and method 2 (installing Windows on 1/3rd of the harddisk and keeping 1/3rd of the harddisk 'unused' for Linux)?

- In my partition tables I see that sda1 is Windows' Recovery Partition and sda2 is the EFI System Partition (ESP).
Is there any way I can physically switch those 2 around, so that EFI physically sits on the first part of my HDD, but also so that it gets assigned sda1 which makes it conform all the howto's that can be found online?
1. It should not make a difference, except that the manual "Something else" install method should be used.

2. No need to move the Windows EFI System Partition(ESP) from /sda2 to /sda1. What is needed is for the Grub boot loader to be installed on the ESP. Such movement is only needed if the ESP is located near the end of the disk/drive, eg /sda8
.
Something is wrong for the Windows ESP to be formatted in vfat and not fat32. The UEFI specifications require fat32 for the ESP. This may be the cause of the problem. Did this vfat thing automatically happen during the install of Win 10.?
.
.
P S - If I were you, I would have chosen to install Win 10 and LM in Legacy BIOS/MBR or ms-dos-disk mode = easier.

nrnugteren
Level 1
Level 1
Posts: 4
Joined: Sun Feb 25, 2018 10:07 pm

Re: Dual boot Windows 10 & Mint 18.3 (Cinnamon) on a 64-bit Lenovo ideapad

Post by nrnugteren » Tue Mar 06, 2018 2:09 pm

Sorry for the delay in replying, put the installation on hold due to other things I had to work on.

Although I agree that running the installs in legacy mode might possibly make it work a lot easier, that kinda undermines the idea of using all the new methods out of the box which, imho should be the correct approach.

However, since my girlfriend needs the laptop for school, I have to finish this personal project in an unsatisfactory way and just let her work on Windows 10 only.

Nevertheless I thank you a lot for thinking with me Michael! Should I get another box in my hands where I can try it on in the future, I might give it another shot and post back here.

Finally, as to answer your questions that might be of help with other users facing a similar problem (which I suspect will happen sooner or later since everything is new and out of the box):
1. As far as I can tell, based on what I've seen during various installation attempts, the installation method shouldn't make much of a difference, because:
a) The automated installation of Mint uses the 1/3rd of free space
b) The manual configuration of the partition uses the exact same space, just gives you more freedom as to how to partition /boot, /home and swap

2.I agree, there shouldn't be a need. Just would've liked to do that if I had more time, partly for aesthetical reasons and to have the install conform with all the how-to's online.

3. And yep, the ESP was in vfat after the default installation of Windows 10.
Lenovo ideapad 320
Celeron CPU
4 GB RAM
1 TB HDD

User avatar
michael louwe
Level 8
Level 8
Posts: 2235
Joined: Sun Sep 11, 2016 11:18 pm

Re: Dual boot Windows 10 & Mint 18.3 (Cinnamon) on a 64-bit Lenovo ideapad

Post by michael louwe » Tue Mar 06, 2018 3:42 pm

@ nrnugteren, .......
nrnugteren wrote:.
.
Seems, vfat = fat32, ie they are the same or similar. When using SSDs, sometimes vfat is shown for the EFI System Partition, instead of fat32.

rEFInd is not needed if Grub can boot a dual-boot system normally.
....... AFAIK, installing rEFInd on the ESP may complicate the install of the Grub bootloader. It is quite impossible to totally uninstall rEFInd and revert its changes to the system. So, your last resort may be to reinstall Win 10 and LM alongside it later.

Post Reply

Return to “Installation & Boot”