LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch
User Name
Password
Arch This Forum is for the discussion of Arch Linux.

Notices


Reply
  Search this Thread
Old 12-01-2018, 04:23 PM   #1
Faire
LQ Newbie
 
Registered: Dec 2018
Posts: 5

Rep: Reputation: Disabled
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?
 
Old 12-01-2018, 06:04 PM   #2
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
What distro? uefi or legacy mode? did you try running the grub-install command first?
 
Old 12-01-2018, 06:17 PM   #3
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by Faire View Post
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.
 
Old 12-02-2018, 01:14 AM   #4
Faire
LQ Newbie
 
Registered: Dec 2018
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
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?

Last edited by Faire; 12-02-2018 at 02:24 AM.
 
Old 12-02-2018, 02:21 AM   #5
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by Faire View Post
@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.

My guess is that you created /boot at this step: https://wiki.archlinux.org/index.php...e_file_systems. Then, to create /boot/grub, I guess you have to do https://wiki.archlinux.org/index.php...Installation_2. This is where you should look for errors or oversights.

Of course, it can’t be excluded that something or someone removed /boot or /boot/grub. Perhaps there are traces in the logs.

Last edited by berndbausch; 12-02-2018 at 02:22 AM. Reason: typo
 
Old 12-02-2018, 06:03 AM   #6
Faire
LQ Newbie
 
Registered: Dec 2018
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by berndbausch View Post
On re-reading this, I wonder if my remark sounded arrogant or condescending. If so, sorry.

My guess is that you created /boot at this step: https://wiki.archlinux.org/index.php...e_file_systems. Then, to create /boot/grub, I guess you have to do https://wiki.archlinux.org/index.php...Installation_2. This is where you should look for errors or oversights.

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?

Last edited by Faire; 12-02-2018 at 06:17 AM.
 
Old 12-02-2018, 08:40 AM   #7
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
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.
 
Old 12-02-2018, 08:47 AM   #8
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
Quote:
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?
 
1 members found this post helpful.
Old 12-02-2018, 09:20 AM   #9
Faire
LQ Newbie
 
Registered: Dec 2018
Posts: 5

Original Poster
Rep: Reputation: Disabled
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
 
Old 12-02-2018, 01:17 PM   #10
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
The link you posted doesn't mention anything about installing grub on an efi system. Here is some info for installing grub on efi mode:
If you already have an efi partition then you won't have to create it just mount it to /boot/efi
http://fasterland.net/how-to-install...inux-uefi.html
https://gist.github.com/Apsu/4108795
 
Old 12-02-2018, 02:31 PM   #11
Faire
LQ Newbie
 
Registered: Dec 2018
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
The link you posted doesn't mention anything about installing grub on an efi system. Here is some info for installing grub on efi mode:
If you already have an efi partition then you won't have to create it just mount it to /boot/efi
http://fasterland.net/how-to-install...inux-uefi.html
https://gist.github.com/Apsu/4108795
I have followed the tutorial in link, mounted EFI, same result. :/
 
Old 12-03-2018, 01:15 PM   #12
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,346

Rep: Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589Reputation: 1589
does the directory /boot/grub exist? If not create the /boot/grub directory.
 
Old 12-04-2018, 12:06 AM   #13
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Quote:
Originally Posted by Faire View Post
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:
Code:
# pacman -S grub efibootmgr
# grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=GRUB
After this, /boot/grub exists.

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.
 
Old 12-04-2018, 12:19 AM   #14
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Now I also have an installation problem. I end up in the UEFI shell rather than booting Archlinux. Just to tell you that you are not alone
 
Old 12-04-2018, 01:34 AM   #15
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
first things first: we are all assuming that you are root when doing these things.

Quote:
Originally Posted by Faire View Post
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".
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] executable file error: "No such file of directory" when file does exist dalgrim Slackware 8 11-03-2014 11:28 AM
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 10:56 PM
[SOLVED] error: asm/ppc_asm.h: No such file or directory and error: asm/processor.h: No such f Thirupathip Linux - Newbie 3 01-25-2013 03:02 AM
windows eclipse platform - crt1.o: No such file: No such file or directory jnettleton Programming 2 05-18-2012 09:01 PM
[SOLVED] "/boot/grub/grub.conf: No such file or directory" Pale Linux - Newbie 3 07-04-2010 03:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Arch

All times are GMT -5. The time now is 05:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration