You are not logged in.

#1 2024-11-04 19:29:14

Zaphkiel224z
Member
Registered: 2024-01-11
Posts: 28

Regarding mounting conventions, /mnt and /, mounting /efi.

I am installing arch the second time and just basically trying to remember what I did and how I did last time. I still don't fully understand Linux filesystem and when looking at mount points for my previous system a couple of questions arose.

My root is mounted on / . I should've mounted it on /mnt since I followed the guide diligently. My assumption is that it is shown as being mounted on / because  /mnt is my de facto root. So, if I chroot, I should be able to see my original mount point, is that assumption correct or did I just have a stroke in the middle of reading the guide back then? My ESP is mounted on /efi because I had a smol Windows ESP there. And, if I am wrong, Is it correct to assume that mounting to /mnt is need to keep a / clean or... something... So you can chroot there from like a different system if something goes horribly wrong?

If my previous idea is right, is it truly mounted on /efi? Or is it on /mnt/efi? And, by extension, where should I put my current ESP? I assume it should be on /efi since it will be used for multiple systems and where should I create my /boot? Should I mkdir it /mnt/boot or /boot? Do I even need to make it? Maybe Grub creates it without me?

Thanks in advance

Update: I tried looking through chroot to / and it seems that I was wrong. I guess mount locations are agnostic of your current root. So I guess I did mount my root partition to /. Probably shouldn't do that this time. The general question and the question about mounting efi and creating boot still stand though.

Last edited by Zaphkiel224z (2024-11-04 19:55:28)

Offline

#2 2024-11-04 19:57:15

archlynovice
Member
Registered: 2023-10-22
Posts: 28

Re: Regarding mounting conventions, /mnt and /, mounting /efi.

If you're on a Live ISO, it has nothing to do with your system yet. You have to connect all parts of your system to the Live ISO. The "dock" for all these parts (root, efi, swap, ...) is the /mnt mountpoint. Everything needs to be bundled there (consider the order of what's connected after another). When everything is in place, you can change root (chroot) to the /mnt mountpoint. Only then, your system stands on its own legs - and to be able to do so, everything needs to be accessible (mounted to the previous /mnt).

Every system has its 'reference point' to which every location/directory is relative to. It's important to differentiate between what is part of the Live ISO and your Arch system.

That's the best I can explain it (being a newbie myself). Hope it helps your understanding.

Last edited by archlynovice (2024-11-04 20:03:14)

Offline

#3 2024-11-04 20:01:05

Zaphkiel224z
Member
Registered: 2024-01-11
Posts: 28

Re: Regarding mounting conventions, /mnt and /, mounting /efi.

archlynovice wrote:

If you're on a Live ISO, it has nothing to do with your system yet. You have to connect all parts of your system to the Live ISO. The "dock" for all these parts (root, efi, swap, ...) is the /mnt mountpoint. Everything needs to be bundled there (consider the order of what's connected after another). When everything is in place, you can change root (chroot) to the /mnt mountpoint. Only then, your system stands on its own legs - and to be able to do so, everything needs to be accessible (mounted to the previous /mnt).

That's the best I can explain it (being a newbie myself). Hope it helps your understanding.

Hm, that's interesting. So, I guess, if we disconnect an ISO the /mnt does become /? If I mount something on / on Live ISO do I basically mount it to the ISO?

Offline

#4 2024-11-04 20:09:44

archlynovice
Member
Registered: 2023-10-22
Posts: 28

Re: Regarding mounting conventions, /mnt and /, mounting /efi.

I just edited it to my response. Maybe it helps you:

Every system has its 'reference point' to which every location/directory is relative to. It's important to differentiate between what is part of the Live ISO and your Arch system.

I'm not sure if we ever 'disconnect' the ISO - we normally chroot out of it and forget about it.

If I mount something on / on Live ISO do I basically mount it to the ISO?

Yes.

Offline

#5 2024-11-04 20:20:07

archlynovice
Member
Registered: 2023-10-22
Posts: 28

Re: Regarding mounting conventions, /mnt and /, mounting /efi.

After re-reading, I fear some things I wrote are only partially true. I may not have been qualified to take on your question from the beginning ^^

The boot stick loads the Live ISO into your working memory. When working your system and even after changing root, the system relies on the Live ISO in the memory. Only after reboot (and pulling the boot stick during poweroff), the system stands on its own legs.

Offline

#6 2024-11-04 20:29:39

Zaphkiel224z
Member
Registered: 2024-01-11
Posts: 28

