Pages : 1
#1 Le 03/11/2008, à 23:14
- Pingouinbricoleur
Réparer grub après réinstal XP
Bonjour à tous,
Suite à réinstall XP, j'ai perdu grub.
Dans la doc et sur http://doc.ubuntu-fr.org/tutoriel/comment_recuperer_ubuntu_apres_installation_windows#avec_votre_livecd_2nd_methode
j'ai suivi les commandes et notamment j'ai tapé celles-ci :
grub> find /boot/grub/stage1
réponse : hd0,7
grub> root (hd0,7)
grub> setup (hd0)
grub> quit
Je n'ai pas trop compris à quelle valeur il faut mettre : grub> setup (hd0)
J'ai fait ces commandes avec un live CD 7.04 (Ubuntu installé est la 8.04). Avec l'éditeur de partitions, il me dit que j'ai 2 disques qui s'appellent sda et sdb.
la swap est installée sur sda7
/ installé sur sda8
et /home sur sda9.
A la fin de la manip, il me dit que l'opération a été réalisée avec succès.
Pourtant, au boot, grub s'affiche mais ne lance pas ubuntu mais XP se lance.
Il me met : "Error 17 : Cannot mount selected partition".
Je patauge. J'attends votre aide.
Merci d'avance.
Pingouin bricoleur
Hors ligne
#2 Le 03/11/2008, à 23:19
- belga3600s_mododoze
Re : Réparer grub après réinstal XP
depuis le live cd
sudo umount -a
sudo mount /dev/sda8 /mnt
poste les retours de
cat /mnt/etc/fstab
ls /mnt/boot
cat /mnt/boot/grub/menu.lst
sudo vol_id /dev/sda8 | grep UUID_
sudo vol_id /dev/sda10 | grep UUID_
#3 Le 03/11/2008, à 23:41
- Pingouinbricoleur
Re : Réparer grub après réinstal XP
Je viens d'essayer :
sudo umount -a
Réponse :
sudo umount -a
umount: /tmp: périphérique occupé
umount: /dev/shm: périphérique occupé
umount: /dev: périphérique occupé
umount: /var/run: périphérique occupé
J'ai essayé plusieurs fois cette commande mais elle me donne toujours cette réponse !
sudo mount /dev/sda8 /mnt
Réponse :
mount: ne peut repérer /dev/sda8/mnt dans /etc/fstab ou /etc/mtab
poste les retours de
cat /mnt/etc/fstab
cat: /mnt/etc/fstab: Aucun fichier ou dossier de ce type
ls /mnt/boot
ls: ne peut accéder /mnt/boot: Aucun fichier ou dossier de ce type
cat /mnt/boot/grub/menu.lst
cat: /mnt/boot/grub/menu.lst: Aucun fichier ou dossier de ce type
sudo vol_id /dev/sda8 | grep UUID_
ID_FS_UUID=f1df4126-0c37-4218-bdb7-f16d39ba12ff
ID_FS_UUID_ENC=f1df4126-0c37-4218-bdb7-f16d39ba12ff
sudo vol_id /dev/sda10 | grep UUID_
ID_FS_UUID=D03443033442EBD2
ID_FS_UUID_ENC=D03443033442EBD2
Désolé, je n'ai pas pu obtenir beaucoup de réponses du système.
Merci de votre aide.
Pingouin bricoleur
Hors ligne
#4 Le 03/11/2008, à 23:43
- Grub de chantier
Re : Réparer grub après réinstal XP
fais gaf aux espaces dans les commandes,
tu t'es trompé à la deuxième
depuis le live cd
sudo umount -a #pas grave pour les messages qu'il crache
sudo mount /dev/sda8 /mntposte les retours de
cat /mnt/etc/fstab
ls /mnt/boot
cat /mnt/boot/grub/menu.lst
sudo vol_id /dev/sda8 | grep UUID_
sudo vol_id /dev/sda10 | grep UUID_
#5 Le 03/11/2008, à 23:55
- Pingouinbricoleur
Re : Réparer grub après réinstal XP
voici les réponses :
cat /mnt/etc/fstab
Réponse :
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda10
UUID=f1df4126-0c37-4218-bdb7-f16d39ba12ff / ext3 relatime,errors=remount-ro 0 1
# /dev/sda7
UUID=4bfb6202-c9f6-11d8-9040-cca2e83ba149 /home ext3 relatime 0 2
# /dev/sda9
UUID=d184523c-be23-4d81-abd8-c2ab97e7d16d none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/scd1 /media/cdrom1 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
ls /mnt/boot
abi-2.6.24-16-generic initrd.img-2.6.24-16-generic System.map-2.6.24-16-generic
abi-2.6.24-19-generic initrd.img-2.6.24-16-generic.bak System.map-2.6.24-19-generic
config-2.6.24-16-generic initrd.img-2.6.24-19-generic vmlinuz-2.6.24-16-generic
config-2.6.24-19-generic initrd.img-2.6.24-19-generic.bak vmlinuz-2.6.24-19-generic
grub memtest86+.bin
cat /mnt/boot/grub/menu.lst donne :
# 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 use 'savedefault' 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 10
## 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=UUID=f1df4126-0c37-4218-bdb7-f16d39ba12ff ro
## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0
## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,9)
## 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
## 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=(recovery) 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
## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false
## ## End Default Options ##
title Ubuntu 8.04.1, kernel 2.6.24-19-generic
root (hd0,9)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=f1df4126-0c37-4218-bdb7-f16d39ba12ff ro quiet splash
initrd /boot/initrd.img-2.6.24-19-generic
quiet
title Ubuntu 8.04.1, kernel 2.6.24-19-generic (recovery mode)
root (hd0,9)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=f1df4126-0c37-4218-bdb7-f16d39ba12ff ro single
initrd /boot/initrd.img-2.6.24-19-generic
title Ubuntu 8.04.1, kernel 2.6.24-16-generic
root (hd0,9)
kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=f1df4126-0c37-4218-bdb7-f16d39ba12ff ro quiet splash
initrd /boot/initrd.img-2.6.24-16-generic
quiet
title Ubuntu 8.04.1, kernel 2.6.24-16-generic (recovery mode)
root (hd0,9)
kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=f1df4126-0c37-4218-bdb7-f16d39ba12ff ro single
initrd /boot/initrd.img-2.6.24-16-generic
title Ubuntu 8.04.1, memtest86+
root (hd0,9)
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 XP Pro
root (hd0,0)
savedefault
makeactive
chainloader +1
Ensuite, sudo vol_id /dev/sda10 | grep UUID_ donne :
ID_FS_UUID_ENC=f1df4126-0c37-4218-bdb7-f16d39ba12ff
Et enfin, sudo vol_id /dev/sda10 | grep UUID_ donne :
ID_FS_UUID_ENC=D03443033442EBD2
Merci de votre aide;
Pingouin bricoleur
Hors ligne
#6 Le 04/11/2008, à 00:21
- sapristi
Re : Réparer grub après réinstal XP
tu tapes
sudo umount -a
sudo mount /dev/sda8 /mnt
sudo gedit /mnt/boot/grub/menu.lst
et change les (hd0,9) en (hd0,7) dabs les lignes groot et root
# groot=(hd0,9)
title Ubuntu 8.04.1, kernel 2.6.24-19-generic
root (hd0,9)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=f1df4126-0c37-4218-bdb7-f16d39ba12ff ro quiet splash
initrd /boot/initrd.img-2.6.24-19-generic
quiettitle Ubuntu 8.04.1, kernel 2.6.24-19-generic (recovery mode)
root (hd0,9)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=f1df4126-0c37-4218-bdb7-f16d39ba12ff ro single
initrd /boot/initrd.img-2.6.24-19-generictitle Ubuntu 8.04.1, kernel 2.6.24-16-generic
root (hd0,9)
kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=f1df4126-0c37-4218-bdb7-f16d39ba12ff ro quiet splash
initrd /boot/initrd.img-2.6.24-16-generic
quiettitle Ubuntu 8.04.1, kernel 2.6.24-16-generic (recovery mode)
root (hd0,9)
kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=f1df4126-0c37-4218-bdb7-f16d39ba12ff ro single
initrd /boot/initrd.img-2.6.24-16-generictitle Ubuntu 8.04.1, memtest86+
root (hd0,9)
kernel /boot/memtest86+.bin
quiet
enregistre
puis poste le retour de
sudo fdisk -l
ls -l /dev/disk/by-uuid
#7 Le 04/11/2008, à 14:45
- Pingouinbricoleur
Re : Réparer grub après réinstal XP
Bonjour à tous,
Je viens de faire les commandes suivantes comme demandé dans le précédent post :
sudo umount -a
sudo mount /dev/sda8 /mnt
sudo gedit /mnt/boot/grub/menu.lst
et change les (hd0,9) en (hd0,7) dabs les lignes groot et root
sudo fdisk -l donne ceci :
Disque /dev/sda: 61.4 Go, 61492838400 octets
255 heads, 63 sectors/track, 7476 cylinders
Units = cylindres of 16065 * 512 = 8225280 bytes
Identifiant disque: 0xb46cb46c
Périphérique Amorce Début Fin Blocs Id Système
/dev/sda1 * 1 383 3076416 b W95 FAT32
/dev/sda2 384 7476 56974522+ f W95 Etendu (LBA)
/dev/sda5 384 1658 10241406 7 HPFS/NTFS
/dev/sda6 1659 2295 5116671 b W95 FAT32
/dev/sda7 2296 2357 497983+ 82 Linux swap / Solaris
/dev/sda8 2358 2840 3879666 83 Linux
/dev/sda9 2841 4429 12763611 83 Linux
/dev/sda10 4430 7476 24474996 7 HPFS/NTFS
Disque /dev/sdb: 40.0 Go, 40020664320 octets
255 heads, 63 sectors/track, 4865 cylinders
Units = cylindres of 16065 * 512 = 8225280 bytes
Identifiant disque: 0xe9afe9af
Périphérique Amorce Début Fin Blocs Id Système
/dev/sdb1 * 1 4865 39078081 7 HPFS/NTFS
et ensuite,
ls -l /dev/disk/by-uuid
ls -l /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 10 2008-11-04 12:51 14D8F56C8E7976C9 -> ../../sda5
lrwxrwxrwx 1 root root 10 2008-11-04 12:51 40E1-5BA3 -> ../../sda1
lrwxrwxrwx 1 root root 10 2008-11-04 12:51 40E2-B8CD -> ../../sda6
lrwxrwxrwx 1 root root 10 2008-11-04 12:51 4bfb6202-c9f6-11d8-9040-cca2e83ba149 -> ../../sda9
lrwxrwxrwx 1 root root 10 2008-11-04 12:51 B4F007B6F0077E3C -> ../../sdb1
lrwxrwxrwx 1 root root 11 2008-11-04 12:51 D03443033442EBD2 -> ../../sda10
lrwxrwxrwx 1 root root 10 2008-11-04 12:51 d184523c-be23-4d81-abd8-c2ab97e7d16d -> ../../sda7
lrwxrwxrwx 1 root root 10 2008-11-04 12:51 f1df4126-0c37-4218-bdb7-f16d39ba12ff -> ../../sda8
Voilà, et merci de votre aide.
Pingouin bricoleur
Hors ligne
#8 Le 04/11/2008, à 15:28
- mloupiot
Re : Réparer grub après réinstal XP
Bonjour,
quand ça m'est arrivé, j'ai utilisé supergrub http://www.supergrubdisk.org/ et ça a marché ...
Hors ligne
#9 Le 04/11/2008, à 22:04
- Pingouinbricoleur
Re : Réparer grub après réinstal XP
Bonsoir à tous,
Bon, ça y est : ça marche presque. Il fallait remplacer hd0,9 et mettre hd0,7.
Mais une dernière question avant de mettre résolu à ce sujet :
Quelle est la signification de ces commandes que vous m'avez fait faire ? Je voudrais me coucher ce soir en ayant appris quelque chose aujourd'hui
sudo umount -a
sudo mount /dev/sda8 /mnt
sudo gedit /mnt/boot/grub/menu.lst
sudo vol_id /dev/sda8 | grep UUID_
sudo vol_id /dev/sda10 | grep UUID_
et enfin, comment avez-vous vu qu'il fallait changer hd0,9 en hd0,7
Question annexe : pourquoi que mes 2 disques IDE s'appellent sda et sdb au lieu de hda et hdb ?
Un grand merci à tous ceux qui m'ont répondu ! C'est vraiment super d'être dépanné.
Pingouin bricoleur
Hors ligne
Pages : 1