Jump to content

Confused about mount points - would love to get clarification

I wanted to separate Windows Boot Manager and GRUB from being on the same partition.

So I created a new partition, formatted it at fat32 and gave it esp and boot flags.

 

Now in fstab, I changed the UUID to the newly created partition (sdb5 in my case).

 

But fstab requires a mount point.

 

The original mount point was /boot/efi, but that's the mount point of the Windows Boot Manager partition.

If I don't change the mount point, then how does Ubuntu know to install GRUB on the new partition?

 

So what is this /boot/efi mount point? I thought it's a directory inside /dev/sda1 partition where the Windows Boot Manager lives.

But it makes no sense, because I just changed the UUID to a UUID of a different partition, didn't change mount point yet it installed it in the correct partition 

 

I thought I'd need to create a new dir somehow inside sdb5 and mount it and then install grub.. but not

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

For uefi, the boot partition should always be the first partition on the drive (probably /dev/sda1 or similar in your case) and unfortunately you cannot have two seperate uefi partitions on the same drive. So your /dev/sdb5 cannot be used for /boot/efi.

 

So you're solution is either to have your linux and windows installs on two seperate hdds/ssds or to let them continue to share the same uefi partition as before.

Link to comment
Share on other sites

Link to post
Share on other sites

Quote

The original mount point was /boot/efi, but that's the mount point of the Windows Boot Manager partition.

If I don't change the mount point, then how does Ubuntu know to install GRUB on the new partition?

It doesn't.

Quote

So what is this /boot/efi mount point? I thought it's a directory inside /dev/sda1 partition where the Windows Boot Manager lives.

yes, usually, /dev/sda1 is mounted as /boot and that is the efi system partition where linux puts grub and windows puts windows boot manager

It would help if you said which distro you're using because each distro will do things slightly differently.

 

21 minutes ago, Filingo said:

But it makes no sense, because I just changed the UUID to a UUID of a different partition, didn't change mount point yet it installed it in the correct partition 

 

I thought I'd need to create a new dir somehow inside sdb5 and mount it and then install grub.. but not

I'm not sure I fully understand... could you post the contents of your /etc/fstab ?

Link to comment
Share on other sites

Link to post
Share on other sites

8 hours ago, WIZZDOM said:

For uefi, the boot partition should always be the first partition on the drive (probably /dev/sda1 or similar in your case) and unfortunately you cannot have two seperate uefi partitions on the same drive. So your /dev/sdb5 cannot be used for /boot/efi.

 

So you're solution is either to have your linux and windows installs on two seperate hdds/ssds or to let them continue to share the same uefi partition as before.

Looks like it doesn't have to be first or only one. In my case it's 4th, and I have 2, but only one can be used at a time?
Also, originally it was on sda2 and not sda1

8 hours ago, DarkStreek said:

Are you trying to install android 86 in your windows tablet or something ? 

Haha no I just had some issues with installing Ubuntu on the same SSD with Windows

 

8 hours ago, WIZZDOM said:

I'm not sure I fully understand... could you post the contents of your /etc/fstab ?

This is an example how it was originally:

UUID=ABCD-1234 /boot/efi       vfat    umask=0077      0       1

 

so the mount point is /boot/efi.

 

What is /boot/efi? Is it a folder inside the partition marked as "esp"? Which in my case it was sdb1?

OR this "mount point" is not a directory, just some name for Linux to know about?

Link to comment
Share on other sites

Link to post
Share on other sites

8 hours ago, Filingo said:

The original mount point was /boot/efi, but that's the mount point of the Windows Boot Manager partition.

/boot/efi is just a folder in your root filesystem, you can mount whatever you want there but the system expects a boot partition.

 

14 minutes ago, Filingo said:

What is /boot/efi? Is it a folder inside the partition marked as "esp"?

"esp" is just a placeholder name for your efi system partition. in your case that's /boot/efi.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

8 minutes ago, Sauron said:

/boot/efi is just a folder in your root filesystem, you can mount whatever you want there but the system expects a boot partition.

 

"esp" is just a placeholder name for your efi system partition. in your case that's /boot/efi.

For the following example let's say my ext4 system is dev/sdb4 and my new fat32 partition is /dev/sdb3

 

Let's say I assign sdb3 with flags esp,boot.

Now I create a folder /boot/ubuntu as mount point for grub.

 

But when I do mkdir /boot/ubuntu, then it will probably be created on sdb4 partition no? Because I did not specify which partition it should be on

 

So how does it "know" that it needs to be created on sdb3? Because when I use mount -a it will need to mount the partition on that mount point

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Filingo said:

But when I do mkdir /boot/ubuntu, then it will probably be created on sdb4 partition no? Because I did not specify which partition it should be on

You don't need to think about partitions when working with directories. There is only one folder tree and it's /, which points to your root partition. If you mounted /dev/sdb4 to / then that's where new directories will be placed unless one of the intermediate directories has another partition mounted to it. If you want a better understanding of how this works try reading this.

6 minutes ago, Filingo said:

So how does it "know" that it needs to be created on sdb3?

It doesn't because it isn't. It's created in your root tree and then /dev/sb3 is mounted to it, if you specify that in your fstab file or do it manually of course - it won't happen automagically.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Sauron said:

You don't need to think about partitions when working with directories. There is only one folder tree and it's /, which points to your root partition. If you mounted /dev/sdb4 to / then that's where new directories will be placed unless one of the intermediate directories has another partition mounted to it. If you want a better understanding of how this works try reading this.

