LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
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


Reply
  Search this Thread
Old 02-05-2021, 11:19 PM   #1
Michael Piziak
Member
 
Registered: Feb 2015
Distribution: Ubuntu 20.04 lts
Posts: 598

Rep: Reputation: 43
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.
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2021-02-06 00-16-56.png
Views:	30
Size:	74.4 KB
ID:	35509  
 
Old 02-06-2021, 04:43 AM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,671

Rep: Reputation: Disabled
This is ESP partition, it does not need to be mounted for system to function normally.
 
1 members found this post helpful.
Old 02-06-2021, 10:31 AM   #3
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Quote:
Originally Posted by Emerson View Post
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.
Old 02-06-2021, 10:40 AM   #4
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,671

Rep: Reputation: Disabled
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.
Old 02-06-2021, 02:45 PM   #5
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,901
Blog Entries: 1

Rep: Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081
Quote:
Originally Posted by Emerson View Post
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.
 
Old 02-06-2021, 03:12 PM   #6
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,671

Rep: Reputation: Disabled
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.
Old 02-06-2021, 03:29 PM   #7
Michael Piziak
Member
 
Registered: Feb 2015
Distribution: Ubuntu 20.04 lts
Posts: 598

Original Poster
Rep: Reputation: 43
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.
 
Old 02-06-2021, 03:39 PM   #8
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,671

Rep: Reputation: Disabled
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.
Old 02-06-2021, 03:42 PM   #9
Michael Piziak
Member
 
Registered: Feb 2015
Distribution: Ubuntu 20.04 lts
Posts: 598

Original Poster
Rep: Reputation: 43
Quote:
Originally Posted by Emerson View Post
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.
 
Old 02-06-2021, 03:53 PM   #10
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,671

Rep: Reputation: Disabled
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.
Old 02-06-2021, 04:35 PM   #11
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,901
Blog Entries: 1

Rep: Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081
Quote:
Originally Posted by Emerson View Post
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.
Old 02-06-2021, 04:53 PM   #12
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,671

Rep: Reputation: Disabled
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?
 
Old 02-06-2021, 05:45 PM   #13
Michael Piziak
Member
 
Registered: Feb 2015
Distribution: Ubuntu 20.04 lts
Posts: 598

Original Poster
Rep: Reputation: 43
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.
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2021-02-06 18-41-34.png
Views:	15
Size:	162.2 KB
ID:	35526  
 
Old 02-06-2021, 05:48 PM   #14
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,671

Rep: Reputation: Disabled
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.
 
Old 02-06-2021, 05:55 PM   #15
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, others
Posts: 5,901
Blog Entries: 1

Rep: Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081Reputation: 2081
Quote:
Originally Posted by Michael Piziak View Post
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Dangerous keyboard app has more than 50 million downloads LXer Syndicated Linux News 1 06-29-2016 09:50 PM
[SOLVED] added a couple of new disks and now /dev/sd* disks are all messed up nass Linux - Hardware 4 10-30-2012 10:16 AM
[SOLVED] RAID 5 with 4 hard disks... array started with only 3 out of 4 disks kikinovak Slackware 9 08-11-2012 06:33 AM
[SOLVED] What implications does it have now that IDE disks are seen as "scsi" disks? harryhaller Slackware 8 03-28-2011 07:54 AM
Installation Disks not recognized as official disks when booting with floppy coal-fire-ice Mandriva 13 12-09-2004 04:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:35 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration