Installation problem - grub config error - "No such file or directory"
ArchThis Forum is for the discussion of Arch Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Installation problem - grub config error - "No such file or directory"
Hello! I got stuck during installation process. Grub is installed but configuration does not work - grub-mkconfig -o /boot/grub/grub.cfg says /usr/bin/grub-mkconfig: line 245: /boot/grub/grub.cfg.new: No such file or directory.
What have I missed? Are there more information I can provide?
Hello! I got stuck during installation process. Grub is installed but configuration does not work - grub-mkconfig -o /boot/grub/grub.cfg says /usr/bin/grub-mkconfig: line 245: /boot/grub/grub.cfg.new: No such file or directory.
What have I missed? Are there more information I can provide?
This error probably means that /boot/grub doesn’t exist.
What distro? uefi or legacy mode? did you try running the grub-install command first?
I have used the basic iso from archlinux pages, UEFI mode, yes, I have run the installation, no errors (the installation bar was completed, the app advised me to use grub-mkconfig).
@Berndbausch: I understand that. How can I verify the information? Is it possible that the installation through pacman seemed to be successful (e.g. the console output indicated so) and yet failed? How can I check that?
Is it possible that I did something wrong during the installation proces that could now cause the problem?
@Berndbausch: I understand that. How can I verify the information? Is it possible if the installation through paman seemed to be successful (e.g. the console output indicated so) and yet failed? How can I check that?
Is it possible that I did something wrong during the installation proces that could now cause the problem?
On re-reading this, I wonder if my remark sounded arrogant or condescending. If so, sorry.
Of course, it can’t be excluded that something or someone removed /boot or /boot/grub. Perhaps there are traces in the logs.
I was not feeling offended, I am glad you are trying to help. Yes, the directory is created. I tried to run the pacman again, I guess it detected previous installation (Warning: ... is up to date -- reinstalling...), the Boot directory is created (and populated), but threre is no Grub subdirectory, if there should be one. Could I have intalled it to wrong location? Find / -type d -name "grub" found two folders of that name: /usr/share/grub and /usr/lib/grub. Is that wrong?
During the grub installation was the efi partition mounted at /boot or /boot/efi. If you had to create the efi partition was it formatted as fat32
Debian based systems mount the efi partition at /boot/efi, I don't use Arch, but when looking up Arch grub documentation I found conflicting info as to where to mount the efi partition.
but threre is no Grub subdirectory, if there should be one. Could I have intalled it to wrong location? Find / -type d -name "grub" found two folders of that name: /usr/share/grub and /usr/lib/grub. Is that wrong
NO, that is where the package manager installs the grub package to. These files are what is used when
Code:
grub-install /dev/sda
is ran to install the grub bootloader to the efi partition and the grub files to /boot/grub/*.
Did you chroot into your arch installation before installing grub?
Per instructions from https://linuxhint.com/install-arch-linux/ I am pretty sure I did (90%). Can I verify? Is there something else I could try but start from scratch?
EFI partition was already created by Win10.
Last edited by Faire; 12-02-2018 at 10:28 AM.
Reason: wrong term used
the Boot directory is created (and populated), but threre is no Grub subdirectory
Since I am interested in Archlinux and UEFI, I started an installation as documented on the Archlinux Wiki. Right before boot loader installation, the EFI system partition exists and is mounted on /boot.
Grub installation is also documented on the Wiki. I installed the grub and efibootmgr packages, then ran grub-install:
Adding the --verbose option to grub-install (it is extremely verbose; redirect it to a file), I see that it copies a large number of files from /usr/lib/grub to /boot/grub. This is obviously the moment when /boot/grub is created.
Last edited by berndbausch; 12-04-2018 at 12:14 AM.
first things first: we are all assuming that you are root when doing these things.
Quote:
Originally Posted by Faire
Can I verify?
you have asked this twice now.
do you know how to traverse your filesystem with the shell (bash)?
basic commands like cd and ls?
maybe you need to learn that first.
another thing:
during the installation process i do not recommend to use anything else but the archwiki for instructions (except where archwiki itself points to external resources).
and, whenever the archwiki "recommends" something, it means: "unless you're 100% sure why you want to do it differently, this is how you must do it".
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.