Welcome! Log In Create A New Profile

Advanced

Does any version of uboot support EFI and GPT?

Posted by handy1 
Does any version of uboot support EFI and GPT?
November 21, 2012 01:35AM
I ask because I have a 3TB GoFlex home. I would like to install linux directly on the drive and boot from it. I am looking for the best solution to this.

I am aware that there is a solution that uses a hybrid MBR/GPT. That isn't ideal, but will be sufficient if I can't do it more directly.

I believe that the best solution would be to use a uboot and kernel that support EFI and GPT.

Ultimately I want to know what I need to do to be able to boot from and use the entire 3TB.

Any help?

Thanks
Re: Does any version of uboot support EFI and GPT?
November 21, 2012 08:37AM
1) EFI is unneeded. GPT is all you would like
2) a 3TB rootfs would take forever to fsck at boot.
Re: Does any version of uboot support EFI and GPT?
November 21, 2012 06:31PM
I was not specific. I don't plan to use the whole drive as a single partition. I just want to be able to use the whole drive.

I was planning to have 3 partitions, 1GB(boot/root), 512MB(swap) and 3TB(SMB or NFS).

My understanding is that:
  • A normal MBR cannot handle the full 3TB, regardles of the size of partitions. You only get 2.1TB
  • Hybrid MBR/GPT can do it, but that is requires a little extra work and is non-standard. This is acceptable, but not ideal.
  • EFI/GPT can handle this situation natively.


Do I have this in some way incorrect?

Back to the original question though, does such a uboot exist already?

Maybe a better question to ask is what options do I have for accomplishing the stated goal of booting from and using the entire 3TB drive?



Edited 1 time(s). Last edit at 11/21/2012 06:34PM by handy1.
Re: Does any version of uboot support EFI and GPT?
November 21, 2012 08:28PM
handy1 Wrote:
-------------------------------------------------------
> I was not specific. I don't plan to use the whole
> drive as a single partition. I just want to be
> able to use the whole drive.
>
> I was planning to have 3 partitions,
> 1GB(boot/root), 512MB(swap) and 3TB(SMB or NFS).
>
> My understanding is that:
>
    >
  • A normal MBR cannot handle the full 3TB,
    > regardles of the size of partitions. You only get
    > 2.1TB
    >
  • Hybrid MBR/GPT can do it, but that is requires
    > a little extra work and is non-standard. This is
    > acceptable, but not ideal.
    >
  • EFI/GPT can handle this situation natively.
    >
>
>
> Do I have this in some way incorrect?
>
> Back to the original question though, does such a
> uboot exist already?
>
> Maybe a better question to ask is what options do
> I have for accomplishing the stated goal of
> booting from and using the entire 3TB drive?

I would use 8GB boot/rootfs MBR partition, with 1GB swap file in it, and the rest in a second partition. Rootfs partition could grow pretty quickly when it's on a hard drive and you'd end up experimenting with lots of utilities or compile your own kernel.
Re: Does any version of uboot support EFI and GPT?
November 21, 2012 11:52PM
The point is not the size of the partitions. Thanks for the advice on the size. The point is what are my options for getting to use the whole drive?

Is my understanding of the situation correct?

Thanks bodhi, for your help now and before.
and
Thank you as well WarheadsSE. Much appreciated.
Re: Does any version of uboot support EFI and GPT?
November 22, 2012 05:05PM
handy1,

Yes, you're got the 3 options like you'd laid out. WarheadsSE pretty much sumamized it up above nicely! 3TB ext3 will take forever to fsck. So best to have a small rootfs partition.
Re: Does any version of uboot support EFI and GPT?
November 22, 2012 07:10PM
Glad to hear that all three options are available.

How do I accomplish the third one (EFI/GPT)? I have not found any definitive mention of a uboot for these devices that supports EFI and GPT. I am happy to compile from source, but a prebuilt binary would be easier.

By the way, is there any documentation on the different features of the different versions of uboot?

Am I alone in wanting to do this? I would have thought that others with the 3TB GoFlex Home would be in the same predicament.
Re: Does any version of uboot support EFI and GPT?
November 28, 2012 06:59PM
Please stop saying "EFI and GPT". GPT is a parition scheme, EFI is 'Extensible Firmware Interface' and not related, as these devices are NOT x86.

You will need a GPT Hybrid. Period. Unless I am mistaken, uboot itself does not have GPT support at this time.
Re: Does any version of uboot support EFI and GPT?
November 28, 2012 07:47PM
WarheadsSE Wrote:
-------------------------------------------------------
> You will need a GPT Hybrid. Period. Unless I am
> mistaken, uboot itself does not have GPT support
> at this time.

Agree. The version(s) we are using for these ARM plugs don't have the support. I've read somewhere that UBoot has this capability, but it needs to be configured in building a new UBoot image.

