Voilà la configuration du système (c’est sur disque de serveur de fichier) :
- /dev/sda1 2048 1026047 1024000 500M Amorçage BIOS
- /dev/sda2 1026048 17803263 16777216 8G Partition d'échange Linux
- /dev/sda3 17803264 58763263 40960000 19,5G Système de fichiers Linux
- /dev/sda4 58763264 99723263 40960000 19,5G Système de fichiers Linux
- /dev/sda5 99723264 130279423 30556160 14,6G Système de fichiers Linux
- /dev/sda6 130279424 160835583 30556160 14,6G Système de fichiers Linux
Voici le
/etc/default/grub
Code : Tout sélectionner
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
#GRUB_SAVEDEFAULT="true"
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Arch"
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX=""
# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"
# Uncomment to enable Hidden Menu, and optionally hide the timeout count
#GRUB_HIDDEN_TIMEOUT=5
#GRUB_HIDDEN_TIMEOUT_QUIET=true
# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console
# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto
# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep
# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true
# Uncomment and set to the desired menu colors. Used by normal and wallpaper
# modes only. Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"
# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
#GRUB_THEME="/path/to/gfxtheme"
# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"
/etc/grub.d/40_custom
Code : Tout sélectionner
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
savedefault
menuentry 'Debian GNU/Linux, avec Linux 4.9.0-3-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.9.0-3-amd64-advanced-27b7deee-d3c4-440a-b211-408c77205fee' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
set root='hd0,gpt4'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4 27b7deee-d3c4-440a-b211-408c77205fee
else
search --no-floppy --fs-uuid --set=root 27b7deee-d3c4-440a-b211-408c77205fee
fi
echo 'Chargement de Linux 4.9.0-3-amd64…'
linux /boot/vmlinuz-4.9.0-3-amd64 root=/dev/sda4 ro quiet
echo 'Chargement du disque mémoire initial…'
initrd /boot/initrd.img-4.9.0-3-amd64
}
menuentry 'Debian GNU/Linux, with Linux 4.9.0-3-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-4.9.0-3-amd64-recovery-27b7deee-d3c4-440a-b211-408c77205fee' {
load_video
insmod gzio
if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
insmod part_gpt
insmod ext2
set root='hd0,gpt4'
if [ x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt4 --hint-efi=hd0,gpt4 --hint-baremetal=ahci0,gpt4 27b7deee-d3c4-440a-b211-408c77205fee
else
search --no-floppy --fs-uuid --set=root 27b7deee-d3c4-440a-b211-408c77205fee
fi
echo 'Chargement de Linux 4.9.0-3-amd64…'
linux /boot/vmlinuz-4.9.0-3-amd64 root=/dev/sda4 ro single
echo 'Chargement du disque mémoire initial…'
initrd /boot/initrd.img-4.9.0-3-amd64
}
menuentry 'Arrêt du système' {
halt
}
menuentry 'Redémarrage du système' {
reboot
}
Le soucis, c’est que la fonction de booter automatiquement sur le choix précédent ne fonctionne pas.
J’ai parcouru pas mal sur le net (wiki d’Archlinux.fr, celui d’Archlinux.org, celui d’Ubutu GRUB2 ainsi que le tuto sur Ubuntu pour le paramétrage manuel, plus d’autres sites, des forums, ...), mais le résultat est toujours le même : la fonction ne fonctionne pas…
Vous auriez une idée ou deux pour éclairer ma route ?
Je vous remercie pour les réponses.
Bonne soirée et bon week-end.