You are not logged in.

#1 2021-02-14 14:00:18

860lacov
Member
Registered: 2020-05-02
Posts: 497

[SOLVED] /boot or /efi for systemd-boot?

In wiki /boot or /efi are example paths to mount esp partition.

If I understand correctly if I mount it in/boot then ky kernel will go to there so I'll have to make sure that my esp partition has enough space for kernels.

If I mount esp to /efi directory than bootloader will be installed on esp partition and kernels will stay on /boot on my main drive (I will not mount it to the separate partition).

Am I right?

If I will mount esp to /efi then will I have to copy kernels, ucode or something to the esp?
Or when I will create entries for systemd-boot will I have to modify them from default
Example:
/vmlinuz-linux

To something else?
Like /efi/vmlinuz-linux

?

Last edited by 860lacov (2021-02-18 21:11:45)

Offline

#2 2021-02-14 14:07:35

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,346

Re: [SOLVED] /boot or /efi for systemd-boot?

Systemd-boot can't boot from non-FAT32 partitions so you are not going to get around making the ESP partition big enough and then ideally directly mounting it to /boot so all of these things that need to be available to be loaded early land on the ESP where systemd-boot can access them.

Last edited by V1del (2021-02-14 14:08:10)

Offline

#3 2021-02-14 22:35:36

kermit63
Member
Registered: 2018-07-04
Posts: 372

Re: [SOLVED] /boot or /efi for systemd-boot?

Is this thread an offshoot of your previous thread?

It sounds like an XY problem that started with dual-booting with Windows that somehow meandered into a discussion about systemd-boot as a solution to the dual-boot problem.


Never argue with an idiot, they will drag you down to their level and then beat you with experience.
It is better to light a candle than curse the darkness.
A journey of a thousand miles begins with a single step.

Offline

#4 2021-02-14 23:28:18

860lacov
Member
Registered: 2020-05-02
Posts: 497

Re: [SOLVED] /boot or /efi for systemd-boot?

kermit63 wrote:

Is this thread an offshoot of your previous thread?

It sounds like an XY problem that started with dual-booting with Windows that somehow meandered into a discussion about systemd-boot as a solution to the dual-boot problem.

Both topics are connected to the same PC.


I'm almost sure that I can manage to install windows + arch with grub without any serious problems but still I don't know what to do when windows overwrite grub.
I wanted to know how to deal with the problem before it occurre.

I started this topic because of answers in previous one (those with systemd-boot)
Didn't want to expand first topic and change its subject.

Offline

#5 2021-02-15 00:14:15

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,346

Re: [SOLVED] /boot or /efi for systemd-boot?

Windows usually doesn't do much anymore and can happily use an existing EFI partition, how your mainboard reacts is a different story and in any case the worst that could happen is that you'd need to reinstall GRUB/systemd-boot.

Offline

#6 2021-02-15 00:17:04

loqs
Member
Registered: 2014-03-06
Posts: 19,022

Re: [SOLVED] /boot or /efi for systemd-boot?

860lacov wrote:

I'm almost sure that I can manage to install windows + arch with grub without any serious problems but still I don't know what to do when windows overwrite grub.
I wanted to know how to deal with the problem before it occurre.

You already answered your own question in 1. https://bbs.archlinux.org/viewtopic.php … 7#p1955737 ?

Offline

#7 2021-02-15 00:20:34

kermit63
Member
Registered: 2018-07-04
Posts: 372

Re: [SOLVED] /boot or /efi for systemd-boot?

860lacov wrote:

I'm almost sure that I can manage to install windows + arch with grub without any serious problems

Does this mean you plan to reinstall arch? Technically, you don't have to. You can just add Windows, then boot into a live USB and reinstall grub + os-prober to end up with a multi-boot system. Just make sure to mount the windows partition before reinstalling GRUB so it can be detected.

860lacov wrote:

but still I don't know what to do when windows overwrite grub.I wanted to know how to deal with the problem before it occurre.

The same procedure I mentioned above applies whenever a windows update overwrites grub. I'm not a systemd-boot expert, but the same problem will occur whether you use GRUB or systemd-boot, so switching to systemd-boot is not the solution to the problem. That's why I called it an XY problem.

The term "overwriting GRUB" is actually misleading when applied to EFI systems as it is a term more commonly applicable to BIOS/MBR systems. In BIOS systems, GRUB is installed in the MBR, which Windows will totally overwrite when it's installed after arch. In EFI systems, Windows creates a boot entry in the EFI partition and makes it the default boot entry, while the arch boot entry remains but hidden since Windows doesn't understand linux boot systems.

Even without reinstalling GRUB, you can still boot into arch by going into your UEFI boot menu and selecting the arch boot entry. Once booted into arch, you can then use os-prober in conjunction with grub-mkconfig or grub-install to end up with a GRUB boot screen that has a windows boot entry.

Even in the unlikely event that windows totally overwrites the EFI partition, you can still recreate an arch boot entry using the method I mentioned earlier. (live USB + os-prober + grub-install).

----

I don't know what your use-case is, but have you considered installing Windows as a virtual machine inside Arch? That's a more surefire way of preventing Windows from messing up  your arch installation, with the added bonus that you can use both OS at the same time.

NOTE: I noticed @loqs and @V1del's answer before I pressed Submit, but decided to post anyway since I went into a lot more detail.


Never argue with an idiot, they will drag you down to their level and then beat you with experience.
It is better to light a candle than curse the darkness.
A journey of a thousand miles begins with a single step.