In any case, I would not not use the entire 1TB, 2TB, or 3TB Goflex Desk HDD for rootfs. Hard to backup and take forever to fsck the disk.
Re: Does any version of uboot support EFI and GPT?
November 29, 2012 01:54AM
I know about the hybrid solution. I mentioned that above.

I also know that the uboot source has supported EFI for years. There are also other kirkwood based products that have EFI enabled uboots. I really want to know if there is a version that have been compiled for these machines.

I was asking if any version of uboot supported the EFI/GPT solution rather than the MBR/GPT hybrid. Apparently nobody knows of such a uboot.

Though the size of the partitions is not the issue, I do not plan on having a 3TB rootfs. As I said before, I plan to use a few GB for boot/root and swap and the remainder would be served up as an SMB share.
Re: Does any version of uboot support EFI and GPT?
November 29, 2012 03:56AM
handy1 Wrote:
-------------------------------------------------------
> I know about the hybrid solution. I mentioned that
> above.
>
> I also know that the uboot source has supported
> EFI for years. There are also other kirkwood based
> products that have EFI enabled uboots. I really
> want to know if there is a version that have been
> compiled for these machines.
>
> I was asking if any version of uboot supported the
> EFI/GPT solution rather than the MBR/GPT hybrid.
> Apparently nobody knows of such a uboot.
>
> Though the size of the partitions is not the
> issue, I do not plan on having a 3TB rootfs. As I
> said before, I plan to use a few GB for boot/root
> and swap and the remainder would be served up as
> an SMB share.

Cool. I'd suggest a swap file instead of swap partition, because it is so easy to expand/shrink it, and moving it, without changing fstab.
Re: Does any version of uboot support EFI and GPT?
December 03, 2012 07:46PM
WarheadsSE Wrote:
-------------------------------------------------------
> Please stop saying "EFI and GPT". GPT is a
> parition scheme, EFI is 'Extensible Firmware
> Interface' and not related, as these devices are
> NOT x86.
>
> You will need a GPT Hybrid. Period. Unless I am
> mistaken, uboot itself does not have GPT support
> at this time.


Ehhrrrmmm... well... sort of... nah... really, if the uboot/README and other docs say, it then we can probably say "it" [EFI!] as well. Quoting the u-boot-2011.12/README file,
Quote

- Partition Support:
CONFIG_MAC_PARTITION and/or CONFIG_DOS_PARTITION
and/or CONFIG_ISO_PARTITION and/or CONFIG_EFI_PARTITION

In addition, EFI also constitutes a standard, of which GUID Partition Table (GPT) is a subset. [ e.g. http://en.wikipedia.org/wiki/GUID_Partition_Table ]

IIUC, two things need to be compliled-in/activated/configured-in on UBoot in order for 3TB partitions to be recognized as GPT (read 'nonhybrid').
  • CONFIG_EFI_PARTITION
  • CONFIG_SYS_64BIT_LBA
In addition, it is my understanding that CONFIG_EFI_PARTITION (while perhaps seeming to be a misnomer) actually is analogous to the Linux kernel config/setting referenced by the help text "Say Y here if you would like to use hard disks under Linux which were partitioned using EFI GPT." The CONFIG_SYS_64BIT_LBA setting is to allow 64bit sector addresses needed for disks larger than 2.1TB.

{ Anyone who is UBoot savvy, please let me know if you know of any further requirements. TTBOMRecollection, these are the only 2 things that need to be turned on. If there is a 3rd or 4th, I beg your pardon, and by all means specify and cite the documents. }

Certainly at least three more things are needed for the full picture, beyond UBoot capabilities mentioned above:
  1. A kernel with EFI GPT support
  2. a utility other than fdisk, namely "gdisk", which is built into the newer rescue images I've posted, and finally...
  3. a really big-honkin' 3TB-ish SATA drive for us to test this all on and see if it really works!
;)

Originally, I was going to put up EFI+64Bit UBoot images... but after Jeff and I tested them, we noticed that some older USB drives didn't seem to like the timings... we shrugged our shoulders and I agreed with him that it is safer for users to just use the nonEFI & non64Bit images, and just incorporate the L2CacheDisable that was needed in kernels of version 3.2 and higher.

=====================================================





Edited 3 time(s). Last edit at 12/03/2012 08:05PM by davygravy.
Re: Does any version of uboot support EFI and GPT?
December 09, 2012 12:26PM
From the latest u-boot source tree (disk/part_efi.c):

/*
 * Problems with CONFIG_SYS_64BIT_LBA:
 *
 * struct disk_partition.start in include/part.h is sized as ulong.
 * When CONFIG_SYS_64BIT_LBA is activated, lbaint_t changes from ulong to uint64_t.
 * For now, it is cast back to ulong at assignment.
 *
 * This limits the maximum size of addressable storage to < 2 Terra Bytes
 */

