Theme GRUB graphique tactile pour triple boot
- Fond sombre avec degradé - Icônes 96x96 pour chaque projet (PB, PS, ?) - Grosses polices DejaVu pour ecran tactile - Highlight de selection bleu - GRUB_TIMEOUT=-1 : attend la selection (pas de timeout) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -248,24 +248,47 @@ mount --bind /proc "$MNT/proc"
|
||||
mount --bind /sys "$MNT/sys"
|
||||
mount --bind /run "$MNT/run"
|
||||
|
||||
# Creer les entrees GRUB personnalisees
|
||||
# === THEME GRUB TACTILE ===
|
||||
info "Installation du theme GRUB tactile..."
|
||||
|
||||
THEME_DEST="$MNT/boot/grub/themes/terra"
|
||||
mkdir -p "$THEME_DEST/icons"
|
||||
|
||||
# Copier le theme depuis le repo clone
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
if [ -d "$SCRIPT_DIR/grub-theme" ]; then
|
||||
cp "$SCRIPT_DIR/grub-theme/theme.txt" "$THEME_DEST/"
|
||||
cp "$SCRIPT_DIR/grub-theme/background.png" "$THEME_DEST/"
|
||||
cp "$SCRIPT_DIR/grub-theme/select_"*.png "$THEME_DEST/"
|
||||
cp "$SCRIPT_DIR/grub-theme/icons/"*.png "$THEME_DEST/icons/"
|
||||
else
|
||||
warn "Theme GRUB non trouve dans $SCRIPT_DIR/grub-theme, theme par defaut"
|
||||
fi
|
||||
|
||||
# Installer les polices GRUB
|
||||
chroot "$MNT" bash -c 'grub-mkfont -s 36 -o /boot/grub/fonts/DejaVuSansBold36.pf2 /usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf 2>/dev/null || true'
|
||||
chroot "$MNT" bash -c 'grub-mkfont -s 42 -o /boot/grub/fonts/DejaVuSansBold42.pf2 /usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf 2>/dev/null || true'
|
||||
chroot "$MNT" bash -c 'grub-mkfont -s 18 -o /boot/grub/fonts/DejaVuSans18.pf2 /usr/share/fonts/truetype/dejavu/DejaVuSans.ttf 2>/dev/null || true'
|
||||
chroot "$MNT" bash -c 'grub-mkfont -s 24 -o /boot/grub/fonts/DejaVuSansBold24.pf2 /usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf 2>/dev/null || true'
|
||||
|
||||
# Creer les entrees GRUB personnalisees avec icones
|
||||
cat > "$MNT/etc/grub.d/40_custom" <<GRUB
|
||||
#!/bin/sh
|
||||
exec tail -n +3 \$0
|
||||
|
||||
menuentry "Photobooth" {
|
||||
menuentry "Photobooth" --class photobooth {
|
||||
search --no-floppy --fs-uuid --set=root $UUID_1
|
||||
linux /boot/vmlinuz-\$(ls /mnt/photobooth/boot/ | grep vmlinuz | head -1 | sed 's/vmlinuz-//') root=UUID=$UUID_1 ro quiet splash
|
||||
initrd /boot/initrd.img-\$(ls /mnt/photobooth/boot/ | grep initrd | head -1 | sed 's/initrd.img-//')
|
||||
}
|
||||
|
||||
menuentry "Photostation" {
|
||||
menuentry "Photostation" --class photostation {
|
||||
search --no-floppy --fs-uuid --set=root $UUID_2
|
||||
linux /boot/vmlinuz-\$(ls /mnt/photostation/boot/ | grep vmlinuz | head -1 | sed 's/vmlinuz-//') root=UUID=$UUID_2 ro quiet splash
|
||||
initrd /boot/initrd.img-\$(ls /mnt/photostation/boot/ | grep initrd | head -1 | sed 's/initrd.img-//')
|
||||
}
|
||||
|
||||
menuentry "Autre" {
|
||||
menuentry "Autre" --class autre {
|
||||
search --no-floppy --fs-uuid --set=root $UUID_3
|
||||
linux /boot/vmlinuz-\$(ls /mnt/autre/boot/ | grep vmlinuz | head -1 | sed 's/vmlinuz-//') root=UUID=$UUID_3 ro quiet splash
|
||||
initrd /boot/initrd.img-\$(ls /mnt/autre/boot/ | grep initrd | head -1 | sed 's/initrd.img-//')
|
||||
@@ -273,17 +296,23 @@ menuentry "Autre" {
|
||||
GRUB
|
||||
chmod +x "$MNT/etc/grub.d/40_custom"
|
||||
|
||||
# Desactiver os-prober et les entrees auto pour eviter les doublons
|
||||
# Desactiver os-prober, activer le theme graphique
|
||||
cat > "$MNT/etc/default/grub" <<GRUBCFG
|
||||
GRUB_DEFAULT=0
|
||||
GRUB_TIMEOUT=5
|
||||
GRUB_TIMEOUT=-1
|
||||
GRUB_DISTRIBUTOR="Triple Boot Terra"
|
||||
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
|
||||
GRUB_CMDLINE_LINUX=""
|
||||
GRUB_DISABLE_OS_PROBER=true
|
||||
GRUB_DISABLE_RECOVERY=true
|
||||
GRUB_THEME=/boot/grub/themes/terra/theme.txt
|
||||
GRUB_GFXMODE=1920x1080,auto
|
||||
GRUB_GFXPAYLOAD_LINUX=keep
|
||||
GRUBCFG
|
||||
|
||||
# Installer les polices DejaVu pour le theme
|
||||
chroot "$MNT" apt-get install -y -qq fonts-dejavu-core 2>/dev/null || true
|
||||
|
||||
chroot "$MNT" update-grub
|
||||
|
||||
# Nettoyer
|
||||
|
||||
Reference in New Issue
Block a user