It doesn't because it isn't. It's created in your root tree and then /dev/sb3 is mounted to it, if you specify that in your fstab file or do it manually of course - it won't happen automagically.

So the folder itself is on the sdb4 partition mounted on /, and then you create a folder /boot/ubuntu inside / (which is mounted on sdb4) and mount sdb3 on /boot/ubuntu which is inside sdb4 (so u mount sdb3 top of sdb4?) (partition on top of partition? aaa I'm so confused)

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Filingo said:

So the folder itself is on the sdb4 partition mounted on /, and then you create a folder /boot/ubuntu inside / (which is mounted on sdb4) and mount sdb3 on /boot/ubuntu which is inside sdb4

Yes

1 hour ago, Filingo said:

(so u mount sdb3 top of sdb4?) (partition on top of partition? aaa I'm so confused)

It's not "on top of" anything, you're just telling the system that files created in /boot/ubuntu have to be stored on /dev/sdb3.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

You're massively overthinking it and confusing yourself.

 

When you mount a drive to a folder you are essentially saying "every time I write something to that folder save it onto the mounted drive instead".

 

You gotta get rid of this windows mentality, On Linux EVERYTHING is a file, yes even folders and entire drives are represented as files to the user so mounting a drive to a folder is exactly the same as creating a symlink between two files. You're not mounting one drive/partition on top of another, you're simply redirecting everything you save to one file into another file instead.

 

Fun experiment to prove everything is a file, in terminal do

 

sudo cat /dev/psaux

 

and move your mouse around. You'll notice that your inputs are shown in terminal, you just catalogued a file and got access to your mouse inputs.

 

Press Ctrl+C to exit btw.

 

Main Rig:-

Ryzen 7 3800X | Asus ROG Strix X570-F Gaming | 16GB Team Group Dark Pro 3600Mhz | Corsair MP600 1TB PCIe Gen 4 | Sapphire 5700 XT Pulse | Corsair H115i Platinum | WD Black 1TB | WD Green 4TB | EVGA SuperNOVA G3 650W | Asus TUF GT501 | Samsung C27HG70 1440p 144hz HDR FreeSync 2 | Ubuntu 20.04.2 LTS |

 

Server:-

Intel NUC running Server 2019 + Synology DSM218+ with 2 x 4TB Toshiba NAS Ready HDDs (RAID0)

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, Sauron said:

"esp" is just a placeholder name for your efi system partition. in your case that's /boot/efi.

Not true, ESP would be an identification flag. Its used by the kernel to check the partition is what it thinks before mounting so it doesn't try mounting an NTFS partition using the EXT4 driver for example, which would be bad.

 

If FSTab says /dev/sdb1 is EXT4 but the Kernel sees it has an NTFS flag it will abort the mount and fire an error. Same for EFI, ESP, Apple System Partition etc etc.

 

Its also used by FDISK type utils for pretty obvious reasons.

Main Rig:-

Ryzen 7 3800X | Asus ROG Strix X570-F Gaming | 16GB Team Group Dark Pro 3600Mhz | Corsair MP600 1TB PCIe Gen 4 | Sapphire 5700 XT Pulse | Corsair H115i Platinum | WD Black 1TB | WD Green 4TB | EVGA SuperNOVA G3 650W | Asus TUF GT501 | Samsung C27HG70 1440p 144hz HDR FreeSync 2 | Ubuntu 20.04.2 LTS |

 

Server:-

Intel NUC running Server 2019 + Synology DSM218+ with 2 x 4TB Toshiba NAS Ready HDDs (RAID0)

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Master Disaster said:

Not true, ESP would be an identification flag. Its used by the kernel to check the partition is what it thinks before mounting so it doesn't try mounting an NTFS partition using the EXT4 driver for example, which would be bad.

The actual filesystem flag sure, but when used to refer to a mount point it generally just means whatever path you mounted your EFI partition to. The OP was probably referring to the filesystem flag though now that I think about it.

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

thank you guys, you pretty much made it clear!

 

It's different from Windows where if you create a new partition and mount it on a letter, then when you create a folder, it's directly inside the partition.

But with Linux it's more like:

Create a directory inside the main / partition and then specify it as mount point for other partition that you choose, but the directory itself, is on the partition specified by /

Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, Filingo said:

thank you guys, you pretty much made it clear!

 

It's different from Windows where if you create a new partition and mount it on a letter, then when you create a folder, it's directly inside the partition.

But with Linux it's more like:

Create a directory inside the main / partition and then specify it as mount point for other partition that you choose, but the directory itself, is on the partition specified by /

Grub and Windows Boot Manager are bootloaders not a mount point. If you don't use several hard drives it makes no sense to move Grub. Usually it is installed on the first partition (EFI) of the disk where you have installed Linux. In order to manage many bootloaders you can use Refinder, but I advise you not to uninstall Grub or move it.

 

Bye. 

Link to comment
Share on other sites

Link to post
Share on other sites

2 hours ago, mionome12 said:

Grub and Windows Boot Manager are bootloaders not a mount point. If you don't use several hard drives it makes no sense to move Grub. Usually it is installed on the first partition (EFI) of the disk where you have installed Linux. In order to manage many bootloaders you can use Refinder, but I advise you not to uninstall Grub or move it.

 

Bye. 

I do use multiple hard drives that's why the whole issue

Link to comment
Share on other sites

Link to post
Share on other sites

16 minutes ago, Filingo said:

I do use multiple hard drives that's why the whole issue

You can mount the efi partition of the two target disks with Windows if you have difficulty with Linux and then you can move Grub. If grub works and you not have Linux on an external drive, you don't move grub.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×