Page 1 of 1

Uefi doesn't see flash drive

Posted: Sat Oct 24, 2026 11:50 am
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.

Re: Uefi doesn't see flash drive

Posted: Sat Oct 24, 2026 2:47 pm
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.

Re: Uefi doesn't see flash drive

Posted: Sat Oct 24, 2026 7:28 pm
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

Re: Uefi doesn't see flash drive

Posted: Sat Oct 24, 2026 8:53 pm
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.

Re: Uefi doesn't see flash drive

Posted: Sun Oct 25, 2026 6:58 am
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: