Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 03/11/2007, à 22:57

wilduck

dossier /grub introuvable

Bonsoir à tous,

Je m'intéresse depuis quelques mois à Linux et j'ai profité de quelques jours de vacances pour installer la distrib Ubuntu. J'ai pas mal regardé les forums et autres tutos pour ne pas me planter.
je vous donne ma config :
Disque dur 1 SATA avec Win XP + une partition vide
Disque dur 2 SATA pour les données

J'ai démarré sur le live-cd 7.10 Ubuntu (amd64), suivi les consignes d'installation jusqu'à la création des partitions.
J'ai créé 3 partitions supplementaires dans la partition vide du premier disque :
ext3 /         12 Go
ext3 /home  13 Go
swap           1024 Mo
J'ai formaté les ext3, l'installation se termine sans problème.

Mon problème : après le reboot je démarre automatiquement sur Windows sans avoir l'écran grub
J'ai donc redémarré sur le live cd mais je ne trouve pas le dossier /boot/grub et donc je n'arrive pas à modifier les paramètres de boot

pouvez vous me renseigner sur ce problème ?

Merci d'avance

Hors ligne

#2 Le 03/11/2007, à 23:04

belga

Re : dossier /grub introuvable

salut
poste les retours de

sudo fdisk -l
sudo grub
find /boot/grub/stage1
quit

Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.

900s entre deux postes: mododoze

Hors ligne

#3 Le 03/11/2007, à 23:43

wilduck

Re : dossier /grub introuvable

Alors voila les reponses :

sudo fdisk -l

Disk /dev/sda: 74.3 GB, 74355769344 bytes
255 heads, 63 sectors/track, 9039 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x070d070d

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        5801    46596501    7  HPFS/NTFS
/dev/sda2            5802        7260    11719417+  83  Linux
/dev/sda3            7261        8914    13285755   83  Linux
/dev/sda4            8915        9039     1004062+  82  Linux swap / Solaris

Disk /dev/sdb: 163.9 GB, 163928604672 bytes
16 heads, 63 sectors/track, 317632 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Disk identifier: 0xd1999e83

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               2      317632   160086024    f  W95 Ext'd (LBA)
/dev/sdb5               2      317632   160085992+   7  HPFS/NTFS

sudo grub
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/stage1
find /boot/grub/stage1

Error 15: File not found

Voila j'espere que ca pourra t eclairer un peu plus

MERCI !

Hors ligne

#4 Le 03/11/2007, à 23:45

belga

Re : dossier /grub introuvable

tape

sudo mount /dev/sda2 /mnt

donne les retours de

ls /mnt/boot
ls /mnt/boot/grub

Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.

900s entre deux postes: mododoze

Hors ligne

#5 Le 04/11/2007, à 00:04

wilduck

Re : dossier /grub introuvable

Salut,

Voila ce que j'obtiens ;

root@ubuntu:~# sudo mount /dev/sda2 /mnt
root@ubuntu:~# ls /mnt/boot
abi-2.6.22-14-generic             memtest86+.bin
config-2.6.22-14-generic          System.map-2.6.22-14-generic
initrd.img-2.6.22-14-generic.bak  vmlinuz-2.6.22-14-generic
root@ubuntu:~# ls /mnt/boot/grub
ls: /mnt/boot/grub: No such file or directory

A priori, je n'ai pas le dossier

Hors ligne

#6 Le 04/11/2007, à 00:24

wilduck

Re : dossier /grub introuvable

J'ai déjà essayé de réinstaller plusieurs fois sans succès...

Hors ligne

#7 Le 04/11/2007, à 00:40

belga

Re : dossier /grub introuvable

démarre en live

sudo mount -o rw /dev/sda2 /mnt
cd /mnt
sudo mkdir boot/grub
sudo cp /sbin/update-grub ./
sudo chroot /mnt/ /update-grub   #s'il y a erreur: sudo chroot /mnt/ update-grub

cette dernière te demandera de créer un munu.lst, dis oui

puis tape

sudo  gedit /mnt/boot/grub/menu.lst

dans le fichier qui s'ouvre, trouve la ligne

#groot=(hd0,0)   change la en     #groot=(hd0,1)

##change aussi les lignes root (hd0,0) en  root (hd0,1)

##rajoute ceci à la fin
title           Windows XP
root            (hd0,0)
chainloader     +1
boot

enregistre et referme, et reviens dans le terminal et tape

cd /mnt
sudo chroot /mnt /update-grub
sudo grub-install --root-directory=/mnt /dev/sda

redémarre


Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.

900s entre deux postes: mododoze

Hors ligne

#8 Le 04/11/2007, à 01:21

wilduck

Re : dossier /grub introuvable

MErci deja pour ton aide precieuse j'arrive a voir Grub au redemarrage

Par contre, il me donne un vilain message d'erreur :
"Kernel-panic - not syncing VFS : unable to mount root fs on unknown block (0,0)

Du coup, je ne boot ni sur winodws ni sur linux

Je suis donc sur le live-cd

peux-tu  m'aider encore une fois stp ? merci

Hors ligne

#9 Le 04/11/2007, à 05:38

belga

Re : dossier /grub introuvable

salut,

sudo mount -o rw /dev/sda2 /mnt

poste les retours de

cat /mnt/etc/fstab
ls -l /dev/disk/by-uuid
cat /mnt/boot/grub/menu.lst
sudo grub
find /boot/grub/stage1
quit

pour retrouver 2odoze
avec une connexion câblée (sinon on fera autrement)

sudo apt-get update
sudo apt-get install mbr
sudo install-mbr /dev/sda

au redémarrage ça devrait aller mieux.

Dernière modification par belga (Le 04/11/2007, à 05:40)


Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.

900s entre deux postes: mododoze

Hors ligne

#10 Le 04/11/2007, à 11:27

wilduck

Re : dossier /grub introuvable

Salut et encore merci pour ton aide. Voila les resultats que tu demandes :
A signaler, j'ai bien ajouté les lignes pour le démarrage de Windows en (hd0,0) dans le menu.lst (manip précédente) mais il n'apparait pas au redémarrage sans le fichier menu.lst (ni d'ailleurs dans le grub au démarrage ce qui parait logique)

ubuntu@ubuntu:~$ sudo -s
root@ubuntu:~# sudo mount -o rw /dev/sda2 /mnt
root@ubuntu:~# cat /mnt/etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
# /dev/sda2
UUID=d7030bdc-0d95-4ef9-94fc-c853e769a787 /               ext3    defaults,errors=remount-ro 0       1
# /dev/sda3
UUID=9b25342d-75fb-484e-8260-da7eda25f0f6 /home           ext3    defaults        0       2
# /dev/sda1
UUID=EAD868E1D868AE0F /media/sda1     ntfs    defaults,umask=007,gid=46 0       1
# /dev/sdb5
UUID=082C20392C2023E2 /media/sdb5     ntfs    defaults,umask=007,gid=46 0       1
# /dev/sda4
UUID=35751221-e774-4e20-b5de-330e2e572ecf none            swap    sw              0       0
/dev/hdc        /media/cdrom0   udf,iso9660 user,noauto,exec 0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto,exec 0       0
root@ubuntu:~# ls -l /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 10 2007-11-04 10:12 082C20392C2023E2 -> ../../sdb5
lrwxrwxrwx 1 root root 10 2007-11-04 10:12 35751221-e774-4e20-b5de-330e2e572ecf -> ../../sda4
lrwxrwxrwx 1 root root 10 2007-11-04 10:12 9b25342d-75fb-484e-8260-da7eda25f0f6 -> ../../sda3
lrwxrwxrwx 1 root root 10 2007-11-04 10:12 d7030bdc-0d95-4ef9-94fc-c853e769a787 -> ../../sda2
lrwxrwxrwx 1 root root 10 2007-11-04 10:12 EAD868E1D868AE0F -> ../../sda1
root@ubuntu:~# 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 use 'savedefault' 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         15

## 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=d7030bdc-0d95-4ef9-94fc-c853e769a787 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,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

## 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

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title           Ubuntu 7.10, kernel 2.6.22-14-generic
root            (hd0,1)
kernel          /boot/vmlinuz-2.6.22-14-generic root=/dev/hda1 ro quiet splash
quiet

title           Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root            (hd0,1)
kernel          /boot/vmlinuz-2.6.22-14-generic root=/dev/hda1 ro single

title           Ubuntu 7.10, memtest86+
root            (hd0,1)
kernel          /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST
root@ubuntu:~# sudo grub
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/stage1
find /boot/grub/stage1
(hd0,1)
grub> quit
quit
root@ubuntu:~#

Voila je vais tester les 3 dernieres lignes de commande

Hors ligne

#11 Le 04/11/2007, à 11:38

wilduck

Re : dossier /grub introuvable

je viens de tester... sa démarre sur windows automatiquement et j'ai vu apparaitre "MBR" en bas pendant le chargement de la carte mère... bizarre

Hors ligne

#12 Le 04/11/2007, à 16:14

belga

Re : dossier /grub introuvable

Salut,

sudo mount -o rw /dev/sda2 /mnt
sudo gedit /mnt/boot/grub/menu.lst

Il y a des changements à faire

defaut   0   ===> remplace 0 par 3 si tu veux que 2odoze se lance par défaut yikes

timeout   15  [b]temps en seconde de l'affichage de grub, mets ce que tu veux[/b]

hiddenmenu  remplace par ===>  #hiddenmenu

# kopt_2_6=root=/dev/hda1 ro  remplace par # kopt_2_6=root=/dev/sda2 ro

title           Ubuntu 7.10, kernel 2.6.22-14-generic
root            (hd0,1)
kernel          /boot/vmlinuz-2.6.22-14-generic root=/dev/hda1 ro quiet splash  ===> /dev/sda2
quiet

title           Ubuntu 7.10, kernel 2.6.22-14-generic (recovery mode)
root            (hd0,1)
kernel          /boot/vmlinuz-2.6.22-14-generic root=/dev/hda1 ro single   ===> /dev/sda2


rajouter après
### END DEBIAN AUTOMAGIC KERNELS LIST

title           Windows XP
root            (hd0,0)
chainloader     +1
boot

enregistre
puis tape

sudo grub
setup (hd0) (hd0,1)
quit

redémarre


Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.

900s entre deux postes: mododoze

Hors ligne

#13 Le 04/11/2007, à 21:21

wilduck

Re : dossier /grub introuvable

Aie aie aie tu vas finir par me trouver penible lol
Bon, j'ai bien suivi toutes tes demarches, j'ai donc grub qui demarre de nouveau, j'ai le choix entre mes 2 OS par contre des que je demarre sur Linux, j'ai ce message d'erreur :

[18.561959] Kernel panic - not syncing : VFS unable to mount root fs on unknow block (0,0)

merci de ton aide

Hors ligne

#14 Le 04/11/2007, à 21:47

belga

Re : dossier /grub introuvable

démarre en  live

sudo mount /dev/sda2 /mnt/
sudo chroot /mnt/ /bin/bash
mount -t proc /proc /proc
apt-get update
apt-get install initrd-tools
apt-get remove linux-image-2.6.22-14-generic
apt-get install linux-image-2.6.22-14-generic

ctrl+D

sudo umount /mnt

redémarre

Dernière modification par belga (Le 04/11/2007, à 21:47)


Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.

900s entre deux postes: mododoze

Hors ligne

#15 Le 04/11/2007, à 22:55

wilduck

Re : dossier /grub introuvable

manip OK par contre toujours le même problème (sauf que le numero de défaut a change...)

Pour info, windows fonctionne et memtest aussi (les 2 autres choix de mon grub)

Je commence à desesperer de pouvoir decouvrir linux lol

Si tu as d'autres idées, je suis preneur...

Hors ligne

#16 Le 05/11/2007, à 10:03

belga

Re : dossier /grub introuvable

Une réinstallation
en suivant ce tuto
http://www.breizh-ardente.fr/dotclear/index.php?2007/10/15/83-l-installation-v710


Multi-bomb : Multi-doze : Mandoze, Ubundoze, Pardoze.

900s entre deux postes: mododoze

Hors ligne