# Format image for UEFI



## webpr (Aug 26, 2016)

I want to mount the image in UEFI BIOS via Intel BMC.
Image create through mdconfig, mount its via JAVA applet  Intel BMC.
UEFI BIOS sees storage device, but not see files.

I tried gpart:

```
gpart create -s mbr da0
gpart add -t fat32 da0
newfs_msdos -F32 /dev/da0s1
```
I tried fresh format:

```
newfs_msdos -F32 /dev/da0
```
I tried fdisk:

```
fdisk -i /dev/da0
newfs_msdos -F32 /dev/da0s1
```

How format image for use in UEFI BIOS?


----------



## asteriskRoss (Aug 27, 2016)

From the FreeBSD development wiki page:


> *Real Hardware Gotchas*
> These are some issues I have run into when using real hardware (ie, not qemu).
> 
> Filesystem not seen. FreeBSD's FAT32 code appears to sometimes create filesystems that the UEFI code can't properly read. If the filesystem is small enough, use FAT16 or FAT12 instead. Please submit a PR with details if you are able to reproduce this.


I have experienced the same issue, though not yet submitted a PR.  Try creating your filesystem as FAT16 to see whether that works.

You could also create your FAT32 filesystem with another operating system.  FreeBSD will still be able to read and write to it.


----------



## webpr (Aug 27, 2016)

asteriskRoss said:


> You could also create your FAT32 filesystem with another operating system.


Yes, but I use FreeBSD on desktop and want to do all in it 

That's the conclusion fdisk from media formatted under MS Windows XP SP3:

```
# fdisk -s /dev/da1
/dev/da1: 504 cyl 255 hd 63 sec
Part        Start        Size Type Flags
   1:   778135908  1141509631 0x72 0x6f
   2:   168689522  1936028240 0x65 0x69
   3:  1869881465  1936028192 0x79 0x73
   4:  2885681152       55499 0x0d 0x74
```
I can not understand why such strange partition.


----------



## SirDice (Aug 29, 2016)

Please stop using fdisk(8), use gpart(8).


----------



## webpr (Aug 29, 2016)

That's the conclusion gpart from media formatted under MS Windows XP SP3:

```
# gpart show da1
gpart: No such geom: da1.
```


----------



## SirDice (Aug 30, 2016)

That would mean there's no partition table at all and the disk is used entirely.


----------



## wblock@ (Sep 1, 2016)

Disk Setup On FreeBSD: Booting with UEFI.


----------

