Windows pas reconnu par Grub

Résolu
Bonjour à tous !!

J'ai installé Debian sur une partition, et non sur celle ou est installé Windows.
Je redémarre mon PC et je m'apercois que Grub ne reconnait que Debian...

Comment faire apparaitre Windows?

Merci de m'aider !!
++
Configuration: Linux
Mozilla 1.8.1.16

71 réponses

Résumé de la discussion

Le problème central est que GRUB ne détecte pas Windows après une installation Debian sur une partition distincte, laissant l'entrée Windows absente du menu de démarrage. Plusieurs participants proposent d'ajouter manuellement une entrée Windows dans le fichier grub (ou menu.lst) en utilisant une chainloader vers la partition Windows, ce qui nécessite d'identifier la bonne partition. D'autres échanges abordent le montage et l'accès à des partitions NTFS depuis Debian, parfois en lecture seule, et la question de permissions pour consulter des dossiers situés sur Windows. En cas de besoin, certains suggèrent de vérifier la partition Windows et de tester le mode chainloader, afin d'éviter les erreurs de démarrage et d'accentuer la fiabilité de l'accès multi-OS.

Bobot (l’IA à votre service)
  1. cat /boot/grub/menu.lst


    ça donne quoi dans un term ?
    0
    1. Hello,
      voici ce que ça mets :

      # menu.lst - See: grub(8), info grub, update-grub(8)
      # grub-install(8), grub-floppy(8),
      # grub-md5-crypt, /usr/share/doc/grub
      # and /usr/share/doc/grub-doc/.

      ## default num
      # Set the default entry to the entry number NUM. Numbering starts from 0, and
      # the entry number 0 is the default if the command is not used.
      #
      # You can specify 'saved' instead of a number. In this case, the default entry
      # is the entry saved with the command 'savedefault'.
      # WARNING: If you are using dmraid do not change this entry to 'saved' or your
      # array will desync and will not let you boot your system.
      default 0

      ## timeout sec
      # Set a timeout, in SEC seconds, before automatically booting the default entry
      # (normally the first entry defined).
      timeout 5

      # Pretty colours
      color cyan/blue white/blue

      ## password ['--md5'] passwd
      # If used in the first section of a menu file, disable all interactive editing
      # control (menu entry editor and command-line) and entries protected by the
      # command 'lock'
      # e.g. password topsecret
      # password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
      # password topsecret

      #
      # examples
      #
      # title Windows 95/98/NT/2000
      # root (hd0,0)
      # makeactive
      # chainloader +1
      #
      # title Linux
      # root (hd0,1)
      # kernel /vmlinuz root=/dev/hda2 ro
      #

      #
      # Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

      ### BEGIN AUTOMAGIC KERNELS LIST
      ## lines between the AUTOMAGIC KERNELS LIST markers will be modified
      ## by the debian update-grub script except for the default options below

      ## DO NOT UNCOMMENT THEM, Just edit them to your needs

      ## ## Start Default Options ##
      ## default kernel options
      ## default kernel options for automagic boot options
      ## If you want special options for specific kernels use kopt_x_y_z
      ## where x.y.z is kernel version. Minor versions can be omitted.
      ## e.g. kopt=root=/dev/hda1 ro
      ## kopt_2_6_8=root=/dev/hdc1 ro
      ## kopt_2_6_8_2_686=root=/dev/hdc2 ro
      # kopt=root=/dev/hdb2 ro

      ## default grub root device
      ## e.g. groot=(hd0,0)
      # groot=(hd0,1)

      ## should update-grub create alternative automagic boot options
      ## e.g. alternative=true
      ## alternative=false
      # alternative=true

      ## should update-grub lock alternative automagic boot options
      ## e.g. lockalternative=true
      ## lockalternative=false
      # lockalternative=false

      ## additional options to use with the default boot option, but not with the
      ## alternatives
      ## e.g. defoptions=vga=791 resume=/dev/hda5
      # defoptions=

      ## should update-grub lock old automagic boot options
      ## e.g. lockold=false
      ## lockold=true
      # lockold=false

      ## Xen hypervisor options to use with the default Xen boot option
      # xenhopt=

      ## Xen Linux kernel options to use with the default Xen boot option
      # xenkopt=console=tty0

      ## altoption boot targets option
      ## multiple altoptions lines are allowed
      ## e.g. altoptions=(extra menu suffix) extra boot options
      ## altoptions=(single-user) single
      # altoptions=(single-user mode) single

      ## controls how many kernels should be put into the menu.lst
      ## only counts the first occurence of a kernel, not the
      ## alternative kernel options
      ## e.g. howmany=all
      ## howmany=7
      # howmany=all

      ## should update-grub create memtest86 boot option
      ## e.g. memtest86=true
      ## memtest86=false
      # memtest86=true

      ## should update-grub adjust the value of the default booted system
      ## can be true or false
      # updatedefaultentry=false

      ## ## End Default Options ##

      title Debian GNU/Linux, kernel 2.6.18-6-686
      root (hd0,1)
      kernel /boot/vmlinuz-2.6.18-6-686 root=/dev/hdb2 ro
      initrd /boot/initrd.img-2.6.18-6-686
      savedefault

      title Debian GNU/Linux, kernel 2.6.18-6-686 (single-user mode)
      root (hd0,1)
      kernel /boot/vmlinuz-2.6.18-6-686 root=/dev/hdb2 ro single
      initrd /boot/initrd.img-2.6.18-6-686
      savedefault

      ### END DEBIAN AUTOMAGIC KERNELS LIST
      0
      1. Oky donc c'est normal, sur quelle partition est ton windows ?
        0
        1. Hello,
          je ne sais pas...

          Je sais juste que la partition ou se truve Windows est de 100 go à peu près...
          0
          1. Modérateur
            Salut,

            Affiches le résultat de la commande suivante (en root) :
            /sbin/fdisk -l
            ;-))
            0
            1. Voici :

              /sbin/fdisk: option invalide -- 1

              Usage: fdisk [-b SSZ] [-u] DISK Change partition table
              fdisk -l [-b SSZ] [-u] DISK List partition table(s)
              fdisk -s PARTITION Give partition size(s) in blocks
              fdisk -v Give fdisk version
              Here DISK is something like /dev/hdb or /dev/sda
              and PARTITION is something like /dev/hda7
              -u: give Start and End in sector (instead of cylinder) units
              -b 2048: (for certain MO disks) use 2048-byte sectors
              0
              1. Modérateur
                C'est un "l" (elle minuscule) pas un 1 (un) ! ;-)
                0
                1. c'est pas un 1 mais un L minuscule !

                  edit : grillé :)
                  0
                  1. Modérateur
                    edit : grillé :)
                    Et ça fait mal ? ;-))
                    0
                2. :):)

                  Voila le résultat de la vraie commande... ::::::

                  Disk /dev/hdb: 160.0 GB, 160041885696 bytes
                  255 heads, 63 sectors/track, 19457 cylinders
                  Units = cylinders of 16065 * 512 = 8225280 bytes

                  Device Boot Start End Blocks Id System
                  /dev/hdb1 2 13349 107217810 f W95 Ext'd (LBA)
                  /dev/hdb2 * 13350 19457 49062510 83 Linux
                  /dev/hdb5 2 13083 105081133+ 7 HPFS/NTFS
                  /dev/hdb6 13084 13349 2136613+ 82 Linux swap / Solaris
                  0
                  1. Suis poilu alors ça sent fort surtout. :D
                    0
                    1. Modérateur
                      Rajoute ça à la fin de ton fichier /boot/grub/menu.lst :
                      title Windows 
                      root (hd0,2)
                      makeactive
                      chainloader +1 

                      0
                      1. Modérateur
                        ## ## End Default Options ##
                        
                        title Debian GNU/Linux, kernel 2.6.18-6-686
                        root (hd0,1)
                        kernel /boot/vmlinuz-2.6.18-6-686 root=/dev/hdb2 ro
                        initrd /boot/initrd.img-2.6.18-6-686
                        savedefault
                        
                        title Debian GNU/Linux, kernel 2.6.18-6-686 (single-user mode)
                        root (hd0,1)
                        kernel /boot/vmlinuz-2.6.18-6-686 root=/dev/hdb2 ro single
                        initrd /boot/initrd.img-2.6.18-6-686
                        savedefault
                        
                        ### END DEBIAN AUTOMAGIC KERNELS LIST
                        
                        title Windows 
                        root (hd0,2)
                        makeactive
                        chainloader +1 
                        0
                        1. Hello,
                          voici le message d'erreur...:

                          booting Windows

                          root (hd0,2)
                          Error 22 : No such partition

                          ...

                          J'ai des données très importante sur cette partition, et j'ai besoin de Windows...
                          0
                          1. Modérateur
                            Change ce qui est en gras :
                            title Windows 
                            root (hd0,0)
                            makeactive
                            chainloader +1

                            0
                            1. title Windowstest1
                              root (hd0,0)
                              makeactive
                              chainloader +1 
                              
                              title Windowstest2
                              root (hd0,4)
                              makeactive
                              chainloader +1 
                              


                              Un des 2 devrai passer normalement
                              0
                              1. Modérateur
                                J'ai opté pour le (hd0,0), car y'a un sacré binz dans sa table des partitions :

                                Device Boot Start End Blocks Id System
                                /dev/hdb1 2 13349 107217810 f W95 Ext'd (LBA)
                                /dev/hdb2 * 13350 19457 49062510 83 Linux
                                /dev/hdb5 2 13083 105081133+ 7 HPFS/NTFS
                                /dev/hdb6 13084 13349 2136613+ 82 Linux swap / Solaris

                                qui devrait être :

                                Device Boot Start End Blocks Id System
                                /dev/hdb1 2 13349 107217810 f W95 Ext'd (LBA)
                                /dev/hdb5 2 13083 105081133+ 7 HPFS/NTFS
                                /dev/hdb6 13084 13349 2136613+ 82 Linux swap / Solaris
                                /dev/hdb2 * 13350 19457 49062510 83 Linux

                                ;-((
                                0
                            2. Hello,
                              Peter, j'ai essayé ça ne marche pas...

                              jipyci, que dois-je faire avec ça?
                              0
                              1. Modérateur
                                jipyci, que dois-je faire avec ça?
                                Rien, c'était juste pour qu'on y voit un peu mieux.

                                Par contre il faudrait remettre le "flag" de boot" sur la partition "Windows", c'est peut être ça qui empêche le démarrage, enfin je suppose ;-\
                                Ca se fait depuis "fdisk". il faut lancer fdisk en root :

                                fdisk /dev/hda

                                - appuyer sur la touche "m" pour avoir l'aide
                                - "p" pour afficher la table des partitions
                                - "a" pour basculer le flag
                                - choisir le numéro correspondant à la partition où tu veux mettre le flag
                                - "w" pour écrire
                                - "q" pour quitter

                                Au fait tu dis que ça ne marche pas, mais as-tu eu des messages d'erreurs?
                                0
                            3. Oui,
                              voici le message d'erreur :

                              root (hd0,0)
                              Filesystem type unknow, partition type 0xf
                              makeactive
                              Error 12 : Invalid device requested

                              Euh je fais quoi avec fdisk?
                              Quelle commande faut que je fasse exactement?
                              je suis completement perdu, merci de m'aider...
                              0
                              1. Modérateur
                                Tu tapes les commandes dans l'ordre que je t'ai donné.
                                0
                              2. @jipicySalut j'ai suivi les directives et ça marche

                                merci
                                0
                            4. Ah okok

                              - choisir le numéro correspondant à la partition où tu veux mettre le flag

                              Et je fais met quoi à la place de ça?
                              0
                              • 1
                              • 2
                              • 3
                              • 4