How to boot from GPT partition without "bootme" attribute?

Ian Lepore ian at freebsd.org
Tue Oct 30 22:58:52 UTC 2018


On Tue, 2018-10-30 at 21:37 +0300, Lev Serebryakov wrote:
>  I have disk with GPT scheme and three partitions:
> 
> p1 - freebsd-boot
> p2 - freebsd-ufs
> p3 - freebsd-ufs
> 
>  pmbr is installed on this disk, and gptboot is installed on p1. Both
> p2
> and p3 contains valid FreeBSD installation, with /boot/loader,
> kernel,
> and everything.
> 
>  I have attribute "bootme" set on p3, but not on p2.
> 
>  What should I do to boot from p2?
> 
>  I've tried to interrupt gptboot and override its choice:
> 
>  0:ad(0p3)/boot/loader
> 
>  with
> 
>  0:ad(0p2)/boot/loader
> 
>  After that loader, loaded from p2, loads kernel from p3 and boots
> system from p3!
> 
>  If I have MBR, I could override "active" slice in boot0 MBR loader
> interactively.
> 
>  Is it analogous feature for GPT?
> 

While loader(8) is loading the kernel, interrupt it to get the console
prompt (or ask the menu to give the prompt if you use menus) and do:

 unload
 set currdev=disk0p2
 boot

-- Ian


More information about the freebsd-stable mailing list