Ubuntu – Best partition scheme for ubuntu + windows with EFI and GPT

grub-efiinstallationpartitioninguefiwindows

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

Best Answer

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.

Related Question