Kernel GPT Support

Support for your TonidoPlug
User avatar
agrajag
Veteran Tonidoid
Veteran Tonidoid
Posts: 77
Joined: Tue Dec 14, 2010 9:25 am

Kernel GPT Support

Postby agrajag » Sun Jan 16, 2011 8:11 am

Is the Kernel of the Plugs System kompiled with GPT support for partitions >2TB?
I want to use a 4TB external HDD on the plug.
Now i read, that the Kernel has to use the GPT option to recognize Partitions over 2TB right?
So does the Plug has this Option, or do i have to recompile the plugs Kernel to switch this option on?

User avatar
agrajag
Veteran Tonidoid
Veteran Tonidoid
Posts: 77
Joined: Tue Dec 14, 2010 9:25 am

Re: Kernel GPT Support

Postby agrajag » Mon Jan 17, 2011 8:13 am

OK.
I figured it out myself. Thanks for the help :!:

For others as Info:
I googled for that and found, that the Kernel has to be compiled with the
Option "CONFIG_EFI_PARTITION" as to be switched on for GPT support.
So i logged on to the plug via ssh and did an:

Code: Select all

less /proc/config.gz | grep EFI


So i got this output:
CONFIG_EFI_PARTITION=y


So this said that the Kernel was already compiled with this option switched on.
So it should be OK to use disk with a gpt partition table and partitions >2TB :D

I will try this and give a feat-back, if it works.

User avatar
agrajag
Veteran Tonidoid
Veteran Tonidoid
Posts: 77
Joined: Tue Dec 14, 2010 9:25 am

Re: Kernel GPT Support

Postby agrajag » Mon Jan 17, 2011 10:09 am

OK.
It works well.
The Plug just mounted a 4TB HDD to disk1part1 :ugeek:

Now i'm trying to boot from that, but it won't work.
I copied over all files from my USB-Boot-Stick (the Stick works well).
But the Plug won't boot from the Disk.
Neither on a cold reboot nor from a warm reboot.
What can i do to make it boot from the HDD?

Tuxedo
Tonido Team
Tonido Team
Posts: 1458
Joined: Wed Jan 28, 2009 11:30 pm

Re: Kernel GPT Support

Postby Tuxedo » Mon Jan 17, 2011 2:08 pm

What happens when you boot the plug with the 4TB HDD.
Does it hang or it ignores the HDD.

User avatar
agrajag
Veteran Tonidoid
Veteran Tonidoid
Posts: 77
Joined: Tue Dec 14, 2010 9:25 am

Re: Kernel GPT Support

Postby agrajag » Mon Jan 17, 2011 2:44 pm

The Plug is booting from the internal flash as normal and it mounts the external 4TB just fine. ( Works as designed ;) ).
But i wanted the Plug to boot from the external 4TB Disk.
I've copied all the necessary files to the HDD, just the same way i've build up my Bootable-USB-Stick (which works just fine).
But the plug doesn't boot from the hdd.

I've than tried it another way:
first i deleted all partitions.
than i added a small partition to it with only 2GB and a second partition with the rest of
the 4TB. Than i started gptsync on the disk, the i got an MBR compatible Partitiontable beneath the GPT partitiontable (i thought that could has caused my Problems).
I than copied over the bootstuff again, but now to the 2GB Partition.
But this still don't work. The plug keeps booting from the internal flash and mounts the 4TB Partition.

But i recognized, that since i've run the gptsync command fdisk -l shows two partitions
the first one is EFI-GPT and the 2nd the 2GB ext3. The 3rd is the 4TB partitions, but it is not shown by fdisk -l because it's >2TB (fdisk ignores such partitions because it doesn't support GPT).
I think the problem in this setup is, that the 2GB partition is the 2nd and the Plug only boots from the first one.

But now i'm thinking the Problem is caused by the uBoot_process of the Plug.
The External drives take some time to spin up.
I've found some similar Problems round the web for that.
But i thing if i modify the uBoot i will loss the guaranty for the Plug.

So here are many questions to clear:
1. Does the Plug boot directly from an GPT based partition or does it need a MBR based one?
2. If it can boot from a GPT: can it boot from a partition >2TB?
3. Does the HDD Spin-up take too long?

