You are not logged in.
Pages: 1
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
Does /boot/grub exist? Did you forget to mount the /boot partition?
Offline
When I go to the /boot/ folder there is no folder or file called grub
Offline
Hence the error.
You missed a part:
Did you forget to mount the /boot partition?
Offline
To mount the boot partition I used the command:
sudo mount /boot
which changed nothing, same error
Offline
if mount /boot would work it'd w/ 99% chance not be necessary…
*sigh*
cat /etc/fstab
lsblk -fOffline
Still getting the same error even with mounting the actual partition
Offline
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
/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
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
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
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
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% /homeOffline
What's the updated output of "ls -lR /boot"?
Offline
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.cfgOffline
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
So if I have syslinux why are there grub configuration files on my drive?
Offline
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
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
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
I legitimately have no idea how I installed grub, but since it's not necessary, it's safe to remove it, right?
Offline
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
Cool, thanks to everyone that helped me, I'm going to mark this as solved
Offline
Pages: 1