You are not logged in.

#1 2021-02-28 17:47:52

NaNaN
Member
Registered: 2021-01-04
Posts: 65

Missing GRUB in boot directory

My installation is fine and everything boots but I noticed something strange, the directory I installed GRUB to (/boot) is not showing the kernel or the grub directory that was there when I did the install.

What happened to it? Where did it go?

I can see the ESP mounted but I can't see the files. I'm expecting to see /boot/grub/grub.cfg and /boot/vmlinuz-linux (kernel) but even after it's booted, the directory is empty.

Last edited by NaNaN (2021-02-28 17:49:36)

Offline

#2 2021-02-28 17:56:16

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,731

Re: Missing GRUB in boot directory

Is it mounted? And is the ESP mounted or rather was it mounted to /boot when you first set up the system?

Post the output of

mount
tree /boot

.

This usually happens due to a common misunderstanding of what's mounted where. If the directory is empty now then you are either looking at an actually unmounted directory and you didn't set up a relevant automount for the ESP you expect to have your images on or you mounted something over /boot that wasn't there before and you actually setup the files on the /boot directory on your root partition.

Online

#3 2021-02-28 18:02:24

NaNaN
Member
Registered: 2021-01-04
Posts: 65

Re: Missing GRUB in boot directory

The ESP resides on sda1 and it's mounted; I can see it. Do you still want to see the output of mount?

Yes, you're right, I did not set up an automount for the ESP as it seemed counterintuitive since that's handled by the OS itself.

But even though I didn't set it to automount, shouldn't I still be seeing the files since the partition is mounted? I'm still missing something.

EDIT:
I don't have 'tree' installed, the command is not found.

Last edited by NaNaN (2021-02-28 18:12:05)

Offline

#4 2021-02-28 18:33:41

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,731

Re: Missing GRUB in boot directory

Well then install tree.  But you say "it's mounted" where exactly ( and this is the reason I need to see the output of mount, because your interpretation of "is mounted" and what the system actually thinks to be mounted and especially where and why might differ)? If you don't mount that to /boot then you won't see it's contents in  /boot if you did have that mounted to /boot during the installation then files will have landed there.

Online

#5 2021-02-28 18:45:03

NaNaN
Member
Registered: 2021-01-04
Posts: 65

Re: Missing GRUB in boot directory

Thank you, I see what you mean now. Okay, I see the files now. They are all there, you're right, all I had to do was to mount the ESP. I was convinced it was mounted but I mistook sda3 for the ESP. Ugh...

As for installing tree, I have to have a connection to the web for that, but one of the requirements is that this machine never be connected to the Internet. I would have to get the package and install it manually. BTW, this flexibility is the main reason why we moved away from UNIX and over to Arch.

Offline

#6 2021-02-28 18:49:25

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,731

Re: Missing GRUB in boot directory

If you set it up this way you should set up the automount to /boot because if you were to ever update the system including a new kernel you need the updated initramfs and vmlinuz files to land on the ESP which is easiest accomplished by mounting it to /boot

In any case if this is [SOLVED] for you please mark it as such by editing the title in your first post.

Last edited by V1del (2021-02-28 18:49:57)

Online

#7 2021-02-28 18:53:33

NaNaN
Member
Registered: 2021-01-04
Posts: 65

Re: Missing GRUB in boot directory

Thanks V1, I didn't realize this. I thought it was actually preferable to leave the ESP off automount, so this is good to know. I'll set it to mount on boot then. Thanks for taking the time to explain everything.

Offline

#8 2021-03-02 03:41:43

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Missing GRUB in boot directory

I solved this problem by mounting the ESP to /tmp/esp during the install, having /boot be a boring directory, and letting grub, on every boot, mount the rootfs to access the /boot directory. This is one of the main advantages of grub, it supports every filesystem you're likely to use.

I've never really had a reason to mount the ESP or modify it since then. Which is also fewer ways for it to get messed up. wink


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB