You are not logged in.

#1 2014-02-25 18:06:45

nupsi
Member
Registered: 2014-02-25
Posts: 9

After kernel update /boot/efi mount fails

Dear all,

last week I made it. I have installed archlinux on my new Dell XPS15 notebook based on UEFI. It was very hard get it working but it does now. Fortunately with GRUB.
For the installation I have used the German installation guide in https://wiki.archlinux.de/title/UEFI_Installation. As described there I have installed GRUB.

After a system update with "pacman -Syu" from linux-3.12.9-2 to linux-3.13.4-1 every reboot will end up in the emergency mode:

systemd[1]: Mounting /boot/efi...
mount[216]: mount: unknown filesystem type 'vfat'
systemd[1]: boot-efi.mount mount process exited, code=exited status=32
systemd[1]: Failed to mount /boot/efi.
systemd[1]: Depecdency failed for Local File Systems.

After asking Google for help and getting through many archlinux-Wiki sites I did not find a solution for my problem. A topic in this forum https://bbs.archlinux.org/viewtopic.php?pid=1187902 describes my problem precisely. But I do not really understand how to solve the problem (maybe it is not really the same?!).
However like in the post written I could downgrade my kernel to 3.12.9 and then everything worked again fine. But after the next update copying the kernal data did not lead to success (before the target directory /boot/efi/EFI/arch_grub had only one entry: grubx64.efi):

cd /boot
cp vmlinuz-linux ./efi/EFI/arch_grub/vmlinuz-arch.efi
cp initramfs-linux.img ./efi/EFI/arch_grub/initramfs-arch.img
cp initramfs-linux-fallback.img ./efi/EFI/arch_grub/initramfs-arch-fallback.img

Additionally I added "vfat" as the only entry to my /etc/mkinitcpio.conf MODULES. According to https://bbs.archlinux.org/viewtopic.php?id=173676.



My /etc/fstab looks like this:

# /dev/sda9 UUID=5b35397b-20ec-4d09-a4d8-960dbfe86069
    LABEL=root              /               ext4            rw,relatime,data=ordered        0 1

    # /dev/sda10 UUID=67b18dad-9dff-489b-b35a-e62700c907d0
    LABEL=var               /var            ext4            rw,relatime,data=ordered        0 2

    # /dev/sda11 UUID=03803a4b-b355-4adc-acec-9c0f19d2d6c8
    LABEL=home              /home           ext4            rw,relatime,data=ordered        0 2

    # /dev/sda8 UUID=2ea104d6-27d6-4b51-b0d0-36a3201d06ef
    LABEL=boot              /boot           ext4            rw,relatime,data=ordered        0 2

    # /dev/sda1 UUID=8A54-66DE
    LABEL=ESP               /boot/efi       vfat            rw,relatime,fmask=0022,dmask=0022,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 2



I run Windows 8.1 in dual boot mode (installed on sda2 - sda7 with Win partitions, recovery partitions a.s.o).


Thank you very much for your advices in advance.

Regards nupsi

Offline

#2 2014-02-25 18:33:49

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: After kernel update /boot/efi mount fails

I am going to guess that your booting kernel is not the same as the installed kernel.  Does 'uname -r' give the same result as 'pacman -Q linux'?

Offline

#3 2014-02-25 20:18:19

nupsi
Member
Registered: 2014-02-25
Posts: 9

Re: After kernel update /boot/efi mount fails

Since I have tried to update my kernel to 3.13.5-1 the output of pacman -Q linux is:

linux 3.13.5-1

The output of uname -r is:

linux 3.12.9-2-ARCH

As you guessed the booting kernel is not the same as the installed kernel although I copied the files like mentioned before.
I see a difference: I have copied my files to "./efi/EFI/arch_grub/" and not to "./efi/EFI/arch/". Is this correct?
I have used the name from the command

grub-install --target=x86_64-efi --efi-directory=/boot --bootloader-id=arch_grub --recheck --debug

when I installed GRUB.



In emergency mode: When I try to mount my UEFI partition into my boot partition with

mount /dev/sda1 /boot/efi

the mount fails: Unknown filesystem type "vfat"?!

Last edited by nupsi (2014-02-25 20:24:12)

Offline

#4 2014-02-25 20:40:43

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 10,721
Website

