LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-22-2017, 07:12 PM   #1
Neville Hillyer
Member
 
Registered: Jul 2015
Posts: 57

Rep: Reputation: Disabled
Linux mount points


I am having difficulty understanding mount points and in particular why Linux installers will not let me mount identical OSs on separate primary partitions. They appear to need different mount points set.

Most of my experience is with OS X which allows identical or cloned OSs to be used. OS X defaults to a /Volumes mount point with aliases in the Volumes directory pointing to each partition.

Is there any reason I could not use the same structure on Linux with symlinks pointing to each partition?

The Volumes directory would be identical for all OSs albeit the link for the active OS/partition would resolve to '/'.

Will this work and will Linux installers allow all mount points to be set to /Volumes?
 
Old 12-23-2017, 03:10 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 10,253

Rep: Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014
I don't understand what do you need. I mean this:
Quote:
why Linux installers will not let me mount identical OSs on separate primary partitions
Can you please explain, give us more details? What did you try, what's happened, what did you expect? ....
 
Old 12-23-2017, 04:00 AM   #3
Neville Hillyer
Member
 
Registered: Jul 2015
Posts: 57

Original Poster
Rep: Reputation: Disabled
For my education only I tried two installs from a Ubuntu 9.10 iso on separate primary partitions but at the second install I was faced with a message saying I could not use a mount point of / because it had already been used. I have never met this with OS X and would not expect it with dual boot Linux. I wish to have two entirely separate installs where there is no need for one install to know about the other. Perhaps you could view my aim as the same as Linux being put onto 2 separate computers with both disks later being put onto one computer, ie 2 identical installs.

I am not concerned about the location of the mount points as long as both are the same, as with OS X.
 
Old 12-23-2017, 05:38 AM   #4
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 10,253

Rep: Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014
the message you got means you wanted to mount two different filesystems to / which is impossible (you got the message at the second attempt, because / was already in use).
So you can mount a filesystem several times to different directories, but one mount point (directory) can be used only one time.
Still don't understand what do you want to achieve, and still would be nice to post what did you try exactly.
 
Old 12-23-2017, 05:50 AM   #5
Neville Hillyer
Member
 
Registered: Jul 2015
Posts: 57

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
the message you got means you wanted to mount two different filesystems to / which is impossible (you got the message at the second attempt, because / was already in use).
So you can mount a filesystem several times to different directories, but one mount point (directory) can be used only one time.
Still don't understand what do you want to achieve, and still would be nice to post what did you try exactly.
Can anybody put this in an OS X context for me?

I don't understand the strict meaning of / as used for mount points. I thought it was the root of the active partition but it appears this is not so. Does it relate to the PC, the disk or something to do with grub, bios or boot loaders?

This is purely for my education so that I fully understand the issue.
 
Old 12-23-2017, 06:08 AM   #6
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 10,253

Rep: Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014Reputation: 3014
see man mount, that will explain how mount work. The usual approach is probably: there is a filesystem somewhere (can be on HDD, USB, network, CD, whatever), and you want to see/use it (in case of HDD there can be several partitions, and every partition may contain a filesystem). In linux you need to specify a directory: where do you want to see the given filesystem. / is the root directory, every other thing is located inside. / is a filesystem too (especially the root of that filesystem), therefore it is by default mounted and there is a device which contains that filesystem.
You can mount other filesystems into other directories, like /Volumes or /mnt/music or whatever you want. These directories named mount points. Every directory can hold only one single mounted filesystem.
 
Old 12-23-2017, 06:53 AM   #7
_roman_
Member
 
Registered: Dec 2017
Location: _Austro_Bavaria_
Distribution: SLACKWARE 96 -> SUSE 6.2 & REDHAT -> Gentoo & ARCH-Linux & Linux-Mint
Posts: 290

Rep: Reputation: Disabled
Quote:
Originally Posted by Neville Hillyer View Post
For my education only I tried two installs from a Ubuntu 9.10 iso on separate primary partitions but at the second install I was faced with a message saying I could not use a mount point of / because it had already been used. I have never met this with OS X and would not expect it with dual boot Linux. I wish to have two entirely separate installs where there is no need for one install to know about the other. Perhaps you could view my aim as the same as Linux being put onto 2 separate computers with both disks later being put onto one computer, ie 2 identical installs.

I am not concerned about the location of the mount points as long as both are the same, as with OS X.
Are you aware of the concepts of users?

Just create a new user test. Use user test to play around. Every user gets a new home directory with new config files.

Binary distros are usually designed to be able to install everything which is available! So there should be no need to have two identical distros isntalled. you better use different users with "different user profiles", which equals different home directories

-- or is there some other reason why you want two identical installations?


Below comes a lot of off topic: you have been warned

--

This is more an issue of using the installer disc in the wrong way or some newbie help feature of the installer media. some installer media think tehy are smart and tells you that you have already the same version installed.

I would not be surprised that ubuntu may have this limitation. As ubuntu is pointed for a very stupid audience which can not be bothered to partition discs, to read some documentation. MY first gentoo installation took me two weeks to get only the basic shell running. Most guys do not have the endurance for such.

