Comment configurer grub afin d'avoirs un dual boot windows linux

Tags: #<Tag:0x00007f63e4d9cae8> #<Tag:0x00007f63e4d9c9a8>

Voici le rapport :

                 Boot Info Script 0.78      [09 October 2019]


============================= Boot Info Summary: ===============================

 => Windows 7/8/2012 is installed in the MBR of /dev/sda.
 => Grub2 (v2.00) is installed in the MBR of /dev/sdb and looks at sector 1 of 
    the same hard drive for core.img. core.img is at this location and looks 
    for (,msdos5)/boot/grub. It also embeds following components:
    
    modules
    ---------------------------------------------------------------------------
    fshelp ext2 part_msdos biosdisk
    ---------------------------------------------------------------------------

sda1: __________________________________________________________________________

    File system:       ntfs
    Boot sector type:  Windows 8/2012: NTFS
    Boot sector info:  No errors found in the Boot Parameter Block.
    Operating System:  
    Boot files:        /Windows/System32/winload.exe

sdb1: __________________________________________________________________________

    File system:       swap
    Boot sector type:  -
    Boot sector info: 

sdb2: __________________________________________________________________________

    File system:       Extended Partition
    Boot sector type:  Unknown
    Boot sector info: 

sdb5: __________________________________________________________________________

    File system:       ext4
    Boot sector type:  -
    Boot sector info: 
    Operating System:  Ubuntu 20.04.1 LTS
    Boot files:        /boot/grub/grub.cfg /etc/fstab 
                       /boot/grub/i386-pc/core.img

============================ Drive/Partition Info: =============================

Drive: sda _____________________________________________________________________
Disque /dev/sda : 223,58 GiB, 240057409536 octets, 468862128 secteurs
Disk model: TOSHIBA-TR150   
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

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sda1               2,048   468,858,879   468,856,832   7 NTFS / exFAT / HPFS


Drive: sdb _____________________________________________________________________
Disque /dev/sdb : 111,81 GiB, 120034123776 octets, 234441648 secteurs
Disk model: LDLC            
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

Partition  Boot  Start Sector    End Sector  # of Sectors  Id System

/dev/sdb1    *          2,048    15,624,191    15,622,144  82 Linux swap / Solaris
/dev/sdb2          15,626,238   234,440,703   218,814,466   5 Extended
/dev/sdb5          15,626,240   234,440,703   218,814,464  83 Linux


"blkid" output: ________________________________________________________________

Device           UUID                                   TYPE       LABEL

/dev/sda1        F6E27694E2765937                       ntfs       
/dev/sdb1        175d243d-aa4a-45f0-b3a8-5434efce0b49   swap       
/dev/sdb5        31f96bc8-cf99-47bf-9349-5ef796f4b473   ext4       

========================= "ls -l /dev/disk/by-id" output: ======================

total 0
lrwxrwxrwx 1 root root  9 oct.   3 18:23 ata-LDLC_12262015B0126 -> ../../sdb
lrwxrwxrwx 1 root root 10 oct.   3 18:23 ata-LDLC_12262015B0126-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 oct.   3 18:23 ata-LDLC_12262015B0126-part2 -> ../../sdb2
lrwxrwxrwx 1 root root 10 oct.   3 18:23 ata-LDLC_12262015B0126-part5 -> ../../sdb5
lrwxrwxrwx 1 root root  9 oct.   3 18:23 ata-TOSHIBA-TR150_46RB687PK8WU -> ../../sda
lrwxrwxrwx 1 root root 10 oct.   3 18:23 ata-TOSHIBA-TR150_46RB687PK8WU-part1 -> ../../sda1
lrwxrwxrwx 1 root root  9 oct.   3 18:23 wwn-0x5e83a9720045fa34 -> ../../sda
lrwxrwxrwx 1 root root 10 oct.   3 18:23 wwn-0x5e83a9720045fa34-part1 -> ../../sda1

================================ Mount points: =================================

Device           Mount_Point              Type       Options

/dev/sdb5        /                        ext4       (rw,relatime,errors=remount-ro)


=========================== sdb5/boot/grub/grub.cfg: ===========================

--------------------------------------------------------------------------------

Donc quasiment retour à la case départ… C’est quand même un peu plus sain, les petites partitions recovery et FAT ont dégagé. Par contre je ne vois toujours pas les fichiers du gestionnaire d’amorçage de Windows, et la partition NTFS n’est toujours pas marquée amorçable. Dommage qu’on ne puisse pas générer ce rapport après l’installation de Windows et avant celle d’Ubuntu.

Je ne connais pas spécifiquement le gestionnaire d’amorçage de Windows 10 (je me suis arrêté à Windows 7). Une hypothèse serait qu’il a changé et que os-prober ne le reconnaît plus, mais ça n’expliquerait pas pourquoi Windows ne démarre pas quand tu essaies de booter sur son disque.

Tu avais essayé d’activer la partition NTFS comme indiqué plus haut ? Si non, peux-tu essayer ?

Rien à voir, mais il y a maintenant une partition de swap or il me semblait que les versions récentes d’Ubuntu n’utilisaient plus de partition de swap mais un fichier de swap dans la partition racine (ce qui est un mauvais choix à mon avis).

les problème os-prober viennent eventuellement avec l’utilisation UEFI et aussi avec le UEFI Secure Boot (c’est dans le bios il me semble).
J’ai plusieurs fois eu le problème sur mon pc.
perso mon disque 1 c’est windows, le disque 2 c’est debian. J’ai installé le grub sur le disque 2 et dans l’ordre de boot BIOS j’ai mis le disque 2.

Pour avoir une installation UEFI il faut avoir démarré le disque d’installation en UEFI justement, sinon il considère que c’est en MBR et donc avec grub-pc au lieu de grub-efi.

Tu peux éventuellement utiliser cette page pour refaire ton boot avec boot-repair: