Pages : 1
#1 Le 05/09/2007, à 00:35
- Snuffybunny
Problème avec GRUB
Bonjour tous,
J'ai récemment décidé d'essayer d'installer sur une nouvelle partition Ubuntu 7.04 en dual boot avec Windows Vista, question de pouvoir tester Ubuntu et m'amuser un peu...
J'ai suivi la procédure avec le LiveCD, je démarre en "noapic" parce que sa plante aussi non. Tout va bien, je réussi à installer Ubuntu sur une de mes partitions.
Je redémarre, et puis, rien, sa load sur Windows Vista comme si j'avais rien fait. Alors je me ressais avec le CD, et puis je vérifie avec GParted, et j'ai bien partionné, pas de problème, car il me dit que j'ai des fichiers dans ma partition pour Ubuntu et tout.
Alors je suppose qu'il n'a pas GRUB d'installer, alors je fais, toujours avec le LiveCD:
$ sudo apt-get install grub ## Pour être sur qu'il soit installé. Je vois comme message:
Reading package lists... Done
Building dependency tree
Reading state information... Done
grub is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not to upgraded.
Je fais par la suite, pour vérifier, selon ce que j'ai trouvé dans les divers tutorials ici:
$ sudo grub
Probing devices to guess BIOS drives. This may take a long time.
## Et il dit Minimal BASH-like line edditing, etc.
Cependant, le problème c'est qu'il me sort une "Error 15: File not found" quand je fais une de ces deux commands pour trouver mon stage1:
grub> find /boot/grub/stage1
grub> find /grub/stage1
Et bon, je crois qu'elles sont essentielle pour arranger mon probleme pour booter avec GRUB. Je me fis sur la partie d'aide http://doc.ubuntu-fr.org/tutoriel/comment_recuperer_ubuntu_apres_installation_windows
Pour savoir comment "essayer" d'arranger mon GRUB. Peut-être que c'est pas la bonne place, mais bon, est-ce que quelqu'un pourrait m'aider à fixer mon GRUB?
Merci d'avance!
#2 Le 05/09/2007, à 00:37
- belga
Re : Problème avec GRUB
Salut
démarre avec le live et poste le retour de
sudo fdisk -l
Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.
900s entre deux postes: mododoze
Hors ligne
#3 Le 05/09/2007, à 00:49
- Snuffybunny
Re : Problème avec GRUB
Voici le message que sa donne:
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 10058 80787399 7 HPFS/NTFS
/dev/sda2 10058 15285 41984000 7 HPFS/NTFS
/dev/sda3 18446 19457 8128890 7 HPFS/NTFS
/dev/sda4 15286 18445 25382700 5 Extended
/dev/sda5 * 15286 18308 24282216 83 Linux
/dev/sda6 18309 18445 1100421 82 Linux swap / Solaris
Partition table entries are not in disk order
Désolé pour le désordre, j'écris à partir de mon desktop... J'essaye de faire marcher Ubuntu sur mon portable, c'est un HP Pavillion dv9000, si sa peut aider un peu...
Mais bon, les sda1, sda2, sda3 sont mes partitions Windows Vista, une de backup et une de donnée, tandis que sda4 "contient" sda5 et sda6... En tout cas, c'Est ce que Gparted me dit.
#4 Le 05/09/2007, à 01:01
- belga
Re : Problème avec GRUB
Alors tape
sudo mount -o rw /dev/sda5 /mnt
puis
ls /mnt #si cela retourne etc usr ..... continue
ls /mnt/boot # poste le retour en gros
ls /mnt/boot/grub #vois tu un menu.lst
Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.
900s entre deux postes: mododoze
Hors ligne
#5 Le 05/09/2007, à 01:07
- Snuffybunny
Re : Problème avec GRUB
Okay, alors j'ai fait les commandes que tu m'as dit et j'obtiens:
ls /mnt/boot
abi-2.6.20-15-generic memtest86+.bin
config-2.6.20-15-generic System.map-2.6.20-15-generic
initrd.img-2.6.20-15-generic.bak vmlinuz-2.6.20-15-generic
Donc, pour une raison que j'ignore, il n'y a pas de fichier GRUB dans mon boot. Cependant, j'ai bien fait la commande pour l'installer à partir du CD...
#6 Le 05/09/2007, à 01:20
- belga
Re : Problème avec GRUB
ce n'est pas grave
on peut le construire:
1- si tu as relancé le live (inutile sinon)
sudo mount -o rw /dev/sda5 /mnt
2-
cd /mnt
sudo mkdir boot/grub
sudo cp /sbin/update-grub ./
sudo chroot /mnt /update-grub
la dernière comande devrait te demander si tu veux créer un fichier menu.lst
réponds oui.
Il faudrait alors que tu postes le retours de
cat /mnt/boot/grub/menu.lst
avant de continuer
Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.
900s entre deux postes: mododoze
Hors ligne
#7 Le 05/09/2007, à 01:31
- Snuffybunny
Re : Problème avec GRUB
Alors voici ce que j'obtiens après le premier bloc de commande, ou plutot, apres "sudo chroot /mnt /update-grub":
Searching for GRUB installation directory ... found: /boot/grub
findfs: Unable to resolve 'UUID=4bf77081-8a2b-497b-8f87-42b1e0503b9a'
Cannot determine root device. Assuming /dev/hda1
This error is probably caused by an invalid /etc/fstab
Testing for an existing GRUB menu.lst file ...
Could not find /boot/grub/menu.lst file. Would you like /boot/grub/menu.lst generated for you? (y/N) y
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.20-15-generic
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done
Pour ce qui est de l'autre partie... C'est un peu long, mais j'obtiens:
ubuntu@ubuntu:/mnt$ cat /mnt/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 3
## 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=4bf77081-8a2b-497b-8f87-42b1e0503b9a ro
# kopt_2_6=root=/dev/hda1 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=/dev/hda1 ro quiet splash
savedefault
title Ubuntu, kernel 2.6.20-15-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.20-15-generic root=/dev/hda1 ro single
title Ubuntu, memtest86+
root (hd0,0)
kernel /boot/memtest86+.bin
### END DEBIAN AUTOMAGIC KERNELS LIST
#8 Le 05/09/2007, à 01:39
- belga
Re : Problème avec GRUB
Ok, (si tu as redémarré sudo mount -o rw /dev/sda5 /mnt)
on ouvre ce fichier
sudo gedit /mnt/boot/grub/menu.lst
tu changes les différents lignes (elles ne se suivent pas)
timeout 3 en timeout 10
# groot=(hd0,0) # groot=(hd0,4)
tu enregistres puis
tu tapescd /mnt sudo chroot /mnt /update-grub
et reposte
cat /mnt/boot/grub/menu.lst
avant la dernière étape
Dernière modification par belga (Le 05/09/2007, à 01:40)
Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.
900s entre deux postes: mododoze
Hors ligne
#9 Le 05/09/2007, à 02:01
- Snuffybunny
Re : Problème avec GRUB
Voila, alors il donne toujours le même message quand je fais update-grub:
Searching for GRUB installation directory ... found: /boot/grub
findfs: Unable to resolve 'UUID=4bf77081-8a2b-497b-8f87-42b1e0503b9a'
Cannot determine root device. Assuming /dev/hda1
This error is probably caused by an invalid /etc/fstab
Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
Searching for splash image ... none found, skipping ...
Found kernel: /boot/vmlinuz-2.6.20-15-generic
Found kernel: /boot/memtest86+.bin
Updating /boot/grub/menu.lst ... done
Bon, j'ai été vérifié dans mon dossier /etc, et je n'ai pas de dossier fstab... Alors... je sais pas trop c'est quoi sa, mais bon... Pour ce qui est de l'autre commande, voila le retour:
# 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=4bf77081-8a2b-497b-8f87-42b1e0503b9a ro
# kopt_2_6=root=/dev/hda1 ro
## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0
## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,4)
## 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,4)
kernel /boot/vmlinuz-2.6.20-15-generic root=/dev/hda1 ro quiet splash
savedefault
title Ubuntu, kernel 2.6.20-15-generic (recovery mode)
root (hd0,4)
kernel /boot/vmlinuz-2.6.20-15-generic root=/dev/hda1 ro single
title Ubuntu, memtest86+
root (hd0,4)
kernel /boot/memtest86+.bin
### END DEBIAN AUTOMAGIC KERNELS LIST
#10 Le 05/09/2007, à 02:10
- belga
Re : Problème avec GRUB
ok, Ok, (si tu as redémarré sudo mount -o rw /dev/sda5 /mnt)
j'ai oublié un petit détail qu'on rectifie comme ceci
sudo gedit /mnt/boot/grub/menu.lst
tu changes dans
# kopt_2_6=root=/dev/hda1 ro /hda1 en /sda5
kernel /boot/vmlinuz-2.6.20-15-generic root=/dev/hda1 ro quiet splash /hda1 en /sda5
kernel /boot/vmlinuz-2.6.20-15-generic root=/dev/hda1 ro single /hda1 en /sda5
et après la ligne
### END DEBIAN AUTOMAGIC KERNELS LIST
rajoute une entrée pour windows
title Vista
root (hd0,0)
savedefault
makeactive
chainloader +1
enregistre
puis tape pour terminer avant de démarrer
sudo grub-install --root-directory=/mnt /dev/sda
il y a un espace entre /mnt et /dev.
puis redémarre
Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.
900s entre deux postes: mododoze
Hors ligne
#11 Le 05/09/2007, à 02:25
- Snuffybunny
Re : Problème avec GRUB
Alors voici ce que j'obtiens apres la ligne de commande:
ubuntu@ubuntu:~$ sudo gedit /mnt/boot/grub/menu.lst
ubuntu@ubuntu:~$ sudo grub-install --root-directory=/mnt /dev/sda
Probing devices to guess BIOS drives. This may take a long time.
Due to a bug in xfs_freeze, the following command might produce a segmentation
fault when /mnt/boot/grub is not in an XFS filesystem. This error is harmless and
can be ignored.
xfs_freeze: specified file ["/mnt/boot/grub"] is not on an XFS filesystem
Installation finished. No error reported.
This is the contents of the device map /mnt/boot/grub/device.map.
Check if this is correct or not. If any of the lines is incorrect,
fix it and re-run the script `grub-install'.
(fd0) /dev/fd0
(hd0) /dev/sda
Et puis je redemerrae... Bon signe, il sa dit des choses par rapport à GRUB cet fois. Cependant, j'obtiens un message d'erreur, ou plutot, sa bogue. Voila ce que sa dit:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Hum, est-ce que sa ce peut que je me sois tromper quelque part dans ce qu'il fallait que je change...?
#12 Le 05/09/2007, à 02:28
- Snuffybunny
Re : Problème avec GRUB
Oh... En passant, je fais 'ESC' pour aller au menu, il me laisse des choix, et je peux demarrer Vista normalement, mais pas Ubuntu.
#13 Le 05/09/2007, à 02:35
- belga
Re : Problème avec GRUB
La je pense que les modules qui chargent les disques
ne se lancent pas au démarage.
As tu stoppé l'installation?
ue s'est-il passé? te rappelles-tu?
Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.
900s entre deux postes: mododoze
Hors ligne
#14 Le 05/09/2007, à 02:41
- Snuffybunny
Re : Problème avec GRUB
Non, malheureusement.
Je ne crois pas avoir installé l'installation, mais rien ne me disait qu'elle n'était pas fini. Mais il reste une petite fenetre carré en permanence dans l'écran, que je pouvais déplacer et je savais pas trop s'était quoi. Bref, j'ai redémarré et puis sa été sa pour l'installation (Désolé du manque de précision, sa fait un peu moins d'une semaine que j'ai fait cet installation.)
#15 Le 05/09/2007, à 02:56
- belga
Re : Problème avec GRUB
Du coté grub, tout est bon.
Tu peux essayer ceci (en live et une connexion via ethernet)
sudo mount /dev/sda5 /mnt/
sudo chroot /mnt /bin/bash
sudo apt-get update
sudo apt-get install initrd-tools
sudo mount -t proc /proc /proc
sudo aptitude remove linux-image-2.6.20-15-generic
sudo aptitude install linux-image-2.6.20-15-generic
Dernière modification par belga (Le 05/09/2007, à 02:56)
Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.
900s entre deux postes: mododoze
Hors ligne
#16 Le 05/09/2007, à 02:56
- Snuffybunny
Re : Problème avec GRUB
... Et comme je me rappelle plus de ue, je pense que probablement non...
Est-ce que cela serait plus simple d'essayer de reinstaller Ubuntu a partir du CD? Ou bien est-ce que cela peut s'arranger à partir du CD?
#17 Le 05/09/2007, à 02:57
- belga
Re : Problème avec GRUB
message 15
si ça ne vas pas refais une installation
Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.
900s entre deux postes: mododoze
Hors ligne
#18 Le 05/09/2007, à 03:09
- Snuffybunny
Re : Problème avec GRUB
Ouais...
Il boguait un peu au ligne de sudo apt-get update, il disait quil ne pouvait pas ouvrir des choses... De toute facon...
Jai pas vraiment fait quoi que ce soit sur Ubuntu encore, ma seule apprehension cest que l'installation, auparavant, je l'avais fait sur la plus-grosse partie non-allouée, mais la j'en ai pas en particulier... Et je sais pas trop comment le faire manuellement pour ré-installer sur la même partition d'avant.
Quand je le fais manuellement, il me dit:
You need to specify a partition for the root file system (mount point "/") with a minimum size of 2 GB, and a swap partition of at least 256 MB. You may also set up other partitions if you wish.
Alors, comme il liste mes partitions, je choisis /dev/sda5, mais sa me dit "No root file defined"
#19 Le 05/09/2007, à 03:14
- belga
Re : Problème avec GRUB
regarde ici
http://www.breizh-ardente.fr/dotclear/index.php?2007/06/07/70-l-installation-v704
une installation pas à pas
Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.
900s entre deux postes: mododoze
Hors ligne
#20 Le 05/09/2007, à 03:57
- Snuffybunny
Re : Problème avec GRUB
Merci beaucoup, Belga! Surtout pour la patience, finalement, j'ai reussi à faire fonctionner tout cela. Merci pour le lien, sa été vraiment utile pour le faire manuellement!
GRUB fonctionne, Vista et Ubuntu aussi. Mon seul problème c'est que avec Ubuntu, pour ma connection réseau, il ne semble pas détecte que j'ai une carte réseau sans fil, alors je n'ai pas l'option de pouvoir me connecter a un reseau sans fil... Est-ce que tu sais comment je pourrais fixer cela?
#21 Le 05/09/2007, à 04:46
- belga
Re : Problème avec GRUB
poste le retour de
lspci
sudo lshw -C network
ce sont des commandes qui donnent
des infos sur le matériel.
Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.
900s entre deux postes: mododoze
Hors ligne
Pages : 1