Configurer grub pour creer plusieurs entrées

Résolu
morphinux Messages postés 189 Statut Contributeur -  
morphinux Messages postés 189 Statut Contributeur -
bonjour,

Sur mon PC, j'ai 3 systèmes d'exploitation : WindowsXP, PClinuxOS et debian.

J'ai installé windows en premier, PClinuxOS en deuxième avec grub comme programme d'amorçage sur /dev/hda et debian en troisième avec grub sur /dev/hda, ce qui a remplacé le grub de PClinuxOS.

Mes partitions :

localhost:/home/morphinux# fdisk -l

Disk /dev/hda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        2550    20482843+   7  HPFS/NTFS
/dev/hda2            2551       14593    96735397+   f  W95 Ext'd (LBA)
/dev/hda5            2551        5100    20482843+   b  W95 FAT32
/dev/hda6            7799        8053     2048256   82  Linux swap / Solaris
/dev/hda7            8054       11998    31688181   83  Linux
/dev/hda8            5101        7798    21671653+  83  Linux
/dev/hda9           11999       14593    20844306   83  Linux

Partition table entries are not in disk order


Mon problème : après avoir installé debian et modifié le grub de debian, je dispose de 3 entrées : Debian, PClinuxOS et windowsXP. J'arrive à booter sur debian et windows mais pas sur PClinuxOS. Voilà mon fichier /boot/grub/menu.lst :

## ## End Default Options ##

title		Debian GNU/Linux, kernel 2.6.18-4-686
root		(hd0,8)
kernel		/boot/vmlinuz-2.6.18-4-686 root=/dev/hda9 ro 
initrd		/boot/initrd.img-2.6.18-4-686
savedefault

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

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.
title		Other operating systems:
root

#PClinuxOS
title		PClinuxOS kernel 2.6.18.6.tex1
root		(hd0,7)
savedefault
chainloader     +1


# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/hda1
title		Windows NT/2000/XP
root		(hd0,0)
savedefault
chainloader	+1


Quand je choisis PClinuxOS, ça commence à booter puis ça revient sur grub à la liste complète ??? en faite ça tourne en rond.

Merci d'avance
Configuration: Linux Debian
Epiphany 2.14