Offline

#8 2021-02-15 06:18:04

finoderi
Member
Registered: 2020-06-12
Posts: 76

Re: [SOLVED] /boot or /efi for systemd-boot?

@860lacov I've been using dualboot with Windows for two years now and Windows never overwrited anything. Windows doesn't do it anymore.

Offline

#9 2021-02-15 09:42:01

860lacov
Member
Registered: 2020-05-02
Posts: 497

Re: [SOLVED] /boot or /efi for systemd-boot?

kermit63 wrote:

Does this mean you plan to reinstall arch? Technically, you don't have to. You can just add Windows, then boot into a live USB and reinstall grub + os-prober to end up with a multi-boot system. Just make sure to mount the windows partition before reinstalling GRUB so it can be detected.

Recently I made some major hardware changes. I prefer to do a clean installation.


kermit63 wrote:

You can just add Windows, then boot into a live USB and reinstall grub + os-prober to end up with a multi-boot system. Just make sure to mount the windows partition before reinstalling GRUB so it can be detected.

This is the part I don't understand. It's probably obvious that I know how to mount a partition but just to be sure. I know.
But what does mean mount the windows partition? Mount it wherever I want? Do I have to mount it to a directory like /Windows or /mnt/Windows or /home/jm/Windows ?
Do I need to have it in fstab?

kermit63 wrote:

I don't know what your use-case is, but have you considered installing Windows as a virtual machine inside Arch? That's a more surefire way of preventing Windows from messing up  your arch installation, with the added bonus that you can use both OS at the same time.

For me virtualization is an ideal solution. I have a virtual machine with Windows already, but I need to prepare PC for the new user. For this user Linux = magic, and running Windows form Virtualbox = black magic smile
There are some other things I tried to fight with for a few years (Affinity photo, Lightroom etc.)


finoderi wrote:

@860lacov I've been using dualboot with Windows for two years now and Windows never overwrited anything. Windows doesn't do it anymore.

Good to know. Thank you

Last edited by 860lacov (2021-02-15 09:55:05)

Offline

#10 2021-02-15 10:16:52

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,346

Re: [SOLVED] /boot or /efi for systemd-boot?

You need to mount the partition "somewhere" it doesn't matter where, the important thing is that it gets an entry in your /etc/mtab (which will happen on mount) before running grub-mkconfig so that grub's os-prober can identify it's presence. Though I am somewhat unsure whether this is actually needed, as on an EFI system GRUB should be booting the Windows boot loader that's also on the ESP that GRUB has been installed on.

Offline

#11 2021-02-18 19:25:35

860lacov
Member
Registered: 2020-05-02
Posts: 497

Re: [SOLVED] /boot or /efi for systemd-boot?

I decided to try systemd-boot
And I failed

my loader.conf is:

default  arch.conf
timeout  4
console-mode max
editor   no

My entry is called arch.conf and it is:

title   Arch Linux
linux   /vmlinuz-linux
initrd  /amd-ucode.img
initrd  /initramfs-linux.img
options root=/dev/nvme0n1p3 rw

When I try to boot I get an error:

:: running early hook [udev]
Starting version 247.3-1-arch
:: running hook [udev]
:: Triggering uevents...
:: running hook [consolefont]
:: Loading consolefont...done.
:: perfroming fsck on '/dev/nvme0n1p3'
:: mounting '/dev/nvme0n1p3' on real root
:: running cleanup hook [udev]
Error: Root device mounted successfully, nut /sbin/init does not exist.
Bailing out, you are on your own. Good luck.

sh: con't access tty; job control turned off

nvme0n1p3 is a btrfs partiton with @ @home and @cache subvolumes

Last edited by 860lacov (2021-02-18 19:43:23)

Offline

#12 2021-02-18 20:01:27

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

Re: [SOLVED] /boot or /efi for systemd-boot?

860lacov wrote:

nvme0n1p3 is a btrfs partiton with @ @home and @cache subvolumes

Then you need to tell your bootloader about this. Currently you have it looking for / on the root of your btrfs partition, you need to tell it to look on the @ subvolume instead.
https://wiki.archlinux.org/index.php/Bt … me_as_root


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

#13 2021-02-18 20:21:02

860lacov
Member
Registered: 2020-05-02
Posts: 497

Re: [SOLVED] /boot or /efi for systemd-boot?

Slithery wrote:
860lacov wrote:

nvme0n1p3 is a btrfs partiton with @ @home and @cache subvolumes

Then you need to tell your bootloader about this. Currently you have it looking for / on the root of your btrfs partition, you need to tell it to look on the @ subvolume instead.
https://wiki.archlinux.org/index.php/Bt … me_as_root

1. Thank you very much!
I added rootflags=subvol=@ and that helped

Do I have to add something more? For example in fstab I have options like compress=zstd,ssd,commit=120,...
Should I add something similar to arch.conf for systemd-boot?

Or if I have rw option in fstab for my root partiton. Same option is on arch.conf. So can I ramove this option from fstab?

2. I have another problem. Don't know if it's systemd-boot connected

In place where I should input login there is:

archlinux login: [      1.984961] nouveau 0000:2d:00.0: AMD-Vi: Event logged [IO_P AGE_FAULT domain=0x001a address=0x0 flags=0x0000]

nouveau is something connected with Nvidia card I believe

Edit. Not sure what happened.
After 3 or 4 reboot message didn't appear again.

Last edited by 860lacov (2021-02-18 20:48:59)

Offline

Board footer

Powered by FluxBB