# FreeBSD 11.0 boot failure (periodically)



## Reface (Nov 18, 2016)

In 10.1 boot was ok, but when I installed 11.0 amd 64 sometimes boot failure.
Picture of this error:





ACPI APIC Table: <_ASUS_Notebook>
And boot is stop. This failure is periodicalle. For example a normal boot:




So sometimes I have a problem when kernel display information about my processor.
I have a default kernel. How to fix this problem?


----------



## Paul Floyd (Nov 18, 2016)

You don'y have any USB devices plugged in when the boot fails?


----------



## Reface (Nov 18, 2016)

I tested without USB devices (keyboard, mouse and cisco usb) - the same result.


----------



## Terry_Kennedy (Nov 19, 2016)

Reface said:


> I have a default kernel. How to fix this problem?


1) Check to make sure you have the most up-to-date BIOS for your system (always good advice, though it probably won't fix this issue).
2) Enable a verbose boot (at the loader menu) and post another picture of where it hangs. There may be additional useful information which doesn't show up unless you do a verbose boot.
3) If this only happens after a reboot (as opposed to a cold power-on), that's another useful clue.


----------



## Reface (Nov 19, 2016)

Terry_Kennedy said:


> 1) Check to make sure you have the most up-to-date BIOS for your system (always good advice, though it probably won't fix this issue).
> 2) Enable a verbose boot (at the loader menu) and post another picture of where it hangs. There may be additional useful information which doesn't show up unless you do a verbose boot.
> 3) If this only happens after a reboot (as opposed to a cold power-on), that's another useful clue.


1) My BIOS is up-to-date.
2) Very interesting advice. So, I added at /boot/loader.conf

```
verbose_loading="YES"
boot_verbose="-v"
```
But I had nothing, any additional information. But I had grub2.
So `pkg delete grub2`, and:
`gpart show ada0
boot0cfg -v ada0`

```
boot0cfg:/dev/ada0 unknown or incompatible code
```
`boot0cfg -B ada0
boot0cfg -v ada0`
And then `shutdown -r now`.
Very strange, but now I have a normal boot of my FreeBSD. But I don't understand, what is the problem with grub. I had a default config of grub2 (`grub-install --modules=part_gpt /dev/ada0` and `grub-mkconfig -o /boot/grub/grub.cfg`, `cp /boot/grub/grub.cfg.new /boot/grub/grub.cfg`)


----------



## wblock@ (Nov 19, 2016)

What was the output of `gpart show`?


----------



## Reface (Nov 20, 2016)

On my main hdd (without problem):
`gpart show`

```
=>     63      976773105    ada0         MBR (466G)
                     63                1985                      - free - (993K)
                 2048            204800         1          ntfs (100M)
             206848      614195200         2          ntfs (293G)
       614402048      362371119         3           freebsd [active] (173G)
       976773167                      1                      - free - (512B)
=>                 0       362371119    ada0s3      BSD (173G)
                      0       346030080              1      freebsd-ufs (165G)
      346030080         16340992              2      freebsd-swap (7.8G)
      362371072                     47                      - free - (24K)
```
On my main hdd (with problem):
`gpart show`

```
=>       63  976773105   ada0          MBR  (466G)
                       63       1985                          - free -  (993K)
                   2048     204800           1           ntfs  (100M)
               206848  614195200        2           ntfs  (293G)
         614402048  362371119        3           freebsd  [active]  (173G)
         976773167                  1                     - free -  (512B)
=>                   0  362371119   ada0s3       BSD  (173G)
                        0  346030080            1       freebsd-ufs  (165G)
        346030080    16340992            2       freebsd-swap  (7.8G)
        362371072               47                      - free -  (24K)
```
Config of grub2 - /boot/grub/grub.cfg:

