Installation slax - UEFI 64bits
Ce document décrit les étapes permettant l'installation d'une distribution Linux Slax avec amorçage UEFI 64bits.
Installation
Préparation de l'environnement hôte
Nous aurons besoin de formater l'ESP en FAT32. Il nous faut donc le paquet suivant permettant cette opération
apt install dosfstools
Repérez le support qui vous servira de disque système et initialisez une variable avec son chemin
export disque=/dev/sdb
Téléchargement des ressources
wget http://ftp.sh.cvut.cz/slax/Slax-9.x/slax-64bit-9.11.0.iso https://www.kernel.org/pub/linux/utils/boot/syslinux/Testing/6.04/syslinux-6.04-pre1.tar.gz -P /tmp/
Extraction des éléments de Syslinux
tar xzvf /tmp/syslinux-6.04-pre1.tar.gz -C /tmp/
Création des répertoires de travail
mkdir -p /tmp/slax/{source,cible}
montage du cédérom de Slax
mount -o loop,ro -t iso9660 /tmp/slax-64bit-9.11.0.iso /tmp/slax/source/
Préparation de l'invité
Partitionnement du disque système invité
<source lang="bash"> sed -e 's/\s*\([\+0-9a-zA-Z]*\).*/\1/' << "FDISK_CMDS" | fdisk ${disque} g # création d'un schéma de partition GPT n # ajouter une nouvelle partition 1 # partition 1
# par défaut - premier secteur
+512MiB # taille de la partition n # ajouter une nouvelle partition 2 # partition 2
# par défaut - premier secteur
# par défaut - dernier secteur
t # changement du type de partition 1 # partition 1 1 # partition système EFI (ESP) t # changement du type de partition 2 # partition 2 20 # système de fichier linux w # écrire la table de partitions et quitter FDISK_CMDS </source>
INFORMATION
Dans l'absolut, seul l'ESP est nécessaire à l'usage du système (Slax utilisant massivement des images squashfs couplées à des montages en union stockées dans celui-ci). L'ajout d'une partition ext4 apporte un espace persistant supplémentaire utilisant un système de fichier bien plus fiable que l'antique FAT32 (qui n'hésitera pas à corrompre vos données à la première occasion). Celle-ci sera monté automatiquement avec la session.Formatage des partitions
mkfs.vfat -F32 ${disque}1
mkfs.ext4 ${disque}2
Montage de l'ESP
mount -t vfat ${disque}1 /tmp/slax/cible
Copie des fichiers système
cp -axv /tmp/slax/source/slax /tmp/slax/cible/slax
Création du répertoire d'amorçage UEFI
mkdir -p /tmp/slax/cible/EFI/Boot
Copie du binaire de démarrage UEFI de Syslinux
cp /tmp/syslinux-6.04-pre1/efi64/efi/syslinux.efi /tmp/slax/cible/EFI/Boot/bootx64.efi
Copie des éléments du menu Syslinux
cp /tmp/syslinux-6.04-pre1/efi64/com32/elflink/ldlinux/ldlinux.e64 /tmp/syslinux-6.04-pre1/efi64/com32/menu/menu.c32 /tmp/syslinux-6.04-pre1/efi64/com32/lib/libcom32.c32 /tmp/syslinux-6.04-pre1/efi64/com32/libutil/libutil.c32 /tmp/syslinux-6.04-pre1/efi64/com32/menu/vesamenu.c32 /tmp/slax/cible/EFI/Boot/
Création du menu Syslinux
<source lang="bash"> cat > /tmp/slax/cible/EFI/Boot/syslinux.cfg << "SYSLINUXCFG" TIMEOUT 30 ONTIMEOUT slax
UI vesamenu.c32 MENU TITLE Slax (UEFI)
LABEL slax
MENU LABEL Run Slax (Changements persistants)
LINUX /slax/boot/vmlinuz
INITRD /slax/boot/initrfs.img
APPEND vga=normal load_ramdisk=1 prompt_ramdisk=0 rw printk.time=0 slax.flags=perch,automount
SYSLINUXCFG </source>
ASTUCE
{{{1}}}Vérifications
Voici les fichiers présents sur le support après réalisation des étapes décrites supra
find /tmp/slax/cible/
<source lang="bash"> /tmp/slax/cible/ /tmp/slax/cible/slax /tmp/slax/cible/slax/01-core.sb /tmp/slax/cible/slax/01-firmware.sb /tmp/slax/cible/slax/02-xorg.sb /tmp/slax/cible/slax/03-desktop.sb /tmp/slax/cible/slax/04-apps.sb /tmp/slax/cible/slax/05-chromium.sb /tmp/slax/cible/slax/boot /tmp/slax/cible/slax/boot/bootinst.bat /tmp/slax/cible/slax/boot/bootinst.sh /tmp/slax/cible/slax/boot/bootlogo.png /tmp/slax/cible/slax/boot/extlinux.x32 /tmp/slax/cible/slax/boot/extlinux.x64 /tmp/slax/cible/slax/boot/help.txt /tmp/slax/cible/slax/boot/initrfs.img /tmp/slax/cible/slax/boot/isolinux.bin /tmp/slax/cible/slax/boot/isolinux.boot /tmp/slax/cible/slax/boot/ldlinux.c32 /tmp/slax/cible/slax/boot/libcom32.c32 /tmp/slax/cible/slax/boot/libutil.c32 /tmp/slax/cible/slax/boot/mbr.bin /tmp/slax/cible/slax/boot/pxelinux.0 /tmp/slax/cible/slax/boot/runadmin.vbs /tmp/slax/cible/slax/boot/samedisk.vbs /tmp/slax/cible/slax/boot/syslinux.cfg /tmp/slax/cible/slax/boot/syslinux.com /tmp/slax/cible/slax/boot/syslinux.exe /tmp/slax/cible/slax/boot/vesamenu.c32 /tmp/slax/cible/slax/boot/vmlinuz /tmp/slax/cible/slax/boot/zblack.png /tmp/slax/cible/slax/changes /tmp/slax/cible/slax/modules /tmp/slax/cible/EFI /tmp/slax/cible/EFI/Boot /tmp/slax/cible/EFI/Boot/bootx64.efi /tmp/slax/cible/EFI/Boot/ldlinux.e64 /tmp/slax/cible/EFI/Boot/menu.c32 /tmp/slax/cible/EFI/Boot/libcom32.c32 /tmp/slax/cible/EFI/Boot/libutil.c32 /tmp/slax/cible/EFI/Boot/vesamenu.c32 /tmp/slax/cible/EFI/Boot/syslinux.cfg </source>
Votre système est prêt à démarraer en UEFI 64bits.