You are not logged in.
Pages: 1
First off, let me preface this by saying I've read and tried a significant number of tutorials on this and always run into the same/similar problems. Sorry for the verbosity but I've been wrestling with this for way longer than I should and could really use some help.
Relevant portion of the layout as found by lsblk -
sdc
--> sdc1 8:33 0 100M 0 part
--> sdc2 8:34 0 80G 0 part
--> sdc3 8:35 0 80G 0 part
--> sdc4 8:36 0 8G 0 part
My goal is to use the UEFI boot partition required (sdc1) to successfully setup GRUB so I can boot into arch linux. I'm using the most recent stable/core distribution available on the http download mirrors, then installing it onto a flash drive as directed in the tutorial.
When I follow this guide, I get to the GRUB install section and type
# mount -t efivarfs efivarfs /sys/firmware/efi/efivars
This produces errors both in and out of arch-chroot (from / to /mnt) while installing, saying that there is no such directory. I've read a lot of posts on this including this, this, and this. It has been an incredibly frustrating experience as it seems no matter how many times I nuke the partitions and restart this, I always end up with the same result.
Just to be clear, efivarfs and efivars both give errors of directory not found or does not exist. In many cases, the /sys directory exists, but does not contain the subdir firmware; this occurs both in and out of chroot as walked through in the very first link above. Also, just for clarity sake, this is what cgdisk shows for sdc:
Part# Size Partition Type Partition Name
1 100 MiB Linux Filesystem
2 80 GiB Linux Filesystem arch
3 80 GiB Linux Filesystem
4 8 GiB Linux Filesystem swap
Finally, when I do parted -l I find that sdc1 is fat32, sdc2 and sdc3 are both ext4, and sdc4 is linux-swap(v1) with no partitions having any flags set. When I boot up, the prompt says missing boot loader if I push return, but otherwise gives a blank screen with a blinking white bar. I've tried installing and nuking/repartitioning sdc multiple times with the same result. So far, I have not been able to get GRUB to boot into anything no matter what I try. Similar things happen when I tried to install syslinux instead. Everything seems to revolve around these *.efi files that never show up in the installation and don't seem to exist when I search for them. I've also read that there are a lot of known problems with installing GRUB to UEFI systems, but no solutions that fix the fact that these efi folders and files are not even there to use. I also cannot boot into the EFI shell (when it is available in /) by going into the bios and selecting boot to EFI from filesystem as described here. I download, successfully unzip Shell2.zip into /Shell2/{filenames} but again, no success.
Lastly, I also consistently get errors stating "The backup GPT table is not ad the end of the disk"; should I have moved sdc1 to the end of the disk, or is this talking about something else?
Thanks in advance for any help you can provide in getting Arch to actually boot and GRUB to even just show up...
Offline
As far i know a uefi system partition where you will mount /boot should have at least 512 MB.
For using grub with uefi system you need to install gummiboot. You also can use only the gummiboot, it's fast and more simple.
And about the error while
# mount -t efivarfs efivarfs /sys/firmware/efi/efivars
, if the firmware/efi/efivars folder doesn't exit, probaly you not boot on efi mode, so you will can't set up a efi system!
Emacs - tmux - Cmus - Mutt - Lynx/w3m - ....
Offline
I had had a similiar problem when I tried to install Gentoo over a Slackware installation. I did not try to fsck what the problem was but some distros does give you bad time for sure.
an EFI partition is advised to be not below 500 MiB as suggested. Why don't you make a arch installation usb, or disc. It also is most needed in times of emergencies.
Offline
So I figured out that apparently there is something wrong with how the USB mountable image as discussed in the link above handles UEFI boot, so I installed ubuntu on another partition so I could get GRUB to at least function. I can now boot into GRUB (and Ubuntu), however, it only gives me the Ubuntu, Ubuntu recovery, and memtest options rather than recognizing Arch. I know I need to edit grub.cfg, which I can at least see in Ubuntu, to get Arch to show up as an option.
The partition setup is now as follows from lsblk:
sdc
->sdc1 8.33 0 80G 0 part
->sdc2 8.34 0 80G 0 part
->sdc3 8.35 0 8G 0 part
->sdc4 8.36 0 48.8M 0 part
->sdc5 8.36 0 64.9G 0 part
It also appears as though Ubuntu tried to mount sdc1 (the arch partition) to /media/username/GUID (with my username and drive GUID substituted), although when opened the mounted system shows as empty.
What do I put in grub.cfg (or its dependent files), and where? Or is it possible to add something to the arch partition to automatically generate these? Thanks again.
Offline
When I follow this guide, I get to the GRUB install section and type
# mount -t efivarfs efivarfs /sys/firmware/efi/efivars
This produces errors both in and out of arch-chroot (from / to /mnt) while installing, saying that there is no such directory. [...] Just to be clear, efivarfs and efivars both give errors of directory not found or does not exist. In many cases, the /sys directory exists, but does not contain the subdir firmware; this occurs both in and out of chroot as walked through in the very first link above.
If you have no /sys/firmware/efi/ directory then the system is not booted up in EFI mode...
Have you enabled EFI mode in the BIOS options?
If you boot up via the current archlive CD it should boot up in EFI mode if it is enabled in the BIOS (it did on my laptop anyway); if you are not booted up in EFI mode to install the system it will not work ![]()
To echo @henriqueleng, IMHO gummiboot or even EFISTUB (via efibootmgr) is easier to set up than GRUB...
Jin, Jîyan, Azadî
Offline
Do you remember entering anything like, pacstrap while in install or "base?" ![]()
Offline
EFI is enabled on the motherboard's BIOS, and yes I did try pacstrapping both base and base-devel.
As I said, GRUB seems to be fine in UEFI with Ubuntu, now I just have to get it to add Arch as an option when grub loads. Any ideas on that?
Offline
First of all, you deleted Efi partition and claiming Ubuntu booted fine. Since it boot fine without an EFI partition, we can assumed that it is installed in legacy. You have some problem with your bios. still. Also, let's assume you made Grub see your x64 arch, you still need to install grub on your arch partition to delete Ubuntu, consider that.
I asked that because you mentioned the partition of Arch as empty. Any chance Ubuntu formatted it again? Where is your EFI part in the last layout? I made these kind of errors when I'm sleepy, have a cup of coffee or something.
Offline
That's what I thought originally, but if we hit "e" at the GRUB (v2.00-19ubuntu2) menu, it has the following subset of parameters:
insmod part_gpt
set root='hd2,gpt2'
That, combined with the fact that I made all partitions on a GPT, makes me scratch my head as to why it would behave like that. From what I understood about UEFI, I couldn't boot a GPT partition using bios even if I wanted to do so.
Another interesting thing that happened is that now as I'm troubleshooting, I can see all the files that are part of the arch installation I have been attempting from within Ubuntu. More specifically, it has mounted the arch partition (sdc1) on /media/username/GUID.
In my mind this just means I need whatever instructions GRUB has to have in order to recognize sdc1 as a valid boot partition. Any ideas on this?
Offline
You could try using the arch live cd & arch-chroot into your arch / partition and using
# grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=arch_grub --recheck as suggested in the wiki...
BTW a GPT partition can be booted in EFI and/or non-EFI mode ![]()
Jin, Jîyan, Azadî
Offline
Apparently I have no idea what is going on with these partitions. I tried manipulating flags on the various partitions and still have been unable to get anything UEFI to work correctly, even after following the wiki. The grub-install line works, but returns an error that UEFI is not supported, despite having the dedicated fat32 partition at the end of the disk. When I boot into the arch live installation media (usb), I cannot seem to make the live media do anything with EFI.
When I input the line
# mount -t efivarfs efivarfs /sys/firmware/efi/efivars
I get an error that the /sys/firmware/efi/efivars directory does not exist, and if I change it to a directory that does exist, it says that efivarfs cannot be found.
The folders aren't there despite all of the partitions showing as GPT on the partitioning tools (cgdisk, parted, gparted), and even though I have a fat32 partition at the end of the disk like gparted wanted, with a bios_grub or a boot flag active on it. There is no efi directory in or out of chroot (/sys/firmware/efi/...), and I can't seem to find any tutorials for how to effectively force that.
The motherboard bios that I boot into at startup says that it is forcing uefi, but even so it just won't recognize it.
Offline
Try burning the archlive .iso onto a CD, that worked for me.
Just because you have a GPT-formatted drive does not mean you are booting in EFI mode; a GPT-formatted drive can also be booted up in non-EFI mode ("Legacy" mode).
In the live system, if "efivar -l" does not return a (long) list of variables, the system is not booted in EFI mode & the system cannot be installed to boot up in EFI mode...
It is generally recommended that the EFI System Partition is set to 512MiB; Rod Smith (@srs5694) has said that "some EFIs seem to have bugs that cause them to be flaky with FAT32 filesystems that are smaller than 512MiB" --- maybe this is your problem?
Jin, Jîyan, Azadî
Offline
I burned the iso to a cd, but to no avail. After booting back into the live environment, I mounted the drives successfully (and the 512MiB EFI Partition shows up and will mount to /mnt/boot), but efivar -l did not exist, and the wiki command to mount efivarfs returns both errors, mount point does not exist and unknown filesystem type efivarfs.
Is there any way to force it to boot into UEFI? Wny will it not boot into UEFI mode once I select to boot x86_64?
Last edited by Polybiusx (2014-04-12 22:06:52)
Offline
IMHO, the best way to force a computer to boot in EFI mode is to use an EFI-only boot manager or boot loader, such as rEFInd, gummiboot, or ELILO. Prepare a boot medium (a USB flash drive, say) with your chosen EFI boot program and boot it. If you boot through to your chosen Linux without rebooting, you can be sure you're in EFI mode. (One caveat: rEFInd does support chainloading to a BIOS boot loader, but the ability to do so is disabled with the default configuration file.) Checking for the presence of the /sys/firmware/efi directory will verify that you're in EFI mode.
One big problem with many Linux installation media is that they support multiple boot modes. On the face of it, this sounds like a good idea; it makes the boot media universal (or as near to it as can be managed), which minimizes the odds of user confusion. Look deeper, though, and it actually causes problems, because so many EFIs are unclear about their boot paths. The boot options ("UEFI," "UEFI/Legacy", "CSM," etc.) are often interpreted as priorities or suggestions, not restrictions. Thus, you may think that you'll be booting in EFI mode, but if the computer has problems with the EFI-mode boot loader, the firmware will "helpfully" fall back on a BIOS/CSM/legacy-mode boot, and the Linux tool you're booting won't present any big flashing signs to inform you that you booted in the wrong mode. This problem is exacerbated by the fact that so many Linux installers have twisted themselves into shapes that make pretzels looks straight in order to boot in so many different ways (EFI vs. BIOS, CD-R vs. USB flash drive). This makes it hard for the firmware to figure out what to do with them, or to interpret a desired boot mode as invalid for that medium.
Offline
Why will it not boot into UEFI mode once I select to boot x86_64?
What do you mean by this?
x86_64 just means 64 bit intel-type processor, it has nothing to do with EFI.
What are the options in your BIOS menu?
Is there an option which specifically states "Enable UEFI" or maybe "Disable Legacy Mode"?
EDIT: Thanks Rod, good to have an expert here ![]()
Last edited by Head_on_a_Stick (2014-04-12 23:09:28)
Jin, Jîyan, Azadî
Offline
First, GPT disks, and UEFI are two separate issues. It is true that older BIOS's probably don't support GPT disks. But if your UEFI BIOS has a 'compatibility mode' aka CSM, then it can understand GPT disks and boot from them just as if they were older style disks.
To boot in EFI mode you need to rely on the software in your 'bios'. This software is smart enough to understand a FAT32 file system, and so if it can find an ESP with the correct code on it, then it can load the code from the ESP. This code is typically a bootloader that can then load OS's.
An alternative is to just install GRUB on the GPT disk. GRUB understands GPT disks, and if you give it a 'grub-bios' partition, then when you boot in CSM mode GRUB takes over and does its thing. Since GRUB is much more capable than the UEFI routines, it understands all kinds of file systems and can load code from any partition on the disk, not just the ESP.
Personally I have yet to see anyone explain to me the advantages of loading in UEFI mode (assuming you do not want secure boot). You are relying on the proprietary BIOS routines to manage your boot loaders for you. It seems much simpler to me to just boot in CSM mode, let GRUB which is well supported and standard, take over and presto you are in familiar territory.
So that is what I do. I have several GPT disks with a couple of dozen partitions on each and various linux systems on the partitions, all managed with no hassle with GRUB.
a simple 'update-grub' and the menu is re created with the new linux distro present and ready for testing.
pgmer6809
Of course my UEFI supports CSM booting -- a pre-requisite for sure.
Offline
Pages: 1