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 04/07/2006, à 19:36

zebu14

Ajouter windows Xp a grub (menu.lst)

Bonjour à tous.

J'explique mon cas :

Je possede un pc sur lequel j'avais Windows Xp sur un disque dur en serial ATA.
J'ai décidé un jour d'installer Ubuntu Dapper sur un disque en IDE.
Pour etre sur que grub n'efface pas mon boot windows xp, j'ai donc oté mon disque Serial ATA puis installé Ubuntu.
Tout fonctionne a merveille, mais désormais, j'aimerais pouvoir ajouter une entrée windows XP a mon menu Grub pour ne pas avoir a débrancher un disque puis rebrancher l'autre pour pouvoir passer de win Xp a Ubuntu et inversement.

J'ai lu pas mal d'infos sur le menu.st, mais etant donné que je ne connais pas l'identification de chacun des disques dur (hd0 ou 1) etc.... je ne veux pas faire de betises.
Autrement dit; je cherche a savoir comment connaitre les identifiants de chacun de mes disques durs pour pouvoir configurer mon menu.lst correctement.

Mon menu.lst est le suivant :

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

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
hiddenmenu

# 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/hda1 ro

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

## 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=quiet splash

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(recovery mode) single
# altoptions=(recovery 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		Ubuntu, kernel 2.6.15-25-k7
root		(hd0,0)
kernel		/boot/vmlinuz-2.6.15-25-k7 root=/dev/hda1 ro quiet splash
initrd		/boot/initrd.img-2.6.15-25-k7
savedefault
boot

title		Ubuntu, kernel 2.6.15-25-k7 (recovery mode)
root		(hd0,0)
kernel		/boot/vmlinuz-2.6.15-25-k7 root=/dev/hda1 ro single
initrd		/boot/initrd.img-2.6.15-25-k7
boot

title		Ubuntu, kernel 2.6.15-25-386
root		(hd0,0)
kernel		/boot/vmlinuz-2.6.15-25-386 root=/dev/hda1 ro quiet splash
initrd		/boot/initrd.img-2.6.15-25-386
savedefault
boot

title		Ubuntu, kernel 2.6.15-25-386 (recovery mode)
root		(hd0,0)
kernel		/boot/vmlinuz-2.6.15-25-386 root=/dev/hda1 ro single
initrd		/boot/initrd.img-2.6.15-25-386
boot

title		Ubuntu, kernel 2.6.15-23-386
root		(hd0,0)
kernel		/boot/vmlinuz-2.6.15-23-386 root=/dev/hda1 ro quiet splash
initrd		/boot/initrd.img-2.6.15-23-386
savedefault
boot

title		Ubuntu, kernel 2.6.15-23-386 (recovery mode)
root		(hd0,0)
kernel		/boot/vmlinuz-2.6.15-23-386 root=/dev/hda1 ro single
initrd		/boot/initrd.img-2.6.15-23-386
boot

title		Ubuntu, memtest86+
root		(hd0,0)
kernel		/boot/memtest86+.bin 
boot

### END DEBIAN AUTOMAGIC KERNELS LIST

Je sais qu'il faut ajouter une entrée du type :

title Windows XP
root (hd$,$)
savedefault
makeactive
chainloader +1
rootnoverify (hd$)

Mais je ne sais pas quoi mettre à la place des "$"

Merci d'avance !!

Hors ligne

#2 Le 04/07/2006, à 19:40

nicky_larson9

Re : Ajouter windows Xp a grub (menu.lst)

lequel ton disque sata pour windows ?

sinon tu fais Fdisk -l ( pas majuscule L)

puis tu me montre smile


je suis malentendant (sourd et muet), désolé pour mon orthographe ?
[ubuntu Dapper 6.06/ Gnome/ Firefox/ thunderbird/ Nvidia]
nouveau ! irc : irc.freenode.net / #frugalware-fr  &  #terranux, à vous chattez

Hors ligne

#3 Le 04/07/2006, à 19:45

zebu14

Re : Ajouter windows Xp a grub (menu.lst)

J'ai tapé la commande !! wink

zebu@zebu-desktop:~$ sudo fdisk -l

Disque /dev/sda: 251.0 Go, 251000193024 octets
255 têtes, 63 secteurs/piste, 30515 cylindres
Unités = cylindres de 16065 * 512 = 8225280 octets

Périphérique Amorce    Début         Fin      Blocs    Id  Système
/dev/sda1   *           1       26188   210355078+   7  HPFS/NTFS             [b]==> Partition Windows[/b]
/dev/sda2           26189       30515    34756627+   f  W95 Etendu (LBA)
/dev/sda5           26189       30515    34756596    7  HPFS/NTFS

