1,330
edits
No edit summary |
|||
Line 22: | Line 22: | ||
== | == How to create a bootabled GPT-partitioned USB-stick with Fedora 23 == | ||
This will create a USB stick capable to | This will create a USB stick capable to | ||
* EFI boot on | * EFI boot on Macs | ||
* UEFI boot on | * UEFI boot on PCs | ||
* BIOS boot on newer hardware (legacy boot / CSM enabled) | * BIOS boot on newer hardware (legacy boot / CSM enabled in BIOS) | ||
* BIOS | * BIOS boot on medium aged hardware | ||
* not boot on really old BIOS hardware which doesn't support booting from GPT (see below) | |||
=== GPT partition the stick using gdisk === | === GPT partition the stick using gdisk === | ||
The example shows a 32 GB Sandisk Extreme: | The example shows a 32 GB Sandisk Extreme: | ||
Part 1: +1G VFAT | Part 1: +1G VFAT (0700) (Windows needs it to be the first partition) | ||
Part 2: +1M Biosboot | Part 2: +1M Biosboot (ef02) | ||
Part 3: +250M EFI | Part 3: +250M EFI (ef00) | ||
Part 4: +13500M / | Part 4: +13500M / (0083) | ||
Part 5: +15000M /mnt/data (0083) | Part 5: +15000M /mnt/data (0083) | ||
For performance, make sure that the big partitions are aligned to 8192-sector boundaries; 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 Fedora23 on an UEFI machine (UEFI enabled; LegacyBoot / CSM disabled) === | === Install Fedora23 on an UEFI machine (UEFI enabled; LegacyBoot / CSM disabled) === | ||
Whenever you see a ?, you must fill in the appropriate drive letter (e.g. c or d). | Whenever you see a ?, you must fill in the appropriate drive letter (e.g. c or d). | ||
sd?3: efi | sd?3: efi /boot/efi | ||
sd?4: ext4 | sd?4: ext4 / | ||
sd?5: ext4 | sd?5: ext4 /mnt/data | ||
=== adjust the USB-stick for UEFI/EFI boot (before reboot from chroot environment) === | === adjust the USB-stick for UEFI/EFI boot (before reboot from chroot environment) === | ||
Line 52: | Line 52: | ||
install updates: | install updates: | ||
dnf -y update | dnf -y update # dnf on FC23 is successor to yum | ||
configure grub2 for (U)EFI systems: | configure grub2 for (U)EFI systems: | ||
Line 125: | Line 125: | ||
dd if=/dev/zero of=/mountpoint/delete.me bs=65536 # this will stop when filesystem full | dd if=/dev/zero of=/mountpoint/delete.me bs=65536 # this will stop when filesystem full | ||
rm /mountpoint/delete.me | rm /mountpoint/delete.me | ||
Better: use the (enhanced) SECURITY ERASE UNIT feature of hdparm (quicker, and nicer for the device). | Better: use the (enhanced) SECURITY ERASE UNIT feature of hdparm (quicker, and nicer for the device, but tricky to use). | ||
save a compressed disk image - we use the parallel gzip program called pigz: | save a compressed disk image - we use the parallel gzip program called pigz: |