Re: After kernel update /boot/efi mount fails

Any chance you have more than one ESP? Can you find this 3.12.9-2-ARCH kernel anywhere on the one you have mounted?You can check the version with file.

e.g.

$ file /boot/EFI/arch/vmlinuz-linux-mainline 
/boot/EFI/arch/vmlinuz-linux-mainline: Linux kernel x86 boot executable bzImage, version 3.14.0-rc4-mainline (nobody@var-lib-archbuild-extra-x86_64-buil, RO-rootFS, swap_dev 0x3, Normal VGA

Sakura:-
Mobo: MSI MEG B550 UNIFY // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#5 2014-02-26 00:46:43

mrunion
Member
From: Jonesborough, TN
Registered: 2007-01-26
Posts: 1,938
Website

Re: After kernel update /boot/efi mount fails

FWIW, on my system which sounds similar to yours, the kernel should go in /boot/efi/EFI/arch. You should have the three files in there that you copied to /boot/efi/EFI/arch_grub.


Matt

"It is very difficult to educate the educated."

Offline

#6 2014-02-26 19:34:18

nupsi
Member
Registered: 2014-02-25
Posts: 9

Re: After kernel update /boot/efi mount fails

@WorMzy: I have only 5 partitions mounted
ESP / EF00: /dev/sda1 on /boot/efi
EF02: /dev/sda8 on /boot
root: /dev/sda9 on /
var: /dev/sda10 on /var
home: /dev/sda11 on /home

With the command find -iname "vmlinuz*" executed on / my system found 2 entries. One in /boot and one in /boot/efi/EFI/arch_grub.
The first one was created after "pacman -Syu" and the second one was created after I copied them to this path.
After "file ..." Both show:

Linux kernel x86 boot executable bzImage, version 3.13.5-1-ARCH (nobody@var-lib-archbuild-extra-x86_64-thomas) #1, RO-rootFS. swap_dev 0x3, Normal VGA

Offline

#7 2014-02-26 19:40:25

nupsi
Member
Registered: 2014-02-25
Posts: 9

Re: After kernel update /boot/efi mount fails

@mrunion:
I have booted my system with Arch on a flash drive. There I have mounted my partitions as I mentioned in the post before. Then I chrooted it.
In there I have created a directory arch with "mkdir /boot/efi/EFI/arch". Then I copied the 3 files from /boot to /boot/efi/EFI/arch. After rebooting it is still the same.
I fall back into emergency mode.

Offline

#8 2014-02-26 19:49:30

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 10,721
Website

Re: After kernel update /boot/efi mount fails

If you unmount your ESP, is there anything inside /boot/efi?

Also, what is the output of

lsblk -f

Sakura:-
Mobo: MSI MEG B550 UNIFY // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#9 2014-02-26 20:02:36

nupsi
Member
Registered: 2014-02-25
Posts: 9

Re: After kernel update /boot/efi mount fails

If I unmount ESP then there is nothing. /boot/efi seems to be an empty directory (used ls -al which shows only . and ..)

The output of lsblk -f is:

sda
--sda1   vfat   ESP                 8A54-66DE
--sda2   vfat   DIAGS             F215-B1A2
--sda3                           
--sda4   ntfs   WINRETOOLS   646016D66016AEB4
--sda5   ntfs   OS                   E8081EBA081E87A8 
--sda6   
--sda7   ntfs   PBR Image       CAD8069FD80689C1
--sda8   ext4   boot                2ea104d6-27d6-4b51-b0d0-36a3201d06ef   /boot
--sda9   ext4   root                 5b35397b-20ec-4d09-a4d8-960dbfe86069   /
--sda10   ext4   var                67b18dad-9dff-489b-b35a-e62700c907d0    /var
--sda11   ext4   home            03803a4b-b355-4adc-acec-9c0f19d2d6c8    /home

Offline

#10 2014-02-26 20:31:26

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 10,721
Website

Re: After kernel update /boot/efi mount fails

Okay, and if you then unmount your boot partition, is there anything still in /boot?

And are there any kernels on sda2?


Sakura:-
Mobo: MSI MEG B550 UNIFY // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#11 2014-02-26 20:43:14

nupsi
Member
Registered: 2014-02-25
Posts: 9

Re: After kernel update /boot/efi mount fails

Ok now I used umount /boot.
Now lsblk -f shows:

sda
--sda1   vfat   ESP                 8A54-66DE
--sda2   vfat   DIAGS             F215-B1A2
--sda3                           
--sda4   ntfs   WINRETOOLS   646016D66016AEB4
--sda5   ntfs   OS                   E8081EBA081E87A8
--sda6   
--sda7   ntfs   PBR Image       CAD8069FD80689C1
--sda8   ext4   boot                2ea104d6-27d6-4b51-b0d0-36a3201d06ef
--sda9   ext4   root                 5b35397b-20ec-4d09-a4d8-960dbfe86069   /
--sda10   ext4   var                67b18dad-9dff-489b-b35a-e62700c907d0    /var
--sda11   ext4   home            03803a4b-b355-4adc-acec-9c0f19d2d6c8    /home


Then I changed to the directory and I get a confusing output:

.
..
EFI
efi
grub
initramfs-linux-fallback.img
initramfs-linux.img
vmlinuz-linux

As you might already guess "file vmlinuz-linux" returns:

Linux kernel x86 boot executable bzImage, version 3.12.9-2-ARCH (nobody@var-lib-archbuild-extra-x86_64-thomas) #1, RO-rootFS. swap_dev 0x3, Normal VGA

The directory /boot/efi is still empty. But in /boot/EFI there is one entry: gummiboot.

OMG what's going on there? How does this work? I remember I had trouble while installing a bootloader GRUB so I tried a gummiboot and GRUB again until it worked. Sorry for my misunderstanding. Can you help me with this please?

(I cannot mount /dev/sda2 because the system returns unknown filesystem type "vfat" in emergency mode)

Offline

#12 2014-02-26 21:09:31

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 10,721
Website

Re: After kernel update /boot/efi mount fails

From what I can gather, you are not booting with EFI. Instead, you are booting with grub2 in legacy boot mode for gpt partitioned disks (https://wiki.archlinux.org/index.php/Gr … structions). This version of grub is installed to your root partition (not the boot partition, or the ESP), and as such is loading the kernel from your root partition's /boot folder.

Check in your BIOS to confirm whether you're booting in UEFI or legacy mode to confirm/deny this hypothesis. I might be mistaken, but it seems like the most likely explanation.

If I'm right, you have three choices.

1) Continue with the current state of affairs. Simply remove the /boot and /boot/efi entries in your fstab, and use you root partition's /boot folder.
2) Continue booting in legacy mode, but reinstall grub to your boot partition (good if you have a small root, or want to keep /boot separate).
3) Change your BIOS so that you boot in UEFI mode and use a EFI boot manager (may not be possible if your BIOS doesn't have UEFI capabilities).


Sakura:-
Mobo: MSI MEG B550 UNIFY // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#13 2014-02-26 22:11:51

nupsi
Member
Registered: 2014-02-25
Posts: 9

Re: After kernel update /boot/efi mount fails

Hmm that's confusing. I have installed GRUB2 with this guide: https://wiki.archlinux.org/index.php/Gr … _systems_2. In my boot settings of my UEFI-BIOS I have got 3 possibilities. 1) legacy 2) UEFI with Secure Boot and 3) UEFI without Secure Boot. I Have chosen the 3rd configuration.
Furthermore the installation based on the GRUB2 UEFI guide added a boot entry "arch_grub" to my  boot options (beside of Windows and UEFI Boot).

I still do not really understand why my system works with kernel 3.12. The system is booting and after the startup I can see my boot partition and  the additionally mounted sda1 partition on /boot/efi with all data in it?!

Anyway I am aiming to use UEFI. So kann I just correct my boot partition? Should I clean up the boot partition and it's files and use another bootloader than GRUB2?

Offline

#14 2014-02-26 22:32:03

WorMzy
Forum Moderator
From: Scotland
Registered: 2010-06-16
Posts: 10,721
Website

Re: After kernel update /boot/efi mount fails

If you're aiming to boot with UEFI, then you don't really need a boot partition. Your ESP will suffice as one (after all, you need to have the kernel on there anyway, what's the point of duplicating files across partitions?), you just need a bit of fstab magic/hackery to mount your ESP's grub directory to /boot, using bind mounts. At least that's how I do it (albeit with refind rather than grub).

Getting back to the problem in hand though, you can boot with 3.12 because, when you downgrade to that kernel, you have all the 3.12 modules installed to your root, and this includes the vfat module necessary for mounting your ESP. The problem you get after upgrading is that you're still loading the 3.12 module for some reason, but your root has the modules for a different kernel version.

I guess the question now is, why is grub loading the kernel from the root partition, instead of the ESP? Unfortunately I can't help with that question, as I don't use grub. I'm sure someone else can answer that, but in the meantime, follow 1) in my previous post. That should allow you to boot the latest kernels in the interim.


Sakura:-
Mobo: MSI MEG B550 UNIFY // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#15 2014-02-26 23:17:10

nupsi
Member
Registered: 2014-02-25
Posts: 9

Re: After kernel update /boot/efi mount fails

Ok thank you very much. I think I could understand it a little bit more smile

As a conclusion of your advices I cleaned up my /boot directory (unmounted). After that I mounted my boot partition and ESP again. Then I have reinstalled grub there with the guide from https://wiki.archlinux.org/index.php/GR … _systems_2. Additionally I had to execute "grub-mkconfig -o /boot/grub/grub.cfg".
In the next step I added a mkinitcpio hook to update the kernel files in "/boot/efi/EFI/arch" from https://wiki.archlinux.org/index.php/EF … tcpio_hook.
I have tested with a downgrade to 3.12. and an upgrade to 3.13. Now it seems to work.

But as you mentioned I do not like duplicating the files. So I would prefer your method. Doesn't it matter when I dual boot Windows 8.1? I will study https://wiki.archlinux.org/index.php/EF … bind_mount and https://wiki.archlinux.org/index.php/REFInd. Hopefully I can delete GRUB, follow the guides and install reFind without an additional boot partition.

Thank you so much again for your time and help :-)

Offline

#16 2014-04-15 23:53:43

Robasiewicz
Member
Registered: 2014-04-15
Posts: 9

Re: After kernel update /boot/efi mount fails

nupsi wrote:

Dear all,

systemd[1]: Mounting /boot/efi...
mount[216]: mount: unknown filesystem type 'vfat'
systemd[1]: boot-efi.mount mount process exited, code=exited status=32
systemd[1]: Failed to mount /boot/efi.
systemd[1]: Depecdency failed for Local File Systems.

Additionally I added "vfat" as the only entry to my /etc/mkinitcpio.conf MODULES. According to https://bbs.archlinux.org/viewtopic.php?id=173676.

I had a very similar problem not too long ago.
in /etc/mkinitcpio.conf MODULES i did add both vfat and fat

I also found out that my kernel-copying services were not working.

after doing both of these things everything went smoothly. Hope it helps.

Offline

#17 2014-04-16 03:55:24

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,414

Re: After kernel update /boot/efi mount fails

Robasiewicz wrote:

I had a very similar problem not too long ago.
in /etc/mkinitcpio.conf MODULES i did add both vfat and fat

I also found out that my kernel-copying services were not working.

after doing both of these things everything went smoothly. Hope it helps.

If you are going to do this, you should also add the nls_cp437 module as well.  Otherwise you still won't be able to mount the vfat filesystem from within the initramfs.

I actually think this addition is not a bad idea.  You can then at least make modifications to your ESP from the initramfs (just boot with 'break=premount' on the kernel command line).  I do believe that I have this included in my fallback initramfs, as I use a whole separate config for the fallback so I can stick the btrfs binaries in there in case I break my shit.

In any case, this thread has been inactive for a month and a half, so hopefully the OP was able to get this solved and things in shape.


Oh, I think it was WorMzy who I had seen with an interesting solution to the issue of the kernel being written to /boot.  Instead of mounting the ESP at /boot or even mount at /boot/efi with some kind of helper to mv/cp the kernel and initramfs, he has the ESP mounted somewhere else entirely.  I think it may be /mnt/esp, so he then just bind mounts /mnt/esp/EFI/arch to /boot.  Then the kernel and initramfs gets written to the right place automatically while still being able to keep the "proper" directory structure of the ESP.

Offline

Board footer

Powered by FluxBB