You are not logged in.

#1 2024-03-15 22:30:05

camleon
Member
Registered: 2023-09-07
Posts: 8

[SOLVED] Failed to mount /boot. (kernel versions differ?)

Hi all,
I have been using Archlinux for many years on a dual-boot system alongside with Windows, but recently I needed to redo the installation and ran into a problem, where I get the following error message at boot (of course after very carefully following the installation guide for the x-th time):

[FAILED] Failed to mount /boot
[DEPEND] Dependency failed for Local File Systems.
You are in emergency mode [...]

There was definitely no error when installing grub in my EFI partition.
After doing some research, I found out that my kernel versions differ between the "uname -a" and "pacman -Qi linux":

$ pacman -Qi linux | grep Version
Version     : 6.7.9.arch1-1
$ uname -a 
Linux archlinux 6.6.21-1-lts [...]

and that this may be the reason /boot cannot be mounted. How can that be? What does this mean? So bizzare!
I don't have an old kernel version in /var/cache/pacman/... to revert to, because obviously I just installed the system. I cannot mount /boot manually, because

unknown filesystem type 'vfat'

. I cannot connect to the internet or start the networkmanager service, because this seems to be impossible in emergency mode. `mkinitcpio -P` and `mkinitcpio -P linux` don't fix anything unfortunately. I am really stuck here..

Content of fstab:

# /dev/sda1
UUID=BLABLABLA                /          ext4                rw,realtime    0   1
# /dev/sdc5
UUID=BLA                         /boot        vfat                 rw,realtime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro        0    2
# /dev/sda2
UUID=BLABLABLA                none        swap               defaults     0   0

Windows is located on "/dev/sdc" and "/dev/sdc5" is the EFI partition (1GB)
Any help would be greatly appreciated! Thanks!

Last edited by camleon (2024-03-16 13:07:45)

Offline

#2 2024-03-15 23:01:25

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,640

Re: [SOLVED] Failed to mount /boot. (kernel versions differ?)

Why would you check the 'linux' package when that's not the kernel you're using?

Offline

#3 2024-03-15 23:08:20

camleon
Member
Registered: 2023-09-07
Posts: 8

Re: [SOLVED] Failed to mount /boot. (kernel versions differ?)

sorry, can you elaborate a bit? Should I check something else? I thought 6.7.9 was the kernel version I should be using. I am not saying that this linux version stuff is definitely the reason /boot cannot be mounted, but this conclusion comes up from time to time when researching the problem in other forums.

Last edited by camleon (2024-03-15 23:20:56)

Offline

#4 2024-03-15 23:21:20

seth
Member
Registered: 2012-09-03
Posts: 52,276

Re: [SOLVED] Failed to mount /boot. (kernel versions differ?)

You're booting the LTS kernel?

In any event, you'll have to fix this offline (ie. from the install iso) since you cannot mount the boot partition.
Speaking of which:

# /dev/sdc5                  /boot        vfat                 rw,realtime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro        0    2

it seems commented in your fstab??
However

UUID=BLABLABLA

since this is apparently a transcript, it's not clear how accurate that is.

Offline

#5 2024-03-15 23:30:53

camleon
Member
Registered: 2023-09-07
Posts: 8

Re: [SOLVED] Failed to mount /boot. (kernel versions differ?)

seth wrote:

You're booting the LTS kernel?

In any event, you'll have to fix this offline (ie. from the install iso) since you cannot mount the boot partition.
Speaking of which:

# /dev/sdc5                  /boot        vfat                 rw,realtime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro        0    2

it seems commented in your fstab??
However

UUID=BLABLABLA

since this is apparently a transcript, it's not clear how accurate that is.

Honestly I am confused as to what I should be booting. Since I installed 6.7.9 via pacstrap just now, I would expect that version to boot and I would expect "uname -a" to list it.

Yes, it is a transcript, and I just corrected it, thanks. The crucial info is not commented out.

I have already tried running pacman updates / mkinitcpio from the live iso (in arch-chroot), without luck.

Last edited by camleon (2024-03-15 23:33:14)

Offline

#6 2024-03-15 23:36:13

seth
Member
Registered: 2012-09-03
Posts: 52,276

Re: [SOLVED] Failed to mount /boot. (kernel versions differ?)

pacman -Qs kernel

