Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] UEFI booting
Date: Fri, 26 Aug 2016 11:34:10
Message-Id: 5732843.V0CfNClkB1@dell_xps
In Reply to: [gentoo-user] UEFI booting by Peter Humphrey
1 On Friday 26 Aug 2016 09:32:25 Peter Humphrey wrote:
2 > Hello list,
3 >
4 > In my search for a suitable boot method, I'm trying Mike G's systemd-boot
5 > ebuild. I've installed it with no problem, and now I reach the heart-in-
6 > mouth stage of actually replacing gummiboot with it. But first, the backup,
7 > including dd of what used to be called the MBR (what is it now?).
8 >
9 > # parted -l
10 > Model: Unknown (unknown)
11 > Disk /dev/nvme0n1: 256GB
12 > Sector size (logical/physical): 512B/512B
13 > Partition Table: gpt
14 > Disk Flags:
15 >
16 > Number Start End Size File system Name Flags
17 > 1 1049kB 3146kB 2097kB uefi bios_grub
18 > 2 3146kB 144MB 141MB fat32 boot boot, esp
19 > 3 144MB 4504MB 4360MB linux-swap(v1) swap
20 > 4 4504MB 15.0GB 10.5GB ext4 rescuesys
21 > 5 15.0GB 32.2GB 17.2GB ext4 gentoo
22 > 6 32.2GB 36.5GB 4295MB ext4 var
23 > 7 36.5GB 45.1GB 8590MB ext4 home
24 > [...]
25 >
26 > That start block of the uefi partition looks odd to me.
27
28 The 'Name' of the 1st partition is the label you have provided when you
29 created it. It is NOT the type of the partition, which is shown under the
30 'Flags' column as 'bios_grub'. The 1st partition was created to accommodate
31 Grub's boot code. It starts on the first cylinder (change the units in parted
32 to cyl and you'll see it starts at '0 cyl') and has no fs on it.
33
34 > I'm pretty sure I
35 > didn't specify a start position to parted when I was constructing the
36 > partition layout six months ago, preferring to let the program choose a
37 > value itself.
38
39 Parted and friends will create this partition for Grub at the very start of
40 the disk, when you use GPT. If you stay with a conventional msdos partition
41 table, then the first partition starts at cylinder 63 allowing enough space for
42 MBR to store its boot code in the unallocated cylinders 0 to 62.
43
44
45 > I do remember, though, that parted had a strange idea of what
46 > 2MB meant: it's turned out to be 2097kB.
47
48 You are mixing decimal and binary. 2MiB = 2 x 1024^2 = 2,097,152
49
50
51 > My question for the panel is whether I need to do anything about that
52 > partition layout. What do you think?
53
54 You don't have to do something about it, if you want to retain the ability to
55 use Grub. If you will no longer use grub then you probably do not need the
56 first grub-specific partition.
57
58
59 As shown above the second partition is your EFI partition. 141MB may not be
60 enough to store many kernel images, but it depends on how many kernel images
61 and initramfs you keep in there at any time.
62
63 --
64 Regards,
65 Mick

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-user] UEFI booting Neil Bothwick <neil@××××××××××.uk>
Re: [gentoo-user] UEFI booting Peter Humphrey <peter@××××××××××××.uk>