#1 Le 05/02/2009, à 20:38
- minux02
ubuntu 8.04 ne se lance pas après réinstallation de grub
Bonsoir,
Sur le même disque dur(160go sata) j'ai xp et ubuntu 8.04. Après avoir réinstallé xp, j'ai perdu "grub", j'ai suivi le tutoriel pour restaurer "grub" avec live cd automatiquement. Cela a fonctionné, mais lorsque je choisis ubuntu, grub inscrit :
error 22 "no such partition"
Si une personne, patiente avec un boulet sous linux comme moi, veut bien m'aider!
merci d'avance.
Hors ligne
#2 Le 05/02/2009, à 21:46
- denis_aec
Re : ubuntu 8.04 ne se lance pas après réinstallation de grub
En livecd, monte la partition sur laquelle est ubuntu et donne le contenu de fstab :
cat /media/xxxxxxxx/etc/fstab (remplacer le media/xxxxxxxxx par ce qui va bien ...)
et aussi :
sudo fdisk -l
Hors ligne
#3 Le 05/02/2009, à 22:12
- minux02
Re : ubuntu 8.04 ne se lance pas après réinstallation de grub
Je te remercie de ton aide.
J'essaierai de faire ce que tu me dis demain, car j'ai les yeux et le cerveau hs ce soir à force de lire tous les topics sur error 22 et je finis par ne plus rien capter.
Merci encore et à demain.
Hors ligne
#4 Le 06/02/2009, à 12:13
- minux02
Re : ubuntu 8.04 ne se lance pas après réinstallation de grub
Bonjour,
j'ai oublié de préciser que lors de la réinstallation d'xp, j'ai modifié les partitions (je suis passé de 4 à 3 en ntfs). Est-ce-que cela peut générer mon problème?
Hors ligne
#5 Le 06/02/2009, à 12:31
- vincentp010
Re : ubuntu 8.04 ne se lance pas après réinstallation de grub
Salut, oui ton problème viens de là.
Afin que l'on puisse t'aider il nous faudrais le résultat de quelques commandes comme l'a demandé denis_aec.
Démarre sur le live cd et monte ta partition où il y a ubuntu (remplacer sdaX par ta partition où il y a ubuntu
mkdir /media/ubuntu
sudo mount /dev/sdaX /media/ubuntu
Et donne nous le résultat de ces commandes:
sudo fdisk -l (c'est un L minuscule)
cat /media/ubuntu/etc/fstab
cat /media/ubuntu/boot/grub/menu.lst
ls -l /dev/disk/by-uuid
Desktop: Archlinux OpenBox
Laptop: Dualboot Ubuntu-Studio 9.10 / Archlinux OpenBox
Server: EeeBox Ubuntu-Server 8.10 500Go
Hors ligne
#6 Le 06/02/2009, à 13:02
- _nox_
Re : ubuntu 8.04 ne se lance pas après réinstallation de grub
Il faut que tu flag ta partition ubuntu pour la rendre bootable
--------------------------------------------------
Encouragez votre os préféré, faites des dons !
Debian Wheely 64 - Athlon X2, 4Go, 9800GT, 2410SA, 1To / Debian Wheely 64 - HP EliteBook 8540p (i5 / 4Go)
Hors ligne
#7 Le 06/02/2009, à 13:08
- _nox_
Re : ubuntu 8.04 ne se lance pas après réinstallation de grub
si jamais tu n'y arrive pas avec grup, essaye lilo
--------------------------------------------------
Encouragez votre os préféré, faites des dons !
Debian Wheely 64 - Athlon X2, 4Go, 9800GT, 2410SA, 1To / Debian Wheely 64 - HP EliteBook 8540p (i5 / 4Go)
Hors ligne
#8 Le 06/02/2009, à 14:27
- denis_aec
Re : ubuntu 8.04 ne se lance pas après réinstallation de grub
Il faut que tu flag ta partition ubuntu pour la rendre bootable : totalement inutile pour Ubuntu mais impératif pour win ...
Dernière modification par denis_aec (Le 06/02/2009, à 14:27)
Hors ligne
#9 Le 06/02/2009, à 21:29
- minux02
Re : ubuntu 8.04 ne se lance pas après réinstallation de grub
bonsoir à tous, voilà j'ai effectué ce que vous m'avez dicté, voici le résultat: (c'est long, et j'avoue ne pas y comprendre grand-chose:(, je compte donc sur vous, merci) tant que j'y pense, je précise que grub me lance correctement xp et je n'ai pas intérêt à ce que ce soit l'inverse sinon je me fais assassiner par le reste de la famille
root@ubuntu:~# sudo mount /dev/sda8 /media/ubuntu
root@ubuntu:~# sudo fdisk -l
Disque /dev/sda: 163.9 Go, 163928604672 octets
255 heads, 63 sectors/track, 19929 cylinders
Units = cylindres of 16065 * 512 = 8225280 bytes
Identifiant disque: 0x0dc30dc2
Périphérique Amorce Début Fin Blocs Id Système
/dev/sda1 * 1 3824 30716248+ 7 HPFS/NTFS
/dev/sda2 3825 19929 129363412+ f W95 Etendu (LBA)
/dev/sda5 3825 10198 51199123+ 7 HPFS/NTFS
/dev/sda6 10199 16502 50636848+ 7 HPFS/NTFS
/dev/sda7 16503 16533 248976 82 Linux swap / Solaris
/dev/sda8 16534 19929 27278338+ 83 Linux
Disque /dev/sdb: 512 Mo, 512753664 octets
16 heads, 32 sectors/track, 1956 cylinders
Units = cylindres of 512 * 512 = 262144 bytes
Identifiant disque: 0x00000000
Périphérique Amorce Début Fin Blocs Id Système
/dev/sdb1 * 1 1956 500720 e W95 FAT16 (LBA)
root@ubuntu:~# cat /media/ubuntu/etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda9
UUID=4b4b9b59-ecad-448e-9f96-ed6c4d89ff2a / ext3 relatime,errors=remount-ro 0 1
# /dev/sda8
UUID=a875ff1a-3434-4f49-a911-de2b9ec8b2dd none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/scd1 /media/cdrom1 udf,iso9660 user,noauto,exec,utf8 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
root@ubuntu:~# cat /media/ubuntu/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 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=4b4b9b59-ecad-448e-9f96-ed6c4d89ff2a ro
## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0
## 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
## 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 8.04.2, kernel 2.6.24-23-generic
root (hd0,8)
kernel /boot/vmlinuz-2.6.24-23-generic root=UUID=4b4b9b59-ecad-448e-9f96-ed6c4d89ff2a ro quiet splash
initrd /boot/initrd.img-2.6.24-23-generic
quiet
title Ubuntu 8.04.2, kernel 2.6.24-23-generic (recovery mode)
root (hd0,8)
kernel /boot/vmlinuz-2.6.24-23-generic root=UUID=4b4b9b59-ecad-448e-9f96-ed6c4d89ff2a ro single
initrd /boot/initrd.img-2.6.24-23-generic
title Ubuntu 8.04.2, kernel 2.6.24-22-generic
root (hd0,8)
kernel /boot/vmlinuz-2.6.24-22-generic root=UUID=4b4b9b59-ecad-448e-9f96-ed6c4d89ff2a ro quiet splash
initrd /boot/initrd.img-2.6.24-22-generic
quiet
title Ubuntu 8.04.2, kernel 2.6.24-22-generic (recovery mode)
root (hd0,8)
kernel /boot/vmlinuz-2.6.24-22-generic root=UUID=4b4b9b59-ecad-448e-9f96-ed6c4d89ff2a ro single
initrd /boot/initrd.img-2.6.24-22-generic
title Ubuntu 8.04.2, kernel 2.6.24-21-generic
root (hd0,8)
kernel /boot/vmlinuz-2.6.24-21-generic root=UUID=4b4b9b59-ecad-448e-9f96-ed6c4d89ff2a ro quiet splash
initrd /boot/initrd.img-2.6.24-21-generic
quiet
title Ubuntu 8.04.2, kernel 2.6.24-21-generic (recovery mode)
root (hd0,8)
kernel /boot/vmlinuz-2.6.24-21-generic root=UUID=4b4b9b59-ecad-448e-9f96-ed6c4d89ff2a ro single
initrd /boot/initrd.img-2.6.24-21-generic
title Ubuntu 8.04.2, kernel 2.6.24-19-generic
root (hd0,8)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=4b4b9b59-ecad-448e-9f96-ed6c4d89ff2a ro quiet splash
initrd /boot/initrd.img-2.6.24-19-generic
quiet
title Ubuntu 8.04.2, kernel 2.6.24-19-generic (recovery mode)
root (hd0,8)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=4b4b9b59-ecad-448e-9f96-ed6c4d89ff2a ro single
initrd /boot/initrd.img-2.6.24-19-generic
title Ubuntu 8.04.2, memtest86+
root (hd0,8)
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/sda1
title Microsoft Windows XP Professionnel
root (hd0,0)
savedefault
makeactive
chainloader +1
root@ubuntu:~# ls -l /dev/disk/by uuid
ls: ne peut accéder /dev/disk/by: Aucun fichier ou dossier de ce type
ls: ne peut accéder uuid: Aucun fichier ou dossier de ce type
Hors ligne
#10 Le 06/02/2009, à 22:03
- denis_aec
Re : ubuntu 8.04 ne se lance pas après réinstallation de grub
Dans fstab, linux est sur sda8 = hd0,7 et non hd0,8 comme indiqué dans menu.lst.
Dans tout le menu.lst, modifie donc partout hd0,8 par hd0,7, y compris dans "# groot=(hd0,8) "
Pour "ls -l /dev/disk/by uuid " il manque un "-" (ou "_" ?) entre by et uuid
Hors ligne
#11 Le 06/02/2009, à 22:17
- minux02
Re : ubuntu 8.04 ne se lance pas après réinstallation de grub
ok, je veux bien faire les modifs, mais j'aimerais(tant qu'à faire) que xp soit l'os par défaut puis supprimer les différentes options de kernel et ne garder que les deux plus récents (est-ce possible?). Enfin, petit soucis, quand je suis dans le terminal et que je modifie les données, comment je les sauvegarde?
pour la dernière commande, elle permet quoi? (ls -l/dev/disk/by-uuid)
merci
Hors ligne
#12 Le 06/02/2009, à 22:44
- Carroués
Re : ubuntu 8.04 ne se lance pas après réinstallation de grub
Bonsoir,
De nos jours, Ubuntu utilise très bien les UUID pour remplacer le système historique hdXY / sdXY
L'avantage est précisément que l'ordre des disques vu du BIOS importe peu (sda→sdb) : une reprise des partitions, une partoche qui disparaît (le cas présent)… idem, l'identifiant unique reconnaît la partition.
En principe (je n'ai pas approfondi ma lecture du menu.lst de minux02) il faudrait remplacer toutes les références de type
title Ubuntu 8.04.2, kernel 2.6.24-21-generic
root (hd0,8)
par :
title Ubuntu 8.04.2, kernel 2.6.24-21-generic
uuid 4b4b9b59-ecad-448e-9f96-ed6c4d89ff2a
y compris au niveau de :
## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,8)
par
# groot=4b4b9b59-ecad-448e-9f96-ed6c4d89ff2a
Pour ce qui est des noyaux à afficher (tu en veux 2, c'est excellent comme choix) :
## 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=2
Démarrage sur XP par défaut (vers le haut de menu.lst) :
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 6
Pour terminer,
sudo update-grub
Sauf erreur de ma part (je suis humain, donc c'est possible ! ), ça devrait fonctionner.
Dernière modification par carroues (Le 06/02/2009, à 22:52)
Hors ligne
#13 Le 07/02/2009, à 14:23
- minux02
Re : ubuntu 8.04 ne se lance pas après réinstallation de grub
Bonjour,
merci à tous pour vos précieux conseils ; moi qui suis un vrai ignard en informatique.
Mon problème est résolu pour grub.Ceci étant je ne sais pas comment l'indiquer en en-tête.:/
à plus car j'ai encore pas mal de problèmes de fonctionnement.:)
Hors ligne