Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 08/06/2008, à 18:31

jmr60

Modifier Grub

Bonjour,

Je voudrais modifier mon multi boot pour le simplifier:

Seulement 2 entrées:
Windows XP en 1er et en démarrage auto
et Ubuntu,

Je n'ais pas compris à quoi servent les autres entrées,
J'ai copier le fichier menu.lst et le fichier fdisk, j'ai bien lu la doc, mais je ne veux pas faire d'érreur
déjà je ne trouve pas la ligne default!
Est-ce que je peux supprimer les lignes en trop pour juste garder Ubuntu 8.04, kernel 2.6.24-18-generic,




title        Ubuntu 8.04, kernel 2.6.24-18-generic
root        (hd0,4)
kernel        /boot/vmlinuz-2.6.24-18-generic root=UUID=0fa5472e-faf3-4866-b5e5-50da10693235 ro quiet splash
initrd        /boot/initrd.img-2.6.24-18-generic
quiet

title        Ubuntu 8.04, kernel 2.6.24-18-generic (recovery mode)
root        (hd0,4)
kernel        /boot/vmlinuz-2.6.24-18-generic root=UUID=0fa5472e-faf3-4866-b5e5-50da10693235 ro single
initrd        /boot/initrd.img-2.6.24-18-generic

title        Ubuntu 8.04, kernel 2.6.24-16-generic
root        (hd0,4)
kernel        /boot/vmlinuz-2.6.24-16-generic root=UUID=0fa5472e-faf3-4866-b5e5-50da10693235 ro quiet splash
initrd        /boot/initrd.img-2.6.24-16-generic
quiet

title        Ubuntu 8.04, kernel 2.6.24-16-generic (recovery mode)
root        (hd0,4)
kernel        /boot/vmlinuz-2.6.24-16-generic root=UUID=0fa5472e-faf3-4866-b5e5-50da10693235 ro single
initrd        /boot/initrd.img-2.6.24-16-generic

title        Ubuntu 8.04, memtest86+
root        (hd0,4)
kernel        /boot/memtest86+.bin
quiet

### 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

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1

title        Microsoft Windows XP Professionnel
root        (hd0,0)
savedefault
makeactive
chainloader    +1

fdisk
Disque /dev/sda: 160.0 Go, 160041885696 octets
255 heads, 63 sectors/track, 19457 cylinders
Units = cylindres of 16065 * 512 = 8225280 bytes
Identifiant disque: 0xe36b6e7b

Périphérique Amorce    Début         Fin      Blocs    Id  Système
/dev/sda1   *           1       14281   114712101    7  HPFS/NTFS
/dev/sda2           14282       19457    41576220    5  Extended
/dev/sda5           14282       19174    39302991   83  Linux
/dev/sda6           19175       19457     2273166   82  Linux swap / Solaris

Disque /dev/sdb: 122.9 Go, 122942324736 octets
255 heads, 63 sectors/track, 14946 cylinders
Units = cylindres of 16065 * 512 = 8225280 bytes
Identifiant disque: 0x9e4c0d35

Périphérique Amorce    Début         Fin      Blocs    Id  Système
/dev/sdb1               1       14946   120053713+   7  HPFS/NTFS
jean-michel

Hors ligne

#2 Le 08/06/2008, à 19:43

xens

Re : Modifier Grub

Salut!

Voilà la config:

-------------------------------------------
title        Microsoft Windows XP Professionnel
root        (hd0,0)
savedefault
makeactive
chainloader    +1

title        Linux OSes
root

title        Ubuntu 8.04, kernel 2.6.24-18-generic
root        (hd0,4)
kernel        /boot/vmlinuz-2.6.24-18-generic root=UUID=0fa5472e-faf3-4866-b5e5-50da10693235 ro quiet splash
initrd        /boot/initrd.img-2.6.24-18-generic
quiet

title        Ubuntu 8.04, kernel 2.6.24-18-generic (recovery mode)
root        (hd0,4)
kernel        /boot/vmlinuz-2.6.24-18-generic root=UUID=0fa5472e-faf3-4866-b5e5-50da10693235 ro single
initrd        /boot/initrd.img-2.6.24-18-generic

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

La deuxième ligne recovery ubuntu n'est pas nécessaire mais bon sait on jamais!

Hors ligne

#3 Le 08/06/2008, à 19:48

kal torak

Re : Modifier Grub

bonsoir,
tu peux les supprimer, les  2 autres lignes avec

title        Ubuntu 8.04, kernel 2.6.24-16-generic
root        (hd0,4)
kernel        /boot/vmlinuz-2.6.24-16-generic root=UUID=0fa5472e-faf3-4866-b5e5-50da10693235 ro quiet splash
initrd        /boot/initrd.img-2.6.24-16-generic
quiet

title        Ubuntu 8.04, kernel 2.6.24-16-generic (recovery mode)
root        (hd0,4)
kernel        /boot/vmlinuz-2.6.24-16-generic root=UUID=0fa5472e-faf3-4866-b5e5-50da10693235 ro single
initrd        /boot/initrd.img-2.6.24-16-generic

sont les entrées de ton ancien noyau qui a été mis à jour à la version 2.6.24-18, aussi tu peux supprimer via synaptic ce noyau 2.6.24-16.
sinon pour connaître un peu plus le grub et ses paramètres la documentation ici

Hors ligne

#4 Le 08/06/2008, à 19:53

matoo

Re : Modifier Grub

Salut

Pour commencer, pour éviter toute erreur garde une copie de ton grub actuel au chaud (dans ton home par exemple):

sudo cp /boot/grub/menu.lst ~

Ensuite pour avoir seulement 2 entrées, commente les lignes avec # en début de ligne
Si tu veux tu peux également renommer les choix des title.
Exemple :

title        Ubuntu
root        (hd0,4)
kernel        /boot/vmlinuz-2.6.24-18-generic root=UUID=0fa5472e-faf3-4866-b5e5-50da10693235 ro quiet splash
initrd        /boot/initrd.img-2.6.24-18-generic
quiet

#title        Ubuntu 8.04, kernel 2.6.24-18-generic (recovery mode)
#root        (hd0,4)
#kernel        /boot/vmlinuz-2.6.24-18-generic root=UUID=0fa5472e-faf3-4866-b5e5-50da10693235 ro single
#initrd        /boot/initrd.img-2.6.24-18-generic

#title        Ubuntu 8.04, kernel 2.6.24-16-generic
#root        (hd0,4)
#kernel        /boot/vmlinuz-2.6.24-16-generic root=UUID=0fa5472e-faf3-4866-b5e5-50da10693235 ro quiet splash
#initrd        /boot/initrd.img-2.6.24-16-generic
#quiet

#title        Ubuntu 8.04, kernel 2.6.24-16-generic (recovery mode)
#root        (hd0,4)
#kernel        /boot/vmlinuz-2.6.24-16-generic root=UUID=0fa5472e-faf3-4866-b5e5-50da10693235 ro single
#initrd        /boot/initrd.img-2.6.24-16-generic

#title        Ubuntu 8.04, memtest86+
#root        (hd0,4)
#kernel        /boot/memtest86+.bin
#quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

# This is a divider, added to separate the menu items below from the Debian
# ones.

title        Ou :
root

# This entry automatically added by the Debian installer for a non-linux OS
# on /dev/sda1

title        Windows XP
root        (hd0,0)
savedefault
makeactive
chainloader    +1

Pour le choix par défaut, ca se passe en début du fichier menu.lst :

## 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 use 'savedefault' or your
# array will desync and will not let you boot your system.
default		5

Le numéro après default, pour toi, serais 5 car XP est en 5ème position du grub (grub compte en commencant par 0).

Après tu peux aussi jouer sur le nombre de seconde avant que grub boot sur l'OS par défaut (ce qui te laisse le temps ou pas de choisir autre chose) :

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

A toi de trouver le nombre de seconde adéquates...

Voilà en esperant avoir répondu clairement à tes questions... n'hésites pas si besoin!

Au passage pour rendre grub un peu moins austère en ajoutant une image, viens voir ici.

A+

EDIT : GRILLED...

Dernière modification par matoo (Le 08/06/2008, à 19:55)

Hors ligne

#5 Le 08/06/2008, à 20:58

jmr60

Re : Modifier Grub

Merci pour ces réponses ultra rapides.

Après le réarrangement de mes partitions et la refonte du multi boot j'aurais un PC impec.

J'ai lu quelque part (je ne retrouve plus ou ) qu'il serait utile de faire une disquette de redémarrage au cas ou.

Jean-Michel

Hors ligne

#6 Le 09/06/2008, à 21:39

xens

Re : Modifier Grub

Pour ce qui est de la disquette de dlmarrage il existe toujours les live CD's pour réparer les bêtises smile

Un petit résolu dans le titre?

Hors ligne