# gptboot: No /boot/loader on 0:ad(0p2)



## andlil (Jan 17, 2014)

I have a new computer, ASUS Z87-K motherboard with an Intel I5 CPU. I can install (with no errors) FreeBSD 9.2 or FreeBSD 10.0-RC5, I use default partitioning of the entire disk. But when booting into harddisk I always get:

```
gptboot: No /boot/loader on 0:ad(0p2)
gptboot: No /boot/boot/kernel on 0:ad(0p2)
```

From the LiveCD I can mount the newly installed disk, and everything seems to be there, /boot/loader, /boot/kernel/kernel and all the other files.

I have tried to set the SATA controller to AHCI or RAID, with RAIDed or non-RAIDed disks, which gives the same error all the time. I have updated the BIOS to latest. I have successfully installed Win7-Pro Windows 7 Pro 64 bit, so I do not think there is a hardware error. I have tested the memory.

What can I do? Should I change the boot-loader from gptboot to something older? How do I do that? ASUS specifies the LAN controller to Realtek 8111GR, and that is recognized by 10.0-RC5, but not by 9.2, therefore I prefer 10.0-RC5.

Best wishes,

Anders Liljeborg


----------



## SirDice (Jan 17, 2014)

What does the other partition (ad0p1) contain?


----------



## kpa (Jan 17, 2014)

Judging by the error message the /boot/gptboot boot block on ada0p1 gets run normally but it then can not find the root partition and the loader(8) binary. Try changing the boot order in the BIOS settings so that the harddisk containing the FreeBSD installation is before any other devices,


----------



## wblock@ (Jan 17, 2014)

gptboot(8) boots from the first UFS partition found on the disk.  Please boot in the Live CD mode and show the output of `gpart show`.  The presence of old motherboard RAID metadata can cause problems, so if you have set up any motherboard RAID volumes, destroy them from the BIOS before installing.


----------



## andlil (Jan 20, 2014)

Thank you very much for your help. Right after I posted this question I found a relevant post:


> "Partitions not seen. When using GPT, FreeBSD will create a protective
> MBR. This MBR has one partition entry covering the whole disk. FreeBSD
> marks this partition active. This causes at least some UEFI
> implementations to ignore the GPT. To fix this the partition needs to
> ...



The command below executed right after installation, but before trying to boot the disk, did the trick.


```
gpart set -a active ada0
```

Best wishes
Anders Liljeborg


----------



## dhiraj golhar (Feb 9, 2019)

How can I execute gpart command before booting is done. 
I am getting below error before boot and I can't proceed further. Can't execute any command. please help.

```
gptboot: No /boot/loader on 0:ad(0p2)
```


----------



## SirDice (Feb 11, 2019)

Please don't hijack a 5 year old thread.


----------

