You are not logged in.

#1 2013-02-07 15:59:40

mjb
Member
From: Germany
Registered: 2012-01-28
Posts: 66

[SOLVED] How do I actually partition GPT on an UEFI motherboard?

Hello,

I know that everything about the installation is in the wiki, but I have trouble fitting the pieces together:

1) The Beginners' Guide

https://wiki.archlinux.org/index.php/Be … rage_drive)

states how to partition GPT with cgdisk (but not with parted etc.). That would be no problem.

2) It also states that "If you have a UEFI motherboard [which I do], you will need to create an extra UEFI System partition."

3) If I follow this link:

https://wiki.archlinux.org/index.php/Un … n_in_Linux

I am instructed how to create such a UEFI partition with gparted and fdisk. But not how to do it with cgdisk!

Can you please help me figure out how to do a complete partition table with either cgdisk or parted?

Thank you very much!

Last edited by mjb (2013-02-07 21:22:21)

Offline

#2 2013-02-07 16:56:27

UnhappymealQQ
Member
Registered: 2013-02-07
Posts: 5

Re: [SOLVED] How do I actually partition GPT on an UEFI motherboard?

Hey I did a UEFI install myself:  you just have to make a partition in gdisk just like you did all the others.

gdisk
"n"   new partition 
enter size... at least 512mb is the specification.  I just used 512mb.
enter type code  EF00  (it will ask what kind you want).
save and close.

Now from the command prompt:

mkfs.vfat -F32 /dev/<THAT_PARTITION> 

Done!  You can mount this as /boot/efi now.

Offline

#3 2013-02-07 21:22:36

mjb
Member
From: Germany
Registered: 2012-01-28
Posts: 66

Re: [SOLVED] How do I actually partition GPT on an UEFI motherboard?

Thanks!

Offline

#4 2013-02-07 23:07:56

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,662

Re: [SOLVED] How do I actually partition GPT on an UEFI motherboard?

Actually, it specifies GPT fdisk = gdisk. This is not the same thing at all as fdisk which shouldn't be used with a GPT partition map.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#5 2013-03-05 05:57:36

sidneyk
Member
From: Bonner Springs, KS. USA
Registered: 2011-04-22
Posts: 129

Re: [SOLVED] How do I actually partition GPT on an UEFI motherboard?

UnhappymealQQ wrote:

Hey I did a UEFI install myself:  you just have to make a partition in gdisk just like you did all the others.

gdisk
"n"   new partition 
enter size... at least 512mb is the specification.  I just used 512mb.
enter type code  EF00  (it will ask what kind you want).
save and close.

Now from the command prompt:

mkfs.vfat -F32 /dev/<THAT_PARTITION> 

Done!  You can mount this as /boot/efi now.

And it doesn't even have to be 512MB, I made mine 300MB and share it with Windows 7 and Ubuntu.

Offline

#6 2013-03-05 22:36:04

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,662

Re: [SOLVED] How do I actually partition GPT on an UEFI motherboard?

sidneyk wrote:

And it doesn't even have to be 512MB, I made mine 300MB and share it with Windows 7 and Ubuntu.

This is bad advice. Although this will work in many cases, in some cases it will prevent the machine from booting at all. My firmware, for example, will not recognise such a partition unless it is formatted with Fat 16 rather than Fat 32. I imagine other firmware will refuse to use Fat 16 since that is not in the specification for UEFI. The wiki was changed because the previous advice to use a smaller EFI partition caused very significant and deeply mysterious problems.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#7 2013-03-06 05:29:58

sidneyk
Member
From: Bonner Springs, KS. USA
Registered: 2011-04-22
Posts: 129

Re: [SOLVED] How do I actually partition GPT on an UEFI motherboard?

cfr wrote:
sidneyk wrote:

And it doesn't even have to be 512MB, I made mine 300MB and share it with Windows 7 and Ubuntu.

This is bad advice. Although this will work in many cases, in some cases it will prevent the machine from booting at all. My firmware, for example, will not recognise such a partition unless it is formatted with Fat 16 rather than Fat 32. I imagine other firmware will refuse to use Fat 16 since that is not in the specification for UEFI. The wiki was changed because the previous advice to use a smaller EFI partition caused very significant and deeply mysterious problems.

Win 7 setup creates a 100mb ESP and formats it as FAT32. Of course, MS expects that you'll only ever want to boot Windows. I don't know what Win 8 does, but any info I could find seemed to suggest the same. But, I know that Win 7, Ubuntu 12.10 and Arch can all live happy in that space with room to spare and FAT32 ESP works fine with Asus' UEFI implementation.

Offline

#8 2013-03-06 15:02:50

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: [SOLVED] How do I actually partition GPT on an UEFI motherboard?

