You are not logged in.

#1 2023-08-19 20:22:43

omins
Member
Registered: 2023-08-19
Posts: 12

[SOLVED]grub-mkconfig issue

I recently wanted to set up a gpu passthrough vm which required me to rebuild my grub configuration file.
The command I used was sudo grub-mkconfig -o /boot/grub/grub.cfg and the output i got was :
[sudo] password for root:
/usr/bin/grub-mkconfig: line 270: /boot/grub/grub.cfg.new: File or folder doesn't exist
I couldn't find any solution on the wiki and in other forum posts so I was hoping that someone could help me

Last edited by omins (2023-08-20 13:40:47)

Offline

#2 2023-08-19 21:34:19

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,112

Re: [SOLVED]grub-mkconfig issue

Does /boot/grub exist? Did you forget to mount the /boot partition?

Offline

#3 2023-08-19 21:40:18

omins
Member
Registered: 2023-08-19
Posts: 12

Re: [SOLVED]grub-mkconfig issue

When I go to the /boot/ folder there is no folder or file called grub

Offline

#4 2023-08-19 21:41:18

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,112

Re: [SOLVED]grub-mkconfig issue

Hence the error.
You missed a part:

seth wrote:

Did you forget to mount the /boot partition?

Offline

#5 2023-08-19 21:47:09

omins
Member
Registered: 2023-08-19
Posts: 12

Re: [SOLVED]grub-mkconfig issue

To mount the boot partition I used the command:
sudo mount /boot
which changed nothing, same error

Offline

#6 2023-08-19 22:01:12

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,112

Re: [SOLVED]grub-mkconfig issue

if mount /boot would work it'd w/ 99% chance not be necessary…
*sigh*

cat /etc/fstab
lsblk -f

Offline

#7 2023-08-19 22:05:50

omins
Member
Registered: 2023-08-19
Posts: 12

Re: [SOLVED]grub-mkconfig issue

Still getting the same error even with mounting the actual partition

Offline

#8 2023-08-19 22:07:09

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,112

Re: [SOLVED]grub-mkconfig issue

You're getting the error because wherever you installed grub isn't mounted to /boot
Post the output I asked for or install ubuntu.

Offline

#9 2023-08-20 05:31:11

lfitzgerald
Member
Registered: 2021-07-16
Posts: 175

Re: [SOLVED]grub-mkconfig issue

/boot is supposed contain some stuff. If it's empty, that's usually because it didn't get mounted for some reason. An easy option is to mount it manually and see if that fixes your mkconfig issue. If it does, you can then try to figure out why it's not getting mounted.

You should see the partition in lsblk - usually people make boot ~1 GB so it should be easy to find by size.

You can also check /etc/fstab to see if there's an entry for boot. If so it would point you to where exactly your boot partition is.

Offline

#10 2023-08-20 06:06:39

omins
Member
Registered: 2023-08-19
Posts: 12

Re: [SOLVED]grub-mkconfig issue

lfitzgerald, there is an entry for the /boot partition in /etc/fstab
# /dev/nvme0n1p1 UUID=2349-AD32          /boot           vfat            rw,relatime,fmask=0022,dmask=00
in case you need it. When I mount it I still get the same error

Offline

#11 2023-08-20 06:09:25

omins
Member
Registered: 2023-08-19
Posts: 12

Re: [SOLVED]grub-mkconfig issue

seth, here are the outputs:
cat /etc/fstab
# Static information about the filesystems.
# See fstab(5) for details.

# <file system> <dir> <type> <options> <dump> <pass>
# /dev/nvme0n1p3
UUID=0aaefc26-5088-4446-8472-15b0e9fd7ddc    /             ext4          rw,relatime    0 1

# /dev/nvme0n1p1
UUID=2349-AD32          /boot         vfat          rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro    0 2

# /dev/nvme0n1p4
UUID=9e18c7cb-1d71-429c-90ae-69ef27830ffa    /home         ext4          rw,relatime    0 2

# /dev/nvme0n1p2
UUID=78f9213a-7817-4e28-98ad-2d8d74b99822    none          swap          defaults      0 0
lsblk -f
Assertion 'path_is_absolute(p)' failed at src/basic/chase.c:628, function chase(). Aborting.

Offline

#12 2023-08-20 07:10:42

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,112

Re: [SOLVED]grub-mkconfig issue

Please use [code][/code] tags. Edit your post in this regard.

$ lsblk -f
Assertion 'path_is_absolute(p)' failed at src/basic/chase.c:628, function chase(). Aborting.

is obviously a massive problem.
https://gitlab.archlinux.org/archlinux/ … /issues/99
https://github.com/systemd/systemd/issues/28458
https://www.reddit.com/r/debian/comment … e_systemd/

What is the context of this?
archlinux docker image?
chroot?
Did you run a partial update?

Offline

#13 2023-08-20 12:26:53

omins
Member
Registered: 2023-08-19
Posts: 12

Re: [SOLVED]grub-mkconfig issue

I restarted my system and now the lsblk command is working, output:

lsblk -f
NAME FSTYPE FSVER LABEL      UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
├─nvme0n1p1
│    vfat   FAT32            2349-AD32                             752,5M    26% /boot
├─nvme0n1p2
│    swap   1                78f9213a-7817-4e28-98ad-2d8d74b99822                [SWAP]
├─nvme0n1p3
│    ext4   1.0              0aaefc26-5088-4446-8472-15b0e9fd7ddc   28,9G    21% /
└─nvme0n1p4
     ext4   1.0              9e18c7cb-1d71-429c-90ae-69ef27830ffa  797,1G     5% /home

Offline

#14 2023-08-20 12:42:51

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,112

Re: [SOLVED]grub-mkconfig issue

What's the updated output of "ls -lR /boot"?

Offline

#15 2023-08-20 12:45:40

omins
Member
Registered: 2023-08-19
Posts: 12

Re: [SOLVED]grub-mkconfig issue

The output of Is -IR /boot is:

ls -lR /boot
/boot:
total 275708
drwxr-xr-x 5 root root      4096 2023-08-16 20:25 EFI
-rwxr-xr-x 1 root root 165991288 2023-08-19 22:43 initramfs-linux-fallback.img
-rwxr-xr-x 1 root root 103637875 2023-08-19 22:43 initramfs-linux.img
drwxr-xr-x 3 root root      4096 2023-08-20 loader
drwxr-xr-x 2 root root      4096 2023-08-17 01:43 syslinux
-rwxr-xr-x 1 root root  12673056 2023-08-19 22:43 vmlinuz-linux

/boot/EFI:
total 12
drwxr-xr-x 2 root root 4096 2023-08-16 20:25 BOOT
drwxr-xr-x 2 root root 4096 2023-08-16 20:25 Linux
drwxr-xr-x 2 root root 4096 2023-08-16 20:25 systemd

/boot/EFI/BOOT:
total 92
-rwxr-xr-x 1 root root 92672 2023-08-09 17:07 BOOTX64.EFI

/boot/EFI/Linux:
total 0

/boot/EFI/systemd:
total 92
-rwxr-xr-x 1 root root 92672 2023-08-09 17:07 systemd-bootx64.efi

/boot/loader:
total 16
drwxr-xr-x 2 root root 4096 2023-08-16 20:26 entries
-rwxr-xr-x 1 root root    6 2023-08-16 20:25 entries.srel
-rwxr-xr-x 1 root root   30 2023-08-16 20:25 loader.conf
-rwxr-xr-x 1 root root   32 2023-08-20 random-seed

/boot/loader/entries:
total 4
-rwxr-xr-x 1 root root 144 2023-08-16 20:39 arch.conf

/boot/syslinux:
total 4
-rwxr-xr-x 1 root root 2350 2019-11-21 syslinux.cfg

Offline

#16 2023-08-20 12:48:35

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,112

Re: [SOLVED]grub-mkconfig issue

So you're using syslinux and not grub… so how exactly did you arrive at

I recently wanted to set up a gpu passthrough vm which required me to rebuild my grub configuration file.

this nosensical conclusion?

Offline

#17 2023-08-20 12:54:47

omins
Member
Registered: 2023-08-19
Posts: 12

Re: [SOLVED]grub-mkconfig issue

So if I have syslinux why are there grub configuration files on my drive?

Offline

#18 2023-08-20 12:57:13

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,112

Re: [SOLVED]grub-mkconfig issue

Because you put them there?
You can install the pacakges of a dozen bootloaders that you all don't use - what guide did you follow to install archlinux?
Why don't you know what bootloader you're using or what packages you installed (or why)?

Offline

#19 2023-08-20 13:01:41

omins
Member
Registered: 2023-08-19
Posts: 12

Re: [SOLVED]grub-mkconfig issue

I didn't put anything there, the files already had entries that I never put in. The guide I used was on https://wiki.archlinux.org/title/installation_guide

Offline

#20 2023-08-20 13:07:40

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,112

Re: [SOLVED]grub-mkconfig issue

You obviously at some point installed the grub package, because othrewise there'd also be no grub-mkconfig, and this way put the standard /etc/default/grub onto your disk.
It's not possible to have followed that guide and not be aware what bootloader you're using. It requires you to make an execute a concious choice about that.

Offline

#21 2023-08-20 13:11:55

omins
Member
Registered: 2023-08-19
Posts: 12

Re: [SOLVED]grub-mkconfig issue

I legitimately have no idea how I installed grub, but since it's not necessary, it's safe to remove it, right?

Offline

#22 2023-08-20 13:34:33

Scimmia
Fellow
Registered: 2012-09-01
Posts: 13,727

Re: [SOLVED]grub-mkconfig issue

You appear to be using systemd-boot. You set it up less than 4 days ago, how can you not remember?

Yes, you can uninstall grub and syslinux.

Offline

#23 2023-08-20 13:37:15

omins
Member
Registered: 2023-08-19
Posts: 12

Re: [SOLVED]grub-mkconfig issue

Cool, thanks to everyone that helped me, I'm going to mark this as solved

Offline

Board footer

Powered by FluxBB