MAJ
This commit is contained in:
1 parent
6a65913c2c
commit
fb22fa8af7
143 files changed
+5657
-42
No files matched your search
Executable
+40
@@ -0,0 +1,40 @@
|
||||
#!/bin/sh
|
||||
# ============================================================================
|
||||
# FWS — entrée « Réparer FWS » dans le menu GRUB du SYSTÈME INSTALLÉ
|
||||
# (l'équivalent de l'environnement de récupération de Windows).
|
||||
#
|
||||
# Ce script est exécuté par grub-mkconfig (à l'installation via le %post du
|
||||
# kickstart, puis à chaque fws-recovery « Réinstaller GRUB »). Il démarre le
|
||||
# MÊME système sur fws-recovery.target (+ marqueur fws.recovery=1) :
|
||||
# fws-recovery-boot.service prend alors tty1 et lance l'application de
|
||||
# réparation (GUI via startx, repli console).
|
||||
#
|
||||
# Sur le live, ce fichier est inerte (grub-mkconfig n'y tourne jamais).
|
||||
# ============================================================================
|
||||
set -e
|
||||
. /usr/share/grub/grub-mkconfig_lib
|
||||
|
||||
kernel=/boot/vmlinuz-linux
|
||||
# L'initramfs FALLBACK (sans autodetect) : c'est l'entrée de secours, elle
|
||||
# doit démarrer même si le matériel a changé depuis le dernier mkinitcpio.
|
||||
initrd=/boot/initramfs-linux-fallback.img
|
||||
[ -f "$initrd" ] || initrd=/boot/initramfs-linux.img
|
||||
[ -f "$kernel" ] && [ -f "$initrd" ] || exit 0
|
||||
|
||||
# Même logique racine que 10_linux : UUID sauf refus explicite.
|
||||
if [ -n "${GRUB_DEVICE_UUID:-}" ] && [ "x${GRUB_DISABLE_LINUX_UUID:-}" != xtrue ]; then
|
||||
rootarg="root=UUID=$GRUB_DEVICE_UUID"
|
||||
else
|
||||
rootarg="root=$GRUB_DEVICE"
|
||||
fi
|
||||
|
||||
rel_kernel="$(make_system_path_relative_to_its_root "$kernel")"
|
||||
rel_initrd="$(make_system_path_relative_to_its_root "$initrd")"
|
||||
|
||||
cat <<EOF
|
||||
menuentry 'Réparer FWS (récupération du système)' --class recovery {
|
||||
$(prepare_grub_to_access_device "${GRUB_DEVICE_BOOT}" | grub_add_tab)
|
||||
linux $rel_kernel $rootarg rw ${GRUB_CMDLINE_LINUX:-} systemd.unit=fws-recovery.target fws.recovery=1
|
||||
initrd $rel_initrd
|
||||
}
|
||||
EOF
|
||||
Reference in new issue
Block a user