amd64/186515: Doesn't boot with GPT when # of entries over than 128.

Yeong.Hun at FreeBSD.org Yeong.Hun at FreeBSD.org
Thu Feb 6 17:50:00 UTC 2014


>Number:         186515
>Category:       amd64
>Synopsis:       Doesn't boot with GPT when # of entries over than 128.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-amd64
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Feb 06 17:50:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Yeong Hun, Jo
>Release:        FreeBSD 10.0-RELEASE
>Organization:
-
>Environment:
FreeBSD localhost 10.0-RELEASE FreeBSD 10.0-RELEASE #0 r260789: Thu Jan 1 22:34:59 UTC 2014     root at snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64
>Description:
I tried to making USB memory stick using GPT partition table scheme. I usually use 152 entries to aligning 4KB boundary for data disk(start location) and use 156 entries to aligning 4KB boundary for system disk(end location, misalignment of start location is used for boot code and make 4KB aligned root partition). I don't like that some "free" sectors on disk :-)

But, it failed to boot when partition entry count is adjusted to more than 128.

* WORKS : 128 entries GPT(1st usable sector = 34) with freebsd-boot partition at sector 34, 40.

* DOESN'T WORK : 152 entries GPT(1st usable sector = 40) with freebsd-boot partition at sector 40, 156 entries GPT(1st usable sector = 41) with freebsd-boot partition at sector 41.



Yes, There's no problem with default size GPT partition table. "128 entires" - minimum entry count by spec. - seems to be sufficient at most cases. But, that can be arbitrary size and should be supported even that cases. I think there's some issue on gpart or early-stage boot loader(/boot/pmbr).

>How-To-Repeat:
* For example, USB disk is da0 here.

# gpart create -s gpt -n 152 da0
# gpart add -t freebsd-boot -b 40 -s 32 -i 1 da0
# gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 da0

and try to boot USB. It should be show "clockwise" loading screen even no freebsd-ufs partition on USB, but it doesn't show anything and reboot immediately. It(doesn't say anything and reboot) occurs with /boot populated freebsd-ufs partition, too.
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-amd64 mailing list