The EFI spec does specify FAT32, but does not specify the filesystem size. In practice, FAT16 seems to work with most or all EFIs, but the Windows 7 installer (maybe Windows 8, too; I've not checked) chokes on a FAT16 ESP, so as a general rule, FAT16 should be avoided.

I'm not very impressed with EFI's FAT driver. (There's one driver that's used on most or all EFI implementations.) I've seen it do too many weird things, such as ignore files or claim that a deleted file still exists. Perhaps some of these problems are caused by poor handling of sub-512MiB filesystems. In the past, I've recommended an ESP size of 100-500MiB, but given reports of greater reliability with over-512MiB ESPs, I'm thinking of changing my recommendation. Unfortunately, it's not an easy thing to investigate, since the problems are difficult to reproduce with any reliability.

Offline

#9 2013-03-06 23:39:14

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,662

Re: [SOLVED] How do I actually partition GPT on an UEFI motherboard?

It isn't in the UEFI spec, it is in the specification of a FAT 32 file system. Such a file system must technically/officially be at least 512M.

The issue is not with what fits and I don't know what Windows does. However, I can reliably produce the following on my machine:
1) ESP < 512M, fat 32 -> system does not recognise ESP "no operating system found" on boot
2) ESP >= 512M, fat 32 -> works fine
3) EDP < 512M, fat 16 -> works fine

I would not recommend (3) for just the reason given - UEFI does not specify support. But (1) is also problematic on at least some firmware (e.g. mine).

My very first and very long thread on these forums concerned my attempts to get my system to boot with GPT. In the end, I installed Ubuntu just to see what it did to the ESP of machines like mine to get them working. Ubuntu crashed and failed to install any boot loader but it *did* format the ESP as fat 16 first and I was then able to restore the files from backup to boot Arch.

Later, I learnt about the 512M thing so when I switched to encrypted disk, I created a larger ESP and formatted it fat 32. That also worked fine.

Obviously you may not encounter these issues but the wiki recommendation was updated because of these problems so it is not safe to advise people in general to ignore them. Of course, people can always try but they should know that it might not work - and why - so that they can fix the problem if they have firmware like mine, for example.

I spent about 3 weeks just trying to get Arch to boot because people were not aware then that the size of my ESP might be an issue. I just don't want other people to needlessly suffer through that kind of frustration for the sake a few MBs.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#10 2013-03-07 02:06:12

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: [SOLVED] How do I actually partition GPT on an UEFI motherboard?

cfr wrote:

It isn't in the UEFI spec, it is in the specification of a FAT 32 file system. Such a file system must technically/officially be at least 512M.

Do you have a reference for this? According to Wikipedia's page on FAT, FAT32 can handle sizes from 32MiB to ~2TiB. The Linux mkdosfs command will create a FAT32 filesystem as small as 32MiB, but if you don't specify the -F option, it switches to FAT32 at a size of 521MiB (or at least, somewhere between 520MiB and 521MiB; I didn't test intermediate values). I've read that Windows won't create a FAT32 filesystem smaller than 512MiB, but when I went Googling on the topic, I found reports that it can be made to do so, although it doesn't normally present that option for sub-512MiB partitions.

One thing I found is that an over-512MiB FAT filesystem uses a cluster size of 4KiB (8 sectors) or larger, whereas smaller filesystem sizes use smaller cluster sizes, all the way down to 512 bytes (1 sector). Many modern filesystems use 4KiB or larger cluster sizes, and there can be performance implications for using sub-4KiB clusters on Advanced Format disks. Although I think it's unlikely that issues with Advanced Format disks would cause negative interactions with the EFI's FAT driver, I suppose it's conceivable. It's also possible that there's a bug in the EFI's FAT driver that causes problems on filesystems with sub-4KiB clusters.

Of course, this is all academic, given....

The issue is not with what fits and I don't know what Windows does. However, I can reliably produce the following on my machine:
1) ESP < 512M, fat 32 -> system does not recognise ESP "no operating system found" on boot
2) ESP >= 512M, fat 32 -> works fine
3) EDP < 512M, fat 16 -> works fine

Observations always trump theory; if even some users have problems with sub-512MiB FAT32 ESPs, then it makes sense to recommend using 512MiB or larger ESPs. Given mkdosfs's defaults, bumping that recommendation up to 521MiB might make sense. In fact, even 547MiB (or 550MiB to round it up a bit) might make sense as a recommendation, since then if a user confuses mebibytes (MiB) and megabytes (MB), mkdosfs's defaults will still produce a FAT32 filesystem.

Offline

#11 2013-03-07 02:46:48

sidneyk
Member
From: Bonner Springs, KS. USA
Registered: 2011-04-22
Posts: 129

Re: [SOLVED] How do I actually partition GPT on an UEFI motherboard?

