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 18/07/2006, à 14:25

squallus

[Résolu] pb Restauration Grub depuis Live CD

Je vais essayer de faire clair et complet. wink

Suite à une réinstalle idiote de XP, j'ai (comme je m'y attendais) fait sauter Grub.

Après une lecture de la documentation, notamment ça :

http://doc.ubuntu-fr.org/installation/grub#avec_ubuntu_ou_un_live_cd

J'ai décidé de réinstaller Grub avec mon live CD de Dapper Drake.

Problème :

Depuis l'invite de Grub, à la commande :

find /boot/grub/stage1

j'ai

find : file not found

la commande

sudo fdisk -l

me renvoie notamment :

Device        Boot   Start     End     System
/dev/hda1     *                             NTFS
/dev/hda2                                    NTFS
/dev/hda5                                    NTFS
/dev/hda6                                    NTFS
/dev/hda7     *                              Linux
/dev/hda8                                     Linux SWAP

et la commande

more /etc/fstab

me donne :

unionfs             /         unionfs   rw                  0    0
tmpfs               /tmpfs   tmpfs    nosuid,nodev   0    0
/dev/hda8        swap      swap    defaults          0    0

Pour finir, je tiens à préciser que ma partition qui contenait Kubuntu n'a pas l'air corrompu puisque j'y accède sans problème depuis winwin avec le logiciel explore2fs

J'ai put notamment ouvrir mon ancien fichier menu.lst de Grub dont voici le contenu :

# 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



# Test pour paramétrer l'image de fond
splashimage=(hd0,8)/boot/grub/splashimages/tuxbsdxp.xpm.gz


## 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=/dev/hda9 ro

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,8)

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

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
##      altoptions=(recovery mode) 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 ##

splashimage=(hd0,8)/boot/grub/splashimages/tuxbsdxp.xpm.gz

title		Ubuntu, kernel 2.6.15-26-k7
root		(hd0,8)
kernel		/boot/vmlinuz-2.6.15-26-k7 root=/dev/hda9 ro quiet splash
initrd		/boot/initrd.img-2.6.15-26-k7
savedefault
boot

title		Ubuntu, kernel 2.6.15-26-k7 (recovery mode)
root		(hd0,8)
kernel		/boot/vmlinuz-2.6.15-26-k7 root=/dev/hda9 ro single
initrd		/boot/initrd.img-2.6.15-26-k7
boot

title		Ubuntu, kernel 2.6.15-26-386
root		(hd0,8)
kernel		/boot/vmlinuz-2.6.15-26-386 root=/dev/hda9 ro quiet splash
initrd		/boot/initrd.img-2.6.15-26-386
savedefault
boot

title		Ubuntu, kernel 2.6.15-26-386 (recovery mode)
root		(hd0,8)
kernel		/boot/vmlinuz-2.6.15-26-386 root=/dev/hda9 ro single
initrd		/boot/initrd.img-2.6.15-26-386
boot

title		Ubuntu, memtest86+
root		(hd0,8)
kernel		/boot/memtest86+.bin 
boot

### 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/hda1
title		Microsoft Windows XP Professionnel
root		(hd0,0)
savedefault
makeactive
chainloader	+1

J'ai bien l'impression que le problème se situe au niveau des numéros de partition :
Mon ancien boot, d'après le menu.lst, était sur (hd0,8) or ma table des partitions depuis le live CD m'indique hda7.
J'ai un peu du mal avec tout ça et je ne voudrais pas tout réinstaller en sachant que j'ai juste à récupérer mon Grub. Si une âme charitable pouvait me conseiller pour récupérer Grub depuis le live CD, je lui en serait fortement reconnaissant wink

Merci d'avance pour vos réponses.

Dernière modification par squallus (Le 19/07/2006, à 17:28)

Hors ligne

#2 Le 19/07/2006, à 10:39

pinguino

Re : [Résolu] pb Restauration Grub depuis Live CD

hello,
je crois qu'en remplaçant ( hd0,8) par ( hd0,7)
et /dev/hda9 par /dev/hda8 ca devrait fonctionner
Bonne journée


Dell Inspiron 1200
Acer Aspire5735Z
Asus X301A

Hors ligne

#3 Le 19/07/2006, à 11:20

squallus

Re : [Résolu] pb Restauration Grub depuis Live CD

Heu ...  remplacer où ? Il faudrait peut-être que je monte la partition contenant l'ancien boot pour que ça marche non ? neutral

Hors ligne

#4 Le 19/07/2006, à 11:29

pinguino

Re : [Résolu] pb Restauration Grub depuis Live CD

squallus a écrit :

Heu ...  remplacer où ? Il faudrait peut-être que je monte la partition contenant l'ancien boot pour que ça marche non ? neutral

Demarre avec le live cd, puis monte ta partition par Systeme/administration/disque
enfin en mode console tape
sudo gedit /root/boot/grub/menu.lst
et la tu fais tes modifs


Dell Inspiron 1200
Acer Aspire5735Z
Asus X301A

Hors ligne

#5 Le 19/07/2006, à 12:38

nicky_larson9

Re : [Résolu] pb Restauration Grub depuis Live CD

lu

vice        Boot   Start     End     System
/dev/hda1     *                             NTFS
/dev/hda2                                    NTFS
/dev/hda5                                    NTFS
/dev/hda6                                    NTFS
/dev/hda7     *                              Linux
/dev/hda8                                     Linux SWAP

les chiffres ont vide toi ?:(


je suis malentendant (sourd et muet), désolé pour mon orthographe ?
[ubuntu Dapper 6.06/ Gnome/ Firefox/ thunderbird/ Nvidia]
nouveau ! irc : irc.freenode.net / #frugalware-fr  &  #terranux, à vous chattez

Hors ligne

#6 Le 19/07/2006, à 14:28

squallus

Re : [Résolu] pb Restauration Grub depuis Live CD

Non, non, ils ne sont pas vides. Je les ai pas mis pour gagner du temps. Sinon, je vais tenter ce que me conseille pinguino et je vous tiens au courant.

Hors ligne

#7 Le 19/07/2006, à 17:28

squallus

Re : [Résolu] pb Restauration Grub depuis Live CD

pinguino a écrit :

hello,
je crois qu'en remplaçant ( hd0,8) par ( hd0,7)
et /dev/hda9 par /dev/hda8 ca devrait fonctionner
Bonne journée

Erreur ! Il fallait remplacer /dev/hda9 par /dev/hda7 et (hd0,8) par (hd0,6) .

Ca marche enfin big_smile.

Parcontre, j'ai pas compris pourquoi mon indexage des partitions a été modifié comme ça. Si quelqu'un a une idée ?

Pour information, kate marche bien depuis mon live CD mais ne veut pas se lancer en root. gedit ne marche même pas depuis le live-CD.

Pour finir, j'ai appris à utiliser "vi" comme éditeur pour modifier un fichier en root. Cette mésaventure aura eu au moins cet avantage roll

Sur-ce, je marque [Résolu] . Et si quelqu'un a des connaissances pouvant m'expliquer cette modification d'indexage, je suis toutes ouïes.

Hors ligne

#8 Le 19/07/2006, à 17:38

pinguino

Re : [Résolu] pb Restauration Grub depuis Live CD

aaargh mea culpa.....


Dell Inspiron 1200
Acer Aspire5735Z
Asus X301A

Hors ligne