Uefi doesn't see flash drive

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Woosos
Posts: 1
Joined: Sat Oct 24, 2026 11:19 am

Uefi doesn't see flash drive

Post by Woosos »

Hello guys!

I have a question. I recently made a tiny OS for UEFI on c++, and my brother gave me a Samsung laptop (with UEFI), and it was made in 2015. But I don't know how to boot my OS, I've already tried.img, I even just put files on a flash drive, but it doesn't see my flash drive. Should I create .iso or something else? csm and secure boot are disabled.

thanks.
icr09
Posts: 23
Joined: Fri Oct 02, 2026 3:06 pm
Discord: https://discord.com/invite/icr09
GitHub: https://github.com/icarotelesdasilva/

Re: Uefi doesn't see flash drive

Post by icr09 »

Just a heads-up before I begin my explanation: if your kernel is legacy/MBR, it won't work if your computer doesn't support it.


Follow exactly what I say here, provided your system is functional in QEMU.


minimum requirements for a UEFI loader (the bare minimum I managed to get working)

Your kernel must be generated as a file named:

bootx64.efi or bootx32.efi. I assume that if it is on an EFI system, it is 64-bit, but this explanation applies to both. Your flash drive must be formatted as FAT32; then, open the flash drive and create the following folders:


mkdir -p EFI/BOOT/bootx64.efi

Conversely, if this file directory does not exist or is not in FAT32 format, it will be ignored; I recommend using a flash drive configured via Rufus.

as this is the minimum required for the UEFI to support a charger.




ex: 📂 (your media on FAT32)

└── 📂 EFI

└── 📂 BOOT

└── 📄 BOOTX64.EFI (or corresponding to the architecture)

If you’d like some help, reach out to me on Discord—my username is 'icr09'. I’ll be keeping an eye out for friend requests.
low overall standard :twisted:
User avatar
BenLunt
Member
Member
Posts: 1041
Joined: Sat Nov 22, 2014 6:33 pm
Location: USA
Contact:

Re: Uefi doesn't see flash drive

Post by BenLunt »

I ran into something similar a little while ago.

How to get my code to boot on real hardware using UEFI?

There are a few specifics that you must conform to.
1) Your GPT must occupy the whole thumb drive.
2) You must have a valid FAT file system installed.
3) The name of the file must be correct depending on the platform.
4) the file itself must be built to boot via EFI.

Ben
Octocontrabass
Member
Member
Posts: 6282
Joined: Mon Mar 25, 2013 7:01 pm

Re: Uefi doesn't see flash drive

Post by Octocontrabass »

BenLunt wrote: ↑Sat Oct 24, 2026 7:28 pm1) Your GPT must occupy the whole thumb drive.
Windows uses MBR-partitioned USB flash drives. Firmware vendors usually only care about Windows, so I would avoid GPT since it may not work on some PCs. Some firmware is known to reject unpartitioned USB drives, so there is precedent.
BenLunt wrote: ↑Sat Oct 24, 2026 7:28 pm2) You must have a valid FAT file system installed.
Windows uses FAT32. Some firmware is known to reject FAT16 and FAT12.
icr09
Posts: 23
Joined: Fri Oct 02, 2026 3:06 pm
Discord: https://discord.com/invite/icr09
GitHub: https://github.com/icarotelesdasilva/

Re: Uefi doesn't see flash drive

Post by icr09 »

Octocontrabass wrote: ↑Sat Oct 24, 2026 8:53 pm
BenLunt wrote: ↑Sat Oct 24, 2026 7:28 pm1) Your GPT must occupy the whole thumb drive.
Windows uses MBR-partitioned USB flash drives. Firmware vendors usually only care about Windows, so I would avoid GPT since it may not work on some PCs. Some firmware is known to reject unpartitioned USB drives, so there is precedent.
BenLunt wrote: ↑Sat Oct 24, 2026 7:28 pm2) You must have a valid FAT file system installed.
Windows uses FAT32. Some firmware is known to reject FAT16 and FAT12.
Well, as far as I know and based on what I did I just used Rufus to set up the structure and then placed the bootloader inside it. :roll:
low overall standard :twisted:
Post Reply