# Problem booting FreeBSD from flash drive or even existing system



## kAldown (Jul 28, 2015)

Long time no see. 
Couple weeks ago I want to give a try to Arch-linux. After installing I found that I have no boot option for FreeBSD in my UEFI firmware. dd'ing new arm64-uefi-mini-boot.img flash with FreeBSD 10.1 I faced problem booting from flash. I think it's because boot sequence goes through partitions and boot first freebsd-ufs filesystem which is /dev/sda4.  More over I think I ruined /var partition, just because it was #6, and I `mkswap [FILE]/dev/sda6[/FILE]` for Arch-linux, it was a mistake (actually swap was /dev/sda5).  When I try to use my UEFI firmware to boot from /boot/efi/BOOTx64.efi, it boots Windows (yeah, I got Windows too).

How can I boot FreeBSD 10.1, and add option to boot it from UEFI firmware again? I guess it would be something like:

```
mdconfig -a -f /boot/boot1.efifat #from flash or somewhere else
mount_msdosfs /dev/mdo0 /mnt
cp /mnt/boot/efi/BOOTx64.efi /boot/BOOTx64.efi #/boot - already created partition
umount /mnt
mdconfig -d -u 0
```
Thanks a lot.


----------



## kAldown (Jul 29, 2015)

```
efipart_readwrite rw=1 status=9223372036854775810
don' know how to load module
/boot/kernel/kernel
can't load kernel
```
That's the output


----------

