Pour rajouter d’autres distribs, il faut le faire à partir de /etc/grub.d/40_custom.
Ensuite, pour que ça soit pris en compte par /boot/grub/grub.cfg, il faut taper
update-grub
J’ai fait tout ça mais une distrib sur un DD ext (Kubuntu) était bien prise en compte par grug.cfg mais n’apparaissait pas dans la liste au boute.
J’ai modifié la ligne du haut :
exec tail -n +3 $0
en :
exec tail -n +6 $0
pensant qu’il s’agissait ptet du nombre de distribs totales prises en compte.
Ça a fonctionné et la ligne Kubuntu est apparue au boute.
MAIS —
ma première distrib du fichier 40_custom est tronquée quand elle est copîée dans grub.cfg et les deux premières lignes ne sont plus présentes, ce qui fait qu’elle n’est plus visible au boute.
Une idée ?
fichier 40_custom :
[code]#!/bin/sh
exec tail -n +6 $0
This file is an example on how to add custom entries
menuentry “Debian GNU/Linux, Linux 2.6.26-2-amd64 (STABLE-64 / sda1)” {
set root=(hd0,1)
search --no-floppy --fs-uuid --set 3-------------------------
linux /boot/vmlinuz-2.6.26-2-amd64 root=UUID=3----------------- ro quiet
initrd /boot/initrd.img-2.6.26-2-amd64
}
menuentry “Debian GNU/Linux, Linux 2.6.29-2-486 (TESTING-32 / sda6)” {
set root=(hd0,6)
search --no-floppy --fs-uuid --set 7----------------------
linux /boot/vmlinuz-2.6.29-2-486 root=UUID=7------------------- ro quiet
initrd /boot/initrd.img-2.6.29-2-486
}
menuentry “KUBUNTU 8.04.1, kernel 2.6.27-11-generic (sdb7)” {
set root=(hd1,7)
search --no-floppy --fs-uuid --set f---------------------
linux /boot/vmlinuz-2.6.27-11-generic root=UUID=f------------------- ro quiet
initrd /boot/initrd.img-2.6.27-11-generic
}
[/code]
FICHIER grub.cfg
[code]### BEGIN /etc/grub.d/40_custom ###
search --no-floppy --fs-uuid --set 3---------------------
linux /boot/vmlinuz-2.6.26-2-amd64 root=UUID=3------------------- ro quiet
initrd /boot/initrd.img-2.6.26-2-amd64
}
menuentry “Debian GNU/Linux, Linux 2.6.29-2-486 (TESTING-32 / sda6)” {
set root=(hd0,6)
search --no-floppy --fs-uuid --set 7---------------------------
linux /boot/vmlinuz-2.6.29-2-486 root=UUID=7--------------------- ro quiet
initrd /boot/initrd.img-2.6.29-2-486
}
menuentry “KUBUNTU 8.04.1, kernel 2.6.27-11-generic (sdb7)” {
set root=(hd1,7)
search --no-floppy --fs-uuid --set f----------------------
linux /boot/vmlinuz-2.6.27-11-generic root=UUID=f------------------- ro quiet
initrd /boot/initrd.img-2.6.27-11-generic
}
[/code]