#1 Le 27/06/2007, à 23:24
- Chizux
Problème avec Grub
Bonjour,
Je suis a moitié débutant sous linux car cela fait 3 mois deja que je suis sous ubuntu et je me suis tourné vers XFCE recemment pour sa flexibilité dans l'apparence.
J'ai ajouté un disque dur IDE sur mon ordi en plus du SATA deja installé. J'avais Grub qui assurait le choix entre windows XP et ubuntu. Schéma des partitions:
SATA 80Go :
- 66Go XP ntfs
- 3Go / ext3
- 1Go swap swap
- 6Go /home ext3
Préférant ubuntu j'ai formaté les paritions de ubuntu sur le premier HDD pour avoir 160Go de linux
Ce qui donne:
SATA 80Go :
-66Go XP ntfs
-10Go libre
IDE(maxtor) 160Go :
- 10Go / ext2(impossible en ext3 ???)
- 1Go swap swap
- 150 Go /home ext2(idem)
Infiniement content je reboot le pc et la Grub m'affiche un magnifique error 22 qui m'empeche de selectionner mon OS préféré :@(zut pourquoi j'y ai pas pensé?)
Comment remettre Grub sur pied? et par simple curiosité où sont alors stockées les informations de Grub?
J'écris depuis mon pc avec le live CD de xubuntu 7.04
Merci d'avance pour toutes vos réponses, de ma part et de celle de mon petit frère qui attend impatiamment de jouer a Dofus.
Chizux
Hors ligne
#2 Le 27/06/2007, à 23:29
- djpeck
Re : Problème avec Grub
Salut,
En supprimant ta première partition ntfs tu a du flinguer ton grub... Il y a plusieurs post sur le forum pour résoudre ton problème (à base de live cd et réinstallation grub)
Bon courage
Hors ligne
#3 Le 27/06/2007, à 23:47
- belga
Re : Problème avec Grub
à la mémoire de safe93
Dernière modification par belga (Le 15/10/2007, à 18:13)
Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.
900s entre deux postes: mododoze
Hors ligne
#4 Le 28/06/2007, à 00:12
- Chizux
Re : Problème avec Grub
Il m'indique (hd0,0) :S
Ca consiste en quoi cette commande si tu as le temps d'expliquer?
Saurais-tu pourquoi je ne peux pas mettre ext3 en système de fichiers?
Merci pour ton aide
Dernière modification par Chizux (Le 28/06/2007, à 00:18)
Hors ligne
#5 Le 28/06/2007, à 00:20
- belga
Re : Problème avec Grub
à la mémoire de safe93
Dernière modification par belga (Le 15/10/2007, à 18:14)
Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.
900s entre deux postes: mododoze
Hors ligne
#6 Le 28/06/2007, à 00:29
- Chizux
Re : Problème avec Grub
Voici le résultat de : sudo fdisk -l
Disk /dev/sda: 163.9 GB, 163928604672 bytes
255 heads, 63 sectors/track, 19929 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 1216 9767488+ 83 Linux
/dev/sda2 19790 19929 1124550 5 Extended
/dev/sda3 1217 19789 149187622+ 83 Linux
/dev/sda5 19790 19929 1124518+ 82 Linux swap / Solaris
Partition table entries are not in disk order
Disk /dev/sdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 8025 64460781 7 HPFS/NTFS
Disk /dev/sdc: 1046 MB, 1046331904 bytes
33 heads, 61 sectors/track, 1015 cylinders
Units = cylinders of 2013 * 512 = 1030656 bytes
This doesn't look like a partition table
Probably you selected the wrong device.
Device Boot Start End Blocks Id System
/dev/sdc1 ? 928849 1012649 84344761 69 Unknown
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(68, 13, 10) logical=(928848, 5, 37)
Partition 1 has different physical/logical endings:
phys=(288, 115, 43) logical=(1012648, 7, 36)
Partition 1 does not end on cylinder boundary.
/dev/sdc2 ? 845266 1774169 934940732+ 73 Unknown
Partition 2 has different physical/logical beginnings (non-Linux?):
phys=(371, 114, 37) logical=(845265, 16, 61)
Partition 2 has different physical/logical endings:
phys=(366, 32, 33) logical=(1774168, 12, 30)
Partition 2 does not end on cylinder boundary.
/dev/sdc3 ? 2 2 0 74 Unknown
Partition 3 has different physical/logical beginnings (non-Linux?):
phys=(371, 114, 37) logical=(1, 9, 12)
Partition 3 has different physical/logical endings:
phys=(372, 97, 50) logical=(1, 9, 11)
Partition 3 does not end on cylinder boundary.
/dev/sdc4 1 1706465 1717556736 0 Empty
Partition 4 has different physical/logical beginnings (non-Linux?):
phys=(0, 0, 0) logical=(0, 0, 1)
Partition 4 has different physical/logical endings:
phys=(0, 0, 0) logical=(1706464, 23, 37)
Partition 4 does not end on cylinder boundary.
Partition table entries are not in disk order
Petite précision peut etre utile : le maxtor IDE est en mode esclave
Hors ligne
#7 Le 28/06/2007, à 00:34
- belga
Re : Problème avec Grub
à la mémoire de safe93
Dernière modification par belga (Le 15/10/2007, à 18:14)
Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.
900s entre deux postes: mododoze
Hors ligne
#8 Le 28/06/2007, à 00:40
- Chizux
Re : Problème avec Grub
Contenu du 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=3dc0e2f7-4f81-4acc-918a-95f88b86523f ro
## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0
## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,0)
## 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
## ## End Default Options ##
title Ubuntu, kernel 2.6.20-15-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=3dc0e2f7-4f81-4acc-918a-95f88b86523f ro quiet splash
initrd /boot/initrd.img-2.6.20-15-generic
quiet
savedefault
title Ubuntu, kernel 2.6.20-15-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.20-15-generic root=UUID=3dc0e2f7-4f81-4acc-918a-95f88b86523f ro single
initrd /boot/initrd.img-2.6.20-15-generic
title Ubuntu, memtest86+
root (hd0,0)
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/sdb1
title Microsoft Windows XP Professionnel
root (hd1,0)
savedefault
makeactive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
Hors ligne
#9 Le 28/06/2007, à 00:52
- belga
Re : Problème avec Grub
Oubli, poste aussi
cat /mnt/linux/etc/fstab
Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.
900s entre deux postes: mododoze
Hors ligne
#10 Le 28/06/2007, à 00:54
- Chizux
Re : Problème avec Grub
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1
UUID=3dc0e2f7-4f81-4acc-918a-95f88b86523f / ext2 defaults,errors=remount-ro 0 1
# /dev/sda3
UUID=a2d5161d-335d-435e-9383-6a49fbde9fe4 /home ext2 defaults 0 2
# /dev/sdb1
UUID=B224C8DB24C8A3A7 /media/sdb1 ntfs defaults,nls=utf8,umask=007,gid=46 0 1
# /dev/sda5
UUID=0723952f-d31b-4ab1-964d-0d87f7fe2420 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0
Voila, et merci de m'aider a une heure pareille, ca serait parfait de regler ca ce soir
Hors ligne
#11 Le 28/06/2007, à 00:59
- belga
Re : Problème avec Grub
à la mémoire de safe93
Dernière modification par belga (Le 15/10/2007, à 18:17)
Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.
900s entre deux postes: mododoze
Hors ligne
#12 Le 28/06/2007, à 01:01
- Chizux
Re : Problème avec Grub
OK j'essaye tout de suite. Si ca ne marche pas je reviens demain.
Merci infiniement pour ton aide
Ca confirme que le forum est TRES réactif
@+
Hors ligne
#13 Le 28/06/2007, à 01:53
- belga
Re : Problème avec Grub
poste aussi
cat /mnt/linux/device.map
ls -l /dev/disk/by-uuid/
Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.
900s entre deux postes: mododoze
Hors ligne
#14 Le 28/06/2007, à 09:52
- Chizux
Re : Problème avec Grub
Hier j'ai redémmaré mon pc et ca n'a pas marché il m'affiche toujours la même error 22
J'essaye de comprendre toutes les manips que je fais la mais ca dépasse un peu mes compétences
résultat de : cat /mnt/linux/boot/grub/device.map
(hd0) /dev/sda
(hd1) /dev/sdb
et celui de : ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 2007-06-28 09:32 0723952f-d31b-4ab1-964d-0d87f7fe2420 -> ../../sda5
lrwxrwxrwx 1 root root 10 2007-06-28 09:32 3dc0e2f7-4f81-4acc-918a-95f88b86523f -> ../../sda1
lrwxrwxrwx 1 root root 10 2007-06-28 09:32 a2d5161d-335d-435e-9383-6a49fbde9fe4 -> ../../sda3
lrwxrwxrwx 1 root root 10 2007-06-28 09:32 B224C8DB24C8A3A7 -> ../../sdb1
J'ai revérifié quelques autres fichiers de config et en faisant sudo fdisk -l il affiche un message d'erreur à la fin
Disk /dev/sda: 163.9 GB, 163928604672 bytes
255 heads, 63 sectors/track, 19929 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 1 1216 9767488+ 83 Linux
/dev/sda2 19790 19929 1124550 5 Extended
/dev/sda3 1217 19789 149187622+ 83 Linux
/dev/sda5 19790 19929 1124518+ 82 Linux swap / Solaris
Partition table entries are not in disk order
Disk /dev/sdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 8025 64460781 7 HPFS/NTFS
Disk /dev/sdc: 1046 MB, 1046331904 bytes
33 heads, 61 sectors/track, 1015 cylinders
Units = cylinders of 2013 * 512 = 1030656 bytes
This doesn't look like a partition table
Probably you selected the wrong device.
Device Boot Start End Blocks Id System
/dev/sdc1 ? 928849 1012649 84344761 69 Unknown
Partition 1 has different physical/logical beginnings (non-Linux?):
phys=(68, 13, 10) logical=(928848, 5, 37)
Partition 1 has different physical/logical endings:
phys=(288, 115, 43) logical=(1012648, 7, 36)
Partition 1 does not end on cylinder boundary.
/dev/sdc2 ? 845266 1774169 934940732+ 73 Unknown
Partition 2 has different physical/logical beginnings (non-Linux?):
phys=(371, 114, 37) logical=(845265, 16, 61)
Partition 2 has different physical/logical endings:
phys=(366, 32, 33) logical=(1774168, 12, 30)
Partition 2 does not end on cylinder boundary.
/dev/sdc3 ? 2 2 0 74 Unknown
Partition 3 has different physical/logical beginnings (non-Linux?):
phys=(371, 114, 37) logical=(1, 9, 12)
Partition 3 has different physical/logical endings:
phys=(372, 97, 50) logical=(1, 9, 11)
Partition 3 does not end on cylinder boundary.
/dev/sdc4 1 1706465 1717556736 0 Empty
Partition 4 has different physical/logical beginnings (non-Linux?):
phys=(0, 0, 0) logical=(0, 0, 1)
Partition 4 has different physical/logical endings:
phys=(0, 0, 0) logical=(1706464, 23, 37)
Partition 4 does not end on cylinder boundary.
Partition table entries are not in disk order
Hors ligne
#15 Le 28/06/2007, à 11:22
- belga
Re : Problème avec Grub
à la mémoire de safe93
Dernière modification par belga (Le 15/10/2007, à 18:14)
Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.
900s entre deux postes: mododoze
Hors ligne
#16 Le 28/06/2007, à 11:38
- Chizux
Re : Problème avec Grub
Ca c'est mon mp3
J'ai fait des recherches sur grub et son fonctionnement et je comprends un peu mieux
(hd0,0) est mon disque IDE maxtor (esclave)160Go avec xubuntu il est nommé /dev/sda dans le partitionnement d'install
Celui avec WinXP 80Go est /dev/sdb et donc je suppose (hd1,0) pour grub
Hors ligne
#17 Le 28/06/2007, à 11:48
- belga
Re : Problème avec Grub
oui c'est bien cela
Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.
900s entre deux postes: mododoze
Hors ligne
#18 Le 28/06/2007, à 11:49
- belga
Re : Problème avec Grub
Que te donne
sudo od -Ax -tx1z -v -N446 /dev/sda | grep -i rub
Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.
900s entre deux postes: mododoze
Hors ligne
#19 Le 28/06/2007, à 11:50
- Chizux
Re : Problème avec Grub
voila
000180 52 55 42 20 00 47 65 6f 6d 00 48 61 72 64 20 44 >RUB .Geom.Hard D<
Hors ligne
#20 Le 28/06/2007, à 12:34
- belga
Re : Problème avec Grub
à la mémoire de safe93
Dernière modification par belga (Le 15/10/2007, à 18:15)
Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.
900s entre deux postes: mododoze
Hors ligne
#21 Le 28/06/2007, à 12:44
- Chizux
Re : Problème avec Grub
grub> root (hd0,0)
grub> 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)"... 17 sectors are embedded.
succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+17 p (hd0,0)/boot/grub/stage2 /boo
t/grub/menu.lst"... succeeded
Done.
Ca c'est pour les commandes dans grub
et le résultat de ls /mnt/linux/boot/
abi-2.6.20-15-generic initrd.img-2.6.20-15-generic.bak
config-2.6.20-15-generic memtest86+.bin
grub System.map-2.6.20-15-generic
initrd.img-2.6.20-15-generic vmlinuz-2.6.20-15-generic
Tout me parait cohérent mais ca va marcher?
Dernière modification par Chizux (Le 28/06/2007, à 12:57)
Hors ligne
#22 Le 28/06/2007, à 13:05
- belga
Re : Problème avec Grub
Pour moi tout est bon, tes fichiers images sont dans hd0,0
on a dit a grub d'aller voir dans hd0,0
le menu.lst est correct le uuid de sda1 est correct
on a installer grub dans le mbr de sda en lui disant de prendre
le fichier dans hd0,0
et pourtant....
Physiquement tu as bien ubuntu sur le premier disque ?
Je viens de faire une recherche sur le net, il réinstalle le "mbr" de
windows puis grub. Je n'ai pas compris, utiliser win pour réparer beuurk
Malheureusement je ne vois plus tellmewhy sur le forum,
lui devrait voir ce qu'on ne voit pas.
Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.
900s entre deux postes: mododoze
Hors ligne
#23 Le 28/06/2007, à 13:17
- Chizux
Re : Problème avec Grub
le premier disque (a etre arrivé ds mon pc) a la base etait celui de 80Go et grub devrait etre stocké dans son mbr je pense (ce n'est qu'une supposition)
J'essaye de lancer grub et je reviens sur le live CD
Edit : Ca n'a pas marché il y a toujours la meme Error 22
Loading Grub stage 1.5
Please wait...
Error 22
Pourrait-on effacer Grub et le remettre totalement? De manière à ce qu'il définisse lui meme ses paramatres comme il le fait normalement.
Dernière modification par Chizux (Le 28/06/2007, à 13:26)
Hors ligne
#24 Le 28/06/2007, à 13:36
- belga
Re : Problème avec Grub
à la mémoire de safe93
Dernière modification par belga (Le 15/10/2007, à 18:15)
Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.
900s entre deux postes: mododoze
Hors ligne
#25 Le 28/06/2007, à 13:40
- Chizux
Re : Problème avec Grub
Ca donne ca :
ubuntu@ubuntu:~$ sudo chroot /mnt/linux grub-install /dev/sda
/dev/sda: Not found or not a block device.
Ce message me fait peur
mais ca serait pas plutot sudo chroot /mnt/linux grub-install /dev/sda1? -> soit ma partition /
C'est quoi chroot?-> c'est bon merci wikipedia
Dernière modification par Chizux (Le 28/06/2007, à 13:44)
Hors ligne