6 réponses

  1. jipicy Messages postés 40842 Date d'inscription   Statut Modérateur Dernière intervention   4 898
     
    Salut,

    Voir : grub la structure de fichier de configuration
    0
    1. morphinux Messages postés 189 Statut Contributeur 1
       
      salut,

      Merci pour ta réponse mais j'avais fait tout ça . Lorsque je boot sur sur PClinuxOS, j'ai ce message :

      erreur 15 file not found

      donc il ne doit trouver le vmlinuz, enfin je pense ? voilà le menu.lst modifié :

      ## ## End Default Options ##
      
      title		Debian GNU/Linux, kernel 2.6.18-4-686
      root		(hd0,8)
      kernel		/boot/vmlinuz-2.6.18-4-686 root=/dev/hda9 ro 
      initrd		/boot/initrd.img-2.6.18-4-686
      savedefault
      
      title		Debian GNU/Linux, kernel 2.6.18-4-686 (single-user mode)
      root		(hd0,8)
      kernel		/boot/vmlinuz-2.6.18-4-686 root=/dev/hda9 ro single
      initrd		/boot/initrd.img-2.6.18-4-686
      savedefault
      
      ### END DEBIAN AUTOMAGIC KERNELS LIST
      
      # This is a divider, added to separate the menu items below from the Debian
      # ones.
      title		Other operating systems:
      root
      
      #PClinuxOS
      title		PClinuxOS kernel 2.6.18.6.tex1
      root		(hd0,7)
      kernel		/boot/vmlinuz-2.6.18.6.tex1 root=/dev/hda8 options
      initrd		/boot/initrd.img-2.6.18.6.tex1
      rootnoverify    (hd0,7)
      
      # This entry automatically added by the Debian installer for a non-linux OS
      # on /dev/hda1
      title		Windows NT/2000/XP
      root		(hd0,0)
      savedefault
      chainloader	+1
      0
  2. morphinux Messages postés 189 Statut Contributeur 1
     
    pour info, j'ai monté la partition "PClinuxOS" = /dev/hda8 sur debian avec l'etiquette /PClinuxOS
    0
  3. jipicy Messages postés 40842 Date d'inscription   Statut Modérateur Dernière intervention   4 898
     
    Re-

    Au prompt de "grub", édites ton entrée pour PClinuxOS en surlignant l'entrée et en appuyant sur "e" (comme éditer).
    A partir de là, en t'aidant de la complétion, tu peux définir manuellement toutes les entrées nécessaires.
    Notamment la partition racine (root), le chemin du noyau, etc...
    Vire le "rootnoverify" et quand c'est fini, appuie sur "b" (comme boot).

    Si ça démarre bingo, par contre il faudra que tu édites ton menu.lst pour y rentrer les options en dur, là ce n'est qu'éphémère...

    Dans le cas contraire, redémarre sur ta Debian, puis ouvres le "menu.lst" de ta partition hda8 (celui de PCLinuxOS) et recopie l'entrée qui marchait à l'origine dans celui de ta Debian.
    C'est pas folichon comme idée, mais on sait jamais ;-))
    0
    1. morphinux Messages postés 189 Statut Contributeur 1
       
      Au prompt de "grub"


      hum!! c'est à dire, je fais "grub" en ligne de commande ? bon j'ai testé et ça me donne ça :

      GNU GRUB  version 0.97  (640K lower / 3072K upper memory)
      
             [ Minimal BASH-like line editing is supported.   For
               the   first   word,  TAB  lists  possible  command
               completions.  Anywhere else TAB lists the possible
               completions of a device/filename. ]
      
      grub>
       Possible commands are: blocklist boot cat chainloader clear cmp color configfi
      le debug device displayapm displaymem dump embed find fstest geometry halt help
       hide impsprobe initrd install ioprobe kernel lock makeactive map md5crypt modu
      le modulenounzip pager partnew parttype password pause print quit read reboot r
      oot rootnoverify savedefault serial setkey setup terminal terminfo testload tes
      tvbe unhide uppermem vbeprobe
      
      grub> /dev/hda8
      
      Error 27: Unrecognized command
      
      grub>
      


      et après comment j'edite mon entrée PClinuxOS sur ce prompt ??
      0
  4. jipicy Messages postés 40842 Date d'inscription   Statut Modérateur Dernière intervention   4 898
     
    Nan, par prompt j'entendais au boot... oups sorry :-(
    0
    1. morphinux Messages postés 189 Statut Contributeur 1
       
      bon alors j'ai fait ça en ligne de commande:

      grub> root (hd0,7)
      
       Filesystem type is ext2fs, partition type 0x83
      
      grub> kernel (hd0,7)/PClinuxOS/boot/vmlinuz root=/dev/hda8
      
      Error 15: File not found
      
      grub>
      0
  5. Vous n’avez pas trouvé la réponse que vous recherchez ?

    Posez votre question
  6. lami20j Messages postés 21506 Date d'inscription   Statut Modérateur, Contributeur sécurité Dernière intervention   3 571
     
    Salut,

    démarre avec debian, fait en root
    mkdir /mnt/pclinuxos
    mount /dev/hda8 /mnt/pclinuxos
    ls -l /mnt/pclinuxos/boot
    et affiche le résultat ici
    Merci.
    0
    1. morphinux Messages postés 189 Statut Contributeur 1
       
      salut,

      merci pour ton aide :)

      voilà le resultat :

      localhost:/home/morphinux# ls -l /mnt/pclinuxos/boot
      total 3944
      lrwxrwxrwx 1 root root      20 2007-04-05 19:51 config -> config-2.6.18.6.tex1
      -rw-r--r-- 1 root root   73809 2007-02-24 04:20 config-2.6.18.6.tex1
      drwxr-xr-x 2 root root    4096 2007-04-02 00:03 grub
      -rw-r--r-- 1 root root 1009510 2007-04-02 00:03 initrd-2.6.18.6.tex1.img
      lrwxrwxrwx 1 root root      24 2007-04-01 23:58 initrd.img -> initrd-2.6.18.6.tex1.img
      lrwxrwxrwx 1 root root      28 2007-04-05 19:51 kernel.h -> /boot/kernel.h-2.6.18.6.tex1
      -rw-r--r-- 1 root root    1493 2007-02-27 04:05 kernel.h-2.6.18.6.tex1
      -rw-r--r-- 1 root root   94600 2006-11-09 05:05 memtest-1.65.bin
      -rw-r--r-- 1 root root  470820 2007-04-02 00:03 message-graphic
      lrwxrwxrwx 1 root root      24 2007-04-01 23:58 System.map -> System.map-2.6.18.6.tex1
      -rw-r--r-- 1 root root  755531 2007-02-24 04:20 System.map-2.6.18.6.tex1
      -rw-r--r-- 1 root root     256 2006-12-19 18:11 us.klt
      lrwxrwxrwx 1 root root      21 2007-04-01 23:58 vmlinuz -> vmlinuz-2.6.18.6.tex1-rw-r--r-- 1 root root 1583205 2007-02-24 04:20 vmlinuz-2.6.18.6.tex1
      localhost:/home/morphinux#
      0
  7. lami20j Messages postés 21506 Date d'inscription   Statut Modérateur, Contributeur sécurité Dernière intervention   3 571
     
    Tu as écrit
    #PClinuxOS
    title		PClinuxOS kernel 2.6.18.6.tex1
    root		(hd0,7)
    kernel		/boot/vmlinuz-2.6.18.6.tex1 root=/dev/hda8 options
    initrd		/boot/initrd.img-2.6.18.6.tex1
    rootnoverify    (hd0,7)
    mais je vois ça

    -rw-r--r-- 1 root root 1009510 2007-04-02 00:03 initrd-2.6.18.6.tex1.img
    lrwxrwxrwx 1 root root 24 2007-04-01 23:58 initrd.img -> initrd-2.6.18.6.tex1.img

    lrwxrwxrwx 1 root root 21 2007-04-01 23:58 vmlinuz -> vmlinuz-2.6.18.6.tex1-rw-r--r-- 1 root root 1583205 2007-02-24 04:20 vmlinuz-2.6.18.6.tex1


    Alors soit tu mets ça

    #PClinuxOS
    title		PClinuxOS kernel 2.6.18.6.tex1
    root		(hd0,7)
    kernel		/boot/vmlinuz-2.6.18.6.tex1 root=/dev/hda8 ro
    initrd		/boot/initrd.img-2.6.18.6.tex1.img
    rootnoverify    (hd0,7)
    soit
    #PClinuxOS
    title		PClinuxOS kernel 2.6.18.6.tex1
    root		(hd0,7)
    kernel		/boot/vmlinuz root=/dev/hda8 ro
    initrd		/boot/initrd.img
    rootnoverify    (hd0,7)
    --
    lami20j
    0
    1. morphinux Messages postés 189 Statut Contributeur 1
       
      OOOh!!! c'est pas vrai , j'ai pas vu ça :( le ".img"

      Désolé, c'est une etourderie

      Merci maintenant ça fonctionne :)

      A+
      0