You are not logged in.

#1 2017-01-15 07:48:23

twicetimes
Member
Registered: 2017-01-15
Posts: 6

[SOLVED] Problem creating boot entry

Hi.

I'm following the installation guide on the wiki and I've hit a problem when trying to create a boot entry.  I'm currently following the instructions on https://wiki.archlinux.org/index.php/Systemd-boot

I'm using a UEFI system.  I've created 2 partitions as follows:

Fdisk output

/dev/sda1 is mounted at /mnt/boot
/dev/sda2 is mounted at /mnt

As per https://wiki.archlinux.org/index.php/EF … _Partition, I've formatted my 512MB system partition with

mkfs.fat -F32 /dev/sda1

I'm chroot'd into /mnt as per the earlier stage of the installation guide, so I'm now effectively treating them as

/boot

and

/

respectively.

When trying to run

bootctl --path=/boot install

, I get the following error:

File system "/boot" is not a FAT EFI System Partition (ESP) file system

Now, this seems to be true once I'm chroot'd in, because /boot looks like a directory with the vmlinuz and initramfs files in.  So have I set up my mounts wrong, or is it something else?

I get that I'm failing at a pretty early hurdle here.  Any help would be appreciated.

Last edited by twicetimes (2017-01-17 02:40:32)

Offline

#2 2017-01-15 10:51:25

Alber
Member
From: Spain - España
Registered: 2011-11-11
Posts: 227

Re: [SOLVED] Problem creating boot entry

Hello
I don't see anything wrong.
Which one was the order you mount /dev/sda1 and /dev/sda2 to /mnt/boot and /mnt/?
I don't know if it will work by try:
Mount first,

mnt /dev/sda2 /mnt

And second,

mnt /dev/sda1 /mnt/boot

(If you already did it this way. And it didn't work. I don't know what it could be).

Last edited by Alber (2017-01-15 11:01:44)


Because not all of us are native English speakers, try no to use slang or abbreviations, thank you.

Offline

#3 2017-01-15 11:18:58

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Problem creating boot entry

Is this a VM?
If so is it definitely booted in UEFI mode?


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#4 2017-01-15 11:36:22

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] Problem creating boot entry

From the chroot, check the output of

findmnt

As Alber notes, the order of the commands is important:

# mount /dev/sda2 /mnt
# mkdir /mnt/boot
# mount /dev/sda2 /mnt/boot
# pacstrap /mnt base
# arch-chroot /mnt /bin/bash

EDIT: Forgot to install the system, ha! What can I say? It's been a while... lol

Last edited by Head_on_a_Stick (2017-01-15 21:49:14)


Jin, Jîyan, Azadî

Offline

#5 2017-01-15 13:26:17

Alber
Member
From: Spain - España
Registered: 2011-11-11
Posts: 227

Re: [SOLVED] Problem creating boot entry

And as Head_on_a_Stick points, and I forgot. Thank you smile. It is important. Command

mkdir /mnt/boot

must be after  mount /dev/sda2 /mnt
and before than  mount /dev/sda1 /mnt/boot

Last edited by Alber (2017-01-15 13:27:06)


Because not all of us are native English speakers, try no to use slang or abbreviations, thank you.

Offline

#6 2017-01-15 14:48:23

twicetimes
Member
Registered: 2017-01-15
Posts: 6

Re: [SOLVED] Problem creating boot entry

Thanks for all your help so far.

Changing the order of the mounts did make a difference, and the bootctl command worked.

However, now I have a new problem.  I've created an arch.conf in /boot/loader/conf/ but it's trying to point to the vmlinuz and initramfs files which I can only see in /mnt/boot when I'm 'outside' the chroot.  Once I'm chroot'd in, the /boot directory only contains the EFI and loader directories.  It's as if the chroot'd /boot has overidden or masked the other one somehow.  I'm assuming that the desired situation is that I have both the EFI and loader directories in /boot, but also the kernel files?

Let me know if any of the above is unclear or if you'd like me to paste the output of any commands.

Offline

#7 2017-01-15 19:03:06

Alber
Member
From: Spain - España
Registered: 2011-11-11
Posts: 227

Re: [SOLVED] Problem creating boot entry

Try to think when you do a arch-chroot /mnt /bin/bash is as, roughly, you are in your final system.
The directory /mnt is now /, the root directory, and /mnt/boot is now /boot.
Try again from there.

(?)Maybe I've understood wrong, but you haven't to do a chroot to the /boot directory.


I think that you would get more help if you open a new thread with a new question.
Too, if you think your first question is answered mark this thread as solved. Just edit the thread title. smile

Edit:
I didn't see you had changed the title.
But I would still open a new thread to save people to read the first part that is resolved.

Last edited by Alber (2017-01-15 19:34:43)


Because not all of us are native English speakers, try no to use slang or abbreviations, thank you.

Offline

#8 2017-01-15 19:44:53

Alber
Member
From: Spain - España
Registered: 2011-11-11
Posts: 227

Re: [SOLVED] Problem creating boot entry

Now I think I understand the question.
I don't know if the explanation is correct but at least it is the idea behind:
The final /boot directory is in /dev/sda1. Which is mounted in /mnt/boot but after mount /dev/sda2 in /mnt and then create /mnt/boot. This directory is in /dev/sda2.
Maybe you are seeing /mnt/boot subdirectory of /mnt. Created before you mount /dev/sda2 in /mnt. This directory is in install media.

Try to remove /mnt/boot from install media before mount /dev/sda2 and /dev/sda1.

Last edited by Alber (2017-01-15 19:47:15)


Because not all of us are native English speakers, try no to use slang or abbreviations, thank you.

Offline

