I have a laptop with two SSDs, one NVMe and another SATA. The /root of Fedora 35 (Workstation) is on the first and /home on the latter. Similarly, the C: and D: of Windows 10. I had a problem with a Windows update so I needed to extend the size of C:, but I couldn’t extend because there was too many partitions in that SSD since the partition was MBR. So I decided to convert the whole disk to GPT using a Windows tool called MiniTool Partition Wizard and that wen terribly…
I enabled the UEFI and disabled the Secure Boot, booted on Fedora (thumb drive) and followed a tutorial (I can’t seem to find the link now) to reinstall Grub2 with GPT enabled.
Yes.
I believe the only way to boot windows with GPT when it was initially installed as MBR would be to do a complete repair or reinstall of windows. AFAIK windows boots legacy with an MBR install and UEFI with a GPT install.
you may need to reinstall windows because changing mbr to gpt it is not possible in windows and they don’t allow it so doing it from outside it won’t work. Windows users mostly don’t do this stuff so it is not in windows.but still you may ask windows help if they have any fix but i highly doubt about ultimately you need to reinstall but your linux partition should not have such issues afaik.
For last effort (assumed the software correctly convert everything including creating boot for your Windows with EFI system), on BIOS would you like to check the boot order and make Windows as the first boot. On some old UEFI bios firmware, they don’t completely support GRUB2 and even thought it detected by Fedora Linux, the boot list not works and we need to change the order manually from BIOS.
If this still not work, try again by disabling the UEFI from BIOS (make sure you already try with above approach).
Enabling Legacy mode gives black screen now. So I simply reinstalled Windows, which prevents grub to show up unless I type F12 and open boot options which are basically
Windows Boot Manager
Unknown
Fedora 35 (Workstation)
I have no idea what the second option is (neither tried to discover), but now I need to figure out how to make grub show up again.
Once you have windows booting (which you seem to now), then use the bios boot menu and boot fedora.
In fedora first use sudo fdisk -l and look to see if you have only one or more than one efi partitions. If only one, and that partition is the one fedora has mounted at /boot/efi, then you are good for a quick repair.
The quick repair will involve a simple sudo grub2-mkconfig -o /boot/grub2/grub.conf
Disk /dev/nvme0n1: 223.57 GiB, 240057409536 bytes, 468862128 sectors
Disk model: KINGSTON SA1000M8240G
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 1CF816A0-4063-03B0-A805-3EC71810EC00
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 34815 32768 16M Microsoft reserved
/dev/nvme0n1p2 34816 251693055 251658240 120G Microsoft basic data
/dev/nvme0n1p3 251693056 335579135 83886080 40G Microsoft basic data
/dev/nvme0n1p4 335579136 335988735 409600 200M EFI System
Fedora is on /dev/nvme0n1p3, the reason it says Microsoft basic data might be related to the fact I used a Windows tool to expand the /dev/nvme0n1p2 from 90GB to 120GB.
The quick repair will involve a simple sudo grub2-mkconfig -o /boot/grub2/grub.conf
Hello @darley ,
I did this for one of my older laptops that had been upgraded to Win 10 from Win 7 as BIOS and I needed secure boot on it. I used this MSDN link https://docs.microsoft.com/en-us/windows-hardware/drivers/bringup/mbr2gpt-tool-test-guidance to follow through and I remember that I had to do some setup with Powershell in order to be able to do it, like copying scripts from MSDN etc…
I tried to use that, but I couldn’t figure out a way of pointing to the partition in the recovery mode, so I gave up and reinstalled Windows all together…
(Everything in Windows is a nightmare, I dream a future where I don’t need it to play games anymore)
The only thing I see that is an issue there would be the partition nvme0n1p3.
It certainly should show as “Linux Filesystem”. Thus you may need to redo the linux install, and remove that partition and recreate it as an ext4 linux file system so grub sees it properly.
In general, for successful installs in dual boot machines, you should use the tools in windows to shrink the windows file system to the desired size and leave the free space unallocated. Then during the install tell the fedora installer to use that free space and it will create the partitions properly for you. It will use an already existing efi partition and configure grub properly for dual booting. In fact if you tell it to do an automatic install it will
use the existing efi partition
create an ext4 partition of ~700 MB that it will mount as /boot
create the rest of the free space as btrfs with 2 subvolumes for / and /home.
Problems similar to yours crop up when you have windows create the partition since it is now marked as a windows file system.
My drive shows this with fdisk -l
$ sudo fdisk -l
[sudo] password for user:
Disk /dev/nvme0n1: 476.94 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: INTEL SSDPEKNW512G8
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 406E2318-D071-4F12-A55C-75C1711D624E
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 534527 532480 260M EFI System
/dev/nvme0n1p2 534528 567295 32768 16M Microsoft reserved
/dev/nvme0n1p3 567296 199752334 199185039 95G Microsoft basic data
/dev/nvme0n1p4 998473728 1000214527 1740800 850M Windows recovery environment
/dev/nvme0n1p5 199753728 201404415 1650688 806M Linux filesystem
/dev/nvme0n1p6 201404416 896079871 694675456 331.2G Linux LVM
Partition table entries are not in disk order.
I used an already installed windows system on a GPT partitioned disk. Since windows by default creates 4 partitions for efii booting, and the basic windows C: drive is partition 3 all I did was shrink the size of p3 to what I wanted. Then I installed fedora into the freed up space which put p5 & p6 physically between p3 & p4. Fedora is using nvme0n1p1 as /boot/efi, nvme0n1p5 as /boot, and nvme0n1p6 is LVM containing / and /home.
When I bought this SSD I installed Windows and right after Linux. I have been using like this for 3 years now. But then Windows was complaining that the 50GB free (almost 100GB at total) wasn’t enough to do whatever update it needed to do.
So I needed to grow the Windows partition and that was the root of all evil, because the free space was after my Linux installation.
The EaseUs Partition Master (win software I used) moved the Linux, inserted a partition of 20GB and merged with the windows. Since it did something by changing the type of the Linux partition without erasing the data, could I do something similar in the Linux side?
I don’t know what effect it will have on the data for sure, but you should be able to boot with the live image that you use for an install and with gdisk or parted change the partition type. With gdisk mine shows the /boot partition (ext4) as type 8300.
There was four options of boot precedence on my BIOS, then I disabled secure boot and there was three. Two Windows Boot Managers, then I moved the last one up and that did the trick, although it’s unclear why this name.
Using a USB device I listed the partitions and I found that only the type tag was Microsoft basic data, but the system was indeed brtfs, so I simply changed the tag.