I didn't mean to stir anything up here. I saw some recommendations for 512MB or higher, some for 200-300MB, and some for just 100MB. I was just pointing out that Win 7 installed in UEFI mode on my Asus Sabertooth 990FX board will automatically create just a 100 MB FAT32 EFI partition as the first partition, followed by a 128MB or so MS Reserved partition leaving the rest for Windows or whatever. I would suggest that if a smaller size doesn't work for some then that means there is flunky UEFI implementation, not necessarily bad advice. It may be bad advice for your firmware, but it works perfectly fine on mine. I'm using a 120GB SSD drive as /dev/sda and was trying to keep things at the point of not using anymore than necessary but making sure it was enough for my plans. I found it confusing myself that there was some conflicting recommendations around the net and I wound up mostly following the rEFInd dev's (perhaps earlier) recommendations. If you're starting from scratch or have the capability to sucessfully resize things safely then by all means use 512MB or larger, just to be safe. It would be nice if the vendors were all using standard ways of implementing the UEFI standards or recommendations, but that is the real world. I apologize if I led anyone down a dangerous road.

Last edited by sidneyk (2013-03-07 02:51:14)

Offline

#12 2013-03-07 02:58:07

bam211
Member
Registered: 2012-01-22
Posts: 11

Re: [SOLVED] How do I actually partition GPT on an UEFI motherboard?

If 512 mb is ESP partition requirement, I was thinking of having dual booting arch and windows 8. Now windows 8 install already created  100MB FAT 32 EFI partition. Does that mean I am out of luck dual booting? Or is it safe to increase Windows8 100mb boot EFI to 512 mb? Will Windows8 boot in that case? Wondering anybody had experience dual booting Win8 and Arch in same hard disk?

Offline

#13 2013-03-07 04:24:24

*david_a*
Member
Registered: 2009-06-19
Posts: 80

Re: [SOLVED] How do I actually partition GPT on an UEFI motherboard?

bam211 wrote:

If 512 mb is ESP partition requirement, I was thinking of having dual booting arch and windows 8. Now windows 8 install already created  100MB FAT 32 EFI partition. Does that mean I am out of luck dual booting? Or is it safe to increase Windows8 100mb boot EFI to 512 mb? Will Windows8 boot in that case? Wondering anybody had experience dual booting Win8 and Arch in same hard disk?

I think first you should try to use it as-is. If it's already working, it's reasonable to hope that it keeps working.

Offline

#14 2013-03-07 04:55:59

sidneyk
Member
From: Bonner Springs, KS. USA
Registered: 2011-04-22
Posts: 129

Re: [SOLVED] How do I actually partition GPT on an UEFI motherboard?

bam211 wrote:

If 512 mb is ESP partition requirement, I was thinking of having dual booting arch and windows 8. Now windows 8 install already created  100MB FAT 32 EFI partition. Does that mean I am out of luck dual booting? Or is it safe to increase Windows8 100mb boot EFI to 512 mb? Will Windows8 boot in that case? Wondering anybody had experience dual booting Win8 and Arch in same hard disk?


If those 2 are all you plan to have then there is probably room. The bigger obstacle may be Secure Boot. I don't have a Secure Boot Win 8 system, but from what I have read it sounds like it could prove to be an issue.

Offline

#15 2013-03-07 05:43:25

bam211
Member
Registered: 2012-01-22
Posts: 11

Re: [SOLVED] How do I actually partition GPT on an UEFI motherboard?

thanks ! @sidneyk & @*david_a*. I don't have secureboot win 8 either and I would stay with 100mb EFI and see how it goes in future

Offline

#16 2013-03-07 22:04:18

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,662

Re: [SOLVED] How do I actually partition GPT on an UEFI motherboard?

bam211 wrote:

If 512 mb is ESP partition requirement, I was thinking of having dual booting arch and windows 8. Now windows 8 install already created  100MB FAT 32 EFI partition. Does that mean I am out of luck dual booting? Or is it safe to increase Windows8 100mb boot EFI to 512 mb? Will Windows8 boot in that case? Wondering anybody had experience dual booting Win8 and Arch in same hard disk?

I would try it as is. That it works with Windows suggests that your firmware is *not* as fussy as mine. If it refuses to boot, you'll have to think again but I would cross that bridge if it is still there when you try it. (Horribly mixed-up metaphor - sorry.)


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#17 2013-03-07 22:24:41

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,662

Re: [SOLVED] How do I actually partition GPT on an UEFI motherboard?

sidneyk wrote:

