URL: https://linuxfr.org/forums/linux-general/posts/probleme-de-definition-de-partition-dans-boot-grub-menu-lst Title: problème de définition de partition dans /boot/grub/menu.lst Authors: littlebreizhman Date: 2012年04月03日T14:28:25+02:00 Tags: mageia Score: -1 Bonjour, J'ai un petit problème avec grub2 (edit : faux, c'est grub v 0.97) sur ma mageia. Suite très certainement à une installation initiale un peu naze, grub deux pense que ma partition de boot se trouve sur hd2 (/dev/sdc) au lieu de hd0 (/dev/sda) A chaque mise à jour de noyau, le menu.lst est réécrit avec la fausse entrée hd2 (malgré un menu.lst pré-mise à jour corrigé avec hd0. ```sh [root@hyperion ~]# cat /boot/grub/menu.lst timeout 5 color black/cyan yellow/cyan gfxmenu (hd0,0)/boot/gfxmenu default 0 title linux kernel (hd0,0)/boot/vmlinuz [...] ``` devient ```sh [root@hyperion grub]# cat /boot/grub/menu.lst timeout 5 color black/cyan yellow/cyan gfxmenu (hd2,0)/boot/gfxmenu default 0 title linux kernel (hd2,0)/boot/vmlinuz [...] initrd (hd2,0)/boot/initrd.img [...] [...] title desktop 3.3.1-1.mga2 kernel (hd2,0)/boot/vmlinuz-3.3.1-desktop-1.mga2 [...] initrd (hd2,0)/boot/initrd-3.3.1-desktop-1.mga2.img ``` Un petit sed et tout rentre dans l'ordre... ```sh [root@hyperion ~]# sed -i s/hd2/hd0/ /boot/grub/menu.lst ``` Mais comme je suis étourdi, un fois sur deux j'oublie de faire le sed et je me retrouve à éditer les paramètres de boot à la main dans le menu boot de grub Certes je pourrais l'automatiser mais ce n'est pas élégant et je voudrais savoir comment réparer le problème. J'ai fouillé dans avec un grep hd2 /boot/grub. Il y a bien un install.sh ```sh [root@hyperion grub]# cat install.sh grub --device-map=/boot/grub/device.map --batch <

AltStyle によって変換されたページ (->オリジナル) /