I am NOT an expert on this. If my notes here don't quite fix your problem, then probably someone else on this forum can help you better than I can.
The PC had a previous Linux distro which I wanted to dual-boot into after LMDE was installed. (No M----Soft Windows )
The motherboard was by MSI, and I don't remember its UEFI firmware having any problems that interfered with this conversion & OS installation.
The reason for converting the disk from MBR to GPT was:
- The LMDE installer requires a FAT32 EFI partition, which didn't exist on the disk, so I had to add one;
- The disk already had 3 primary partitions & 1 extended partition, so I couldn't just add another primary partition;
- If I were going to add the EFI partition & leave the disk as MBR, then I would want to add the EFI partition as a primary partition (my own preference).
- So I chose to convert the disk to GPT.
Also, at first, the LMDE version of GRUB wouldn't boot because it didn't properly handle the Btrfs partitions on that PC. This problem & my solution are documented in https://bugs.debian.org/cgi-bin/bugrepo ... bug=854326
I had to use the prior OS's GRUB until I got LMDE's GRUB fixed.
After using "gdisk" to convert the drive from MBR to GPT (step 2 of Portablejim's posting), I used an LMDE 2 "live" USB stick and the prior Linux OS (an Ubuntu version) to install GRUB with the following commands.
Commands in bold will be explained at the bottom.
The hash character (#) introduces comments.
Code: Select all
[b]---BEGIN---[/b] [b]sudo -s[/b] # Not conventional, but most or all of the following commands require root privilege, so I did it this way. [b]mount -o subvol=@ /dev/sda2 /mnt[/b] # /dev/sda2 had the prior Linux OS that formerly booted from master boot record (MBR) # In this case, /dev/sda2 was a Btrfs partition, and all of its data was in a Btrfs subvolume called "@". # I think of /mnt as a "virtual folder" (not technically the right term) in the USB stick "live" OS. (This /mnt folder doesn't exist on the hard drive.) [b]mount -t proc proc /mnt/proc[/b] [b]mount -t sysfs sys /mnt/sys[/b] [b]mount --bind /dev /mnt/dev[/b] # "--bind" means "make a reference to the existing folder & its subfolders, rather than making an entirely new set of /dev subfolders". mkdir /mnt/boot/efi # This folder (with nothing in it) stays on the hard drive. mount /dev/sda1 /mnt/boot/efi # /dev/sda1 is the EFI system partition. cp /run/resolvconf/resolv.conf /mnt/run/resolvconf/resolv.conf # So APT can access the network. cp /etc/resolv.conf /mnt/etc/resolv.conf # Symlink to the above resolv.conf file. [b]chroot /mnt[/b] # From this point on, the binaries being run are on the HDD, not on the USB stick! apt-get install grub-efi # On that Linux distro, this un-installed the "grub-pc" package. grub-install --target=x86_64-efi --efi-directory=/boot/efi # This writes to the EFI system partition. This only needs to be done once, which is why commands related to it aren't in bold (explained in "Commands in bold..." below). [b]update-grub[/b] # This generates /boot/grub/grub.cfg based on /etc/grub.d/* and /etc/default/grub (all of these files are on the prior OS's partition /dev/sda2). [b]---END---[/b]
Anyway, once I dealt with the 2 issues noted above (Debian bugtracker links) in LMDE's GRUB, I could run "update-grub" in LMDE without either the prior LInux OS or the USB stick.
My Web browsing to get my questions answered was done using the LMDE 2 "live" USB stick, so the pages I visited aren't in my Web browser's history.
I know some of the following webpages helped me, although I don't remember the whole list perfectly: