Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux? |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
02-05-2021, 11:19 PM
|
#1
|
Member
Registered: Feb 2015
Distribution: Ubuntu 20.04 lts
Posts: 598
Rep: 
|
Disks app - is this a dangerous option?
I noticed that when using the "Disks" app, it gives me the option to unmount my primary boot HD upon startup. Is this a dangerous choice? Like if I chose to do that, then my system wouldn't mount the HD upon boot?
See screenshot.
|
|
|
02-06-2021, 04:43 AM
|
#2
|
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675
Rep: 
|
This is ESP partition, it does not need to be mounted for system to function normally.
|
|
1 members found this post helpful.
|
02-06-2021, 10:31 AM
|
#3
|
Senior Member
Registered: Aug 2016
Posts: 3,345
|
Quote:
Originally Posted by Emerson
This is ESP partition, it does not need to be mounted for system to function normally.
|
Maybe not for routine running, but it certainly does need to be mounted when a kernel update is done or when something is changed that might affect boot such as adding or changing a drive (hdd to nvme for example), changing devices that need different drivers, changing some video cards, etc. Having the ESP partition dismounted can be hazardous to your system's continued good health.
|
|
1 members found this post helpful.
|
02-06-2021, 10:40 AM
|
#4
|
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675
Rep: 
|
Certainly not. On the contrary, it is an additional security measure which makes tampering with kernel and its modules a little harder. Kernel updates happen automatically in binary distros, and developers take care the boot partition gets mounted before updates. But you can keep yours mounted if you are afraid.
|
|
1 members found this post helpful.
|
02-06-2021, 02:45 PM
|
#5
|
LQ Guru
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, OS/2, others
Posts: 6,530
|
Quote:
Originally Posted by Emerson
Certainly not. On the contrary, it is an additional security measure which makes tampering with kernel and its modules a little harder.
|
Please explain. An ESP partition contains neither kernels nor kernel modules.
|
|
|
02-06-2021, 03:12 PM
|
#6
|
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675
Rep: 
|
Yes it can contain kernels, mine does, and it can also contain initramfs - which contains modules. When you boot EFI stub kernels then they cannot be elsewhere.
|
|
1 members found this post helpful.
|
02-06-2021, 03:29 PM
|
#7
|
Member
Registered: Feb 2015
Distribution: Ubuntu 20.04 lts
Posts: 598
Original Poster
Rep: 
|
So, basically, if someone chose in disks to unmount at starup, then rebooted their system, Linux would tell it to mount anyways and boot up.
Last edited by Michael Piziak; 02-06-2021 at 03:32 PM.
|
|
|
02-06-2021, 03:39 PM
|
#8
|
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675
Rep: 
|
It does not need to be mounted for boot. Mounting is something which is done using kernel functions, when kernel is not loaded yet as it happens during boot there can be no mounting. During boot BIOS/firmware executes the boot loader and boot loader loads the kernel, a bootloader like Grub has its own filesystem driver to read the partition where kernel is located. It was baron Münchausen who lifted himself out from the swamp, Linux kernel cannot do that. 
|
|
1 members found this post helpful.
|
02-06-2021, 03:42 PM
|
#9
|
Member
Registered: Feb 2015
Distribution: Ubuntu 20.04 lts
Posts: 598
Original Poster
Rep: 
|
Quote:
Originally Posted by Emerson
It does not need to be mounted for boot. Mounting is something which is done using kernel functions, when kernel is not loaded yet as it happens during boot there can be no mounting. During boot BIOS/firmware executes the boot loader and boot loader loads the kernel, a bootloader like Grub has its own filesystem driver to read the partition where kernel is located. It was baron Münchausen who lifted himself out from the swamp, Linux kernel cannot do that. 
|
If it's your primary drive, doesn't it need to be mounted after boot though, to access your folders and such....
I know I can't access my backup HD until it's mounted....
Last edited by Michael Piziak; 02-06-2021 at 03:44 PM.
|
|
|
02-06-2021, 03:53 PM
|
#10
|
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675
Rep: 
|
You do not mount drives, you mount filesystems which usually are located in partitions. In case you have two partitions which both have a filesystem on them then you have to mount both filesystems separately, using different mount points. Indeed you need to mount your root '/' filesystem, or your OS won't be able to find its files. And if you have separate home partition (on the same drive) then you need to mount it, too, or you won't be able to log in and access your files. But nothing from boot partition and/or ESP partition is required for OS to function, thus they need to be mounted only when there is a maintenance task which needs to access them.
|
|
1 members found this post helpful.
|
02-06-2021, 04:35 PM
|
#11
|
LQ Guru
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, OS/2, others
Posts: 6,530
|
Quote:
Originally Posted by Emerson
Yes it can contain kernels, mine does, and it can also contain initramfs - which contains modules.
|
Just a few of the preponderance of distros that do not put Linux kernels and initrds on an ESP partition: - CentOS
- Debian, and its multitude of derivatives, including KDE Neon, MXLinux, *buntu and Mint
- Fedora
- Mageia
- openSUSE
- Puppy
- RHEL
Any file system can contain any files that fit its constraints. That doesn't mean they belong there. You can put anything you want anywhere you want on yours, but I'm not aware of any mainstream distro configured with Linux on a (FAT*) ESP partition. If yours has them, it is not because your distro came standard that way. You shouldn't be misleading anyone to think anything belongs there that is not normally to be found there. Normal installations only host grubx64.efi, shimx64.efi and kin, occasionally adding bootable executables such as mt83x64.efi and any logs they may have saved. Standard location of Linux and any applicable initrds is directly in /boot/, not anywhere in the /boot/efi/ tree.
As it turns out, I have four UEFI PCs that multiboot 10 or more distros. They have their ESP partitions ever mounted on only one of the distros. It only takes one bootloader to boot any number of installed distros on a system. The other 9+ may write ESP-related files to /boot/efi/, but those will fall in each individual installation's root filesystem, and not be used for normal booting.
Thus, need for having an ESP mounted or not depends on the admin's skill level in knowing when it is needed, and having it then mounted.
|
|
2 members found this post helpful.
|
02-06-2021, 04:53 PM
|
#12
|
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675
Rep: 
|
If I build an EFI stub kernel then I must put it there, otherwise it won't be booted. I could use ESP partition as boot partition instead of creating separate boot partition. Nobody said we are limited to mainstream distros here. Are we now, because you say so?
|
|
|
02-06-2021, 05:45 PM
|
#13
|
Member
Registered: Feb 2015
Distribution: Ubuntu 20.04 lts
Posts: 598
Original Poster
Rep: 
|
I told the first partition to unmount upon startup and the reboot made it reboot fine, with access to all the files.
Upon going to tell the 2nd partition to unmount at startup, I was give a stern warning, and scared me from trying it.
|
|
|
02-06-2021, 05:48 PM
|
#14
|
LQ Sage
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,675
Rep: 
|
Well, as I told you before you need root filesystem mounted with mount point '/' or your operating system won't find its files. The warning was no joke.
|
|
|
02-06-2021, 05:55 PM
|
#15
|
LQ Guru
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, OS/2, others
Posts: 6,530
|
Quote:
Originally Posted by Michael Piziak
If it's your primary drive, doesn't it need to be mounted after boot though, to access your folders and such....
I know I can't access my backup HD until it's mounted....
|
"Drive" is a Windows term. When you use it in a Gnu/Linux context, it isn't clear whether you're speaking of a HDD, SSD, partition or filesystem.
If your root filesystem isn't mounted, then standard apps and utilities, including X, can't be run, because your normal Ubuntu installation won't run.
If you have /home/ on a separate filesystem on which you keep all your files, it must be mounted before you can login, much less access your personal files.
The ESP partition/filesystem needs to be mounted only when something needs to be written to it. The bootloader will read from it at boot time without need for Ubuntu mount operations. It normally remains completely unused once booting of Ubuntu has completed.
|
|
|
All times are GMT -5. The time now is 11:05 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|