Vous n'êtes pas identifié(e).
L'icône rouge permet de télécharger chaque page du wiki visitée au format PDF et la grise au format ODT →
Ceci est une ancienne révision du document !
(non testé - mytux 09/08/13) Le retour sur le forum est ici : [WIKI] Tuto, Refind boot iso from UEFI ou EFI
N'hésitez pas à y faire part de vos remarques, succès, améliorations ou échecs !
Depuis peu, certain ordinnateurs achetés dans le commerce avec windows préinstallé sont équipés de ce nouveau firmware apppelé UEFI.
Qu'est ce que l'UEFI ?
Citation Wipedia : “La norme Unified Extensible Firmware Interface (UEFI, « interface micro-logicielle extensible unifiée ») définit un logiciel intermédiaire entrele micrologiciel (firmware) et le système d'exploitation (OS) d'un ordinateur. Cette interface succède sur certaines cartes-mères au BIOS. Elle fait suite à EFI (Extensible Firmware Interface), conçue par Intel pour les processeurs Itanium.”
Malheureusement toutes les distributions ne sont pas équipés d' un bootloader capable de démarrer sur ce nouveau logiciel, heureusement un certain Roderick W.Smith à développer un fork de Refit. Refind un bootmanager qui donne la main à un bootloader traditionnel.
Page officiel de Refind: http://www.rodsbooks.com/refind/
Commençons tout d'abord par télécharger ce fameux bootmanager, rendez vous à :http://sourceforge.net/projects/refind/ et télécharger le la dernière version en paquet debian enregistrer le par exemple dans ~/refind
En ligne de commande on extrait cet archive à l'aide de dpkg.
$ cd ~/refind $ dpkg -x refind_0.7.3-1_amd64.deb ./ $ ls etc/ usr/
Les fichiers qui nous intéresses sont situés dans usr/share/refind-0.7.3/refind/
$ cd usr/share/refind-0.7.3/refind/ $ls drivers_x64 icons tools_x64 refind_x64.efi refind.conf-sample
On renomme refind_x64.efi
$ mv refind_x64.efi bootx64.efi
Premièrement nous allons créer les répertoire qui vont accueillir notre bootmanager.
$ mkdir -p ~/EFI/boot/
On copie tout ce qui est dans le répertoire ~/refind/usr/share/refind-0.7.3/refind/ dans ~/EFI/boot/
$ cp -a ~/refind/usr/share/refind-0.7.3/refind/* ~/EFI/boot/ $ cd ~/EFI/boot/ $ ls -l -rw-r--r-- 1 axel axel 173608 août 7 18:05 bootx64.efi drwxr-xr-x 2 axel axel 4096 août 7 18:05 drivers_x64 drwxr-xr-x 2 axel axel 4096 août 7 18:05 icons -rw-r--r-- 1 axel axel 17925 juil. 20 21:56 refind.conf-sample drwxr-xr-x 2 axel axel 4096 août 7 18:05 tools_x64
On rend éxècutable tous ça.
$ chmod -R +x *
Cette partie va se faire principalement en root donc un petit :
$ sudo su #
Nous allon créer une table de partition GPT sur notre clé usb, ensuite une partition de démarrage EFI Filesystem pour refind, une seconde partion Linux Filesystem pour acceuillir notre image iso.
Pour cela nous aurons besoin de gdisk. Généralement il n'est pas installé par défault, vous aurez besoin de l'installer.
# sudo apt-get install gdisk # gdisk /dev/sdb (ou le périphérique correspondant à votre clé usb) GPT fdisk (gdisk) version 0.8.5 Partition table scan: MBR: MBR only BSD: not present APM: not present GPT: not present *************************************************************** Found invalid GPT and valid MBR; converting MBR to GPT format. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by typing 'q' if you don't want to convert your MBR partitions to GPT format! *************************************************************** Warning! Secondary partition table overlaps the last partition by 33 blocks! You will need to delete this partition or resize it in another utility. Command (? for help): ?
Comande h ou ? pour afficher l'aide.
b back up GPT data to a file c change a partition's name d delete a partition i show detailed information on a partition l list known partition types n add a new partition o create a new empty GUID partition table (GPT) p print the partition table q quit without saving changes r recovery and transformation options (experts only) s sort partitions t change a partition's type code v verify disk w write table to disk and exit x extra functionality (experts only) ? print this menu Command (? for help): o
Commande <o> pour créer une nouvelle table de partition.
This option deletes all partitions and creates a new protective MBR. Proceed? (Y/N): y
Vous pouvez confirmer, assurez vous d'avoir sauvegarder vos données existante.
Commande (? for help): n
Partition number (1-128, default 1): 1
Commande <1 ou enter> pour le choix par défaut
First sector (34-7716830, default = 2048) or {+-}size{KMGTP}: 2048 Commande <entrer> choix par défaut Last sector (2048-7716830, default = 7716830) or {+-}size{KMGTP}: +10M
Commande <+50M> 50 Mo suffiront largement
Current type is 'Linux filesystem' Hex code or GUID (L to show codes, Enter = 8300): L
Commande <L> pour connaître les codes connues
0700 Microsoft basic data 0c01 Microsoft reserved 2700 Windows RE 4200 Windows LDM data 4201 Windows LDM metadata 7501 IBM GPFS 7f00 ChromeOS kernel 7f01 ChromeOS root 7f02 ChromeOS reserved 8200 Linux swap 8300 Linux filesystem 8301 Linux reserved 8e00 Linux LVM a500 FreeBSD disklabel a501 FreeBSD boot a502 FreeBSD swap a503 FreeBSD UFS a504 FreeBSD ZFS a505 FreeBSD Vinum/RAID a580 Midnight BSD data a581 Midnight BSD boot a582 Midnight BSD swap a583 Midnight BSD UFS a584 Midnight BSD ZFS a585 Midnight BSD Vinum a800 Apple UFS a901 NetBSD swap a902 NetBSD FFS a903 NetBSD LFS a904 NetBSD concatenated a905 NetBSD encrypted a906 NetBSD RAID ab00 Apple boot af00 Apple HFS/HFS+ af01 Apple RAID af02 Apple RAID offline af03 Apple label af04 AppleTV recovery af05 Apple Core Storage be00 Solaris boot bf00 Solaris root bf01 Solaris /usr & Mac Z bf02 Solaris swap bf03 Solaris backup bf04 Solaris /var bf05 Solaris /home bf06 Solaris alternate se bf07 Solaris Reserved 1 bf08 Solaris Reserved 2 bf09 Solaris Reserved 3 bf0a Solaris Reserved 4 bf0b Solaris Reserved 5 c001 HP-UX data c002 HP-UX service ef00 EFI System ef01 MBR partition scheme ef02 BIOS boot partition fd00 Linux RAID Hex code or GUID (L to show codes, Enter = 8300): ef00
Commande <ef00> pour un système EFI.
Créer une seconde partition de même sur le reste de la clé ou d'une taille suffisante pour copier votre image iso dessus, mais cette fois avec le Filesystem Linux par défaut (Hex code 8300).
Command (? for help): p Disk /dev/sdb: 7716864 sectors, 3.7 GiB Logical sector size: 512 bytes Disk identifier (GUID): 734165E0-59BE-47CE-8773-64FCCC709443 Partition table holds up to 128 entries First usable sector is 34, last usable sector is 7716830 Partitions will be aligned on 2048-sector boundaries Total free space is 7696317 sectors (3.7 GiB) Number Start (sector) End (sector) Size Code Name 1 2048 22527 50.0 MiB EF00 EFI System 2 22528 7716830 3.7 GiB 8300 Linux filesystem
Commande <p> pour afficher la table de partition.
Command (? for help): w Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING PARTITIONS!! Do you want to proceed? (Y/N): y OK; writing new GUID partition table (GPT) to /dev/sdb. Warning: The kernel is still using the old partition table. The new table will be used at the next reboot. The operation has completed successfully. $
Commande <w> pour sauvegarder les changements
Voilà on a notre partition EFI pour accueillir Refind.
Créer une seconde partition de même sur le reste de la clé ou d'une taille suffisante pour copier votre image iso dessus, mais cette fois avec le Filesystem Linux par défaut (Hex code 8300)
# mkfs.vfat -F32 /dev/sdb1 mkfs.vfat 3.0.14 (23 Jan 2023) # mkfs.vfat -F32 /dev/sdb2 mkfs.vfat 3.0.14 (23 Jan 2023) # blkid /dev/sdb1: LABEL="jump" UUID="339F-2ABE" TYPE="vfat" SEC_TYPE="msdos" /dev/sdb2: UUID="3568-43B4" TYPE="vfat"
# mkdir -p /media/refind # mkdir -p /media/iso # mount /dev/sdb1 /media/refind # mount /dev/sdb2 /media/iso
# cp -r ~/EFI /media/refind
Pour la seconde partitions nous allons utiliser Unetbootin.
Télécharger une image iso, par exemple Crunbang ou LMDE, 64bit. Installer votre iso sur /dev/sdb2, avec Unetbootin.
Une fois terminer éxécuter mount. Vous devriez avoir quelque chose comme ça en sortie.
$ mount /dev/sdb1 on /media/refind type vfat (rw) /dev/sdb2 on /media/Debian-Live type vfat (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)
Pour cette seconde troisième partie nous allons nous attaquer le fichier de configuration refind.conf qui ce trouve sur notre clé usb.
$ cd /media/refind/EFI/boot
Là vous devriez avoir un fichier refind.conf-sample, vous pouvez l' éxaminer, il est assez long mais il y a plein de commentaires et quelques modèles.
Nous nous allons en créer un beaucoup plus cours.(j'ai récupere ce fichier, dans l'iso de manjaro, cette iso ma beaucoup aidé pour le fonctionnement de refind))
timeout 5 hideui singleuser textonly #resolution 1024 768 use_graphics_for osx showtools about,reboot,shutdown,exit scan_driver_dirs EFI/boot/drivers_x64 scanfor manual,internal,external,optical scan_delay 1 #also_scan_dirs boot dont_scan_dirs EFI/boot #scan_all_linux_kernels max_tags 0 default_selection "Debian Live" menuentry "Debian Live" { icon /EFI/boot/icons/os_linux.icns volume 1: loader /live/vmlinuz initrd /live/initrd.img ostype Linux graphics off options "ro root=UUID=3568-43B4 add_efi_memmap config boot=live" } menuentry "UEFI x64 Shell v2" { icon /EFI/boot/icons/tool_shell.icns loader /EFI/tools/shellx64_v2.efi graphics off } menuentry "UEFI x64 Shell v1" { icon /EFI/boot/icons/tool_shell.icns loader /EFI/tools/shellx64_v1.efi graphics off }
Bien sûr ceci n'est qu'un exemple il faut que vous éditiez refind.conf en prenant exemple sur les fichiers qui sont sur votre iso.
scan_driver_dir : Faites attention que le chemin corresponde bien.
volume 1: : Correspond au deuxième périphérique de stockage donc votre clé usb <0:> étant /dev/sda.
loader : Correspond au chemin de l'image du noyau.
initrd : Correspond au chemin de l' image RAM.
ro root=UUID=3568-43B4 : Un simple blkid vous renseigne sur ce numéro.
Options : reporter les options qui sont dans le fichier isolinux/live.cfg, n'oubliez pas les guillemets et add_efi_memmap
Pour les autres Options, regardez le fichier refind.conf-sample.
Vous remarquerez la présence de menuentry “UEFI x64 Shell v2”
Et oui, il ya un Shell UEFI vous pouvez les télécharger sur Archlinux
Et pour la forme: EFI Shells and Scripting
Si les fichier de configuration sont niquels, et que vous les avez préparer au petits oignons. On peut redémmarer, <échap> ou je ne sais quelle touche, pour booter UEFI USB NMAP je sais pas quoi.
Normalement Refind se lance, il scan vos disques, et là si tous est bien configurer vous choisisssez Debian Live.
Si cela ne fonctionne pas revoyez votre refind.conf, ou bien postez un message sur le forum.
J 'espère que ce tuto sera utile, j'ai moi même galéré pour démmarer certaine iso sur mon laptop acheté avec Windows 8 préinstallé.
Refind fait des miracles ;)