I think i've to do some researches for the uBoot Process.

Any solutions are welcome.

Tuxedo
Tonido Team
Tonido Team
Posts: 1458
Joined: Wed Jan 28, 2009 11:30 pm

Re: Kernel GPT Support

Postby Tuxedo » Mon Jan 17, 2011 3:18 pm

I think you gave me the answer I was looking for.
Since the plug boots normally (even though you have a bootable USB HDD connected), it means that when uboot loads up it is not able to see the USB HDD. This could be due to the USB hdd spin-up delay. uBoot waits for about 10 secs. It is not a configurable parameter, i guess it is in the code.
I haven't tried booting from a GPT partition table myself. I will give that a try and let you know. My guess will be that it can boot only with MBR.

User avatar
agrajag
Veteran Tonidoid
Veteran Tonidoid
Posts: 77
Joined: Tue Dec 14, 2010 9:25 am

Re: Kernel GPT Support

Postby agrajag » Tue Jan 18, 2011 2:30 pm

Hello Tuxedo!
Thanks for the help so far.
After some more testing i've got some Updates for you:

  1. I've deleted all partitions and partition tables from the HDD, to start from a fresh environment. Than i added only a MBR partitiontable with just one 2GB partition and formated it with ext3. Than i copied over the bootsystem from the Stick again.
    And...
    ... the HDD boots from the HDD :!:

    So i think the HDD Spin-Up is NOT the Problem here.

  2. After that i just want to know, if the GPT is the Problem.
    So i removed all partitiontables from the Stick (remember: it worked just fine before).
    I added only a GPT partitiontable with one ext3 partition.
    Copied over the Bootsystem and...
    ...The Stick doesn't boot anymore :cry:

So what we know so far:
  • Does TonidoPlug support GPT?
    Yes.
  • Does TonidoPlug support partitions >2TB?
    Yes, if the partitiontable is GPT.
  • Does TonidoPlug boot from a GPT partitiontable?
    No, it doesn't. TonidoPlug Boots only from MBR partitions.
  • Does TonidoPlug boot from partitions >2TB
    No, because it only boots from MBR based partitions and they're limited to 2TB.

I think you could add this to your docs and to your FAQs ;)

But we know just more:
We're able to mixup MBR and GPT based Partitiontables with "gptsync".
But sadly the first MBR partition will be the link to the GPT-Table and the Plug boots only from the first partition (which becomes the 2nd in MBR, in GPT still the 1st).

So here are the possible Sollutions (and one workaround):
  1. Make the Plug boot from GPT partitions.
    Any Ideas how to do that, or if it's possible?
  2. Make the Plug boot from the 2nd MBR partition.
    Same here.
  3. Move the GPT link in MBR to the 2nd entry
    Possible? Ideas? HowTo?
  4. What about to add an "extended" partition to the MBR and add GPT to that?
    Possible? (Is "extended" working this way?)
  5. Workaround: Add an MBR-table with a small system partition and splitt up the rest in 2TB partitions.
    On Tonido build an LVM with the splitted 2TB partitions and add an 4TB+ logical volume with a 4TB+ GPT partition on it :ugeek:

    Silly and ugly, but will work

Any other solutions are welcome.

And now i'm going to eat something :!:

Tuxedo
Tonido Team
Tonido Team
Posts: 1458
Joined: Wed Jan 28, 2009 11:30 pm

Re: Kernel GPT Support

Postby Tuxedo » Tue Jan 18, 2011 10:01 pm

Hi agrajag,
Thats excellent information. Great work. Will be very useful for other users. Will add this to Tips/Tricks section.

User avatar
agrajag
Veteran Tonidoid
Veteran Tonidoid
Posts: 77
Joined: Tue Dec 14, 2010 9:25 am

Re: Kernel GPT Support

Postby agrajag » Wed Jan 19, 2011 3:42 am

I just saw that this has moved to this section:
viewtopic.php?f=37&t=2344

Thanks Tuxedo.


Return to “TonidoPlug Support”

Who is online

Users browsing this forum: No registered users and 7 guests