[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Debian and UEFI and GPT



On Thu, Oct 24, 2013 at 9:04 AM, Chris Davies <chris@roaima.co.uk> wrote:
> Andrew M.A. Cater <amacater@galactic.demon.co.uk> wrote:
>>
>> Debian 7.2 runs fine on UEFI, GPT partitioning works fine. You might
>> want to try auto partitioning - there needs to be a 1M space at
>> beginning and end of he disk and a 510M partition marked for EFIboot.
>
> I assume the 1MB space at the beginning is for grub_boot? I found I
> needed that for my big (3TB) GPT disks. What's the space required at
> the end of the disk?

Disks with msdos and gpt partition tables both have their first
partition start on the 2048th sector; this has nothing to do with the
bios_boot partition that's needed if you use a gpt partition with bios
rather than uefi firmware (a bios_boot partition starts at the 2048th
sector by default).

A gpt disk needs 34 sectors at its beginning; the 0th is the mbr, the
1st is the gpt header, the 2nd-33rd are for the partition table (for
128 possible partitions at 128 bytes per partition). And it needs 33
sectors at its end; it's the same as the beginning minus the mbr.

The EFI System Partition's size must depend on size of the disk to
which it belongs. On my laptop with a 24GB ssd (and 1TB hd for
"/home"), the ESP is 93MB (the ESP has Ubuntu and Fedora grub setups):

[root@lenovo15]# gdisk -l /dev/sda
...
Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          194559   94.0 MiB    EF00
   2          194560        46903295   22.3 GiB    8300

[root@lenovo15]# df -h /dev/sda1
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1        93M  4.4M   89M   5% /boot/efi


Reply to: