From: Dan Egli <dan@newideatest.site>
To: gentoo-user@lists.gentoo.org, Walter Dnes <waltdnes@waltdnes.org>
Subject: Re: [gentoo-user] UEFI install noob questions
Date: Sat, 26 Dec 2020 14:21:51 -0700 [thread overview]
Message-ID: <92b8f204-d9eb-875f-444b-cb59880e8317@newideatest.site> (raw)
In-Reply-To: <X+eQ6kQXHDPrLvqF@waltdnes.org>
Let's see. I have done it two ways, depending on the machine. /boot is a
separate partition, and /boot is part of / while /boot/EFI is a
separate. I'll post both.
/boot is EFI partition:
/dev/cdrom /mnt/cdrom auto noauto,ro 0 0
/dev/sda1 /boot vfat defaults 1 2
/dev/sda2 / xfs defaults,noatime 1 1
/boot is part of /:
/dev/sda1 /boot/EFI vfat
defaults,noatime 1 2
/dev/sda3 / xfs defaults,noatime 1 1
/dev/sda2 none swap defaults
0 0
As for parted, I still use fdisk myself. I know the way I created each
was simple enough.
fdisk> g
fdisk> n
1
<just hit enter>
+128M
t
<ENTER>
1
<create other partitions>
The way this works is the g command creates a new gpt table, destroying
any other partition table, then your usual N for new, 1 for partition 1,
enter to start at the first available point, and +128M to select a 128
MB partition. If you're looking for the prompt for primary vs extended
vs logical, those don't exist in gpt tables. EVERYTHING is primary. The
t 1 changes the partition type to EFI System Partition. It's technically
not needed as I neglected to do it to one of my virtual machines. But
it's not a bad idea.
Now format as fat32: mkfs.vfat -F32 /dev/sda1
Still, here's parted output for the /boot is ESP (EFI System Partition):
(parted) print
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sda: 68.7GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 135MB 134MB fat32 boot, esp
2 135MB 68.7GB 68.6GB xfs
and here's the output for the one where /boot is one partition and
/boot/EFI is a different one (and I didn't change the partition type):
(parted) print
Model: ATA VBOX HARDDISK (scsi)
Disk /dev/sda: 34.4GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 68.2MB 67.1MB fat32
2 68.2MB 8658MB 8590MB linux-swap(v1) swap
3 8658MB 34.4GB 25.7GB xfs
EFI really isn't THAT complicated once you remember the restrictions.
For example, on the first instance, using fdisk, the following is
exactly what I did:
Command (m for help): g
Created a new GPT disklabel (GUID: 448CFABB-EBB6-AF44-8A36-A5679DB2EF76).
Command (m for help): n
Partition number (1-128, default 1):
First sector (2048-134217694, default 2048):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (2048-134217694, default
134217694): +128M
Created a new partition 1 of type 'Linux filesystem' and of size 128 MiB.
Command (m for help): n
Partition number (2-128, default 2):
First sector (264192-134217694, default 264192):
Last sector, +/-sectors or +/-size{K,M,G,T,P} (264192-134217694, default
134217694):
Created a new partition 2 of type 'Linux filesystem' and of size 63.9 GiB.
Command (m for help): t
Partition number (1,2, default 2): 1
Partition type (type L to list all types): 1
Changed type of partition 'Linux filesystem' to 'EFI System'.
Command (m for help): w
# mkfs.vfat /dev/sda1 -F32
#mkfs.xfs /dev/sda2
mount /dev/sda2 /mnt/gentoo
mkdir /mnt/gentoo/boot
mount /dev/sda1 /mnt/gentoo/boot
Then once grub is emerged and the kernel compiled:
# grub-install --target=x86_64-efi --efi-directory=/boot
# grub-mkconfig -o /boot/grub/grub.cfg
That's it, I swear. If you still have questions, you can keep asking the
list, or write to me off the list and I'd be happy to help. Your choice.
--
Dan Egli
From my Test Server
next prev parent reply other threads:[~2020-12-26 21:22 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-26 6:28 [gentoo-user] UEFI install noob questions Walter Dnes
2020-12-26 6:39 ` cal
2020-12-26 10:23 ` Peter Humphrey
2020-12-26 12:52 ` Michael
2020-12-26 19:37 ` Walter Dnes
2020-12-26 20:27 ` Neil Bothwick
2020-12-26 21:21 ` Dan Egli [this message]
2020-12-26 23:35 ` Walter Dnes
2020-12-27 0:39 ` Walter Dnes
2020-12-27 0:49 ` cal
2020-12-27 1:29 ` Walter Dnes
2020-12-27 9:48 ` Neil Bothwick
2020-12-27 3:48 ` Walter Dnes
2020-12-27 9:53 ` Neil Bothwick
2020-12-27 19:22 ` Walter Dnes
2020-12-27 20:54 ` Neil Bothwick
2020-12-28 7:43 ` Walter Dnes
2020-12-28 11:16 ` Neil Bothwick
2020-12-28 4:04 ` [gentoo-user] " Grant Edwards
2020-12-28 7:18 ` [gentoo-user] Re: [SOLVED] " Walter Dnes
2020-12-28 23:30 ` Dan Egli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=92b8f204-d9eb-875f-444b-cb59880e8317@newideatest.site \
--to=dan@newideatest.site \
--cc=gentoo-user@lists.gentoo.org \
--cc=waltdnes@waltdnes.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox