Pages : 1
#1 Le 30/06/2007, à 23:50
- Fl4t
Réinstaller grub
Bonsoir a tous.
Depuis une mauvaise manipulation grub m'affiche tout un tas d'érreur que tout le monde connait du genre impossible d'acceder a la partion etc...
J'ai essayer de le réinstaller avec le liveCD depuis les commandes suivantes :
sudo grub
grub> find /boot/grub/stage1
grub> root (hd$i,$i) # $i devant être remplacé par le texte obtenu par la commande précédente
grub> setup (hd0)
grub> quit
Sans succès et a partir de la je ne sais pas comment retrouver mon ubuntu en sachant que mon lecteur disquete et mort
My blog : http://fl4t.blogspot.com/
Fichier Hosts : http://doc.ubuntu-fr.org/fichier_hosts_brouillon
Deviant : http://fl4t.deviantart.com/
Hors ligne
#2 Le 30/06/2007, à 23:59
- belga
Re : Réinstaller grub
quelle a été la réponse de grub> find /boot/grub/stage1
poste aussi
sudo fdisk -l
Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.
900s entre deux postes: mododoze
Hors ligne
#3 Le 01/07/2007, à 00:30
- Fl4t
Re : Réinstaller grub
pour la reponse c'est hd1,1 donc j'ai root (hd1,1) et installer hd1 car je boot sur mon second disque dur.
pour le fdisk je posterai demain
My blog : http://fl4t.blogspot.com/
Fichier Hosts : http://doc.ubuntu-fr.org/fichier_hosts_brouillon
Deviant : http://fl4t.deviantart.com/
Hors ligne
#4 Le 01/07/2007, à 00:37
- belga
Re : Réinstaller grub
si tu boots sur le scond disque dur
il faut faire
sudo grub
grub> find /boot/grub/stage1
grub> root (hd1,1) précédente
grub> setup (hd1)
grub> quit
Dernière modification par belga (Le 01/07/2007, à 01:20)
Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.
900s entre deux postes: mododoze
Hors ligne
#5 Le 01/07/2007, à 01:18
- alpha12
Re : Réinstaller grub
Bonjour,
Sinon plus simple tu boote un alternate CD et tu vas dans le mode récupération d'un système endomagé puis tu laisse faire jusqu'a ce qu'il t'affiches récuperer le secteur de démarrage (GRUB).
Voila bonne chance en tout cas.
A +.
http://www.openmind.fr.cr/
http://www.shutdown-planner.fr/
Hors ligne
#6 Le 01/07/2007, à 11:46
- Fl4t
Re : Réinstaller grub
si tu boots sur le scond disque dur
il faut fairesudo grub grub> find /boot/grub/stage1 grub> root (hd1,1) précédente grub> setup (hd1) grub> quit
C'est ce que je fais mais mes partitions sont toujours inacéssible.
Disque /dev/sda: 37.0 Go, 37019566080 octets
255 têtes, 63 secteurs/piste, 4500 cylindres
Unités = cylindres de 16065 * 512 = 8225280 octets
Périphérique Amorce Début Fin Blocs Id Système
/dev/sda1 * 1 3064 24611548+ 7 HPFS/NTFS
/dev/sda2 3065 3847 6289447+ 83 Linux
/dev/sda3 3848 4500 5245222+ f W95 Etendu (LBA)
/dev/sda5 3848 4369 4192933+ 83 Linux
/dev/sda6 4370 4500 1052226 82 Linux swap / Solaris
Disque /dev/sdb: 120.0 Go, 120034123776 octets
255 têtes, 63 secteurs/piste, 14593 cylindres
Unités = cylindres de 16065 * 512 = 8225280 octets
Périphérique Amorce Début Fin Blocs Id Système
/dev/sdb2 2 14593 117210240 f W95 Etendu (LBA)
/dev/sdb5 2 10896 87514056 7 HPFS/NTFS
/dev/sdb6 10897 14593 29696121 b W95 FAT32
My blog : http://fl4t.blogspot.com/
Fichier Hosts : http://doc.ubuntu-fr.org/fichier_hosts_brouillon
Deviant : http://fl4t.deviantart.com/
Hors ligne
#7 Le 01/07/2007, à 11:50
- Fl4t
Re : Réinstaller grub
C'est bien ce que je craignai en fait au demarrage il se prend pour sda, et sur ubuntu et windows il se prend pour sdb... Mes OS sont sur le disque ATA de 37 Go et mes données sur le IDE 120Go.
My blog : http://fl4t.blogspot.com/
Fichier Hosts : http://doc.ubuntu-fr.org/fichier_hosts_brouillon
Deviant : http://fl4t.deviantart.com/
Hors ligne
#8 Le 01/07/2007, à 11:53
- belga
Re : Réinstaller grub
quelles sont les messages d'erreurs
Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.
900s entre deux postes: mododoze
Hors ligne
#9 Le 01/07/2007, à 11:58
- belga
Re : Réinstaller grub
Fais
mkdir /test
sudo mount -o rw /dev/sda2 /test
et poste
cat /test/boot/grub/device.map
cat /test/boot/grub/menu.lst
Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.
900s entre deux postes: mododoze
Hors ligne
#10 Le 01/07/2007, à 13:14
- Fl4t
Re : Réinstaller grub
ubuntu@ubuntu:~$ sudo mount -o rw /dev/sda2 /test
mount: vous devez spécifier le type de système de fichiers
ubuntu@ubuntu:~$ sudo mount -o rw /dev/sdb2 /test
ubuntu@ubuntu:~$ cat /test/boot/grub/device.map
(hd0) /dev/sda
(hd1) /dev/sdb
ubuntu@ubuntu:~$ cat /test/boot/grub/menu.lst
# 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 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=944eb55a-25a3-4ff4-a9de-24bce0af8d5b ro
## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0
## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,1)
## 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 locale=fr_FR
## 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
## ## End Default Options ##
title Ubuntu, kernel 2.6.20-16-generic
root (hd0,1)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=944eb55a-25a3-4ff4-a9de-24bce0af8d5b ro quiet splash locale=fr_FR
initrd /boot/initrd.img-2.6.20-16-generic
quiet
savedefault
title Ubuntu, kernel 2.6.20-16-generic (recovery mode)
root (hd0,1)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=944eb55a-25a3-4ff4-a9de-24bce0af8d5b ro single
initrd /boot/initrd.img-2.6.20-16-generic
title Ubuntu, kernel 2.6.20-15-generic
root (hd0,1)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=944eb55a-25a3-4ff4-a9de-24bce0af8d5b ro quiet splash locale=fr_FR
initrd /boot/initrd.img-2.6.20-15-generic
quiet
savedefault
title Ubuntu, kernel 2.6.20-15-generic (recovery mode)
root (hd0,1)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=944eb55a-25a3-4ff4-a9de-24bce0af8d5b ro single
initrd /boot/initrd.img-2.6.20-15-generic
title Ubuntu, memtest86+
root (hd0,1)
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
Comme tu le vois la première commande a rater donc jai fait avec sdb2.
My blog : http://fl4t.blogspot.com/
Fichier Hosts : http://doc.ubuntu-fr.org/fichier_hosts_brouillon
Deviant : http://fl4t.deviantart.com/
Hors ligne
#11 Le 01/07/2007, à 14:36
- belga
Re : Réinstaller grub
Rajoute une entrée comme ceci au menu.lst juste après
## ## End Default Options ##
title Ubuntu test
root (hd1,1)
kernel /boot/vmlinuz-2.6.20-16-generic root=UUID=944eb55a-25a3-4ff4-a9de-24bce0af8d5b ro quiet splash locale=fr_FR
initrd /boot/initrd.img-2.6.20-16-generic
quiet
savedefault
redémarre et tu choisis cette entrée et donne le message d'erreur.
As tu essayer de placer dans le bios le démarrage sur le premier disque.
Comme tu as fait setup (hd0), grub est aussi sur le
mbr du sda
le uuid n'est peut être pas bon poste
ls -l /dev/disk/by-uuid
Dernière modification par belga (Le 01/07/2007, à 14:36)
Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.
900s entre deux postes: mododoze
Hors ligne
#12 Le 01/07/2007, à 17:16
- Fl4t
Re : Réinstaller grub
Moi pas comprendre
J'ai réinstaller grub en fesant :
sudo grub
grub> find /boot/grub/stage1
grub> root (hd1,1)
grub> setup (hd1)
grub> quit
Est sa marche ! par contre Ubuntu test n'a pas marcher "no surch partition"
ps : j'avais fait pareil hier dans la soirée et aucune n'étais accessible c'est bizard.
et la réponse a ta ligne de commande :
root@ubuntu:~# ls -l /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 10 2007-07-01 17:45 0C18F58F18F577D2 -> ../../sda5
lrwxrwxrwx 1 root root 10 2007-07-01 17:45 4660-7EC5 -> ../../sda6
lrwxrwxrwx 1 root root 10 2007-07-01 17:45 7266782b-cad9-4726-9a92-b874da4b5d13 -> ../../sdb6
lrwxrwxrwx 1 root root 10 2007-07-01 17:45 838080ea-44d8-439b-9bc8-dd44d4da0ca3 -> ../../sdb5
lrwxrwxrwx 1 root root 10 2007-07-01 17:45 944eb55a-25a3-4ff4-a9de-24bce0af8d5b -> ../../sdb2
lrwxrwxrwx 1 root root 10 2007-07-01 17:45 BA801B2E801AF09D -> ..
Pour modifier le menu.lst j'ai du faire :
sudo -s
gedit /test/boot/grub/menu.lst
En tout cas merci quand même j'en avai marre de réinstaller a chaque coup ! mais le problême n'est pas résolu a vrai dire je suis certain d'avoir proceder ainsi hier soir aussi...
Dernière modification par Fl4t (Le 01/07/2007, à 17:19)
My blog : http://fl4t.blogspot.com/
Fichier Hosts : http://doc.ubuntu-fr.org/fichier_hosts_brouillon
Deviant : http://fl4t.deviantart.com/
Hors ligne
Pages : 1