--

mounting in the old days

well several years ago mostly all distros sticked to https://en.wikipedia.org/wiki/Filesy...archy_Standard

these days with the SYSTEMD - GNOME - REDHAT - new udev - DISEASE they do not stick to that anymore.

most mounting was done with /etc/fstab in the old days.

than we got also mtab and other stupid similar features like links in /media and such

--

to go back to your question.

try a manual approach in installing two identical ubuntu. also try linux mint, it's basically the same + fancy other icons (most of the time)

Also bear in mind that linux mint, based on ubunutu, can not really deal well with bootloaders when you boot more than one operating systems. You have been warned.


Quote:
I wish to have two entirely separate installs where there is no need for one install to know about the other.
Right. But bear in mind those newbie distros like mint, ubuntu, will use autoupdate scripts. and they will do choices for you. which is very very bad sometimes.

the biggest issue i see in the bootloader and how the bootloader gets updated.

you just need two partition and two different boot loader entries which point to them. also you need to find a way that the update process does not nuke those entries.

Too much fiddling around with binary distros and their auto destroy scripts. The reason why a lazy person like myself ended up with gentoo. I somehow managed in the past to destroy my box said in newbie words. Those binary distros can not handle the update procedure well, i point at linux mint and arch linux. Means an update broke the box in such a way that a newbie can not repair it, or a lazy person like myself ditches it, as too much functionality is broken. the arch linux package manager was than in a nice dependency loop, could not recover it over a month. Several attempts.

edit: and yes i used arch linux in the wrong way. i dared to do a not supported upgrade, which finally got rid of arch linux. i do not want to reinstall as the upgrade path. pfff same behaviour for other distros at that time i had the asus g70sg

Last edited by _roman_; 12-23-2017 at 07:04 AM.
 
Old 12-23-2017, 07:03 AM   #8
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: Debian, Crux, LFS, AntiX, NuTyX
Posts: 1,674
Blog Entries: 3

Rep: Reputation: 712Reputation: 712Reputation: 712Reputation: 712Reputation: 712Reputation: 712Reputation: 712
You are right about / being the root directory. The root partition gets mounted there by the kernel when your system boots. Consequently nothing else can be mounted on the same mount point. If you look at the /etc/fstab file, you will see that the first line specifies this mount.

When you have more than one Linux system on the same hard drive, your bootloader (GRUB in your case) should have a menu entry for each one, with the location of the kernel to be loaded and the identity of the root partition. GRUB usually comes with a collection of scripts that are supposed to sniff out your systems and create a suitable menu for booting them all.
 
Old 12-23-2017, 07:35 AM   #9
Neville Hillyer
Member
 
Registered: Jul 2015
Posts: 57

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by hazel View Post
You are right about / being the root directory. The root partition gets mounted there by the kernel when your system boots. Consequently nothing else can be mounted on the same mount point. If you look at the /etc/fstab file, you will see that the first line specifies this mount.

When you have more than one Linux system on the same hard drive, your bootloader (GRUB in your case) should have a menu entry for each one, with the location of the kernel to be loaded and the identity of the root partition. GRUB usually comes with a collection of scripts that are supposed to sniff out your systems and create a suitable menu for booting them all.
What is a root partition and in what way does it differ from other partitions?

Do Linux boot loaders change the root partition?

How many instances of grub can there be?

Where does grub store its settings?

OS X firmware stores the next boot partition in non-volatile memory. This setting can be modifed by any instance of OS X. It can also be modifed at boot time by holding the option key. I am aware that duel boot Linux/OS X is a little more complicated and often uses refind. Mount points do not have to be defined directly by users at any time.
 
Old 12-23-2017, 08:05 AM   #10
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: Debian, Crux, LFS, AntiX, NuTyX
Posts: 1,674
Blog Entries: 3

Rep: Reputation: 712Reputation: 712Reputation: 712Reputation: 712Reputation: 712Reputation: 712Reputation: 712
Quote:
Originally Posted by Neville Hillyer View Post
What is a root partition and in what way does it differ from other partitions?
The root partition is the one on which all other partitions are mounted. In Linux, partitions are not island universes as they are in Windows. Instead they are linked together into a single tree starting with the root directory of the root partition. Every other partition is either mounted somewhere to become part of this tree, or is inaccessible. I gather that OS/X is a form of UNIX, so it probably has a similar arrangement.
Quote:
Do Linux boot loaders change the root partition?
Usually yes, but not necessarily. The kernel needs to know where its root partition is, so the bootloader must pass this information on to it as part of the kernel command line. But it is, in theory, possible to have two menu entries with the same kernel but different root partitions. I can't think offhand why you would want to do that. More common is the same root partition but different kernels (when you're trying out a new kernel and want to have a fallback).

