Solved missing boot loader

when I reboot my system It cannot boot and has shown the "bootable device not detected" message.
by Live cd I enter the command :
Code:
 # gpart show
=>        40  1953525088  ada0  GPT  (932G)
          40      409600     1  efi  (200M)
      409640   314163192     2  freebsd-ufs  (150G)
   314572832   104857600     3  freebsd-ufs  (50G)
   419430432   104857600     4  freebsd-ufs  (50G)
   524288032   629145600     5  freebsd-ufs  (300G)
  1153433632    41943040     6  freebsd-ufs  (20G)
  1195376672     8388608     7  freebsd-swap  (4.0G)
  1203765280   105467872        - free -  (512B)

I searched and do these steps:
Code:
#gpart bootcoed -b /boot/pmbr -p /boot/gpartboot -i 1 ada0
# gpart set -a active ada0
#gpart set -a bootme -i 1 ada0
I reboot the system and now the message is:
Code:
missing boot loader

please help me to solve the problem.

Thanks
 
does not exist (if it was not created by you). It is /boot/gptboot which is default anyway.

Yes, that was my mistake. in terminal I enter the right command.
I used gptboot() and gpart() commands and they run wityhout any error, but when I reboot the system it say missing bootloader.

Another question that I have is, the freebsd-boot partition is not in gpart show output. Is it right or it should be exist?
 
I do these steps:
Code:
# gpart delete -i 1 ada0
# gpart add -t freebsd-boot -l gpboot -b 40 -s 512K ada0
ada0p1 added

reboot the system.
the problem solved:)
 
Back
Top