# Create FreeBSD bootable USB disk, can't boot from EFI.



## zoujiaqing (Feb 19, 2020)

Plan 1:

I using `dd` command to create USB disk from Debian Linux:


```
dd if=FreeBSD-12.1-RELEASE-amd64-memstick.img of=/dev/sda bs=1M
```

Error info:

```
Boot Error.
```

Plan 2:

I using UltraISO to create bootable USB disk on Windows! But, laptop boot menu can't find it ...


----------



## Sevendogsbsd (Feb 19, 2020)

By "USB disk" do you mean thumb drive? If so, how large is the thumb drive? Are you booting in UEFI mode?


----------



## eternal_noob (Feb 19, 2020)

zoujiaqing said:


> dd if=FreeBSD-12.1-RELEASE-amd64-memstick.img of=/dev/sda bs=1M


You should use `sync` after, so that all outstanding write operations are actually performed. Maybe you forgot it and the image hasn't been written completely?


----------



## Hakaba (Feb 19, 2020)

On my MSI laptop, I can not boot on freebsd without rEFInd. I don't know  why.
I have this kind of issue with linux drive too (have to boot with no-modeset and other config or use rEFInd).
I have an another stange issue : booting from usb3 key failed. I have to use usb2 key (all my usb3 key are the same model, maybe it is an issue with this particular model).
I create all my usb disk (linux/freebsd) with the dd method on linux or mac OS X. The same method works fine with a usb2 stick and failed with usb3.


----------



## zoujiaqing (Feb 19, 2020)

Yes, I mean is "Bootable device", thanks! But my laptop only support from UEFI mode .


----------



## zoujiaqing (Feb 19, 2020)

freebsd_noob said:


> You should use `sync` after, so that all outstanding write operations are actually performed. Maybe you forgot it and the image hasn't been written completely?


Yes, I use `sync` command after! USB disk is ufs2? why not fat32? I mount it:

```
sodu mount -t ufs -o ufstype=ufs2 /dev/sda5 /mnt
```

Looked written completely..

But, booting is `Boot Faild!`..


----------



## Vadim_Mkk (Feb 19, 2020)

use Balena Etcher for record USB boot in the Linux or Windows..It correct writes  iso and img FreeBSD distro...
Don use ultraiso rufus and other Windows application except   Win32image from Handbook...


----------



## zoujiaqing (Feb 19, 2020)

Vadim_Mkk said:


> use Balena Etcher for record USB boot in the Linux or Windows..It correct writes  iso and img FreeBSD distro...
> Don use ultraiso rufus and other Windows application except   Win32image from Handbook...


Thank you! I will try now!


----------



## zoujiaqing (Feb 20, 2020)

Vadim_Mkk said:


> use Balena Etcher for record USB boot in the Linux or Windows..It correct writes  iso and img FreeBSD distro...
> Don use ultraiso rufus and other Windows application except   Win32image from Handbook...


Sorry! Can't booting .. and "Boot Fail"


----------



## Zvoni (Feb 20, 2020)

Vadim_Mkk said:


> use Balena Etcher for record USB boot in the Linux or Windows..It correct writes  iso and img FreeBSD distro...
> Don use ultraiso rufus and other Windows application except   Win32image from Handbook...


Would have to disagree. I have used Rufus to create my FreeBSD-USB-drive and it works without problems.
In Rufus i can even use an ISO-image instead of the "img" as source


----------



## Hakaba (Feb 20, 2020)

Have you the same issue with linux or rEFInd usb drive ?
If no, you maybe have the same issue as mine here


----------



## zoujiaqing (Feb 20, 2020)

Zvoni said:


> Would have to disagree. I have used Rufus to create my FreeBSD-USB-drive and it works without problems.
> In Rufus i can even use an ISO-image instead of the "img" as source


It should be EFI startup. The windows image of UEFI also has no way to start. However, the Windows startup disk that can be generated by mediacreationtool.exe tool can be used.


----------



## SirDice (Feb 20, 2020)

zoujiaqing said:


> But my laptop only support from UEFI mode .


Are you sure? Most UEFI implementations allow you to configure it for CSM: https://en.wikipedia.org/wiki/Unified_Extensible_Firmware_Interface#CSM_booting


----------



## Zvoni (Feb 20, 2020)

IIRC, for an USB-Drive to be bootable in UEFI mode, its EFI-Partion must have the flags "boot" and "esp".
After creation of the USB-Drive just check , e.g. with GParted, if the flags are there.
the CSM-Mode SirDice mentioned not withstanding.
That one works definitely.
....Well, as long as SecureBoot is off in the BIOS...


----------



## SirDice (Feb 20, 2020)

What is the make and model of the laptop? On some implementations the option might be named slightly different.


----------



## zoujiaqing (Feb 20, 2020)

Zvoni said:


> IIRC, for an USB-Drive to be bootable in UEFI mode, its EFI-Partion must have the flags "boot" and "esp".
> After creation of the USB-Drive just check , e.g. with GParted, if the flags are there.
> the CSM-Mode SirDice mentioned not withstanding.
> That one works definitely.
> ....Well, as long as SecureBoot is off in the BIOS...


Yes, I booted it! Change SecureBoot to disabled in BIOS! But linux don't need disable SecureBoot can be installed.
I will try install FreeBSD now! Thank you very much!


----------



## zoujiaqing (Feb 20, 2020)

I installing copy files after alert:
Could not set password!





Restart laptop reinstall it alert:

Failed to fech dist from local media:




I will download DVD to try.


----------



## zoujiaqing (Feb 20, 2020)

I use DVD image to insatlled FreeBSD 12.1-REALESE 
Thanks all!


----------

