Pages : 1
#1 Le 16/12/2009, à 17:51
- arnold444
error grub RESOLU
salut,
je suis utilisateur d'ubuntu depuis la version 7.10, mais là, je coince....explication:
j'avais installé karmic à côté de jaunty sur mon disque dur, mais comme karmic fonctionne du tonner, j'ai voulu retrouver mon espace disque et j'ai utilisé Gparted en liveCD pour virer jaunty et sa swap, ensuite j'ai déplacé la swap de karmic ainsi agrandi l'espace de karmic
je reboot
et l'ordi coince sur grub
grub error
grub rescue>
je fait quoi pour remettre grub en ordre???
une idée pour me guider
merçi d'avance
arnold444
Dernière modification par arnold444 (Le 16/12/2009, à 20:00)
Hors ligne
#2 Le 16/12/2009, à 18:05
- Michel Leunen
Re : error grub RESOLU
Restaurer Grub avec un LiveCD. Si Karmic est installé sur sda1:
sudo mount /dev/sda1 /mnt
sudo grub-install --root-directory=/mnt /dev/sda
Tu as modifié les partitions et du coup Grub ne démarre plus.
Michel Leunen
http://linux.leunen.com
Hors ligne
#3 Le 16/12/2009, à 18:05
- Compte anonymisé
Re : error grub RESOLU
Salut
Tu as du mettre un peu le "souk" dans tes partitions.
Peux-tu démarrer en LiveCD, lister les partitions :
sudo fdisk -l
lister les uuid :
sudo ls -l /dev/disk/by-uuid/
monter ta partition / par exemple sur /mnt :
sudo mount /dev/sdxy /mnt en remplaçant les x et y par les bonnes valeurs
puis lister fstab :
cat /mnt/etc/fstab
et ton menu grub :
sudo gedit /mnt/boot/grub/grub.cfg
@+
#4 Le 16/12/2009, à 18:16
- arnold444
Re : error grub RESOLU
@jeanjd63
voiçi....karmic est sur la /sda5...et il y a un restant de sda1 que sert à je ne sais quoi (pê le grub??)
ubuntu@ubuntu:~$ sudo fdisk -l
Disque /dev/sda: 320.1 Go, 320072933376 octets
255 têtes, 63 secteurs/piste, 38913 cylindres
Unités = cylindres de 16065 * 512 = 8225280 octets
Identifiant de disque : 0x002d002d
Périphérique Amorce Début Fin Blocs Id Système
/dev/sda1 * 1 163 1309266 83 Linux
/dev/sda2 164 38913 311259375 5 Etendue
/dev/sda5 164 38552 308359579+ 83 Linux
/dev/sda6 38553 38913 2899701 82 Linux swap / Solaris
Disque /dev/sdb: 262 Mo, 262144000 octets
16 têtes, 32 secteurs/piste, 1000 cylindres
Unités = cylindres de 512 * 512 = 262144 octets
Identifiant de disque : 0x0d0c0b0a
Périphérique Amorce Début Fin Blocs Id Système
/dev/sdb1 * 1 1000 255984 b W95 FAT32
ubuntu@ubuntu:~$ sudo ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 2009-12-16 16:00 27f3a525-5599-4513-a145-4111a0528f65 -> ../../sda1
lrwxrwxrwx 1 root root 10 2009-12-16 16:00 470f358e-cf00-424d-bbb1-5d9fc6753c30 -> ../../sda5
lrwxrwxrwx 1 root root 10 2009-12-16 16:00 9458-1504 -> ../../sdb1
lrwxrwxrwx 1 root root 10 2009-12-16 16:00 ec768b37-7a12-4d15-bd9a-07ee77c4f21c -> ../../sda6
ubuntu@ubuntu:~$ sudo mount /dev/sda5 /mnt
ubuntu@ubuntu:~$ cat /mnt/etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# / was on /dev/sda7 during installation
UUID=470f358e-cf00-424d-bbb1-5d9fc6753c30 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda8 during installation
UUID=ec768b37-7a12-4d15-bd9a-07ee77c4f21c none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
et voiçi mon grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#
### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
have_grubenv=true
load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
saved_entry=${prev_saved_entry}
save_env saved_entry
prev_saved_entry=
save_env prev_saved_entry
fi
insmod ext2
set root=(hd0,7)
search --no-floppy --fs-uuid --set 470f358e-cf00-424d-bbb1-5d9fc6753c30
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=640x480
insmod gfxterm
insmod vbe
if terminal_output gfxterm ; then true ; else
# For backward compatibility with versions of terminal.mod that don't
# understand terminal_output
terminal gfxterm
fi
fi
if [ ${recordfail} = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/white
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-16-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,7)
search --no-floppy --fs-uuid --set 470f358e-cf00-424d-bbb1-5d9fc6753c30
linux /boot/vmlinuz-2.6.31-16-generic root=UUID=470f358e-cf00-424d-bbb1-5d9fc6753c30 ro quiet splash
initrd /boot/initrd.img-2.6.31-16-generic
}
menuentry "Ubuntu, Linux 2.6.31-16-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,7)
search --no-floppy --fs-uuid --set 470f358e-cf00-424d-bbb1-5d9fc6753c30
linux /boot/vmlinuz-2.6.31-16-generic root=UUID=470f358e-cf00-424d-bbb1-5d9fc6753c30 ro single
initrd /boot/initrd.img-2.6.31-16-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,7)
search --no-floppy --fs-uuid --set 470f358e-cf00-424d-bbb1-5d9fc6753c30
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=470f358e-cf00-424d-bbb1-5d9fc6753c30 ro quiet splash
initrd /boot/initrd.img-2.6.31-14-generic
}
menuentry "Ubuntu, Linux 2.6.31-14-generic (recovery mode)" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
insmod ext2
set root=(hd0,7)
search --no-floppy --fs-uuid --set 470f358e-cf00-424d-bbb1-5d9fc6753c30
linux /boot/vmlinuz-2.6.31-14-generic root=UUID=470f358e-cf00-424d-bbb1-5d9fc6753c30 ro single
initrd /boot/initrd.img-2.6.31-14-generic
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###
### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Ubuntu 9.04, kernel 2.6.28-16-generic (on /dev/sda6)" {
insmod ext2
set root=(hd0,6)
search --no-floppy --fs-uuid --set 5e884dd6-9fd3-4495-a1e6-e4aa5427b7d9
linux /boot/vmlinuz-2.6.28-16-generic root=UUID=5e884dd6-9fd3-4495-a1e6-e4aa5427b7d9 ro quiet splash
initrd /boot/initrd.img-2.6.28-16-generic
}
menuentry "Ubuntu 9.04, kernel 2.6.28-16-generic (recovery mode) (on /dev/sda6)" {
insmod ext2
set root=(hd0,6)
search --no-floppy --fs-uuid --set 5e884dd6-9fd3-4495-a1e6-e4aa5427b7d9
linux /boot/vmlinuz-2.6.28-16-generic root=UUID=5e884dd6-9fd3-4495-a1e6-e4aa5427b7d9 ro single
initrd /boot/initrd.img-2.6.28-16-generic
}
menuentry "Ubuntu 9.04, kernel 2.6.28-15-generic (on /dev/sda6)" {
insmod ext2
set root=(hd0,6)
search --no-floppy --fs-uuid --set 5e884dd6-9fd3-4495-a1e6-e4aa5427b7d9
linux /boot/vmlinuz-2.6.28-15-generic root=UUID=5e884dd6-9fd3-4495-a1e6-e4aa5427b7d9 ro quiet splash
initrd /boot/initrd.img-2.6.28-15-generic
}
menuentry "Ubuntu 9.04, kernel 2.6.28-15-generic (recovery mode) (on /dev/sda6)" {
insmod ext2
set root=(hd0,6)
search --no-floppy --fs-uuid --set 5e884dd6-9fd3-4495-a1e6-e4aa5427b7d9
linux /boot/vmlinuz-2.6.28-15-generic root=UUID=5e884dd6-9fd3-4495-a1e6-e4aa5427b7d9 ro single
initrd /boot/initrd.img-2.6.28-15-generic
}
menuentry "Ubuntu 9.04, memtest86+ (on /dev/sda6)" {
insmod ext2
set root=(hd0,6)
search --no-floppy --fs-uuid --set 5e884dd6-9fd3-4495-a1e6-e4aa5427b7d9
linux /boot/memtest86+.bin
}
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
d'avance merçi
arnold444
Hors ligne
#5 Le 16/12/2009, à 18:29
- Compte anonymisé
Re : error grub RESOLU
Salut
Il faut modifier ton fichier grub.cfg :
sudo -i
chmod a+w /mnt/boot/grub/grub.cfg
puis
gedit /mnt/boot/grub/grub.cfg
Tu changes tous les :
set root=(hd0,7)
par des
set root=(hd0,5)
et tu sauves ce fichier.
Ensuite tu passes les commandes suivantes :
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
chroot /mnt
Et tu tapes la commande :
grub-install /dev/sda
Tu rebootes et tapes la commande :
sudo update-grub
et tu vérifies que maintenant grub.cfg est tokay
@+
Dernière modification par Compte anonymisé (Le 16/12/2009, à 18:32)
#6 Le 16/12/2009, à 19:24
- arnold444
Re : error grub RESOLU
Salut
Il faut modifier ton fichier grub.cfg :
sudo -i
chmod a+w /mnt/boot/grub/grub.cfg
puis
gedit /mnt/boot/grub/grub.cfg
Tu changes tous les :
set root=(hd0,7)
par des
set root=(hd0,5)et tu sauves ce fichier.
Ensuite tu passes les commandes suivantes :
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
chroot /mntEt tu tapes la commande :
grub-install /dev/sdaTu rebootes et tapes la commande :
sudo update-grubet tu vérifies que maintenant grub.cfg est tokay
@+
tu es un ange jeanjd63, ça marche au poil...je te propose une choppe virtuelle pour te remercier...et comme je suis de la région ou on produit la geuze, ça sera une bonne geuze virtuelle
en éditant grub, j'ai également supprimé la partie ayant trait à l'ancienne version d'ubuntu 9.04 car elle était déclarée étant sur /sda6 ...or, /sda1 c'est mon swap et je me suis dit qu'il y allait avoir bis-brouille.
par contre si je comprends le début de tes commandes (cmod gedit etc), je ne comprends pas celle-ci:
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
chroot /mnt
si tu as le temps de développer....pour moi être moins bête encore
en-tout cas un immense merçi...et encore une démonstration de la puissance de la ligne de commande (sur un forum win, on t'aurais répondu...bah tu formattes et tu ré-installes)
A+
arnold444
Hors ligne
#7 Le 16/12/2009, à 19:42
- Compte anonymisé
Re : error grub RESOLU
Santé
Les mount --bind /dev et /proc ont pour but de lier temporairement /dev et /proc du LiveCD à ton environnement /mnt et ensuite chroot change la partition / . En LiveCD il s'agit d'un / virtuel et le fait de faire un chroot /mnt va modifier / qui sera maintenant sur /dev/sda5 (dans ton cas car tu as monté /dev/sda5 sur /mnt). Tu es donc dans ton environnement et tu peux passer la commande d'install grub qui va aller chercher ses infos sur /boot/grub donc sur (/dev/sda5)/boot/grub
Pour les modifs dans grub.cfg, je pense que après un démarrage la commande :
sudo update-grub aurait aussi fait le "ménage".
PS Pour info sur windows la ligne de commande fonctionne très bien aussi
Un petit "Résolu" peut être.
Bonne continuation.
Dernière modification par Compte anonymisé (Le 16/12/2009, à 19:46)
Pages : 1