#9 2017-01-15 21:56:43

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] Problem creating boot entry

I think we need to see what is actually present on the partitions.

@OP, from the live environment provided by the Arch ISO image:

mount /dev/sda1 /mnt

Then post the output of:

ls /mnt

And the same for your root partition:

umount -R /mnt
mount /dev/sda2 /mnt
ls /mnt/boot # post this output please

You can use a pastebin client to generate a URL that can be posted here:

https://wiki.archlinux.org/index.php?ti … in_clients

You should also post the actual content of arch.conf rather than a vague description.

https://bbs.archlinux.org/viewtopic.php?id=57855


Jin, Jîyan, Azadî

Offline

#10 2017-01-16 02:40:39

twicetimes
Member
Registered: 2017-01-15
Posts: 6

Re: [SOLVED] Problem creating boot entry

Head_on_a_Stick wrote:

I think we need to see what is actually present on the partitions.

@OP, from the live environment provided by the Arch ISO image:

mount /dev/sda1 /mnt

Then post the output of:

ls /mnt

I'm going with screenshots as I'm using virtualbox's terminal and can't copy/paste easily (no SSH installed yet, etc).

mount sda1

Head_on_a_Stick wrote:

And the same for your root partition:

umount -R /mnt
mount /dev/sda2 /mnt
ls /mnt/boot # post this output please

mount sda2]

Head_on_a_Stick wrote:

You should also post the actual content of arch.conf rather than a vague description.

Note: this is with /dev/sda1 (my 512MB system partition) mounted on /mnt

boot loader conf


That PARTUUID is for the system partition.  Fairly sure this is the right one - see the results of blkid below:

blkid

Offline

#11 2017-01-16 02:48:07

twicetimes
Member
Registered: 2017-01-15
Posts: 6

Re: [SOLVED] Problem creating boot entry

Alber wrote:

The final /boot directory is in /dev/sda1. Which is mounted in /mnt/boot but after mount /dev/sda2 in /mnt and then create /mnt/boot. This directory is in /dev/sda2.
Maybe you are seeing /mnt/boot subdirectory of /mnt. Created before you mount /dev/sda2 in /mnt. This directory is in install media.

Try to remove /mnt/boot from install media before mount /dev/sda2 and /dev/sda1.

But then won't the vmlinuz / initramfs files be deleted?

Offline

#12 2017-01-16 07:54:16

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] Problem creating boot entry

twicetimes wrote:

I'm going with screenshots as I'm using virtualbox's terminal and can't copy/paste easily (no SSH installed yet, etc).

That is why I linked the pastebin guide and told you to post URLs instead  roll

Anyway, moving on...

You have no kernel image or initramfs on your EFI system partition and have instead installed it to /boot on /dev/sda2 — I presume that you ran `pacstrap` with /dev/sda1 unmounted (or mounted incorrectly).

See my earlier post, I have edited it to include the `pacstrap` command in the correct order.

The simplest solution here is probably to just move the kernel & initrd over to the ESP.

From the live environment:

mkdir /esp
mount /dev/sda1 /esp
mount /dev/sda2 /mnt
mv /mnt/boot/* /esp
umount -R /mnt /esp
reboot

EDIT: be sure to check /etc/fstab

For your posted configuration that file is not actually needed unless you want to set custom mount points or options.

Also, add rw to the end of your options line in arch.conf

https://wiki.archlinux.org/index.php/Sy … tallations

Last edited by Head_on_a_Stick (2017-01-16 09:14:28)


Jin, Jîyan, Azadî

Offline

#13 2017-01-16 11:18:23

Alber
Member
From: Spain - España
Registered: 2011-11-11
Posts: 227

Re: [SOLVED] Problem creating boot entry

twicetimes wrote:

But then won't the vmlinuz / initramfs files be deleted?

Yes, my idea was to resume from there and repeat the bootloader install process.
But don't do.
Head_on_a_stick has explained a better way to do it. And very well.


twicetimes wrote:

I think we need to see what is actually present on the partitions.

Yes, it is more sensible ask for info.
Further I was wrong. I was thinking in another scenario.

And more, I forgot what exactly files were there. yikes sad
My apologies.

Last edited by Alber (2017-01-16 11:29:02)


Because not all of us are native English speakers, try no to use slang or abbreviations, thank you.

Offline

#14 2017-01-16 14:35:38

twicetimes
Member
Registered: 2017-01-15
Posts: 6

Re: [SOLVED] Problem creating boot entry

Head_on_a_Stick wrote:

That is why I linked the pastebin guide and told you to post URLs instead  roll

My bad.  I saw 'pastebin' and just glossed over it.  I'll use it in future.

I followed the rest of your instructions and I now have a working boot entry.  I'm running into a new issue where mount reports 'unknown filesystem type vfat', but I think this should be a new thread of its own.

Many thanks for all your help.

Offline

#15 2017-01-16 15:06:39

twicetimes
Member
Registered: 2017-01-15
Posts: 6

Re: [SOLVED] Problem creating boot entry

Did some hunting and it turns out that vfat problem was that I'd put the wrong device's partuuid in my boot conf.  Everything works!  Onwards to post-install land smile

Offline

#16 2017-01-16 21:58:49

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [SOLVED] Problem creating boot entry

twicetimes wrote:

it turns out that vfat problem was that I'd put the wrong device's partuuid in my boot conf

Yes, that error is in the arch.conf that you posted and I should have spotted that, sorry.

On the other hand, I'm pretty sure I would have spotted it had a pastebin been used rather than a picture tongue

Also, would you please be so kind as to mark the thread [SOLVED]?


Jin, Jîyan, Azadî

Offline

Board footer

Powered by FluxBB