1,330
edits
Line 21: | Line 21: | ||
== How to create a bootabled GPT-partitioned USB-stick with Fedora == | == How to create a bootabled GPT-partitioned USB-stick with Fedora == | ||
Adjust the BIOS to have UEFI enabled, and LegacyBoot / CSM disabled. | |||
The steps below will then create a USB stick capable to | |||
* EFI boot on Macs | * EFI boot on Macs | ||
* UEFI boot on PCs | * UEFI boot on PCs | ||
Line 28: | Line 30: | ||
* BIOS boot on medium aged hardware | * BIOS boot on medium aged hardware | ||
* not boot on really old BIOS hardware which doesn't support booting from GPT (see below) | * not boot on really old BIOS hardware which doesn't support booting from GPT (see below) | ||
=== GPT partition the stick using <code>gdisk</code> === | === GPT partition the stick using <code>gdisk</code> === | ||
Line 38: | Line 41: | ||
For performance, make sure that the big partitions are aligned to 8192-sector boundaries; gdisk default is 2048-sector boundaries - the default can be adjusted. If you use the above sizes and the + sign for specifying them, this happens to work out automatically. | For performance, make sure that the big partitions are aligned to 8192-sector boundaries; gdisk default is 2048-sector boundaries - the default can be adjusted. If you use the above sizes and the + sign for specifying them, this happens to work out automatically. | ||
=== install Fedora | === install Fedora === | ||
Note: in the following, whenever you see the X in sdX, you must fill in the appropriate drive letter (e.g. a or b or c or d or ...). | Note: in the following, whenever you see the X in sdX, you must fill in the appropriate drive letter (e.g. a or b or c or d or ...). | ||
sdX3: efi /boot/efi | sdX3: efi /boot/efi | ||
Line 86: | Line 89: | ||
=== Install grub2 for BIOS boot (from chroot environment) === | === Install grub2 for BIOS boot (from chroot environment) === | ||
boot Fedora Live DVD | Next, change the BIOS to allow non-UEFI (legacy) boot. | ||
Then, boot Fedora Live DVD and enter in a terminal: | |||
mount /dev/sdX4 /mnt | mount /dev/sdX4 /mnt | ||
mount -o bind /dev /mnt/dev | mount -o bind /dev /mnt/dev | ||
Line 97: | Line 102: | ||
grub2-install /dev/sdX | grub2-install /dev/sdX | ||
grub2-mkconfig -o /etc/grub2.cfg | grub2-mkconfig -o /etc/grub2.cfg | ||
(on UEFI systems /boot/grub2/grubenv is a symlink to /boot/efi/EFI/fedora/grubenv (from package grub2-efi.rpm). The symlink has to be removed before grub2-install can finish successfully, it automatically creates a new file /boot/grub2/grubenv (as in package grub2.rpm) | (on UEFI systems, /boot/grub2/grubenv is a symlink to /boot/efi/EFI/fedora/grubenv (from package grub2-efi.rpm). The symlink has to be removed before grub2-install can finish successfully, it automatically creates a new file /boot/grub2/grubenv (as in package grub2.rpm) | ||
check /etc/grub2.cfg and if needed, change at all positions: | check /etc/grub2.cfg and if needed, change at all positions: |