[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Limiter le nombre d'entrée Grub 2



m3t4linux a écrit :
Bonsoir à tous,

J'essaie de trouver un moyen de limiter le nombre d'entrées des différents noyaux dans Grub 2
Bonjour
Personnellement, j'édite /etc/boot/grub.cfg
C'est tout
La fin de mon fichier
:
### BEGIN /etc/grub.d/10_linux ###
menuentry "Debian GNU/Linux, Linux 2.6.30-8-deb" {
	insmod reiserfs
	set root=(hd0,2)
	linux	/boot/vmlinuz-2.6.30-8-deb root=/dev/sda2  ro
	initrd	/boot/initrd.img-2.6.30-8-deb
}
menuentry "Debian GNU/Linux, Linux 2.6.30-8-deb (recovery mode)" {
	insmod reiserfs
	set root=(hd0,2)
	linux	/boot/vmlinuz-2.6.30-8-deb root=/dev/sda2  ro single
	initrd	/boot/initrd.img-2.6.30-8-deb
}

menuentry "Linux 2.6.32.3" {
	insmod reiserfs
	set root=(hd0,2)
	linux	/boot/vmlinuz-2.6.32.3 root=/dev/sda2  ro
	initrd	/boot/initrd.img-2.6.32.3
}

### END /etc/grub.d/10_linux ###

Si quelqu'un connaît une meilleure solution, je suis preneur
Attention, toute mise à j de grub2 modifie le grub.cfg, donc prévoir sauvegarde.

Chez moi-update grub sème me bazar dans grub.config, donc je ne l'utilise pas.

Ces entrées ajoutées par update-grub provoquent un kernel panic

menuentry "Debian GNU/Linux, avec Linux 2.6.30-8-deb" {
	insmod reiserfs
	set root=(hd0,2)
	search --no-floppy --fs-uuid --set 395c38ea-a024-4533-9fe8-1a784ec1b9d5
linux /boot/vmlinuz-2.6.30-8-deb root=UUID=395c38ea-a024-4533-9fe8-1a784ec1b9d5 ro quiet
	initrd	/boot/initrd.img-2.6.30-8-deb
}
menuentry "Debian GNU/Linux, avec Linux 2.6.30-8-deb (mode de dépannage)" {
	insmod reiserfs
	set root=(hd0,2)
	search --no-floppy --fs-uuid --set 395c38ea-a024-4533-9fe8-1a784ec1b9d5
linux /boot/vmlinuz-2.6.30-8-deb root=UUID=395c38ea-a024-4533-9fe8-1a784ec1b9d5 ro single
	initrd	/boot/initrd.img-2.6.30-8-deb
}


not change NBLIST=$((0)) #Modification-end


Après plusieurs recherches via Google, je ne trouve rien de très efficace.

Je me doute qu'il faut modifier le fichier /etc/grub.d/10_linux mais sans plus d'inspiration.

J'ai trouvé ces paramètres à ajouter en début de fichiers :
#Modification-start # Number of version to display - can be changed to desired value NBLISTMAX=$((2)) # pre-filtering for kernel to use - can be changed to desired value PREFILTER="-2.6.31-" # post-filtering for kernel to use - can be changed to desired value POSTFILTER="-generic" # Intermediate variable - do > source : http://doc.ubuntu-fr.org/grub-pc-annexe

Mais un 'update-grub' ne change rien

Merci d'avance...

Cordialement


Reply to: