Page 1 of 1
Which B3 U-Boot versions support GPT booting?
Posted: 29 Mar 2015, 17:26
by sakaki
Hi -
apologies if this is a dumb question, but does anyone know which U-Boot versions (for the B3) support booting from a GPT-partitioned drive? And also, how this relates to the >2TiB / 512->4096 byte-sector issue (e.g. per
this post)?
thx
sakaki
Re: Which B3 U-Boot versions support GPT booting?
Posted: 29 Mar 2015, 18:33
by Gordon
The B3 installer sets up a GPT table. Also, as a fact I do own a B3 that has the ancient u-boot version and the 2TB disk that it came with does hold a GPT table. As a result I can confirm that every B3 *must* be able to support GPT. I'm unsure why the older u-boot version can't handle larger disks, but it's definitely not because it doesn't know GPT. Some quick calculation does however show that at 32 bit the limit is 2.2TB if you use a legacy page size of 512 bytes. My assumption is that the older u-boot simply does not accept the larger page size that GPT tells it to use for disks that exceed this 2.2TB limit and thus attempts to boot from an invalid physical disk sector.
Re: Which B3 U-Boot versions support GPT booting?
Posted: 29 Mar 2015, 19:36
by sakaki
Ah, interesting. Is the 2TiB issue possibly related to the CONFIG_SYS_64BIT_LBA setting in U-Boot then? (See
this patch, for example, and the doc for "LBA48 Support"
here).
best
sakaki
Re: Which B3 U-Boot versions support GPT booting?
Posted: 30 Mar 2015, 03:43
by Gordon
That appears to match the issue indeed.
Don't really follow the fundamentals though. One would expect no issue for u-boot using a 32-bit location value to access e.g. LBA 64. Assuming little machine ordering even fetching the first value from the partition table (at LBA 1?) should give it the right block number. But I suppose that not initializing the high DWORD to zero would leave random stuff inside it on reused memory and cause the disk to be instructed to go all over the place.