Comment configurer grub pour lancer mon xp a partir de knoppix ?

bonjour,
comment configurer grub pour lancer mon xp a partir de knoppix
je n’ai pas trouvé d’info simple et clair pour configurer grub

voici ma config

1er disque: 6go (1 partition)
2ième disque: 20go (2 partitions, 1ere part: ext3; 2ieme part fat32 XP installé)

je ne sait absolument pas comment faire pour configurer grub!

merci

De mémoire il faut ajouter dans le fichier de conf de grub (/boot/grub/grub.conf je crois)
[fixed]title=Windows XP
root (hd1,1)
chainloader (hd1,1)+1
[/fixed]ça devrais marcher

GentooUser: pas exactement. C’est le fichier /boot/grub/menu.lst qu’il faut éditer. Pour t’aider, voici ma section Windows éditée d’après ce que tu dis sur tes partitions(à mettre à la fin):

[fixed]title Windows XP
#:1 <-- type: 0 => linux, 1 => windows, 2 => other
rootnoverify (hd1,1)
makeactive
chainloader +1[/fixed]

Si ça marche pas, change la valeur X dans “rootnoverify (hd1,X)” pour qu’il pointe vers la bonne partition. (0, 1, 2…)

déjà un problème , je ne trouve pas grub dans /boot

nota: j’utilise knoppix

Euh… interet de booter sur une distrib bootable pour rebooter sur Xp?

mouais, mais je veux aussi utiliser xp , mais xp se trouve sur un disque en slave et sur la 2ième partition,donc knoppix se trouvant sur le disque maitre et est active n c’est sur knoppix qu’il va démarrer, a moins d’arriver à ne plus rendre active la partition sur le Disque maitre

j’ai bien désactivé l’amorce sur knoppix par cfdisk, mais il redémarre sur knoppix!!

Normal, tu as grub dans le mbr qui lance knoppix. Les partitions bootables servent au cas ou il n’y a rien dans le mbr, auquel cas le bios va chercher la premiere partition bootable.

Sinon, j’ai pas knoppix je peux pas trop t’aider.
Peut-etre:
tu as une partition /boot et elle est pas montee.
tu utilises lilo (le prend pas mal mais parfois on sait jamais trop lol :slight_smile: )
tu peux rechercher le fichier menu.lst avec la command find s’il est place dans un endroit bizarre.

dans /boot aucune partition n’apparait
que se passe t’il si je supprime lilo?
j’ai fait find menu.lst ; et il ne le trouve pas!

si je fais mount il m’affiche
/dev/hda2 on / type ext3 (rw,errors=remount -ro)
/dev/root.old on /initrd type ext2 (rw)
none on /proc type proc (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
automount (pid414) on mnt/auto type autofs (rw,fd=5,pgrp=414,minproto=2,maxproto=4)

Configurer LILO

Pour configurer LILO, vous devez créer le fichier /etc/lilo.conf. Lancez votre éditeur préféré (notre exemple utilise nano) et créez le fichier.

Exemple de code 11 : Créer /etc/lilo.conf

nano -w /etc/lilo.conf

ou

emacs /etc/lilo.conf

ou autre en fonction de l’éditeur utilise

Exemple de /etc/lilo.conf

boot=/dev/hda # Installe LILO dans le MBR.
prompt # Permet à l’utilisateur de sélectionner une autre entrée.
timeout=50 # Délai de 5 (cinq) secondes avant de démarrer l’entrée par défaut.
default=gentoo # Définit l’entrée par défaut.

Uniquement si vous utilisez le framebuffer. Supprimez la ligne suivant dans le cas contraire.

vga=788 # Mode graphique du framebuffer

pour démarrer linux, probablement différent de knoppix car c’est un exemple pour gentoo ne pas toucher

image=/boot/kernel-2.4.26-gentoo-r9
label=gentoo # Nom que nous avons attribué à cette entrée
read-only # Démarre avec root en lecture seulement. Ne pas modifier !
root=/dev/hda3 # Endroit où se trouve le système de fichier root

#[u] Les lignes suivantes sont utilisées pour démarrer un système windows, le cas échéant.

Dans cet exemple, Windows est installé dans /dev/hda6. vu que c’est un deuxième disque dur ca doit être hdb1 a mon avis, a verifié[/u]

other=/dev/hda6
label=windows

Note : Si vos partitions sont agencées d’une autre façon, ajustez les valeurs en conséquence.

Enregistrez le fichier et quittez votre éditeur. Pour terminer, vous devez lancer la commande /sbin/lilo pour que LILO prenne votre fichier /etc/lilo.conf en compte (c’est-à-dire pour l’installer sur le disque). Notez que vous devrez exécuter /sbin/lilo chaque fois que vous installez un noyau.

Exemple de code 14 : Terminer l’installation de LILO

/sbin/lilo

Poursuivez avec Redémarrage du système.

(cf documentation de gentoo un peu modifié http://www.gentoo.org/doc/fr/handbook/2004.3/handbook-x86.xml?full=1 )

j’ai finalment trouvé menu.lst, il est dans
/usr/share/doc/grub/examples

est ce le bon?

non. ça c’est juste un exemple de configuration (de la doc).

on récapitule sois tu as grub :

  • a ce moment la tu as ce fichier
    /boot/grub/menu.lst

  • sinon tu as lilo:
    /etc/lilo.conf
    a ce moment lis ceux que je t’ai di ci dessus

si tu as grub, tu me le dis je te donnerai la manipe a faire

/boot/grub/menu.lst n’existe pas

lilo.conf existe bien

donc tu as bien lilo, tu rajoute ca a ton lilo.conf ( sauf les commentaires )

Les lignes suivantes sont utilisées pour démarrer un système windows, le cas échéant.

Dans cet exemple, Windows est installé dans /dev/hda6. vu que c’est un deuxième disque dur ca doit être hdb1 a mon avis, a verifié

other=/dev/hda6
label=windows

attention de bien remplacer hda6 par la partition de ton windows !!

et puis

/sbin/lilo

voici mon lilo:

vga=791

/etc/lilo.conf - See: lilo(8)' andlilo.conf(5)’,

--------------- install-mbr(8)',/usr/share/doc/lilo/’,

and `/usr/share/doc/mbr/’.

±--------------------------------------------------------------+

| !! Reminder !! |

| |

| Don’t forget to run `lilo’ after you make changes to this |

| conffile, `/boot/bootmess.txt’, or install a new kernel. The |

| computer will most likely fail to boot if a kernel-image |

| post-install script or you don’t remember to run `lilo’. |

| |

±--------------------------------------------------------------+

Support LBA for large hard disks.

lba32

Overrides the default mapping between harddisk names and the BIOS’

harddisk order. Use with caution.

#disk=/dev/hde

bios=0x81

#disk=/dev/sda

bios=0x80

Specifies the boot device. This is where Lilo installs its boot

block. It can be either a partition, or the raw device, in which

case it installs in the MBR, and will overwrite the current MBR.

boot=/dev/hda

Specifies the device that should be mounted as root. (`/’)

root=/dev/hda2

Enable map compaction:

Tries to merge read requests for adjacent sectors into a single

read request. This drastically reduces load time and keeps the

map smaller. Using `compact’ is especially recommended when

booting from a floppy disk. It is disabled here by default

because it doesn’t always work.

compact

Installs the specified file as the new boot sector

You have the choice between: bmp, compat, menu and text

Look in /boot/ and in lilo.conf(5) manpage for details

install=/boot/boot-menu.b

Specifies the location of the map file

map=/boot/map

You can set a password here, and uncomment the `restricted’ lines

in the image definitions below to make it so that a password must

be typed to boot anything but a default configuration. If a

command line is given, other than one specified by an `append’

statement in `lilo.conf’, the password will be required, but a

standard default boot will not require one.

This will, for instance, prevent anyone with access to the

console from booting with something like `Linux init=/bin/sh’,

and thus becoming `root’ without proper authorization.

Note that if you really need this type of security, you will

likely also want to use `install-mbr’ to reconfigure the MBR

program, as well as set up your BIOS to disallow booting from

removable disk or CD-ROM, then put a password on getting into the

BIOS configuration as well. Please RTFM `install-mbr(8)’.

password=tatercounter2000

Specifies the number of deciseconds (0.1 seconds) LILO should

wait before booting the first image.

delay=20

You can put a customized boot message up if you like. If you use

`prompt’, and this computer may need to reboot unattended, you

must specify a `timeout’, or it will sit there forever waiting

for a keypress. single-key' goes with thealias’ lines in the

image' configurations below. eg: You can press1’ to boot

Linux',2’ to boot LinuxOLD', if you uncomment thealias’.

message=/boot/bootmess.txt

prompt

single-key

delay=100

timeout=100

Kernel command line options that apply to all installed images go

here. See: The boot-prompt-HOWO' andkernel-parameters.txt’ in

the Linux kernel `Documentation’ directory.

append=""

append=“hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi apm=power-off nomce”

Boot up Linux by default.

default=Linux

image=/boot/vmlinuz-2.4.22-xfs
label=Linux
initrd=/boot/initrd.gz
read-only

restricted

alias=1

image=/vmlinuz.old
label=LinuxOLD
read-only
optional

restricted

alias=2

If you have another OS on this machine to boot, you can uncomment the

following lines, changing the device name on the `other’ line to

where your other OS’ partition is.

other=/dev/hda4

label=HURD

restricted

alias=3

en faisant cfdisk, windows se trouve dans hdd2 donc

other=/dev/hdd2
label=windows
/sbin/lilo

en faisant ls /dev/hd* dans une console( xterm, Konsole)

Je pense que dans ton cas les lignes a rajouter c’est

[fixed]other=/dev/hdb2
label=windows [/fixed]

EDIT: mais si cfdisk donne hdd2 c’est bizarre, ton 2eme disque dois etre en slave sur la 2eme nappe (pas courant ça) donc

[fixed]other=/dev/hdd2
label=windows [/fixed]

rajoute a lilo.conf :

other=/dev/hdd2
label=windows

et c’est tout ,

apres dans une console
tu tape su
rentre ton mot de passe root
et après tu tape /sbin/lilo

pour mettre a jour la configuration de lilo