FAT32 UEFI compatibility

Open
#587 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
rust

Research direction

Compare how the dev and release profiles build FAT images and trace where the boot directory entries are written. Start by reading the image-building code and checking the reported fsck complaints about . and ..; then investigate whether forcing FAT32 resolves the UEFI filename issue. Done means release images are recognized as bootable by the reported Dell UEFI and their boot directory names display correctly.

Written by the indexing model from the issue text.

Description

Hello,

I am getting some strange behaviour as to when a USB drive image built by this crate gets recognised by my Dell Inspiron laptop UEFI as bootable. I was having an issue where when the image was built with the dev profile (producing a 9.1M) image, things booted fine, but with a 5.1M release image the drive would not be recognised by the UEFI firmware. I tested both images in QEMU, and they both work fine there. It looks like the images made by the fatfs crate are not fully FAT compliant (fsck complains about the . and .. entries anyway, there is supposed to be an upcoming release to fix it).

Specifically, when I tried manually adding a boot entry from the UEFI firmware, file names were garbled within the boot directory (e.g @H�...)

As a workaround, I made a fork of this repo where I force the FAT images to be built with FAT32, and this indeed gets it to boot. I don't know too much about EFI system partitions or FAT in general but I read that FAT32 has better support which is why I tried that.

I know that fatfs is a dependency so I am not sure if there is much this crate can do about it.

Dominant language
Rust
Stars
1.7k
Forks
241
Avg merge
2d 19h
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rust-osdev/bootloader

All issues in rust-osdev/bootloader

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.