Re: Regarding mounting conventions, /mnt and /, mounting /efi.

archlynovice wrote:

After re-reading, I fear some things I wrote are only partially true. I may not have been qualified to take on your question from the beginning ^^

The boot stick loads the Live ISO into your working memory. When working your system and even after changing root, the system relies on the Live ISO in the memory. Only after reboot (and pulling the boot stick during poweroff), the system stands on its own legs.

No worries. You can't brick something if there is no brick, you know. It was still nice for you to answer. Regarding the mounting on /mnt it seems that there is alredy an /efi folder there which would contradict the wiki that states that it needs to be created so this thing only gets harder.
Thanks for the time, once again.

Offline

#7 2024-11-04 20:40:39

archlynovice
Member
Registered: 2023-10-22
Posts: 28

Re: Regarding mounting conventions, /mnt and /, mounting /efi.

Can you link the wiki article you're referring?

Offline

#8 2024-11-04 20:42:13

Zaphkiel224z
Member
Registered: 2024-01-11
Posts: 28

Re: Regarding mounting conventions, /mnt and /, mounting /efi.

archlynovice wrote:

Can you link the wiki article you're referring?

https://wiki.archlinux.org/title/EFI_sy … unt_points

My general choice is separate /boot and /efi

Last edited by Zaphkiel224z (2024-11-04 20:42:44)

Offline

#9 2024-11-04 20:54:10

archlynovice
Member
Registered: 2023-10-22
Posts: 28

Re: Regarding mounting conventions, /mnt and /, mounting /efi.

On my install, the ESP is in my /boot.

At this point I'd assume that you have to create your own /mnt/efi. It will only get populated later in the install process (grub-install and similar).

Offline

#10 2024-11-04 21:04:35

Zaphkiel224z
Member
Registered: 2024-01-11
Posts: 28

Re: Regarding mounting conventions, /mnt and /, mounting /efi.

archlynovice wrote:

On my install, the ESP is in my /boot.

At this point I'd assume that you have to create your own /mnt/efi. It will only get populated later in the install process (grub-install and similar).


Yeah, I know. And yet the /efi folder is already there. I mean, At this point I think I'll just try to mount everything, boot it and see what happens.

Edit: and that folder is not mountable. I gues... I'll mount to /efi and see what happens

Last edited by Zaphkiel224z (2024-11-04 21:07:15)

Offline

#11 2024-11-04 21:38:28

Zaphkiel224z
Member
Registered: 2024-01-11
Posts: 28

Re: Regarding mounting conventions, /mnt and /, mounting /efi.

archlynovice wrote:

On my install, the ESP is in my /boot.

At this point I'd assume that you have to create your own /mnt/efi. It will only get populated later in the install process (grub-install and similar).

Ok, so I found an interesting behavior. If you manually mkdir in /mnt it doesn't allow you to mount that folder. if you use mount --mkdir /mnt/efi, however, it allows that. Very peculiar.

Offline

#12 2024-11-04 23:38:21

loqs
Member
Registered: 2014-03-06
Posts: 18,075

Re: Regarding mounting conventions, /mnt and /, mounting /efi.

Zaphkiel224z wrote:

Ok, so I found an interesting behavior. If you manually mkdir in /mnt it doesn't allow you to mount that folder. if you use mount --mkdir /mnt/efi, however, it allows that. Very peculiar.

This works for me. What was the exact mount command you used and the error message generated?

Offline

#13 2024-11-05 09:43:51

Zaphkiel224z
Member
Registered: 2024-01-11
Posts: 28

Re: Regarding mounting conventions, /mnt and /, mounting /efi.

loqs wrote:
Zaphkiel224z wrote:

Ok, so I found an interesting behavior. If you manually mkdir in /mnt it doesn't allow you to mount that folder. if you use mount --mkdir /mnt/efi, however, it allows that. Very peculiar.

This works for me. What was the exact mount command you used and the error message generated?


mkdir inside /mnt, mount dev/sda1 /mnt/efi
/mnt/efi: mount point does not exist
mkdir /mnt/efi again
cannot create directory "square" /efi "square" File exists.
/mnt/efi can be cd'd into but can't be seen with any ls flags.
rm -rf /efi
As I've said earlier, doing mkdir inside the mount allows the mount. It doesn't work at the end, assuming I didn't screw up last night, grub doesn't see the efi partition on grub-install

Last edited by Zaphkiel224z (2024-11-05 09:44:48)

Offline

#14 2024-11-05 11:13:28

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,289

Re: Regarding mounting conventions, /mnt and /, mounting /efi.

I don't understand where you are... Assuming a live ISO, the usual process for dealing with your actual system is doing

mount $yourrootpartition /mnt 
mount $yourESPpartition /mnt/efi 
arch-chroot /mnt
#At this point, everything you mounted under /mnt will be "logically shifted" to a new root so / is what used to be on /mnt /efi is what used to be on /mnt/efi

it feels like your confusion is somewhere around those lines.

FWIW to get some actual data, from the system with the partitions mounted like you think they are correct, what do you get from

lsblk -f
cat /etc/fstab
mount

https://wiki.archlinux.org/title/List_o … n_services

Offline

#15 2024-11-05 11:39:32

Zaphkiel224z
Member
Registered: 2024-01-11
Posts: 28

Re: Regarding mounting conventions, /mnt and /, mounting /efi.

V1del wrote:

I don't understand where you are... Assuming a live ISO, the usual process for dealing with your actual system is doing

mount $yourrootpartition /mnt 
mount $yourESPpartition /mnt/efi 
arch-chroot /mnt
#At this point, everything you mounted under /mnt will be "logically shifted" to a new root so / is what used to be on /mnt /efi is what used to be on /mnt/efi

it feels like your confusion is somewhere around those lines.

FWIW to get some actual data, from the system with the partitions mounted like you think they are correct, what do you get from

lsblk -f
cat /etc/fstab
mount

https://wiki.archlinux.org/title/List_o … n_services


I did manage to boot up, in the end. Grub couldn't find ESP on /dev/sda so I used -grub-install --efi-directory and everything installed.  both lsblk and fstab show the same mount points, I don't think I can send outputs since there is nothing on the system yet. It's still curious that when manually mkdir /mnt/efi it doesn't allow to mount on it and the folder itself is weird since it doesn't show on ls -a but can be cd'd and rf'd. When using mount --mkdir /dev/sdaX /mnt/efi it does mount. Also, I don't think the last time I installed arch I needed to specifiy the Efi folder,  I just specified the disk /dev/sda. I did use premade Windows efi though so that might've been the reason. Anyway, So far it works and I think I have a better gist about how these filesystem shenenigans operate. I'll mark it [SOLVED] if it won't brick next day.

Offline

#16 2024-11-05 11:45:04

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,289

Re: Regarding mounting conventions, /mnt and /, mounting /efi.

specifying the disk is not a thing when doing an UEFI setup. using --efi-directory and passing the mount point of the ESP is the correct way of telling GRUB to install an UEFI payload. If you didn't need to do that you didn't install an UEFI but a BIOS setup (... or used BIOS emulation of your UEFI)

As for providing the data of these outputs, all of these commands will be present on a normal proper Arch install doing the reccommended base setup.

Last edited by V1del (2024-11-05 11:46:55)

Offline

#17 2024-11-05 11:54:05

Zaphkiel224z
Member
Registered: 2024-01-11
Posts: 28

Re: Regarding mounting conventions, /mnt and /, mounting /efi.

V1del wrote:

specifying the disk is not a thing when doing an UEFI setup. using --efi-directory and passing the mount point of the ESP is the correct way of telling GRUB to install an UEFI payload. If you didn't need to do that you didn't install an UEFI but a BIOS setup (... or used BIOS emulation of your UEFI)

yeah, well, I guess my first install was more magic than knowledge, despite a lot of reading of wiki. 


V1del wrote:

As for providing the data of these outputs, all of these commands will be present on a normal proper Arch install doing the reccommended base setup.

yeah, I know, but I still don't know if its possible to send the outputs here considering the system lacks x11 or wayland, let alone browser.

Offline

#18 2024-11-05 11:58:50

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,973

Re: Regarding mounting conventions, /mnt and /, mounting /efi.

If you have internet access, it is doable  https://wiki.archlinux.org/title/List_o … ted_client .

Without network access you'd need to copy the outputs to a usb stick or similar first.

Many things are possible without GUI or browser .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#19 2024-11-05 12:00:35

Zaphkiel224z
Member
Registered: 2024-01-11
Posts: 28

Re: Regarding mounting conventions, /mnt and /, mounting /efi.

Lone_Wolf wrote:

If you have internet access, it is doable  https://wiki.archlinux.org/title/List_o … ted_client .

Without network access you'd need to copy the outputs to a usb stick or similar first.

Many things are possible without GUI or browser .

damn, I feel like a caveman discovering fire.

Offline

Board footer

Powered by FluxBB