LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-01-2018, 04:43 PM   #1
rx2528l
LQ Newbie
 
Registered: Feb 2018
Posts: 1

Rep: Reputation: Disabled
Question root directory (/) vs root file system


I here people say "/dev/sda1 is mounted on /" .Shouldn't the wording me "/dev/sda1" is mounted as /" ?

Another question regarding the same subject - the directory /dev/ to exist, the parent / has to exist first. It is like chicken and egg situation. Can someone explain or refer to the article that explains this please. I am new to these Linux concepts.
 
Old 10-01-2018, 07:45 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,400
Blog Entries: 28

Rep: Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166Reputation: 6166
See your OED.

(Frankly, this is a mite of a semantic sophistry that would best be posed to the Grammer Girl.)
 
Old 10-01-2018, 08:26 PM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,813

Rep: Reputation: 5958Reputation: 5958Reputation: 5958Reputation: 5958Reputation: 5958Reputation: 5958Reputation: 5958Reputation: 5958Reputation: 5958Reputation: 5958Reputation: 5958
Since this is your first post a belated welcome to LinuxQuestions.

In a nutshell it is all in the start up process. In most distributions the root filesystem is first created by the initrd and once the kernel is up running the init process mounts the root partition via the /etc/fstab. I am far from being a kernel expert so excuse any errors...

https://en.wikipedia.org/wiki/Linux_startup_process
 
Old 10-01-2018, 09:17 PM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,159

Rep: Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125Reputation: 4125
When you ring your mum, do you say you are talking to your mum - or do you say you are talking to a microphone chip ?. Better to get comfortable with accepted usage rather than trying to change the world.

As for / versus /dev/, the kernel creates the root (i.e. the kernel is running before the root directory is created) and the standard directories. Then it goes looking for what you want to mount where.
In all likelihood, the more answers you get the more confused you will be.
 
Old 10-01-2018, 09:32 PM   #5
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
I prefer "/dev/sda1 is mounted at /".

Never depend on a spoken language when you're looking for precision.
 
Old 10-02-2018, 04:59 AM   #6
brebs
Member
 
Registered: May 2013
Posts: 89

Rep: Reputation: Disabled
Code:
$ ls -ld /
drwxr-xr-x 19 root root 4096 Aug 23 17:47 /
It's a directory in its own right - note that it is chmod 755, so users have access to it.
 
Old 10-02-2018, 01:53 PM   #7
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,842

Rep: Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221Reputation: 1221
The / is mounted "by magic" first, normally read-only.
Later it is remounted as stated in the fstab.
 
Old 10-02-2018, 04:59 PM   #8
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian Stable
Posts: 2,546
Blog Entries: 8

Rep: Reputation: 465Reputation: 465Reputation: 465Reputation: 465Reputation: 465
I don't know if all Linux distributions do it the way Debian does it, but the basic sequence of events is:

1) The bootloader loads up the Linux kernel and an initial ramdisk image. This has a "/" ramdisk that fits entirely within ram.

The ramdisk image is pretty minimal, but it has enough file system stuff to mount the real / (either over nfs or local drive) and read /etc/fstab from it

2) The linux kernel starts executing boot up scripts in the initrd. It mounts the real / to something like /rootmount

3) After doing this, it does some other stuff and then chroots to the real / at /rootmount. Before doing this, it'll scoot other mounts to below /rootmount or something like that

So fundamentally, the "chicken and egg" problem is solved by first loading a "chicken" entirely within ram in a minimalistic ramdisk install. Then it mounts the "real" stuff and scoots over into the "real" / and mount points.
 
  


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
"cannot create temporary directory for the root file system: No space left on device", but df-h says home and root are 77% and inodes are OK roberto32 Linux - General 3 05-27-2018 07:34 AM
[SOLVED] Invoke root directory owner/group while moving file/directory yogesh_attarde Linux - Security 5 04-14-2014 11:36 PM
how can i write to a root:root 750 file with a non-root user? Droa Linux - Newbie 1 05-14-2012 07:49 PM
accidentally moved entire linux root "/ " file system to another directory bks2010 Linux - Newbie 8 09-19-2010 05:07 AM
Boot Error: Root file system /dev/root adtomar Linux - Networking 0 12-27-2004 10:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:16 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
Open Source Consulting | Domain Registration