I didn't mean to stir anything up here. I saw some recommendations for 512MB or higher, some for 200-300MB, and some for just 100MB. I was just pointing out that Win 7 installed in UEFI mode on my Asus Sabertooth 990FX board will automatically create just a 100 MB FAT32 EFI partition as the first partition, followed by a 128MB or so MS Reserved partition leaving the rest for Windows or whatever. I would suggest that if a smaller size doesn't work for some then that means there is flunky UEFI implementation, not necessarily bad advice. It may be bad advice for your firmware, but it works perfectly fine on mine. I'm using a 120GB SSD drive as /dev/sda and was trying to keep things at the point of not using anymore than necessary but making sure it was enough for my plans. I found it confusing myself that there was some conflicting recommendations around the net and I wound up mostly following the rEFInd dev's (perhaps earlier) recommendations. If you're starting from scratch or have the capability to sucessfully resize things safely then by all means use 512MB or larger, just to be safe. It would be nice if the vendors were all using standard ways of implementing the UEFI standards or recommendations, but that is the real world. I apologize if I led anyone down a dangerous road.

I'm not against telling people it often works with smaller sizes. Just I think it is worth adding that if they can't boot, they may need to use a bigger ESP. The problem is otherwise deeply mysterious and extremely frustrating!


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#18 2013-03-07 22:33:11

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,662

Re: [SOLVED] How do I actually partition GPT on an UEFI motherboard?

srs5694 wrote:

Do you have a reference for this?

Sorry but no. Somebody who seemed to know their stuff stated it on these forums a while ago. I thought there was a link in the wiki but there's just the claim that it is part of MS's requirements (https://wiki.archlinux.org/index.php/UE … n_in_Linux).

The best I can do googling is a MS specification for the fat file systems which says that fat 32 is/should typically be for >512 but it doesn't say that it must be. There is a separate specification from MS for EFI fat 32 but I didn't want to sign up to the licence agreement they wanted me to agree to before letting me read the document. I'm wondering if that is the relevant document although it is then a bit odd if MS's own installer is making ESPs which are fat 32 and of only 100M.

One thing I found is that an over-512MiB FAT filesystem uses a cluster size of 4KiB (8 sectors) or larger, whereas smaller filesystem sizes use smaller cluster sizes, all the way down to 512 bytes (1 sector). Many modern filesystems use 4KiB or larger cluster sizes, and there can be performance implications for using sub-4KiB clusters on Advanced Format disks. Although I think it's unlikely that issues with Advanced Format disks would cause negative interactions with the EFI's FAT driver, I suppose it's conceivable. It's also possible that there's a bug in the EFI's FAT driver that causes problems on filesystems with sub-4KiB clusters.

Interesting. I wonder if that is the crucial thing, after all...

Of course, this is all academic, given....

The issue is not with what fits and I don't know what Windows does. However, I can reliably produce the following on my machine:
1) ESP < 512M, fat 32 -> system does not recognise ESP "no operating system found" on boot
2) ESP >= 512M, fat 32 -> works fine
3) EDP < 512M, fat 16 -> works fine

Observations always trump theory; if even some users have problems with sub-512MiB FAT32 ESPs, then it makes sense to recommend using 512MiB or larger ESPs. Given mkdosfs's defaults, bumping that recommendation up to 521MiB might make sense. In fact, even 547MiB (or 550MiB to round it up a bit) might make sense as a recommendation, since then if a user confuses mebibytes (MiB) and megabytes (MB), mkdosfs's defaults will still produce a FAT32 filesystem.

I made mine 1G (1022M as it turned out) just to be safe. As I say, it also works with smaller fat 16 even though that isn't even endorsed by the spec. (Ubuntu's installer was apparently formatting ESPs fat 16 - at least when they were the size of the one I had - and that's why installing Ubuntu was working for people on this hardware - presumably the installation didn't always crash - but other Linux distros simply would not even when everything seemed to be installed perfectly correctly.)

Last edited by cfr (2013-03-07 22:36:51)


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#19 2013-03-08 03:04:58

sidneyk
Member
From: Bonner Springs, KS. USA
Registered: 2011-04-22
Posts: 129

Re: [SOLVED] How do I actually partition GPT on an UEFI motherboard?

@cfr - I see that you have Lenovo hardware, according to your signature. I don't know if that's the hardware that's given you the problems, but I did see that in searching, that Lenovo hardware has been problematic, at best, with UEFI. I'll try to change my wording when trying to help anyone out and specify what has worked for me and the fact that a larger EFI may be best and preferable, especially if starting from scratch. I tried to find info on FAT32 also and UEFI specs and also didn't care to agree to some license just to read the spec. either. What info I could find said that UEFI supported FAT12, FAT16, FAT32 and UDF / ISO. FAT32, of course, being meant for a fixed HDD and FAT12, FAT16, UDF/ISO for floppy devices, removable drives, CD, DVD, etc. I think that was on an Ubuntu bug report page that just preceded Ubuntu changing to FAT32 UEFI. Whether it actually agrees with the spec or not I don't know, since I couldn't read it for myself.

Last edited by sidneyk (2013-03-08 03:06:32)

Offline

Board footer

Powered by FluxBB