1

I used to have both windows and Linux on my laptop, for some reasons I have deleted the windows partition and I had to install windows back into it.

My problem is how to have Grub back to select my boot without having to go into the bios.

I still have the EFI partition at the beguining of my drive:

[ geoffroy@DESKTOP-M9IJ9RC ~ ] -> sudo fdisk -l [sudo] Mot de passe de geoffroy : Désolé, essayez de nouveau. [sudo] Mot de passe de geoffroy : Disque /dev/nvme0n1 : 238,49 GiB, 256060514304 octets, 500118192 secteurs Modèle de disque : LENSE30256GMSP34MEAT3TA Unités : secteur de 1 × 512 = 512 octets Taille de secteur (logique / physique) : 512 octets / 512 octets taille d'E/S (minimale / optimale) : 512 octets / 512 octets Type d'étiquette de disque : gpt Identifiant de disque : 3DE484CC-3E40-4C0D-9174-8951A3C26A65 Périphérique Début Fin Secteurs Taille Type /dev/nvme0n1p1 2048 534527 532480 260M Système EFI /dev/nvme0n1p2 534528 567295 32768 16M Réservé Microsoft /dev/nvme0n1p3 567296 120567807 120000512 57,2G Données de base Microsoft /dev/nvme0n1p4 498069504 500117503 2048000 1000M Environnement de récupération Windows /dev/nvme0n1p5 120567808 136566783 15998976 7,6G Partition d'échange Linux /dev/nvme0n1p6 136566784 186566655 49999872 23,9G Système de fichiers Linux /dev/nvme0n1p7 186566656 497115135 310548480 148,1G Système de fichiers Linux Les entrées de la table de partitions ne sont pas dans l'ordre du disque. Disque /dev/sda : 119,26 GiB, 128043712512 octets, 250085376 secteurs Modèle de disque : SD/MMC Unités : secteur de 1 × 512 = 512 octets Taille de secteur (logique / physique) : 512 octets / 512 octets taille d'E/S (minimale / optimale) : 512 octets / 512 octets Type d'étiquette de disque : dos Identifiant de disque : 0x00000000 Périphérique Amorçage Début Fin Secteurs Taille Id Type /dev/sda1 32768 250085375 250052608 119,2G 7 HPFS/NTFS/exFAT 

Is there a safe way to do it?

3
  • If both systems are UEFI installs, and Windows fast start up is off, you just need to run this: sudo update-grub which also runs os-prober. Note that Windows updates will turn fast start up back on. askubuntu.com/questions/843153/… & askubuntu.com/questions/145902/… Grub only boots working Windows, so if issues with Windows, you should always be able to directly boot Windows from UEFI boot menu ( same key you used to select to boot flash drive installers). Commented Oct 9, 2020 at 14:54
  • Thanks for your answer, I tried update-grub but it is not working, I use fedora 31. I cannot find a way to install it back. Commented Oct 10, 2020 at 9:40
  • Ubuntu uses sudo update-grub to call the mkconfig command. With Fedora you have to run the grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg as an administrator. Or this: unix.stackexchange.com/questions/152222/… Commented Oct 10, 2020 at 13:49

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.