It's misleading to talk in this context about the root partition being "changed" because you don't actually have a root partition until the kernel has mounted it. You can however change the root partition on the fly by using the chroot command.
Quote:
How many instances of grub can there be?
Only one main one. But you can chainload an instance of grub in the first sector of any Linux partition
Quote:
Where does grub store its settings?
In the /boot/grub/grub.cfg file in one of your distros.

PS: Your reference to refind suggests that you are using a uefi boot. In that case, the primary GRUB goes onto your efi system partition.

Last edited by hazel; 12-23-2017 at 08:35 AM.
 
Old 12-23-2017, 08:43 AM   #11
michaelk
Moderator
 
Registered: Aug 2002
Posts: 16,608

Rep: Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998Reputation: 1998
Not a Mac expert.

linux and macos have similar file structures and as stated a common used analogy is that of a tree. Check out the links below.

With /(root) being the trunk and all other filesystems being attached via a mount point which is nothing more then a directory. By convention file systems not part of the operating system are mounted to /media in linux and /Volumes in macos.

http://osxdaily.com/2007/03/30/mac-o...ure-explained/

http://www.thegeekstuff.com/2010/09/...stem-structure
 
Old 12-23-2017, 09:03 AM   #12
fatmac
Senior Member
 
Registered: Sep 2011
Location: Upper Hale, Surrey/Hants Border, UK
Distribution: AntiX
Posts: 2,121

Rep: Reputation: Disabled
Your MacOS is just like a desktop environment is to Linux & BSD, because your Mac is actually running a version of FreeBSD.

The O/S uses the / for booting up the system, all other directories are mounted within this (root) directory.

To have two different Linux (or BSD) O/S on one disk, each will have its own / partition where it will mount all other directories.

In fact, BSD actually uses one section, a 'slice', (what other O/S call partitions), of a disk to create all its partitions within, & this fact may well be confusing you, as MacOS is actually FreeBSD, your 'Volumes' are probably these 'partitions'.
 
Old 12-23-2017, 09:06 AM   #13
hazel
Senior Member
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: Debian, Crux, LFS, AntiX, NuTyX
Posts: 1,674
Blog Entries: 3

Rep: Reputation: 712Reputation: 712Reputation: 712Reputation: 712Reputation: 712Reputation: 712Reputation: 712
/media is a fairly recent thing. It's used for mounting exchangeable discs like cdroms. Some distros automount these as soon as they are plugged in. I used Mint on a laptop a couple of years ago, and it created temporary mountpoints called /media/<my_username>, which rather startled me; I suppose that's considered user-friendly nowadays, but this user doesn't really like things being done behind her back.

The older method was to mount partitions on /mnt or one of its sub-directories.

Last edited by hazel; 12-23-2017 at 09:56 AM.
 
Old 12-24-2017, 05:11 AM   #14
Neville Hillyer
Member
 
Registered: Jul 2015
Posts: 57

Original Poster
Rep: Reputation: Disabled
I apologise for not replying sooner.

I am very grateful for all the helpful replies especially those from the little old lady from Harrow with whom I have little in common except age and not being taught to use computers although I did start using them at Culham and NPL in 70/71.

It will take me a while to digest the replies but I can already see I will have a few further questions.

I am going away for Christmas to a cottage without the internet. Also I am normally split between 2 locations: Cumbria with Linux but poor broadband and Bedfordshire with good broadband and no Linux.

Happy holidays to all.

I hope to return here after Christmas.
 
Old 01-02-2018, 04:24 PM   #15
Neville Hillyer
Member
 
Registered: Jul 2015
Posts: 57

Original Poster
Rep: Reputation: Disabled
Happy New Year to all.

I have now returned to Cumbria and have access to Ubuntu and Windows on a very old Dell and OS X on a very old Mac. The internet is the slowest I have used for over 10 years but it is OK for email and some forums such as this one. Open static Google search pages permanently consume most of my OS X CPU due to a recent Google CSS bug which I reported to Google before Christmas. Since the bug still exists I will probably publish it soon.

Please ignore my earlier reference to Refind. It is not in use on my Cumbria computers and I now regret mentioning it.

The Dell has 4 primary partitions and no secondary partitions. Windows is on one partition. Two partitions will be used for Linux - both with Ubuntu 9.10 initially. There are no swap partitions. It is best to assume that for some time Linux will be used for test purposes only.

The issue which I am having difficulty understanding is the concept of a Linux root partition. My OS X does not have a root partition. Does the act of booting from the other Linux partition convert it to the root partition?

To explore this further let us assume that I install Linux from a USB flash stick. I put the first Linux install on partition A and it defaults to a mount point of /. I assume this is the root of partition A. If I now install Linux on partition B the installer will not allow me to select a mount point of /. What does / refer to in this case? This situation does not arise with OS X.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux mount points are getting unmounted charithsrng Linux - Newbie 2 05-13-2015 08:54 AM
LXer: Editing Linux Mount Points LXer Syndicated Linux News 0 12-08-2009 12:00 PM
Mount points on 2 Linux systems chasegger Linux - Newbie 2 07-03-2008 03:26 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:46 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration