grub2-install: error: /boot/efi doesn't look like an EFI partition on a fresh Gentoo install
up vote
2
down vote
favorite
I need a Gentoo 13 machine to test some software on the platform. I'm not a Gentoo regular, so I'm suffering their install procedures. I'm at
Configuring the bootloader | Installing GRUB2, and it failed with:
# grub2-install --target=x86_64-efi --efi-directory=/boot
Installing for x86_64-efi platform.
grub2-install: error: /boot doesn't look like an EFI partition.
I backtracked to Preparing the disks | Default: Using parted to partition the disk, and it appears I have things setup as instructed:
(chroot) Gentoo-2012 / # parted
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit mb
(parted) print
Model: ATA VMware Virtual I (scsi)
Disk /dev/sda: 21475MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1.05MB 3.15MB 2.10MB grub bios_grub
2 3.15MB 131MB 128MB ext2 boot boot, esp
3 131MB 2572MB 2441MB linux-swap(v1) swap msftdata
4 2572MB 21474MB 18902MB ext4 rootfs msftdata
The results above are from the same chapter of the manual, sections Applying a filesystem to a partition and Activating the swap partition.
I also followed the comment EFI directory should not be /boot but /boot/efi from Bootloader problems and questions on the Gentoo forums, but it resulted in the same error:
(chroot) Gentoo-2012 / # mkdir /boot/efi
(chroot) Gentoo-2012 / # grub2-install --target=x86_64-efi --boot-directory=/boot --efi-directory=/boot/efi
Installing for x86_64-efi platform.
grub2-install: error: /boot/efi doesn't look like an EFI partition.
What's the problem and how do I fix it?
Here's the corresponding fdisk
view of the information presented by gparted
above.
(chroot) Gentoo-2012 / # fdisk -l
Disk /dev/loop0: 3.3 GiB, 3567640576 bytes, 6968048 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sda: 20 GiB, 21474836480 bytes, 41943040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 52F5571A-808B-XXXX-XXXX-XXXXXXXX
Device Start End Sectors Size Type
/dev/sda1 2048 6143 4096 2M BIOS boot
/dev/sda2 6144 255999 249856 122M EFI System
/dev/sda3 256000 5023743 4767744 2.3G Microsoft basic data
/dev/sda4 5023744 41940991 36917248 17.6G Microsoft basic data
I also verified the package sys-boot/grub
supports EFI:
(chroot) Gentoo-2012 / # cat /etc/portage/make.conf | grep GRUB
GRUB_PLATFORMS="emu efi-32 efi-64 pc"
I then performed an emerge --ask --newuse sys-boot/grub
, emerge -pv sys-boot/grub
, and then rebuilt grub
.
linux partitioning grub2 gentoo
add a comment |
up vote
2
down vote
favorite
I need a Gentoo 13 machine to test some software on the platform. I'm not a Gentoo regular, so I'm suffering their install procedures. I'm at
Configuring the bootloader | Installing GRUB2, and it failed with:
# grub2-install --target=x86_64-efi --efi-directory=/boot
Installing for x86_64-efi platform.
grub2-install: error: /boot doesn't look like an EFI partition.
I backtracked to Preparing the disks | Default: Using parted to partition the disk, and it appears I have things setup as instructed:
(chroot) Gentoo-2012 / # parted
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit mb
(parted) print
Model: ATA VMware Virtual I (scsi)
Disk /dev/sda: 21475MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1.05MB 3.15MB 2.10MB grub bios_grub
2 3.15MB 131MB 128MB ext2 boot boot, esp
3 131MB 2572MB 2441MB linux-swap(v1) swap msftdata
4 2572MB 21474MB 18902MB ext4 rootfs msftdata
The results above are from the same chapter of the manual, sections Applying a filesystem to a partition and Activating the swap partition.
I also followed the comment EFI directory should not be /boot but /boot/efi from Bootloader problems and questions on the Gentoo forums, but it resulted in the same error:
(chroot) Gentoo-2012 / # mkdir /boot/efi
(chroot) Gentoo-2012 / # grub2-install --target=x86_64-efi --boot-directory=/boot --efi-directory=/boot/efi
Installing for x86_64-efi platform.
grub2-install: error: /boot/efi doesn't look like an EFI partition.
What's the problem and how do I fix it?
Here's the corresponding fdisk
view of the information presented by gparted
above.
(chroot) Gentoo-2012 / # fdisk -l
Disk /dev/loop0: 3.3 GiB, 3567640576 bytes, 6968048 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sda: 20 GiB, 21474836480 bytes, 41943040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 52F5571A-808B-XXXX-XXXX-XXXXXXXX
Device Start End Sectors Size Type
/dev/sda1 2048 6143 4096 2M BIOS boot
/dev/sda2 6144 255999 249856 122M EFI System
/dev/sda3 256000 5023743 4767744 2.3G Microsoft basic data
/dev/sda4 5023744 41940991 36917248 17.6G Microsoft basic data
I also verified the package sys-boot/grub
supports EFI:
(chroot) Gentoo-2012 / # cat /etc/portage/make.conf | grep GRUB
GRUB_PLATFORMS="emu efi-32 efi-64 pc"
I then performed an emerge --ask --newuse sys-boot/grub
, emerge -pv sys-boot/grub
, and then rebuilt grub
.
linux partitioning grub2 gentoo
Try mkdir, then rebooting, and executinggrub2-install --target=x86_64-efi --boot-directory=/boot --efi-directory=/boot/efi
– Joseph A.
Mar 15 '16 at 23:46
@bytec0de - Thanks. If I reboot, then the machine won't boot because it won't have a boot loader. I'd feel much better about the current OS in a state it can proceed. How do I force a re-read of the disk partitions (is that what needs to be done)?
– jww
Mar 16 '16 at 0:02
@bytec0de - I tried the reboot, but it won't reboot. The error message is "operating system not found". Can I ask you... did you know what the problem was, or were you guessing? The best I can tell, two days worth of work is now gone...
– jww
Mar 16 '16 at 1:37
It was an educated guess @jww, which is why I commented.
– Joseph A.
Mar 16 '16 at 13:23
add a comment |
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I need a Gentoo 13 machine to test some software on the platform. I'm not a Gentoo regular, so I'm suffering their install procedures. I'm at
Configuring the bootloader | Installing GRUB2, and it failed with:
# grub2-install --target=x86_64-efi --efi-directory=/boot
Installing for x86_64-efi platform.
grub2-install: error: /boot doesn't look like an EFI partition.
I backtracked to Preparing the disks | Default: Using parted to partition the disk, and it appears I have things setup as instructed:
(chroot) Gentoo-2012 / # parted
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit mb
(parted) print
Model: ATA VMware Virtual I (scsi)
Disk /dev/sda: 21475MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1.05MB 3.15MB 2.10MB grub bios_grub
2 3.15MB 131MB 128MB ext2 boot boot, esp
3 131MB 2572MB 2441MB linux-swap(v1) swap msftdata
4 2572MB 21474MB 18902MB ext4 rootfs msftdata
The results above are from the same chapter of the manual, sections Applying a filesystem to a partition and Activating the swap partition.
I also followed the comment EFI directory should not be /boot but /boot/efi from Bootloader problems and questions on the Gentoo forums, but it resulted in the same error:
(chroot) Gentoo-2012 / # mkdir /boot/efi
(chroot) Gentoo-2012 / # grub2-install --target=x86_64-efi --boot-directory=/boot --efi-directory=/boot/efi
Installing for x86_64-efi platform.
grub2-install: error: /boot/efi doesn't look like an EFI partition.
What's the problem and how do I fix it?
Here's the corresponding fdisk
view of the information presented by gparted
above.
(chroot) Gentoo-2012 / # fdisk -l
Disk /dev/loop0: 3.3 GiB, 3567640576 bytes, 6968048 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sda: 20 GiB, 21474836480 bytes, 41943040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 52F5571A-808B-XXXX-XXXX-XXXXXXXX
Device Start End Sectors Size Type
/dev/sda1 2048 6143 4096 2M BIOS boot
/dev/sda2 6144 255999 249856 122M EFI System
/dev/sda3 256000 5023743 4767744 2.3G Microsoft basic data
/dev/sda4 5023744 41940991 36917248 17.6G Microsoft basic data
I also verified the package sys-boot/grub
supports EFI:
(chroot) Gentoo-2012 / # cat /etc/portage/make.conf | grep GRUB
GRUB_PLATFORMS="emu efi-32 efi-64 pc"
I then performed an emerge --ask --newuse sys-boot/grub
, emerge -pv sys-boot/grub
, and then rebuilt grub
.
linux partitioning grub2 gentoo
I need a Gentoo 13 machine to test some software on the platform. I'm not a Gentoo regular, so I'm suffering their install procedures. I'm at
Configuring the bootloader | Installing GRUB2, and it failed with:
# grub2-install --target=x86_64-efi --efi-directory=/boot
Installing for x86_64-efi platform.
grub2-install: error: /boot doesn't look like an EFI partition.
I backtracked to Preparing the disks | Default: Using parted to partition the disk, and it appears I have things setup as instructed:
(chroot) Gentoo-2012 / # parted
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit mb
(parted) print
Model: ATA VMware Virtual I (scsi)
Disk /dev/sda: 21475MB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1.05MB 3.15MB 2.10MB grub bios_grub
2 3.15MB 131MB 128MB ext2 boot boot, esp
3 131MB 2572MB 2441MB linux-swap(v1) swap msftdata
4 2572MB 21474MB 18902MB ext4 rootfs msftdata
The results above are from the same chapter of the manual, sections Applying a filesystem to a partition and Activating the swap partition.
I also followed the comment EFI directory should not be /boot but /boot/efi from Bootloader problems and questions on the Gentoo forums, but it resulted in the same error:
(chroot) Gentoo-2012 / # mkdir /boot/efi
(chroot) Gentoo-2012 / # grub2-install --target=x86_64-efi --boot-directory=/boot --efi-directory=/boot/efi
Installing for x86_64-efi platform.
grub2-install: error: /boot/efi doesn't look like an EFI partition.
What's the problem and how do I fix it?
Here's the corresponding fdisk
view of the information presented by gparted
above.
(chroot) Gentoo-2012 / # fdisk -l
Disk /dev/loop0: 3.3 GiB, 3567640576 bytes, 6968048 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sda: 20 GiB, 21474836480 bytes, 41943040 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 52F5571A-808B-XXXX-XXXX-XXXXXXXX
Device Start End Sectors Size Type
/dev/sda1 2048 6143 4096 2M BIOS boot
/dev/sda2 6144 255999 249856 122M EFI System
/dev/sda3 256000 5023743 4767744 2.3G Microsoft basic data
/dev/sda4 5023744 41940991 36917248 17.6G Microsoft basic data
I also verified the package sys-boot/grub
supports EFI:
(chroot) Gentoo-2012 / # cat /etc/portage/make.conf | grep GRUB
GRUB_PLATFORMS="emu efi-32 efi-64 pc"
I then performed an emerge --ask --newuse sys-boot/grub
, emerge -pv sys-boot/grub
, and then rebuilt grub
.
linux partitioning grub2 gentoo
linux partitioning grub2 gentoo
edited Mar 16 '16 at 1:30
asked Mar 15 '16 at 23:42
jww
4,1332373143
4,1332373143
Try mkdir, then rebooting, and executinggrub2-install --target=x86_64-efi --boot-directory=/boot --efi-directory=/boot/efi
– Joseph A.
Mar 15 '16 at 23:46
@bytec0de - Thanks. If I reboot, then the machine won't boot because it won't have a boot loader. I'd feel much better about the current OS in a state it can proceed. How do I force a re-read of the disk partitions (is that what needs to be done)?
– jww
Mar 16 '16 at 0:02
@bytec0de - I tried the reboot, but it won't reboot. The error message is "operating system not found". Can I ask you... did you know what the problem was, or were you guessing? The best I can tell, two days worth of work is now gone...
– jww
Mar 16 '16 at 1:37
It was an educated guess @jww, which is why I commented.
– Joseph A.
Mar 16 '16 at 13:23
add a comment |
Try mkdir, then rebooting, and executinggrub2-install --target=x86_64-efi --boot-directory=/boot --efi-directory=/boot/efi
– Joseph A.
Mar 15 '16 at 23:46
@bytec0de - Thanks. If I reboot, then the machine won't boot because it won't have a boot loader. I'd feel much better about the current OS in a state it can proceed. How do I force a re-read of the disk partitions (is that what needs to be done)?
– jww
Mar 16 '16 at 0:02
@bytec0de - I tried the reboot, but it won't reboot. The error message is "operating system not found". Can I ask you... did you know what the problem was, or were you guessing? The best I can tell, two days worth of work is now gone...
– jww
Mar 16 '16 at 1:37
It was an educated guess @jww, which is why I commented.
– Joseph A.
Mar 16 '16 at 13:23
Try mkdir, then rebooting, and executing
grub2-install --target=x86_64-efi --boot-directory=/boot --efi-directory=/boot/efi
– Joseph A.
Mar 15 '16 at 23:46
Try mkdir, then rebooting, and executing
grub2-install --target=x86_64-efi --boot-directory=/boot --efi-directory=/boot/efi
– Joseph A.
Mar 15 '16 at 23:46
@bytec0de - Thanks. If I reboot, then the machine won't boot because it won't have a boot loader. I'd feel much better about the current OS in a state it can proceed. How do I force a re-read of the disk partitions (is that what needs to be done)?
– jww
Mar 16 '16 at 0:02
@bytec0de - Thanks. If I reboot, then the machine won't boot because it won't have a boot loader. I'd feel much better about the current OS in a state it can proceed. How do I force a re-read of the disk partitions (is that what needs to be done)?
– jww
Mar 16 '16 at 0:02
@bytec0de - I tried the reboot, but it won't reboot. The error message is "operating system not found". Can I ask you... did you know what the problem was, or were you guessing? The best I can tell, two days worth of work is now gone...
– jww
Mar 16 '16 at 1:37
@bytec0de - I tried the reboot, but it won't reboot. The error message is "operating system not found". Can I ask you... did you know what the problem was, or were you guessing? The best I can tell, two days worth of work is now gone...
– jww
Mar 16 '16 at 1:37
It was an educated guess @jww, which is why I commented.
– Joseph A.
Mar 16 '16 at 13:23
It was an educated guess @jww, which is why I commented.
– Joseph A.
Mar 16 '16 at 13:23
add a comment |
3 Answers
3
active
oldest
votes
up vote
3
down vote
The answer is simple. EFI System Partition (ESP) should be FAT32 (FAT16 or even FAT12 will also do for most proper UEFI; they are mostly shown as vfat
in Linux) instead of ext2:
mkfs.fat -F32 /dev/sda2
FWIW, if you are not going to install grub i386-pc (for BIOS/CSM boot), you don't need the "BIOS boot" partition. It is only required by grub i386-pc
(but not grub x86_64-efi
or i386-efi
) on GPT.
It doesn't really matter whether you use the ESP for /boot
. If you do, you should run:
grub2-install --efi-directory /boot
If you mount it on /boot/efi
instead, then you should run:
grub2-install --efi-directory /boot/efi
--boot-directory /boot
is implied (i.e. default); It doesn't matter whether /boot
is the ESP, another separate partition, or a directory on the /
filesystem.
You may not even need to chroot again to perform grub2-install
; For example, you mounted sda4
, your partition for /
, on /mnt
; AND THEN, mounted sda2
, your ESP, on /mnt/boot/efi
, then you can simply run:
grub2-install --boot-directory /mnt/boot --efi-directory /mnt/boot/efi
Although grub2-mkconfig
needs to be run in chroot AFAIK. But if you plan on writing a simple and clean grub.cfg
yourself instead (which is the only graceful way to use grub2), then this will be out of your concern.
Thanks Tom. It looks like their manual is pretty much broken in this area. Let me try some of these things and get back to you.
– jww
Mar 16 '16 at 3:18
Thanks again Tom. I performed themkfs.fat -F32 /dev/sda2
. I mounted things again as per the manual, and I was able to rungrub2-install --target=x86_64-efi --boot-directory=/boot --efi-directory=/boot/efi/
with some warnings.grub2-install
completed with "Installation finished. No error reported." However, it does not boot, and produces an error "operating system not found". No wonder these guys don't produce a LiveCD that performs an installation. Based on their instructions, it can't be done.
– jww
Mar 16 '16 at 3:58
As per the manual? What does that mean? Tell themount
commands you ran IN ORDER. Also considering the params you used, have you chrooted? Usually you can't really ignore "warnings" fromgrub2-install
, so please show what exactly they are.
– Tom Yan
Mar 16 '16 at 4:00
Thanks again Tom. Sorry about that; I thought you were familiar with the procedures. The disks were mounted according to Preparing the disks | Mounting. Chroot was entered according to Installing the Gentoo base system | Mounting the necessary filesystems. I had to Chroot because I got an error without it. The error was "grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist."
– jww
Mar 16 '16 at 4:15
It's not about the "procedures" or whether I am familiar with them. It's HOW YOU mounted YOUR devices. So did youmount /dev/sda4 /mnt/gentoo; mount /dev/sda2 /mnt/gentoo/boot/efi
in this ORDER and chroot to/mnt/gentoo
? Again, what were the warnings you mentioned?
– Tom Yan
Mar 16 '16 at 4:20
|
show 3 more comments
up vote
0
down vote
accepted
The problem seemed to be mixing and matching BIOS, EFI, MBR, and GPT. I tried to follow the guides and use the GPT, but there were some dependencies that I could not resolve because I am too inexperienced. Its not even clear to me the kernel was built with GPT support (via config option CONFIG_EFI_PARTITION
).
When I dropped GPT and EFI and switched to purely BIOS and MBR, I was able to boot the resulting machine. BIOS and GPT are supposed to be a valid combination, but I'm wondering if it works in practice (see, for example, Bootloader Options).
Here's the configuration I was able to run the machine with:
$ parted
GNU Parted 3.2
Using /dev/sda
(parted) print
Model: ATA VMware Virtual I (scsi)
Disk /dev/sda: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 135MB 134MB primary ext2 boot
2 135MB 19.5GB 19.3GB primary ext4
3 19.5GB 21.5GB 2012MB primary linux-swap(v1)
Partition 1 is /boot
, Partition 2 is /
, and Partition 3 is swap
.
You don't even necessarily need GPT for a standard-conforming UEFI, and you were able to mount partitions on a GPT disk. You just didn't have grub's EFI binary successfully registered in your UEFI's NVRAM, as the warnings ofgrub2-install
clearly told you. And no matter what the reason is,--removable
should be able to help you out (unless its sharing a Windows's ESP).
– Tom Yan
Mar 18 '16 at 7:07
add a comment |
up vote
0
down vote
I just had this issue and found that /boot existed but didn't have my boot partition mounted to it. Just had to mount the boot partition to fix this
mnt /dev/sda1 /boot
add a comment |
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
The answer is simple. EFI System Partition (ESP) should be FAT32 (FAT16 or even FAT12 will also do for most proper UEFI; they are mostly shown as vfat
in Linux) instead of ext2:
mkfs.fat -F32 /dev/sda2
FWIW, if you are not going to install grub i386-pc (for BIOS/CSM boot), you don't need the "BIOS boot" partition. It is only required by grub i386-pc
(but not grub x86_64-efi
or i386-efi
) on GPT.
It doesn't really matter whether you use the ESP for /boot
. If you do, you should run:
grub2-install --efi-directory /boot
If you mount it on /boot/efi
instead, then you should run:
grub2-install --efi-directory /boot/efi
--boot-directory /boot
is implied (i.e. default); It doesn't matter whether /boot
is the ESP, another separate partition, or a directory on the /
filesystem.
You may not even need to chroot again to perform grub2-install
; For example, you mounted sda4
, your partition for /
, on /mnt
; AND THEN, mounted sda2
, your ESP, on /mnt/boot/efi
, then you can simply run:
grub2-install --boot-directory /mnt/boot --efi-directory /mnt/boot/efi
Although grub2-mkconfig
needs to be run in chroot AFAIK. But if you plan on writing a simple and clean grub.cfg
yourself instead (which is the only graceful way to use grub2), then this will be out of your concern.
Thanks Tom. It looks like their manual is pretty much broken in this area. Let me try some of these things and get back to you.
– jww
Mar 16 '16 at 3:18
Thanks again Tom. I performed themkfs.fat -F32 /dev/sda2
. I mounted things again as per the manual, and I was able to rungrub2-install --target=x86_64-efi --boot-directory=/boot --efi-directory=/boot/efi/
with some warnings.grub2-install
completed with "Installation finished. No error reported." However, it does not boot, and produces an error "operating system not found". No wonder these guys don't produce a LiveCD that performs an installation. Based on their instructions, it can't be done.
– jww
Mar 16 '16 at 3:58
As per the manual? What does that mean? Tell themount
commands you ran IN ORDER. Also considering the params you used, have you chrooted? Usually you can't really ignore "warnings" fromgrub2-install
, so please show what exactly they are.
– Tom Yan
Mar 16 '16 at 4:00
Thanks again Tom. Sorry about that; I thought you were familiar with the procedures. The disks were mounted according to Preparing the disks | Mounting. Chroot was entered according to Installing the Gentoo base system | Mounting the necessary filesystems. I had to Chroot because I got an error without it. The error was "grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist."
– jww
Mar 16 '16 at 4:15
It's not about the "procedures" or whether I am familiar with them. It's HOW YOU mounted YOUR devices. So did youmount /dev/sda4 /mnt/gentoo; mount /dev/sda2 /mnt/gentoo/boot/efi
in this ORDER and chroot to/mnt/gentoo
? Again, what were the warnings you mentioned?
– Tom Yan
Mar 16 '16 at 4:20
|
show 3 more comments
up vote
3
down vote
The answer is simple. EFI System Partition (ESP) should be FAT32 (FAT16 or even FAT12 will also do for most proper UEFI; they are mostly shown as vfat
in Linux) instead of ext2:
mkfs.fat -F32 /dev/sda2
FWIW, if you are not going to install grub i386-pc (for BIOS/CSM boot), you don't need the "BIOS boot" partition. It is only required by grub i386-pc
(but not grub x86_64-efi
or i386-efi
) on GPT.
It doesn't really matter whether you use the ESP for /boot
. If you do, you should run:
grub2-install --efi-directory /boot
If you mount it on /boot/efi
instead, then you should run:
grub2-install --efi-directory /boot/efi
--boot-directory /boot
is implied (i.e. default); It doesn't matter whether /boot
is the ESP, another separate partition, or a directory on the /
filesystem.
You may not even need to chroot again to perform grub2-install
; For example, you mounted sda4
, your partition for /
, on /mnt
; AND THEN, mounted sda2
, your ESP, on /mnt/boot/efi
, then you can simply run:
grub2-install --boot-directory /mnt/boot --efi-directory /mnt/boot/efi
Although grub2-mkconfig
needs to be run in chroot AFAIK. But if you plan on writing a simple and clean grub.cfg
yourself instead (which is the only graceful way to use grub2), then this will be out of your concern.
Thanks Tom. It looks like their manual is pretty much broken in this area. Let me try some of these things and get back to you.
– jww
Mar 16 '16 at 3:18
Thanks again Tom. I performed themkfs.fat -F32 /dev/sda2
. I mounted things again as per the manual, and I was able to rungrub2-install --target=x86_64-efi --boot-directory=/boot --efi-directory=/boot/efi/
with some warnings.grub2-install
completed with "Installation finished. No error reported." However, it does not boot, and produces an error "operating system not found". No wonder these guys don't produce a LiveCD that performs an installation. Based on their instructions, it can't be done.
– jww
Mar 16 '16 at 3:58
As per the manual? What does that mean? Tell themount
commands you ran IN ORDER. Also considering the params you used, have you chrooted? Usually you can't really ignore "warnings" fromgrub2-install
, so please show what exactly they are.
– Tom Yan
Mar 16 '16 at 4:00
Thanks again Tom. Sorry about that; I thought you were familiar with the procedures. The disks were mounted according to Preparing the disks | Mounting. Chroot was entered according to Installing the Gentoo base system | Mounting the necessary filesystems. I had to Chroot because I got an error without it. The error was "grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist."
– jww
Mar 16 '16 at 4:15
It's not about the "procedures" or whether I am familiar with them. It's HOW YOU mounted YOUR devices. So did youmount /dev/sda4 /mnt/gentoo; mount /dev/sda2 /mnt/gentoo/boot/efi
in this ORDER and chroot to/mnt/gentoo
? Again, what were the warnings you mentioned?
– Tom Yan
Mar 16 '16 at 4:20
|
show 3 more comments
up vote
3
down vote
up vote
3
down vote
The answer is simple. EFI System Partition (ESP) should be FAT32 (FAT16 or even FAT12 will also do for most proper UEFI; they are mostly shown as vfat
in Linux) instead of ext2:
mkfs.fat -F32 /dev/sda2
FWIW, if you are not going to install grub i386-pc (for BIOS/CSM boot), you don't need the "BIOS boot" partition. It is only required by grub i386-pc
(but not grub x86_64-efi
or i386-efi
) on GPT.
It doesn't really matter whether you use the ESP for /boot
. If you do, you should run:
grub2-install --efi-directory /boot
If you mount it on /boot/efi
instead, then you should run:
grub2-install --efi-directory /boot/efi
--boot-directory /boot
is implied (i.e. default); It doesn't matter whether /boot
is the ESP, another separate partition, or a directory on the /
filesystem.
You may not even need to chroot again to perform grub2-install
; For example, you mounted sda4
, your partition for /
, on /mnt
; AND THEN, mounted sda2
, your ESP, on /mnt/boot/efi
, then you can simply run:
grub2-install --boot-directory /mnt/boot --efi-directory /mnt/boot/efi
Although grub2-mkconfig
needs to be run in chroot AFAIK. But if you plan on writing a simple and clean grub.cfg
yourself instead (which is the only graceful way to use grub2), then this will be out of your concern.
The answer is simple. EFI System Partition (ESP) should be FAT32 (FAT16 or even FAT12 will also do for most proper UEFI; they are mostly shown as vfat
in Linux) instead of ext2:
mkfs.fat -F32 /dev/sda2
FWIW, if you are not going to install grub i386-pc (for BIOS/CSM boot), you don't need the "BIOS boot" partition. It is only required by grub i386-pc
(but not grub x86_64-efi
or i386-efi
) on GPT.
It doesn't really matter whether you use the ESP for /boot
. If you do, you should run:
grub2-install --efi-directory /boot
If you mount it on /boot/efi
instead, then you should run:
grub2-install --efi-directory /boot/efi
--boot-directory /boot
is implied (i.e. default); It doesn't matter whether /boot
is the ESP, another separate partition, or a directory on the /
filesystem.
You may not even need to chroot again to perform grub2-install
; For example, you mounted sda4
, your partition for /
, on /mnt
; AND THEN, mounted sda2
, your ESP, on /mnt/boot/efi
, then you can simply run:
grub2-install --boot-directory /mnt/boot --efi-directory /mnt/boot/efi
Although grub2-mkconfig
needs to be run in chroot AFAIK. But if you plan on writing a simple and clean grub.cfg
yourself instead (which is the only graceful way to use grub2), then this will be out of your concern.
edited Jul 27 '16 at 18:11
user140967
answered Mar 16 '16 at 3:05
Tom Yan
3,1301618
3,1301618
Thanks Tom. It looks like their manual is pretty much broken in this area. Let me try some of these things and get back to you.
– jww
Mar 16 '16 at 3:18
Thanks again Tom. I performed themkfs.fat -F32 /dev/sda2
. I mounted things again as per the manual, and I was able to rungrub2-install --target=x86_64-efi --boot-directory=/boot --efi-directory=/boot/efi/
with some warnings.grub2-install
completed with "Installation finished. No error reported." However, it does not boot, and produces an error "operating system not found". No wonder these guys don't produce a LiveCD that performs an installation. Based on their instructions, it can't be done.
– jww
Mar 16 '16 at 3:58
As per the manual? What does that mean? Tell themount
commands you ran IN ORDER. Also considering the params you used, have you chrooted? Usually you can't really ignore "warnings" fromgrub2-install
, so please show what exactly they are.
– Tom Yan
Mar 16 '16 at 4:00
Thanks again Tom. Sorry about that; I thought you were familiar with the procedures. The disks were mounted according to Preparing the disks | Mounting. Chroot was entered according to Installing the Gentoo base system | Mounting the necessary filesystems. I had to Chroot because I got an error without it. The error was "grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist."
– jww
Mar 16 '16 at 4:15
It's not about the "procedures" or whether I am familiar with them. It's HOW YOU mounted YOUR devices. So did youmount /dev/sda4 /mnt/gentoo; mount /dev/sda2 /mnt/gentoo/boot/efi
in this ORDER and chroot to/mnt/gentoo
? Again, what were the warnings you mentioned?
– Tom Yan
Mar 16 '16 at 4:20
|
show 3 more comments
Thanks Tom. It looks like their manual is pretty much broken in this area. Let me try some of these things and get back to you.
– jww
Mar 16 '16 at 3:18
Thanks again Tom. I performed themkfs.fat -F32 /dev/sda2
. I mounted things again as per the manual, and I was able to rungrub2-install --target=x86_64-efi --boot-directory=/boot --efi-directory=/boot/efi/
with some warnings.grub2-install
completed with "Installation finished. No error reported." However, it does not boot, and produces an error "operating system not found". No wonder these guys don't produce a LiveCD that performs an installation. Based on their instructions, it can't be done.
– jww
Mar 16 '16 at 3:58
As per the manual? What does that mean? Tell themount
commands you ran IN ORDER. Also considering the params you used, have you chrooted? Usually you can't really ignore "warnings" fromgrub2-install
, so please show what exactly they are.
– Tom Yan
Mar 16 '16 at 4:00
Thanks again Tom. Sorry about that; I thought you were familiar with the procedures. The disks were mounted according to Preparing the disks | Mounting. Chroot was entered according to Installing the Gentoo base system | Mounting the necessary filesystems. I had to Chroot because I got an error without it. The error was "grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist."
– jww
Mar 16 '16 at 4:15
It's not about the "procedures" or whether I am familiar with them. It's HOW YOU mounted YOUR devices. So did youmount /dev/sda4 /mnt/gentoo; mount /dev/sda2 /mnt/gentoo/boot/efi
in this ORDER and chroot to/mnt/gentoo
? Again, what were the warnings you mentioned?
– Tom Yan
Mar 16 '16 at 4:20
Thanks Tom. It looks like their manual is pretty much broken in this area. Let me try some of these things and get back to you.
– jww
Mar 16 '16 at 3:18
Thanks Tom. It looks like their manual is pretty much broken in this area. Let me try some of these things and get back to you.
– jww
Mar 16 '16 at 3:18
Thanks again Tom. I performed the
mkfs.fat -F32 /dev/sda2
. I mounted things again as per the manual, and I was able to run grub2-install --target=x86_64-efi --boot-directory=/boot --efi-directory=/boot/efi/
with some warnings. grub2-install
completed with "Installation finished. No error reported." However, it does not boot, and produces an error "operating system not found". No wonder these guys don't produce a LiveCD that performs an installation. Based on their instructions, it can't be done.– jww
Mar 16 '16 at 3:58
Thanks again Tom. I performed the
mkfs.fat -F32 /dev/sda2
. I mounted things again as per the manual, and I was able to run grub2-install --target=x86_64-efi --boot-directory=/boot --efi-directory=/boot/efi/
with some warnings. grub2-install
completed with "Installation finished. No error reported." However, it does not boot, and produces an error "operating system not found". No wonder these guys don't produce a LiveCD that performs an installation. Based on their instructions, it can't be done.– jww
Mar 16 '16 at 3:58
As per the manual? What does that mean? Tell the
mount
commands you ran IN ORDER. Also considering the params you used, have you chrooted? Usually you can't really ignore "warnings" from grub2-install
, so please show what exactly they are.– Tom Yan
Mar 16 '16 at 4:00
As per the manual? What does that mean? Tell the
mount
commands you ran IN ORDER. Also considering the params you used, have you chrooted? Usually you can't really ignore "warnings" from grub2-install
, so please show what exactly they are.– Tom Yan
Mar 16 '16 at 4:00
Thanks again Tom. Sorry about that; I thought you were familiar with the procedures. The disks were mounted according to Preparing the disks | Mounting. Chroot was entered according to Installing the Gentoo base system | Mounting the necessary filesystems. I had to Chroot because I got an error without it. The error was "grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist."
– jww
Mar 16 '16 at 4:15
Thanks again Tom. Sorry about that; I thought you were familiar with the procedures. The disks were mounted according to Preparing the disks | Mounting. Chroot was entered according to Installing the Gentoo base system | Mounting the necessary filesystems. I had to Chroot because I got an error without it. The error was "grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist."
– jww
Mar 16 '16 at 4:15
It's not about the "procedures" or whether I am familiar with them. It's HOW YOU mounted YOUR devices. So did you
mount /dev/sda4 /mnt/gentoo; mount /dev/sda2 /mnt/gentoo/boot/efi
in this ORDER and chroot to /mnt/gentoo
? Again, what were the warnings you mentioned?– Tom Yan
Mar 16 '16 at 4:20
It's not about the "procedures" or whether I am familiar with them. It's HOW YOU mounted YOUR devices. So did you
mount /dev/sda4 /mnt/gentoo; mount /dev/sda2 /mnt/gentoo/boot/efi
in this ORDER and chroot to /mnt/gentoo
? Again, what were the warnings you mentioned?– Tom Yan
Mar 16 '16 at 4:20
|
show 3 more comments
up vote
0
down vote
accepted
The problem seemed to be mixing and matching BIOS, EFI, MBR, and GPT. I tried to follow the guides and use the GPT, but there were some dependencies that I could not resolve because I am too inexperienced. Its not even clear to me the kernel was built with GPT support (via config option CONFIG_EFI_PARTITION
).
When I dropped GPT and EFI and switched to purely BIOS and MBR, I was able to boot the resulting machine. BIOS and GPT are supposed to be a valid combination, but I'm wondering if it works in practice (see, for example, Bootloader Options).
Here's the configuration I was able to run the machine with:
$ parted
GNU Parted 3.2
Using /dev/sda
(parted) print
Model: ATA VMware Virtual I (scsi)
Disk /dev/sda: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 135MB 134MB primary ext2 boot
2 135MB 19.5GB 19.3GB primary ext4
3 19.5GB 21.5GB 2012MB primary linux-swap(v1)
Partition 1 is /boot
, Partition 2 is /
, and Partition 3 is swap
.
You don't even necessarily need GPT for a standard-conforming UEFI, and you were able to mount partitions on a GPT disk. You just didn't have grub's EFI binary successfully registered in your UEFI's NVRAM, as the warnings ofgrub2-install
clearly told you. And no matter what the reason is,--removable
should be able to help you out (unless its sharing a Windows's ESP).
– Tom Yan
Mar 18 '16 at 7:07
add a comment |
up vote
0
down vote
accepted
The problem seemed to be mixing and matching BIOS, EFI, MBR, and GPT. I tried to follow the guides and use the GPT, but there were some dependencies that I could not resolve because I am too inexperienced. Its not even clear to me the kernel was built with GPT support (via config option CONFIG_EFI_PARTITION
).
When I dropped GPT and EFI and switched to purely BIOS and MBR, I was able to boot the resulting machine. BIOS and GPT are supposed to be a valid combination, but I'm wondering if it works in practice (see, for example, Bootloader Options).
Here's the configuration I was able to run the machine with:
$ parted
GNU Parted 3.2
Using /dev/sda
(parted) print
Model: ATA VMware Virtual I (scsi)
Disk /dev/sda: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 135MB 134MB primary ext2 boot
2 135MB 19.5GB 19.3GB primary ext4
3 19.5GB 21.5GB 2012MB primary linux-swap(v1)
Partition 1 is /boot
, Partition 2 is /
, and Partition 3 is swap
.
You don't even necessarily need GPT for a standard-conforming UEFI, and you were able to mount partitions on a GPT disk. You just didn't have grub's EFI binary successfully registered in your UEFI's NVRAM, as the warnings ofgrub2-install
clearly told you. And no matter what the reason is,--removable
should be able to help you out (unless its sharing a Windows's ESP).
– Tom Yan
Mar 18 '16 at 7:07
add a comment |
up vote
0
down vote
accepted
up vote
0
down vote
accepted
The problem seemed to be mixing and matching BIOS, EFI, MBR, and GPT. I tried to follow the guides and use the GPT, but there were some dependencies that I could not resolve because I am too inexperienced. Its not even clear to me the kernel was built with GPT support (via config option CONFIG_EFI_PARTITION
).
When I dropped GPT and EFI and switched to purely BIOS and MBR, I was able to boot the resulting machine. BIOS and GPT are supposed to be a valid combination, but I'm wondering if it works in practice (see, for example, Bootloader Options).
Here's the configuration I was able to run the machine with:
$ parted
GNU Parted 3.2
Using /dev/sda
(parted) print
Model: ATA VMware Virtual I (scsi)
Disk /dev/sda: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 135MB 134MB primary ext2 boot
2 135MB 19.5GB 19.3GB primary ext4
3 19.5GB 21.5GB 2012MB primary linux-swap(v1)
Partition 1 is /boot
, Partition 2 is /
, and Partition 3 is swap
.
The problem seemed to be mixing and matching BIOS, EFI, MBR, and GPT. I tried to follow the guides and use the GPT, but there were some dependencies that I could not resolve because I am too inexperienced. Its not even clear to me the kernel was built with GPT support (via config option CONFIG_EFI_PARTITION
).
When I dropped GPT and EFI and switched to purely BIOS and MBR, I was able to boot the resulting machine. BIOS and GPT are supposed to be a valid combination, but I'm wondering if it works in practice (see, for example, Bootloader Options).
Here's the configuration I was able to run the machine with:
$ parted
GNU Parted 3.2
Using /dev/sda
(parted) print
Model: ATA VMware Virtual I (scsi)
Disk /dev/sda: 21.5GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 135MB 134MB primary ext2 boot
2 135MB 19.5GB 19.3GB primary ext4
3 19.5GB 21.5GB 2012MB primary linux-swap(v1)
Partition 1 is /boot
, Partition 2 is /
, and Partition 3 is swap
.
answered Mar 18 '16 at 3:19
jww
4,1332373143
4,1332373143
You don't even necessarily need GPT for a standard-conforming UEFI, and you were able to mount partitions on a GPT disk. You just didn't have grub's EFI binary successfully registered in your UEFI's NVRAM, as the warnings ofgrub2-install
clearly told you. And no matter what the reason is,--removable
should be able to help you out (unless its sharing a Windows's ESP).
– Tom Yan
Mar 18 '16 at 7:07
add a comment |
You don't even necessarily need GPT for a standard-conforming UEFI, and you were able to mount partitions on a GPT disk. You just didn't have grub's EFI binary successfully registered in your UEFI's NVRAM, as the warnings ofgrub2-install
clearly told you. And no matter what the reason is,--removable
should be able to help you out (unless its sharing a Windows's ESP).
– Tom Yan
Mar 18 '16 at 7:07
You don't even necessarily need GPT for a standard-conforming UEFI, and you were able to mount partitions on a GPT disk. You just didn't have grub's EFI binary successfully registered in your UEFI's NVRAM, as the warnings of
grub2-install
clearly told you. And no matter what the reason is, --removable
should be able to help you out (unless its sharing a Windows's ESP).– Tom Yan
Mar 18 '16 at 7:07
You don't even necessarily need GPT for a standard-conforming UEFI, and you were able to mount partitions on a GPT disk. You just didn't have grub's EFI binary successfully registered in your UEFI's NVRAM, as the warnings of
grub2-install
clearly told you. And no matter what the reason is, --removable
should be able to help you out (unless its sharing a Windows's ESP).– Tom Yan
Mar 18 '16 at 7:07
add a comment |
up vote
0
down vote
I just had this issue and found that /boot existed but didn't have my boot partition mounted to it. Just had to mount the boot partition to fix this
mnt /dev/sda1 /boot
add a comment |
up vote
0
down vote
I just had this issue and found that /boot existed but didn't have my boot partition mounted to it. Just had to mount the boot partition to fix this
mnt /dev/sda1 /boot
add a comment |
up vote
0
down vote
up vote
0
down vote
I just had this issue and found that /boot existed but didn't have my boot partition mounted to it. Just had to mount the boot partition to fix this
mnt /dev/sda1 /boot
I just had this issue and found that /boot existed but didn't have my boot partition mounted to it. Just had to mount the boot partition to fix this
mnt /dev/sda1 /boot
answered Nov 29 at 23:47
glitchyme
1364
1364
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1053388%2fgrub2-install-error-boot-efi-doesnt-look-like-an-efi-partition-on-a-fresh-ge%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Try mkdir, then rebooting, and executing
grub2-install --target=x86_64-efi --boot-directory=/boot --efi-directory=/boot/efi
– Joseph A.
Mar 15 '16 at 23:46
@bytec0de - Thanks. If I reboot, then the machine won't boot because it won't have a boot loader. I'd feel much better about the current OS in a state it can proceed. How do I force a re-read of the disk partitions (is that what needs to be done)?
– jww
Mar 16 '16 at 0:02
@bytec0de - I tried the reboot, but it won't reboot. The error message is "operating system not found". Can I ask you... did you know what the problem was, or were you guessing? The best I can tell, two days worth of work is now gone...
– jww
Mar 16 '16 at 1:37
It was an educated guess @jww, which is why I commented.
– Joseph A.
Mar 16 '16 at 13:23