Pages : 1
#1 Le 06/10/2007, à 14:56
- pierre_lenain
[RESOLU] J'ai perdu mon MBR !
Bonjour !!!
voila ! ce matin, tres inspiré je me dis que je vais installer debian au lieu de ubuntu... pas bonne idée ! une fois l'instalation je redémare et la le pc me dis que la partition d'amorcage du hard drive c n'est pas bonne !!!
la, je panique un peut et tente immédiatement de téinstaller ubuntu sur le "Hard Drive C" (comprenez : mon disque dur principal). ok ! je relance le pc ... meme erreur. j'essaye le super disque de reinstallation de grub, je tombe sur une console et je sais pas quoi en faire puisque dans la doc il montre une capture d'écran d'un truc comme grub. bon !
je redémare un live cd et part reconsulter la doc ... et je tape (suivant les conseils donc ...)
$ sudo grub --batch
Probing devices to guess BIOS drives. This may take a long time.
[ 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> find /boot/grub/menu.lst
find /boot/grub/menu.lst
(hd0,2)
grub> root (hd0,2)
root (hd0,2)
grub> setup (hd0)
setup (hd0)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/e2fs_stage1_5" exists... yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"... 15 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+15 p (hd0,2)/boot/grub/stage2 /boot/grub/menu.lst"... succeeded
Done.
grub> quit
quit
voila ! on dirai que tout doit aller bien ! et ben ... non ! pas de chance. a cours d'inspiration, je réinstalle. rien. puis je fais une erreur de manip au démarage. et je passe en "demarrer a partir du premier disque dur". et la, shazam v'la t'y pas que je vois grub apparaitre. transporté de bonheur, je me connecte a mon ubuntu (sans probleme), je retape les commandes, et... toujours rien ! (oui je sais s'est tres palpitant !). donc voila ! apres un peu de réflexion, je me dis que je doit avoir cassé mon mbr et que c'est pas pratique de devoir lancer le live cd a chaque fois. surtout que c'est un pc familial. une soluce ???
merci !
ps : y'a pas moyen de reparer le mbr a partir d'un cd de windows ???
Dernière modification par pierre_lenain (Le 06/10/2007, à 15:55)
Linux ne peut changer le monde seul ... Alors aidons le!
Software is like the sex, it's better if it's free !
Tux, parce que je le vaut bien !
--- Pierre !
Hors ligne
#2 Le 06/10/2007, à 15:06
- compte supprimé
Re : [RESOLU] J'ai perdu mon MBR !
Bonjour,
Renvoie donc :
1 ce qui est installé, en définitive
2 sudo fdisk -l
3 le contenu de /root/grub/menu.lst
A+
#3 Le 06/10/2007, à 15:14
- pierre_lenain
Re : [RESOLU] J'ai perdu mon MBR !
1 :
un windows (qui etait déja la avant), un ubuntu 6.10 et un débian sur un disque dur externe.
2:
Disque /dev/hda: 40.0 Go, 40007761920 octets
255 têtes, 63 secteurs/piste, 4864 cylindres
Unités = cylindres de 16065 * 512 = 8225280 octets
Périphérique Amorce Début Fin Blocs Id Système
/dev/hda1 1 3364 27021298+ 7 HPFS/NTFS
/dev/hda2 3365 3495 1052257+ 82 Linux swap / Solaris
/dev/hda3 3496 4864 10996492+ 83 Linux
Disque /dev/sda: 80.0 Go, 80026361856 octets
255 têtes, 63 secteurs/piste, 9729 cylindres
Unités = cylindres de 16065 * 512 = 8225280 octets
Périphérique Amorce Début Fin Blocs Id Système
/dev/sda1 1 5222 41945683+ b W95 FAT32
/dev/sda2 5223 5352 1044225 82 Linux swap / Solaris
/dev/sda3 5353 9729 35158252+ 83 Linux
3:
# 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 4
## 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=a75e76e1-f8b6-49c2-9b7d-11b052d5f8c8 ro
# kopt_2_6=root=/dev/hda3 ro
## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,2)
## 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=splash locale=fr_FR
## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false
## 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
## ## End Default Options ##
title Ubuntu, kernel 2.6.17-12-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.17-12-generic root=/dev/hda3 ro splash locale=fr_FR
initrd /boot/initrd.img-2.6.17-12-generic
quiet
savedefault
boot
title Ubuntu, kernel 2.6.17-12-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.17-12-generic root=/dev/hda3 ro single
initrd /boot/initrd.img-2.6.17-12-generic
boot
title Ubuntu, kernel 2.6.17-10-generic
root (hd0,2)
kernel /boot/vmlinuz-2.6.17-10-generic root=/dev/hda3 ro splash locale=fr_FR
initrd /boot/initrd.img-2.6.17-10-generic
quiet
savedefault
boot
title Ubuntu, kernel 2.6.17-10-generic (recovery mode)
root (hd0,2)
kernel /boot/vmlinuz-2.6.17-10-generic root=/dev/hda3 ro single
initrd /boot/initrd.img-2.6.17-10-generic
boot
title Ubuntu, memtest86+
root (hd0,2)
kernel /boot/memtest86+.bin
quiet
boot
### 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/hda1
title Microsoft Windows XP Home Edition
root (hd0,0)
savedefault
makeactive
chainloader +1
note : j'arrive pas a accedez a mon debian a propos ...
Linux ne peut changer le monde seul ... Alors aidons le!
Software is like the sex, it's better if it's free !
Tux, parce que je le vaut bien !
--- Pierre !
Hors ligne
#4 Le 06/10/2007, à 15:28
- compte supprimé
Re : [RESOLU] J'ai perdu mon MBR !
Aucune partition n'est amorçable !
Démarre Gparted avec un liveCd et essaye de mettre le flag boot sur hda1 (Partition->Gérer les drapeaux).
En principe ça devrait déjà amorcer sur windows.
La suite après...
#5 Le 06/10/2007, à 15:37
- pierre_lenain
Re : [RESOLU] J'ai perdu mon MBR !
Ok !!!
Linux ne peut changer le monde seul ... Alors aidons le!
Software is like the sex, it's better if it's free !
Tux, parce que je le vaut bien !
--- Pierre !
Hors ligne
#6 Le 06/10/2007, à 15:55
- pierre_lenain
Re : [RESOLU] J'ai perdu mon MBR !
Sa marche !!!! merci merci et encore merci !!!!!! et ... merci !!!
tu peux pas savoir a quel point je suis heureux !!! bon ... heu ... tu sais pas comment je pourrai booter mon debian maintenant ?
il est sur sda3 !
merci encore une fois !
Linux ne peut changer le monde seul ... Alors aidons le!
Software is like the sex, it's better if it's free !
Tux, parce que je le vaut bien !
--- Pierre !
Hors ligne
#7 Le 06/10/2007, à 16:00
- compte supprimé
Re : [RESOLU] J'ai perdu mon MBR !
De rien !
Ajoute un truc du genre :
title Debian
root (hd1,2)
savedefault
makeactive
chainloader +1
dans menu.lst
PS : je ne suis pas un spécialiste du chaînage.
Si ça ne fonctionne pas, il faut peut-être préciser le noyau (comme dans la section dédiée à ubuntu).
Et, petite doc sur grub : http://www.linux-france.org/article/sys/chargeurs/ix86/grub/grub-manual-fr.html
A+
Tiens-moi au courant... Moi aussi, j'apprends !
Dernière modification par faustus (Le 06/10/2007, à 16:03)
#8 Le 07/10/2007, à 16:06
- popol99
Re : [RESOLU] J'ai perdu mon MBR !
Tiens-moi au courant... Moi aussi, j'apprends !
ben y a des potaches qui sont fort !
#9 Le 07/10/2007, à 17:49
- compte supprimé
Re : [RESOLU] J'ai perdu mon MBR !
On fait ce qu'on peut...
Pages : 1