Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: MBR & GPT dual compliant format
Date: Fri, 29 Jul 2016 18:07:05
Message-Id: 1873866.vuvYLtUMfU@dell_xps
In Reply to: Re: [gentoo-user] Re: MBR & GPT dual compliant format by james
1 On Friday 29 Jul 2016 12:20:14 james wrote:
2 > On 07/29/2016 09:27 AM, R0b0t1 wrote:
3 >
4 >
5 >
6 >
7 >
8 > I
9 > OK, so I have finally switch my posting to this email. Gmane.org is dead
10 > for now (hence my delayed responses).
11 >
12 > [1] https://lars.ingebrigtsen.no/2016/07/28/the-end-of-gmane/
13 >
14 > So in one thread, I'm going to post to variety of recent posts;
15 > recreated since I have a new email address now anyways and just got it
16 > setup with gentoo-user. (sorry if this makes the thread hard to follow.
17 >
18 > > Neil
19 > >
20 > > It's the ESP (EF00) that can be used as /boot, EF02 is a special
21 > >
22 > > partition that should exist but not be used.
23 >
24 > Agreed. The posted example partition tables (PT) were just an attempt
25 > to motivate any respondant to post an actual (PT) presented by whatever
26 > tool so I could actually see what I'm trying to drive to. Soon, later
27 > tonight or tomorrow, I'll post an actual attempt from recovered failures.
28 >
29 > > Tomh
30 > > The OP wants a partition scheme for both "standard" and efi firmware,
31 > > so he wants an EF02 (gdisk name) of 1MB and an EF00 (also gdisk name).
32 >
33 > Yes, this is a key point.
34 >
35 > > The OP wanted the EF02 to be mounted as "/boot" so it has to be
36 > > larger than 100MB in order to accomodate multiple kernels (and
37 > > possibly initramfs "thingies" as they're sometimes called here).
38 > >
39 > > It's the ESP (EF00) that can be used as /boot, EF02 is a
40 > > special partition that should exist but not be used.
41 >
42 > OK, my problem is I do not know exactly what this looks like. I am
43 > assuming I can do it all with gdisk (which is gptfdisk right)?
44 >
45 > So this is just a starting point of what the PT & fstab cold look like
46 >
47 > Number Start End Size Type File system Flags
48 > 1 1049kB 211MB 210MB primary ext2 boot
49 > 2 211MB 139GB 138GB primary linux-swap(v1)
50 > 3 139GB 952GB 813GB primary ext4
51 > 4 952GB 2000GB 1049GB primary ext4
52 >
53 > corresponding fstab::
54 >
55 > /dev/sda1 /boot ext2 defaults,noatime 0 2
56 > /dev/sda2 none swap sw 0 0
57 > /dev/sda3 / ext4 defaults,noatime 0 1
58 > /dev/sda4 /usr/local ext4 defaults,noatime 0 1
59 >
60 > > David Haller
61 > > You'd have to get rid of one of those partitions (I'd say /boot).
62 >
63 > OK, I was already thinking about placing /boot under '/' anyway, as
64 > many of the stage-4 images I will be using in the auto-image installs
65 > are commonly found as using just 2 partitions anyway ('/' and swap)
66 >
67 > The '/usr/local' will be optional depending on disk size and available
68 > space to provide this third partition. /usr/local will not be needed for
69 > boot(strap) and can be mounted after the systems is up. So /boot
70 > is part of / now.
71 >
72 > > Mick
73 > > It seems you did not use gdisk or a late version of parted to created
74 > > the partition table? Modern partition tools align the logical and
75 > > physical sectors to 4096B.
76 >
77 > Yep, I just 'dogged' the PT hoping someone would create and post what it
78 > should look like, or copy/paste a correct example from somewhere. Sorry
79 >
80 > >> 1 1049kB 211MB 210MB primary ext2 boot
81 > >
82 > > Instead of ext2 follow the guide for creating a FAT fs partition with
83 > > an EF00 partition type.
84 > > James should set the boot flag in the partition table for /dev/sda1
85 > > and mount it under /boot (or /boot/EFI) in fstab.
86 >
87 > I'm going to do away with a separate /boot for now and 'boot' partition
88 > will be moved under /.
89 >
90 > > R0b0t1
91 > >
92 > > > It seems you did not use gdisk or a late version of parted to
93 > >
94 > > created the partition table? Modern partition tools align the
95 > > logical and physical sectors to 4096B.
96 > >
97 > > It can be changed. SSDs are best used with 512B sectors. But, err...
98 >
99 > Well, proper alignment was automatically taken care of with newer tools?
100 > That sort of perfromance issue is also critical. Eventuall, SSD and usb3
101 > mmc and all sorts of other media will be used, depending on the embedded
102 > board's supported interface mix that will work with the vendor's (board)
103 > bootstrap code to bring up linux.
104 >
105 > > The protective MBR can point to another one and you can select which
106 > > GPT partitions are in it. But that's getting into some rube goldberg
107 > > action.
108 >
109 > Is this true if one is using grub-legacy?
110 >
111 > While I'm at it (gentoo specific) what is the difference in
112 > sys-boot/grub-static (0.96-r1 to 0.97-r12) and sys-boot/grub (0.97-r16)
113 > in slot zero?
114 >
115 > I'm assuming that sys-boot/grub-2.02_beta2-r9++ is all grub-2 with
116 > current enhancements.
117 >
118 >
119 > I do appreciate all the inputs, and appologize again for the
120 > transitioning emails, complicated by the demise of gmane.org (my fav
121 > reading/posting for gentoo-user).
122 >
123 > I'm going to post back as soon as I get an actually 2T disk setup with
124 > all of this advise, just to check what folks think and eventually with
125 > the results of booting a variety of mbr systems (efi and newer embedded
126 > systems as they are purchased.)
127 >
128 > I have a few SSD to experiment with now and may try some usb devices
129 > after the spinning rust PT is happy.
130 >
131 >
132 > James
133
134 I'm on the road to post fully, but here's an SSD with UEFI MoBo and GPT
135 tables:
136 =================
137 # gdisk /dev/sda
138 GPT fdisk (gdisk) version 1.0.1
139
140 Partition table scan:
141 MBR: protective
142 BSD: not present
143 APM: not present
144 GPT: present
145
146 Found valid GPT with protective MBR; using GPT.
147
148 Command (? for help): p
149 Disk /dev/sda: 468862128 sectors, 223.6 GiB
150 Logical sector size: 512 bytes
151 Disk identifier (GUID): E682BFC8-0C85-459B-BA14-87F4E68CD711
152 Partition table holds up to 128 entries
153 First usable sector is 34, last usable sector is 468862094
154 Partitions will be aligned on 2048-sector boundaries
155 Total free space is 27368557 sectors (13.0 GiB)
156
157 Number Start (sector) End (sector) Size Code Name
158 1 2048 1093631 533.0 MiB EF00 ESP
159 2 1093632 43036671 20.0 GiB 8300 root
160 3 43036672 441495551 190.0 GiB 8300 home
161 ==================================
162 The note about protective MBR is because it was created automatically with
163 gdisk.
164
165 eix -l fdisk
166 [I] sys-apps/gptfdisk
167 Available versions:
168 0.8.10 [ncurses static KERNEL="linux"]
169 ~ 1.0.0 [ncurses static KERNEL="linux"]
170 1.0.1 [ncurses static KERNEL="linux"]
171 Installed versions: 1.0.1(10:39:35 28/05/16)(ncurses -static
172 KERNEL="linux")
173 Homepage: http://www.rodsbooks.com/gdisk/
174 Description: GPT partition table manipulator for Linux
175
176
177 Same deal but viewing it using fdisk:
178 =====================
179 # fdisk /dev/sda
180
181 Welcome to fdisk (util-linux 2.26.2).
182 Changes will remain in memory only, until you decide to write them.
183 Be careful before using the write command.
184
185
186 Command (m for help): p
187 Disk /dev/sda: 223.6 GiB, 240057409536 bytes, 468862128 sectors
188 Units: sectors of 1 * 512 = 512 bytes
189 Sector size (logical/physical): 512 bytes / 512 bytes
190 I/O size (minimum/optimal): 512 bytes / 512 bytes
191 Disklabel type: gpt
192 Disk identifier: E682BFC8-0C85-459B-BA14-87F4E68CD711
193
194 Device Start End Sectors Size Type
195 /dev/sda1 2048 1093631 1091584 533M EFI System
196 /dev/sda2 1093632 43036671 41943040 20G Linux filesystem
197 /dev/sda3 43036672 441495551 398458880 190G Linux filesystem
198 ==================================
199
200
201 and parted:
202 =========
203 parted /dev/sda
204 GNU Parted 3.2
205 Using /dev/sda
206 Welcome to GNU Parted! Type 'help' to view a list of commands.
207 (parted) print
208 Model: ATA OCZ-ARC100 (scsi)
209 Disk /dev/sda: 240GB
210 Sector size (logical/physical): 512B/512B
211 Partition Table: gpt
212 Disk Flags:
213
214 Number Start End Size File system Name Flags
215 1 1049kB 560MB 559MB fat32 ESP boot, esp
216 2 560MB 22.0GB 21.5GB btrfs root
217 3 22.0GB 226GB 204GB btrfs home
218 ==================================
219
220 I don't use grub on this MoBo, just the EFI stub. Hope this helps for now.
221
222 --
223 Regards,
224 Mick

Attachments

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