Disque /dev/hda: 160.0 Go, 160041885696 octets
255 têtes, 63 secteurs/piste, 19457 cylindres
Unités = cylindres de 16065 * 512 = 8225280 octets

Périphérique Amorce    Début         Fin      Blocs    Id  Système
/dev/hda1               1        4124    33125998+  83  Linux                          [b]==> Partition systeme linux[/b]
/dev/hda2            4125        4809     5502262+  82  Linux swap / Solaris
/dev/hda3            4810       19457   117660060    b  W95 FAT32     [b]==>Partition sur laquelle je mets quelques fichiers sans importance[/b]

Hors ligne

#4 Le 04/07/2006, à 20:13

nicky_larson9

Re : Ajouter windows Xp a grub (menu.lst)

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

ton disque premier sata pour xp ?


je suis malentendant (sourd et muet), désolé pour mon orthographe ?
[ubuntu Dapper 6.06/ Gnome/ Firefox/ thunderbird/ Nvidia]
nouveau ! irc : irc.freenode.net / #frugalware-fr  &  #terranux, à vous chattez

Hors ligne

#5 Le 04/07/2006, à 20:50

zebu14

Re : Ajouter windows Xp a grub (menu.lst)

Merci, j'essaye ca dès que possible et je te redis !:)

Hors ligne

#6 Le 04/07/2006, à 21:07

nicky_larson9

Re : Ajouter windows Xp a grub (menu.lst)

ok tu essaies smile


je suis malentendant (sourd et muet), désolé pour mon orthographe ?
[ubuntu Dapper 6.06/ Gnome/ Firefox/ thunderbird/ Nvidia]
nouveau ! irc : irc.freenode.net / #frugalware-fr  &  #terranux, à vous chattez

Hors ligne

#7 Le 06/07/2006, à 18:22

zebu14

Re : Ajouter windows Xp a grub (menu.lst)

marche po ! roll

Hors ligne

#8 Le 06/07/2006, à 19:53

nicky_larson9

Re : Ajouter windows Xp a grub (menu.lst)

zebu14 a écrit :

marche po ! roll

alors  hd0,0 remplacer (sd0,0)

et après

tu lis ca : http://doc.ubuntu-fr.org/installation/grub

Dernière modification par nicky_larson9 (Le 06/07/2006, à 19:57)


je suis malentendant (sourd et muet), désolé pour mon orthographe ?
[ubuntu Dapper 6.06/ Gnome/ Firefox/ thunderbird/ Nvidia]
nouveau ! irc : irc.freenode.net / #frugalware-fr  &  #terranux, à vous chattez

Hors ligne

#9 Le 09/07/2006, à 12:30

KiaN

Re : Ajouter windows Xp a grub (menu.lst)

Hello,

Bon ben moi j'ai fait pareil, installation d'Ubuntu sur un disque physique autre que XP, sachant que XP était déjà installé et là je veux mettre à jour mon menu.lst mais j'ai un doute sur un truc : mon XP étant sur /dev/hdg1 je sais pas comment mettre ça en hd(x,y)

Disk /dev/sda: 251.0 GB, 251000193024 bytes
255 heads, 63 sectors/track, 30515 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       30515   245111706    7  HPFS/NTFS

Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        1275    10241406    c  W95 FAT32 (LBA)
/dev/sdb2   *        1276        8924    61440592+   7  HPFS/NTFS
/dev/sdb3            8925       30274   171493875    7  HPFS/NTFS
/dev/sdb4           30275       30401     1020127+   7  HPFS/NTFS

Disk /dev/hda: 122.9 GB, 122942324736 bytes
255 heads, 63 sectors/track, 14946 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        1275    10241406    7  HPFS/NTFS
/dev/hda2            1276       14023   102398310    7  HPFS/NTFS

Disk /dev/hdc: 82.3 GB, 82348277760 bytes
255 heads, 63 sectors/track, 10011 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdc1               1        1021     8201151   83  Linux
/dev/hdc2            1022        9813    70621740   83  Linux
/dev/hdc3            9814       10011     1590435   82  Linux swap / Solaris

Vais tenter ma chance un peu au pif ^^;

Dernière modification par KiaN (Le 09/07/2006, à 12:49)

Hors ligne

#10 Le 14/07/2006, à 11:48

nicky_larson9

Re : Ajouter windows Xp a grub (menu.lst)

lu kian,
mais /dev/hdg1 ????? je ne vois pas d'où roll


je suis malentendant (sourd et muet), désolé pour mon orthographe ?
[ubuntu Dapper 6.06/ Gnome/ Firefox/ thunderbird/ Nvidia]
nouveau ! irc : irc.freenode.net / #frugalware-fr  &  #terranux, à vous chattez

Hors ligne