```
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /usr/local/etc/grub.d and settings from /usr/local/etc/default/grub
#

### BEGIN /usr/local/etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="0"

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

if loadfont unicode ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=
  insmod gettext
fi
terminal_output gfxterm
set timeout=5
### END /usr/local/etc/grub.d/00_header ###

### BEGIN /usr/local/etc/grub.d/10_kfreebsd ###
menuentry 'FreeBSD' --class freebsd --class bsd --class os $menuentry_id_option 'kfreebsd-simple-58276b5542bd8618' {
insmod part_msdos
insmod ufs2
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  58276b5542bd8618
else
  search --no-floppy --fs-uuid --set=root 58276b5542bd8618
fi
        echo                    'Loading kernel of FreeBSD kernel ...'
        kfreebsd                /boot/kernel/kernel
        kfreebsd_loadenv        /boot/device.hints
insmod part_msdos
insmod ufs2
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  58276b5542bd8618
else
  search --no-floppy --fs-uuid --set=root 58276b5542bd8618
fi
        kfreebsd_module_elf     /boot/kernel/ufs.ko
        set kFreeBSD.vfs.root.mountfrom=ufs:ufsid/58276b5542bd8618
        set kFreeBSD.vfs.root.mountfrom.options=rw
}
submenu 'Advanced options for FreeBSD' $menuentry_id_option 'kfreebsd-advanced-58276b5542bd8618' {
menuentry 'FreeBSD, with kFreeBSD kernel' --class freebsd --class bsd --class os $menuentry_id_option 'kfreebsd-kernel-advanced-58276b5542bd8618' {
insmod part_msdos
insmod ufs2
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  58276b5542bd8618
else
  search --no-floppy --fs-uuid --set=root 58276b5542bd8618
fi
        echo                    'Loading kernel of FreeBSD kernel ...'
        kfreebsd                /boot/kernel/kernel
        kfreebsd_loadenv        /boot/device.hints
insmod part_msdos
insmod ufs2
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  58276b5542bd8618
telse
  search --no-floppy --fs-uuid --set=root 58276b5542bd8618
fi
        kfreebsd_module_elf     /boot/kernel/ufs.ko
        set kFreeBSD.vfs.root.mountfrom=ufs:ufsid/58276b5542bd8618
        set kFreeBSD.vfs.root.mountfrom.options=rw
}
menuentry 'FreeBSD, with kFreeBSD kernel (recovery mode)' --class freebsd --class bsd --class os $menuentry_id_option 'kfreebsd-kernel-recovery-58276b5542bd8618' {
insmod part_msdos
insmod ufs2
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  58276b5542bd8618
else
  search --no-floppy --fs-uuid --set=root 58276b5542bd8618
fi
        echo                    'Loading kernel of FreeBSD kernel ...'
        kfreebsd                /boot/kernel/kernel -s
        kfreebsd_loadenv        /boot/device.hints
insmod part_msdos
insmod ufs2
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root  58276b5542bd8618
else
  search --no-floppy --fs-uuid --set=root 58276b5542bd8618
fi
        kfreebsd_module_elf     /boot/kernel/ufs.ko
        set kFreeBSD.vfs.root.mountfrom=ufs:ufsid/58276b5542bd8618
        set kFreeBSD.vfs.root.mountfrom.options=rw
}
}

### END /usr/local/etc/grub.d/10_kfreebsd ###

### BEGIN /usr/local/etc/grub.d/30_os-prober ###
### END /usr/local/etc/grub.d/30_os-prober ###

### BEGIN /usr/local/etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /usr/local/etc/grub.d/40_custom ###

### BEGIN /usr/local/etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /usr/local/etc/grub.d/41_custom ###
```

But, I tested this situation on empty hdd. Hdd was formatted, FreeBSD was installed and then I installed grub2. In the result I had the same error with periodically boot failure.
Without boot problem:
`gpart show`

```
=>          63             625142385           ada0       MBR (298G)
               63                             1                          - free - (512B)
               64             624951296                1        freebsd [active] (248G)
  624951360                  191088                         - free - (93M)
=>            0             624951296      ada0s1        BSD (298G)
                 0             616562688               1        freebsd-ufs (294G)
 616562688                 8388607               2        freebsd-swap (4.0G)
 624951295                             1                         - free - (512B)
```
With boot problem:
`gpart show`

```
=>          63             625142385           ada0       MBR (298G)
               63                             1                          - free - (512B)
               64             624951296                1        freebsd [active] (248G)
  624951360                  191088                         - free - (93M)
=>            0             624951296      ada0s1        BSD (298G)
                 0             616562688               1        freebsd-ufs (294G)
 616562688                 8388607               2        freebsd-swap (4.0G)
 624951295                             1                         - free - (512B)
```


----------

