Best partition scheme for ubuntu + windows with EFI and GPT
Solution 1
I don't recall offhand if Windows really requires anything beyond its C: partition and the ESP on an EFI installation. If it does, the installer will probably create whatever it needs automatically. My own approach would probably be to just leave free space for Windows and let the Windows installer create whatever it needs.
There is one major caveat: In my experience, the Windows 7 installer is very fussy about the ESP; it requires a FAT32 ESP. If you've got a FAT16 ESP, as many Linux installers create, Windows will flake out. IIRC, it'll either create a second ESP and become confused after one of its reboots during the installation or it will report that there's no ESP and refuse to install at all. Fortunately, you can change from a FAT16 to a FAT32 ESP by backing up, unmounting the ESP, using mkdosfs, remounting the ESP, and restoring the files. You may also need to adjust the /etc/fstab file if it uses the "UUID" (really a serial number) to identify the ESP.
As on a BIOS system, there's a possibility of boot loader issues after any OS installation. Thus, keeping a backup of the ESP is wise, and being prepared to deal with problems (via an emergency boot disc or the like) is also wise.
Solution 2
On my Windows 7 hard disk, win7 ignored the EFI fat32 system partition, and made a new 100MB partition in unallocated space at the very end of the disk. To prevent this windows should be installed on a fully partitioned disk, without unallocated space.
I understand that windows wants to be the first OS at the start of the disk, but I have no personal experience to back this up.
Solution 3
Some BIOS have difficulties to find boot files located too far from the start of the disk, so i would:
- via Gparted reduce the
sda2
partition from 83GB to 20GB - install Windows in the 63GB free space
- Use Boot-Repair
Recommended Repair
to add a validWindows UEFI
entry in the GRUB menu
This would give something like:
sda 465.8G disk
├─sda1 190.8M part /boot/efi
├─sda2 20G part /
└─sda3 63.8G part /windows
├─sda4 300.0G part /home
└─sda5 1.9G part [SWAP]
Related videos on Youtube
Fernando García Redondo
Updated on September 18, 2022Comments
-
Fernando García Redondo over 1 year
I am guessing which is the better partition scheme for a system with EFI and GPT.
Currently, I have the following scheme:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 465.8G 0 disk ├─sda1 8:1 0 190.8M 0 part /boot/efi ├─sda2 8:2 0 83.8G 0 part / ├─sda3 8:3 0 379.9G 0 part /home └─sda4 8:4 0 1.9G 0 part [SWAP]
I need to install Windows (7 or 8) along ubuntu, so, when 12.10 arrive, I plan reinstalling my ubuntu 12.04 and add a Windows 7 partition.
The problem is that EFI systems with linux + windows can be a mess of partitions. Once I tried it on a machine at work and I ended with an untidy hard disk. I have read Configure Dual Boot, Windows 7 and Ubuntu 12.04 with or without EFI but it does not answer my problem.
At the end of the process I would like to have something like
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 465.8G 0 disk ├─sda1 8:1 0 190.8M 0 part /boot/efi ├─sda2 8:2 0 83.8G 0 part / ├─sda3 8:3 0 300.0G 0 part /home └─sda4 8:4 0 1.9G 0 part [SWAP] └─sda5 8:5 0 79G 0 part /windows
My questions are:
- Is it possible to get an scheme like the above one, without Windows boot partitions?. It would be nice if Windows can place its .efi file in the efi partition (sda1 in the scheme). I can choose between a Windows 7 and a Windows 8 OS.
- Would it be the best choice to put the windows partition at the end of the disk?
- Which should be the process? (Partitioning from live cd or from windows, windows installation, ubuntu installation, and possible additional steps).
Thanks in advance
-
Sounix Souleke over 11 yearsJust a heads up: Windows will be anal and create a 100MiB system partition - there is nothing you can do about this. (This in my case (EFI Machine, Windows 7, Separate HDD) Was at the start. Previosly it installed it onto a Windows XP Partition, on a separate HDD.
-
Rod Smith over 11 yearsNRoach44, in my experience, the Windows 7 installer, when booted in EFI mode, creates its own EFI System Partition (ESP) if and only if the disk doesn't already contain a FAT32 ESP. If the disk contains a FAT16 ESP (as the Ubuntu installer tends to create), Windows creates its own FAT32 ESP and then gets confused partway through the installation. If the disk contains a pre-existing FAT32 ESP, the Windows installer happily uses it.
-
Fernando García Redondo over 11 yearsDear LovinBunt, I don't fully understand your answer. Will not be the windows boot file located in /boot/efi? Which is the reason for the "sda2" size reduction? Will the "Recommended Repair" option put the desired uefi file in /boot/efi? Thanks again
-
LovinBuntu over 11 yearsWindows will put some boot files in sda1, and some other boot files in its system partition (/windows). The Recommended Repair will update GRUB and add a valid Windows entry in the GRUB menu.
-
Fernando García Redondo over 11 yearsI will try and tell you how it goes.