will tell you what kernel's you've installed, but according to "uname -a", you're booting the LTS kernel.
Edit: try to explicitly re-install the kernel from the chroot, make sure you "arch-chroot"'ed into the system and don't forget to mount the /boot partition.

From the recue target, what's

cat /proc/cmdline

?

Last edited by seth (2024-03-15 23:37:51)

Offline

#7 2024-03-15 23:44:05

camleon
Member
Registered: 2023-09-07
Posts: 8

Re: [SOLVED] Failed to mount /boot. (kernel versions differ?)

seth wrote:
pacman -Qs kernel

will tell you what kernel's you've installed, but according to "uname -a", you're booting the LTS kernel.
Edit: try to explicitly re-install the kernel from the chroot, make sure you "arch-chroot"'ed into the system and don't forget to mount the /boot partition.

From the recue target, what's

cat /proc/cmdline

?

Ok, I see. So

 pacman -Qs kernel

lists a couple of packages and also this one (transcript again)

local/linux 6.7.9.arch1-1
    The Linux kernel and modules

and I just noticed that the first boot message, which appears for a split-second is something like "loading linux-lts", so there appears to be some kind of mismatch?

$ cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-linux-lts root=UUID=<STUFF> rw loglevel=3 quiet

Ok, so is this the image that grub tries to boot?

Offline

#8 2024-03-15 23:45:24

camleon
Member
Registered: 2023-09-07
Posts: 8

Re: [SOLVED] Failed to mount /boot. (kernel versions differ?)

ok, I will try reinstalling "linux" with mounted /boot!

Last edited by camleon (2024-03-15 23:50:23)

Offline

#9 2024-03-15 23:48:22

seth
Member
Registered: 2012-09-03
Posts: 52,276

Re: [SOLVED] Failed to mount /boot. (kernel versions differ?)

You'll also have to "grub-mkconfig" (assuming that's your bootloader)

Offline

#10 2024-03-16 00:05:52

camleon
Member
Registered: 2023-09-07
Posts: 8

Re: [SOLVED] Failed to mount /boot. (kernel versions differ?)

seth wrote:

You'll also have to "grub-mkconfig" (assuming that's your bootloader)

Yes, I am using GRUB. Ok, I just did the following from the live iso:

mount /dev/sda1 /mnt
mount /dev/sdc5 /mnt/boot
arch-chroot /mnt
pacman -S linux base linux-firmware
grub-mkconfig -o /boot/grub/grub.cfg

So, pacman reinstalled these packages and ran mkinitcpio.
The grub-mkconfig command prints the following:

Generating grub configuration file
Found linux image: /boot/vmlinuz-linux-lts
Found initrd image: /boot/initramfs-linux-lts.img
Found fallback initrd image(s) in /boot: initramfs-linux-lts-fallback.img
Found linux image /boot/vmlinuz-linux
Found fallback initrd image(s) in /boot: initramfs-linux-fallback.img
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
Adding boot menu entry for UEFI Firmware Settings ...
done

After a reboot the problem persists. Did GRUB actually do anything here? I would guess not, because "cat proc/cmdline" gives me the same output

Offline

#11 2024-03-16 00:18:08

camleon
Member
Registered: 2023-09-07
Posts: 8

Re: [SOLVED] Failed to mount /boot. (kernel versions differ?)

Aha! In the GRUB-menu I selected the non-lts version under the Advanced Options and this boots just fine. So I probably have to find a way to make this the default boot entry for "ArchLinux" and probably I should somehow remove the old LTS version that was left over from the previous setup.. I think my initial problem is therefore solved, thanks a lot for being so patient @seth!

Offline

#12 2024-03-16 08:04:57

seth
Member
Registered: 2012-09-03
Posts: 52,276

Re: [SOLVED] Failed to mount /boot. (kernel versions differ?)

https://wiki.archlinux.org/title/GRUB/T … menu_entry but if you don't even have the lts kernel installed

pacman -Qs linux-lts

I'd rather clean up the /boot directory from LTS kernel and corresponding initramfs'.

Offline

#13 2024-03-16 13:08:21

camleon
Member
Registered: 2023-09-07
Posts: 8

Re: [SOLVED] Failed to mount /boot. (kernel versions differ?)

Yes, agreed. Thanks again!

Offline

Board footer

Powered by FluxBB