I believe that this would also have to be dealt with in order to have > 2 TB. That is unless there is a patch that fixes the casting.
Re: Does any version of uboot support EFI and GPT?
December 09, 2012 09:32PM
That's distressing to see. I find it difficult to believe that they'd have let stand so substantial a problem.

Have you considered emailing the uboot mailing list for confirmation of this problem ?

=====================================================


Re: Does any version of uboot support EFI and GPT?
December 09, 2012 09:42PM
I have just started looking into the code. I have yet to actually compile a uboot. I am trying to feel my way around the code a bit before jumping into the fray. I will probably be ready with my inquiries after next weekend.

I don't yet know of the downstream consequences of this cast. I assume that they must be significant if nothing has been done about it yet. It just seems that if it were as simple as changing a variable type in sveral locations, that would not be a problem.

Thanks Davy,

Handy1
Re: Does any version of uboot support EFI and GPT?
December 10, 2012 07:17PM
Re: Does any version of uboot support EFI and GPT?
December 22, 2012 09:10PM
I am throwing in the towel on the full solution of EFI/GPT with 64 bit LBA. There seems to be very little interest in this both on this forum as well as on the DENX uboot mailing list.

That's OK because there is a satisfactory, though less than ideal solution using the Hybrid MBR/GPT partitioning. I will go that route for now, but I am going to come back to this most likely when others have more interest.

Thanks for the help.
Re: Does any version of uboot support EFI and GPT?
December 23, 2012 05:56PM
I'm commenting here to your thread because Linaro states that they have added GPT support to uboot. See the "GRUB on U-Boot" thread on that.

A couple of other comments:

Somewhere in the thread the use of ext3 was mentioned. Don't use that! Use ext4. Ext3 is deprecated and should only be used on new builds if you need compatibility with something like ext2ifs for Windows that has not yet been updated.

Use of a 1GB swap file was also mentioned. That is a bad choice for a couple of reasons. First, a swap file is accessed much slower than a swap partition. Second, 1GB is way too big on an ARM device. I have a 2GB swap partition on my GoFlex, but that is only for disk compatibility in case I need to swap disks with my main x86 machine. It is basically never used. ARM SoCs use little swap and 256MB is all you can ever use no matter how much you tweak the kernel.
Re: Does any version of uboot support EFI and GPT?
December 23, 2012 06:15PM
gnexus Wrote:
-------------------------------------------------------
> I'm commenting here to your thread because Linaro
> states that they have added GPT support to uboot.
> See the "GRUB on U-Boot" thread on that.
>
> A couple of other comments:
>
> Somewhere in the thread the use of ext3 was
> mentioned. Don't use that! Use ext4. Ext3 is
> deprecated and should only be used on new builds
> if you need compatibility with something like
> ext2ifs for Windows that has not yet been
> updated.
>
> Use of a 1GB swap file was also mentioned. That is
> a bad choice for a couple of reasons. First, a
> swap file is accessed much slower than a swap
> partition. Second, 1GB is way too big on an ARM
> device. I have a 2GB swap partition on my GoFlex,
> but that is only for disk compatibility in case I
> need to swap disks with my main x86 machine. It is
> basically never used. ARM SoCs use little
> swap and 256MB is all you can ever use no matter
> how much you tweak the kernel.

As usual, thanks for the good info about uBoot, and advice about swap :-) yeah, 1GB is just overkilled, but it is a dont-care really on a 3TB disk, isnt't it? my plugs hardly ever use swap at all. The swapfile vs swap partition performance topic has been debated forever :-), but in my personal preference, I'd trade whatever minor performance degradation, if any, for the substantial convenience of the swapfile (no need for fstab definition to point to the location of the swap, very flexible especially if you boot from a USB thumb drive).
Re: Does any version of uboot support EFI and GPT?
December 25, 2012 06:10PM
Quote

yeah, 1GB is just overkilled, but it is a dont-care really on a 3TB disk, isnt't it?

That's why I have 2 GB swap file on mine ;)

Quote

in my personal preference, I'd trade whatever minor performance degradation, if any, for the substantial convenience of the swapfile

Just like I'd trade the convenience of having a partition layout that is the same on every machine ;) That's the beauty of Linux! Unlike with other OS's we can setup our machines however we please for the suited purpose. On the other hand, with my new Acer C7 chromebook, even though ChromeOS is Linux, and I'm using Fedora, I have to still use Google's partition layout if I want a fallback to Chrome if the Fedora does not boot. That is the big drawback of even an open-source proprietary OS.

Everybody, of course, has their own personal preferences. I just wanted to point out the negatives and misconceptions to about swap, and also to let people know that now uboot can make use of GPT. That is a good development by Linaro.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: