Saturday, May 18, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 350  / 2 Years ago, mon, february 7, 2022, 3:36:17

I have a pretty complicated configuration. I'm trying to be synthetic :


I have 4 disks (1 ssd, 2 nvme and 1 HDD) and 4 OSs (3 Win10 and 1 ubuntu) :



  • Nvme 1 (Win10-1 + Ubuntu 20.04) /dev/nvme0n1

  • Nvme 2 (Win10-2) /dev/nvme1n1

  • HDD 1 (just data+swap) /dev/sda

  • SSD 1 (Win10-3) /dev/sdb


The computer is UEFI.


At the begining I had no problem. Grub showed my 4 boot options.


But I had to reinstall Win10-1 and then I completly lost my grub. So I was able to boot only on Win10-1 or Win10-2 via windows boot manager.


I tried to repair Grub booting on a live ubuntu, but with mitigated succes... Here the actual behaviour :



Boot
|_______Grub
|______*Ubuntu > boots Ubuntu
|______*Windows Boot manager on /dev/nvme1n1
|_______Windows Boot Manager GUI
|______*Win10-1 > boots Win10-1
|______*Win10-2
|_______Grub
|______*Ubuntu > Grub rescue
|______*Windows Boot manager on /dev/nvme1n1 > boots Win10-2

So its perfect mess to me and by the way I lost the ability to boot on Win10-3...


I don't know how to erase this messy boot config in the MBRs and roll back to this:


Boot 
|_______Grub
|______*Ubuntu > boots Ubuntu
|______*Windows Boot manager on /dev/nvme0n1 > boots Win10-1
|______*Windows Boot manager on /dev/nvme1n1 > boots Win10-2
|______*Windows Boot manager on /dev/sdb > boots Win10-3

Is there a magic tool to configure this?


Any help/advice will be apreciated.


---Edit 1---
Thanks for your answer WaterOfDark.


I already gone through this process but with no luck.


In addition, Win3 is not a big deal as I can boot it using EFI selection. I also have 3 EFI partition, on Nvme1, Nvme2 and SSD1


Maybe the issue is from those partitions? Maybe I can reset in some way the content of the EFI part and then run update-grub again?


I must admit that I'm not really at ease with the EFI stuff.


---Edit2---


I confirm Windows Fast Start up is disable


---Edit3---


Here are the result of commands :
Here are the results


willy@Ubuntu:~$ sudo efibootmgr
BootCurrent: 0002
Timeout: 1 seconds
BootOrder: 0002,000A,0000,0008,0006,000B,0007
Boot0000* Windows Boot Manager
Boot0002* ubuntu
Boot0006* UEFI: SAMSUNG SSD 830 Series, Partition 2
Boot0007* UEFI: Sabrent Rocket 4.0 1TB, Partition 1
Boot0008* Windows Boot Manager
Boot000A* ubuntu
Boot000B* UEFI OS
willy@Ubuntu:~$ sudo dmidecode -t0 | grep -Ei "BIOS boot|UEFI"
BIOS boot specification is supported
UEFI is supported

More From » dual-boot

 Answers
2

First of all thx everyone for pointing me out the right way, that gives me good clues.
After lots of reading on the subject I have a better understanding of the subject.


Here is the detail of how I proceed :


From Ubuntu, using Gparted, I completely delete EFI partition on Nvme2 I format the one on Nvme1. (with the boot flag)


Then in a terminal :
sudo gedit /etc/fstabto replace UID of the EFI partition. It changes arfter formating. The line should looks like this
UUID=1A2B-3C4D /boot/efi vfat defaults 0 1, save fstab then mount EFI partition sudo mount /boot/efi and reinstall grub
sudo grub-install


Now, after rebooting, UEFI entries are not messy anymore but you've got only one entry: Ubnutu. No more Windows here, so I have to recreate EFI entries for Windows


In a lot of guides I found, it says to use Windows Startup Repair tool, but:



  1. It didn't work for me (maybe because of Grub?)

  2. I don't exactly knows what it does and how....


So I did it manually :


Boot on Windows10 install media > select language > Repair your computer > Advanced Options > Troubleshoot > Command prompt


With diskpart I mount and add a letter to EFI partition


diskpart
diskpart>list vol (to display assigned letter to partitions and volume numbers)
diskpart>sel vol 4 (volume number of the EFI partition)
diskpart>assign letter=Z: (or other available letter)
diskpart>exit

Then I use bcdboot to create Windows entries in the EFI partition


bcdboot D:Windows /l fr-fr /s Z: /f UEFI                (D is the letter of the partition with the first Windows system to boot, here Win10-1)
bcdboot E:Windows /l fr-fr /s Z: /f UEFI /d /addlast (E is the letter of the partition with the first Win10-2 system)
bcdboot F:Windows /l fr-fr /s Z: /f UEFI /d /addlast (F is the letter of the partition with the first Win10-3 system)

When rebooting there is now 2 choice in UEFI selection : Grub or Windows boot manager, but grub still don't know Windows.
At the end, boot a last time on Ubuntu and do a sudo update-grub.


Here is the actual behaviour when booting :


Boot 
|_______Grub
|______*Ubuntu > boots Ubuntu
|______*Windows Boot manager on /dev/nvme0n1
|_______Windows Boot Manager GUI
|______*Win10-1 > boots Win10-1
|______*Win10-2 > boots Win10-2
|______*Win10-3 > boots Win10-3

For more clarity we can use bcdedit to rename entries in WBM


From any Windows command prompt:


bcdedit (to list entries and not identifiers)
bcdedit /set {identifier} description "My Custom Windows"

Now on its preatty clean. But I must go through Grub then Windows Boot Manager GUI to boot on any Windows.
So I keep playing !


I did format EFI partition on Nvme1 again, create a new one on Nvme2 and another on SSD1 (FAT32 partition 100Mo with 'boot' Flag from Gparted)


Install Grub on Nvme1 /boot/EFI.


From Windows10 install media, the same way as above, mount each 3 EFI partitions and add on each one the related EFI entries :


bcdboot D:Windows /l fr-fr /s Z: /f UEFI /d /addlast    (D is system Win10-1 and Z EFI on Nvme1)
bcdboot E:Windows /l fr-fr /s Y: /f UEFI /d /addlast (E is system Win10-2 and Y EFI on Nvme2)
bcdboot F:Windows /l fr-fr /s X: /f UEFI /d /addlast (F is system Win10-3 and X EFI on SSD1)

Finaly do update-grub from Ubuntu after reboot.
And now here is the behaviour :


Boot 
|_______Grub
|______*Ubuntu > boots Ubuntu
|______*Windows Boot manager on /dev/nvme0n1 > boots Win10-1
|______*Windows Boot manager on /dev/nvme1n1 > boots Win10-2
|______*Windows Boot manager on /dev/sdb > boots Win10-3

Furthermore, I am now able to boot any system from UEFI selection and if I lost Nvme1 disk I am still able to boot from other disk


Hope this novel can be useful for other people


[#2230] Tuesday, February 8, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ithriv

Total Points: 46
Total Questions: 115
Total Answers: 96

Location: Malaysia
Member since Wed, May 11, 2022
2 Years ago
ithriv questions
Tue, Mar 14, 23, 14:31, 1 Year ago
Wed, Oct 5, 22, 02:59, 2 Years ago
Fri, Mar 11, 22, 10:12, 2 Years ago
Thu, May 11, 23, 10:55, 1 Year ago
Sun, Sep 26, 21, 06:47, 3 Years ago
;