Does the Linux kernel need a file system to run?2019 Community Moderator ElectionDoes Android really use the same kernel as Linux?How to configure Linux to cache file metadata in preference to contents?File system that never breaks (data loss acceptable)When do I need to specify add_efi_memmap as kernel argument in UEFI/EFI boot?What files does the Linux kernel access?Root file system vs partition's file systemWhat parts of the Linux kernel I do not need?Linux/Embedded Linux - Understanding the Kernel and additional BSP specific componentsHow do I run the Linux kernel?Why does the Linux kernel build system use incremental linking or ar T thin archives?
Mimic lecturing on blackboard, facing audience
Are cause and effect the same as in our Universe in a non-relativistic, Newtonian Universe in which the speed of light is infinite?
Can I cause damage to electrical appliances by unplugging them when they are turned on?
Do we have to expect a queue for the shuttle from Watford Junction to Harry Potter Studio?
What does Apple's new App Store requirement mean
What features enable the Su-25 Frogfoot to operate with such a wide variety of fuels?
"It doesn't matter" or "it won't matter"?
What is the difference between lands and mana?
Is there any evidence that Cleopatra and Caesarion considered fleeing to India to escape the Romans?
Why should universal income be universal?
Is there a way to have vectors outlined in a Vector Plot?
Why does AES have exactly 10 rounds for a 128-bit key, 12 for 192 bits and 14 for a 256-bit key size?
Why do ¬, ∀ and ∃ have the same precedence?
How does electrical safety system work on ISS?
Has the laser at Magurele, Romania reached a tenth of the Sun's power?
Taxes on Dividends in a Roth IRA
Creating two special characters
Did the UK lift the requirement for registering SIM cards?
Will number of steps recorded on FitBit/any fitness tracker add up distance in PokemonGo?
The Digit Triangles
A variation to the phrase "hanging over my shoulders"
How do I tell my boss that I'm quitting soon, especially given that a colleague just left this week
What's the name of the logical fallacy where a debater extends a statement far beyond the original statement to make it true?
Is this part of the description of the Archfey warlock's Misty Escape feature redundant?
Does the Linux kernel need a file system to run?
2019 Community Moderator ElectionDoes Android really use the same kernel as Linux?How to configure Linux to cache file metadata in preference to contents?File system that never breaks (data loss acceptable)When do I need to specify add_efi_memmap as kernel argument in UEFI/EFI boot?What files does the Linux kernel access?Root file system vs partition's file systemWhat parts of the Linux kernel I do not need?Linux/Embedded Linux - Understanding the Kernel and additional BSP specific componentsHow do I run the Linux kernel?Why does the Linux kernel build system use incremental linking or ar T thin archives?
My opinion is yes, it does, because all useful exposure to the outside world (non-priviledged processor mode) would first require a process running in the outside world. That would require a file system, even a temporary, in-RAM, file system.
Another engineer disagrees with me, but I can't seem to prove this beyond all (unknown to me) cases.
Does the answer to this question depend on the definition of 'running'?
filesystems linux-kernel
New contributor
add a comment |
My opinion is yes, it does, because all useful exposure to the outside world (non-priviledged processor mode) would first require a process running in the outside world. That would require a file system, even a temporary, in-RAM, file system.
Another engineer disagrees with me, but I can't seem to prove this beyond all (unknown to me) cases.
Does the answer to this question depend on the definition of 'running'?
filesystems linux-kernel
New contributor
i think that a running kernel does not "require"useful exposure to the outside world
– jsotola
3 hours ago
3
Brings to mind the old halted Linux firewall (circa 2002)
– Jeff Schaller
2 hours ago
add a comment |
My opinion is yes, it does, because all useful exposure to the outside world (non-priviledged processor mode) would first require a process running in the outside world. That would require a file system, even a temporary, in-RAM, file system.
Another engineer disagrees with me, but I can't seem to prove this beyond all (unknown to me) cases.
Does the answer to this question depend on the definition of 'running'?
filesystems linux-kernel
New contributor
My opinion is yes, it does, because all useful exposure to the outside world (non-priviledged processor mode) would first require a process running in the outside world. That would require a file system, even a temporary, in-RAM, file system.
Another engineer disagrees with me, but I can't seem to prove this beyond all (unknown to me) cases.
Does the answer to this question depend on the definition of 'running'?
filesystems linux-kernel
filesystems linux-kernel
New contributor
New contributor
New contributor
asked 4 hours ago
Peter L.Peter L.
1263
1263
New contributor
New contributor
i think that a running kernel does not "require"useful exposure to the outside world
– jsotola
3 hours ago
3
Brings to mind the old halted Linux firewall (circa 2002)
– Jeff Schaller
2 hours ago
add a comment |
i think that a running kernel does not "require"useful exposure to the outside world
– jsotola
3 hours ago
3
Brings to mind the old halted Linux firewall (circa 2002)
– Jeff Schaller
2 hours ago
i think that a running kernel does not "require"
useful exposure to the outside world
– jsotola
3 hours ago
i think that a running kernel does not "require"
useful exposure to the outside world
– jsotola
3 hours ago
3
3
Brings to mind the old halted Linux firewall (circa 2002)
– Jeff Schaller
2 hours ago
Brings to mind the old halted Linux firewall (circa 2002)
– Jeff Schaller
2 hours ago
add a comment |
2 Answers
2
active
oldest
votes
That's rather an odd question because you don't run the kernel like you run a program. The kernel is a platform to run programs on. Of course there is setup and shutdown code but it's not possible to run the kernel on its own. There must always be a main "init" process. And the kernel will panic if it's not there. If init tries to exit the kernel will also panic.
These days the init process is something like systemd. If not otherwise specified the kernel will try to run a program starting with /sbin/init
. See the init Param here http://man7.org/linux/man-pages/man7/bootparam.7.html in an emergency you can boot Linux with init=/bin/bash
. But notice how you always specify a file on the file system to run.
So the kernel will panic if it starts up an has no file system because without one there is no way to load init.
Some confusion may arise because of a chicken and egg situation where the kernel must load drivers to access it's file system. To get round this an initial ramdisk is loaded from an image on disk containing vital drivers and setup scripts. These are executed before the file system is loaded. But make no mistake the initial ramdisk is itself a file system.
Isn't there a condition where the kernel gives up trying to initialize hardware and load a known file system (not initrd passed into the kernel via init params), then drops into a very limited shell (without init=/bin/bash)? Also, since you bring up /bin/bash, would the kernel always have that minimal file system available, even if it was built with other .config options that could potentially eliminate this?
– Peter L.
2 hours ago
@PeterL. that limit shell is some shell from the initrd/initramfs/whatever that kernel booted with, IIRC.
– muru
1 hour ago
add a comment |
In Linux, every device is a file, so you have to have a filesystem to run it.
3
But of course the device drivers exist inside the kernel irrespective of whether or not a device file points to them.
– Philip Couling
2 hours ago
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Peter L. is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f507837%2fdoes-the-linux-kernel-need-a-file-system-to-run%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
That's rather an odd question because you don't run the kernel like you run a program. The kernel is a platform to run programs on. Of course there is setup and shutdown code but it's not possible to run the kernel on its own. There must always be a main "init" process. And the kernel will panic if it's not there. If init tries to exit the kernel will also panic.
These days the init process is something like systemd. If not otherwise specified the kernel will try to run a program starting with /sbin/init
. See the init Param here http://man7.org/linux/man-pages/man7/bootparam.7.html in an emergency you can boot Linux with init=/bin/bash
. But notice how you always specify a file on the file system to run.
So the kernel will panic if it starts up an has no file system because without one there is no way to load init.
Some confusion may arise because of a chicken and egg situation where the kernel must load drivers to access it's file system. To get round this an initial ramdisk is loaded from an image on disk containing vital drivers and setup scripts. These are executed before the file system is loaded. But make no mistake the initial ramdisk is itself a file system.
Isn't there a condition where the kernel gives up trying to initialize hardware and load a known file system (not initrd passed into the kernel via init params), then drops into a very limited shell (without init=/bin/bash)? Also, since you bring up /bin/bash, would the kernel always have that minimal file system available, even if it was built with other .config options that could potentially eliminate this?
– Peter L.
2 hours ago
@PeterL. that limit shell is some shell from the initrd/initramfs/whatever that kernel booted with, IIRC.
– muru
1 hour ago
add a comment |
That's rather an odd question because you don't run the kernel like you run a program. The kernel is a platform to run programs on. Of course there is setup and shutdown code but it's not possible to run the kernel on its own. There must always be a main "init" process. And the kernel will panic if it's not there. If init tries to exit the kernel will also panic.
These days the init process is something like systemd. If not otherwise specified the kernel will try to run a program starting with /sbin/init
. See the init Param here http://man7.org/linux/man-pages/man7/bootparam.7.html in an emergency you can boot Linux with init=/bin/bash
. But notice how you always specify a file on the file system to run.
So the kernel will panic if it starts up an has no file system because without one there is no way to load init.
Some confusion may arise because of a chicken and egg situation where the kernel must load drivers to access it's file system. To get round this an initial ramdisk is loaded from an image on disk containing vital drivers and setup scripts. These are executed before the file system is loaded. But make no mistake the initial ramdisk is itself a file system.
Isn't there a condition where the kernel gives up trying to initialize hardware and load a known file system (not initrd passed into the kernel via init params), then drops into a very limited shell (without init=/bin/bash)? Also, since you bring up /bin/bash, would the kernel always have that minimal file system available, even if it was built with other .config options that could potentially eliminate this?
– Peter L.
2 hours ago
@PeterL. that limit shell is some shell from the initrd/initramfs/whatever that kernel booted with, IIRC.
– muru
1 hour ago
add a comment |
That's rather an odd question because you don't run the kernel like you run a program. The kernel is a platform to run programs on. Of course there is setup and shutdown code but it's not possible to run the kernel on its own. There must always be a main "init" process. And the kernel will panic if it's not there. If init tries to exit the kernel will also panic.
These days the init process is something like systemd. If not otherwise specified the kernel will try to run a program starting with /sbin/init
. See the init Param here http://man7.org/linux/man-pages/man7/bootparam.7.html in an emergency you can boot Linux with init=/bin/bash
. But notice how you always specify a file on the file system to run.
So the kernel will panic if it starts up an has no file system because without one there is no way to load init.
Some confusion may arise because of a chicken and egg situation where the kernel must load drivers to access it's file system. To get round this an initial ramdisk is loaded from an image on disk containing vital drivers and setup scripts. These are executed before the file system is loaded. But make no mistake the initial ramdisk is itself a file system.
That's rather an odd question because you don't run the kernel like you run a program. The kernel is a platform to run programs on. Of course there is setup and shutdown code but it's not possible to run the kernel on its own. There must always be a main "init" process. And the kernel will panic if it's not there. If init tries to exit the kernel will also panic.
These days the init process is something like systemd. If not otherwise specified the kernel will try to run a program starting with /sbin/init
. See the init Param here http://man7.org/linux/man-pages/man7/bootparam.7.html in an emergency you can boot Linux with init=/bin/bash
. But notice how you always specify a file on the file system to run.
So the kernel will panic if it starts up an has no file system because without one there is no way to load init.
Some confusion may arise because of a chicken and egg situation where the kernel must load drivers to access it's file system. To get round this an initial ramdisk is loaded from an image on disk containing vital drivers and setup scripts. These are executed before the file system is loaded. But make no mistake the initial ramdisk is itself a file system.
edited 2 hours ago
answered 2 hours ago
Philip CoulingPhilip Couling
2,031920
2,031920
Isn't there a condition where the kernel gives up trying to initialize hardware and load a known file system (not initrd passed into the kernel via init params), then drops into a very limited shell (without init=/bin/bash)? Also, since you bring up /bin/bash, would the kernel always have that minimal file system available, even if it was built with other .config options that could potentially eliminate this?
– Peter L.
2 hours ago
@PeterL. that limit shell is some shell from the initrd/initramfs/whatever that kernel booted with, IIRC.
– muru
1 hour ago
add a comment |
Isn't there a condition where the kernel gives up trying to initialize hardware and load a known file system (not initrd passed into the kernel via init params), then drops into a very limited shell (without init=/bin/bash)? Also, since you bring up /bin/bash, would the kernel always have that minimal file system available, even if it was built with other .config options that could potentially eliminate this?
– Peter L.
2 hours ago
@PeterL. that limit shell is some shell from the initrd/initramfs/whatever that kernel booted with, IIRC.
– muru
1 hour ago
Isn't there a condition where the kernel gives up trying to initialize hardware and load a known file system (not initrd passed into the kernel via init params), then drops into a very limited shell (without init=/bin/bash)? Also, since you bring up /bin/bash, would the kernel always have that minimal file system available, even if it was built with other .config options that could potentially eliminate this?
– Peter L.
2 hours ago
Isn't there a condition where the kernel gives up trying to initialize hardware and load a known file system (not initrd passed into the kernel via init params), then drops into a very limited shell (without init=/bin/bash)? Also, since you bring up /bin/bash, would the kernel always have that minimal file system available, even if it was built with other .config options that could potentially eliminate this?
– Peter L.
2 hours ago
@PeterL. that limit shell is some shell from the initrd/initramfs/whatever that kernel booted with, IIRC.
– muru
1 hour ago
@PeterL. that limit shell is some shell from the initrd/initramfs/whatever that kernel booted with, IIRC.
– muru
1 hour ago
add a comment |
In Linux, every device is a file, so you have to have a filesystem to run it.
3
But of course the device drivers exist inside the kernel irrespective of whether or not a device file points to them.
– Philip Couling
2 hours ago
add a comment |
In Linux, every device is a file, so you have to have a filesystem to run it.
3
But of course the device drivers exist inside the kernel irrespective of whether or not a device file points to them.
– Philip Couling
2 hours ago
add a comment |
In Linux, every device is a file, so you have to have a filesystem to run it.
In Linux, every device is a file, so you have to have a filesystem to run it.
answered 4 hours ago
K7AAYK7AAY
744825
744825
3
But of course the device drivers exist inside the kernel irrespective of whether or not a device file points to them.
– Philip Couling
2 hours ago
add a comment |
3
But of course the device drivers exist inside the kernel irrespective of whether or not a device file points to them.
– Philip Couling
2 hours ago
3
3
But of course the device drivers exist inside the kernel irrespective of whether or not a device file points to them.
– Philip Couling
2 hours ago
But of course the device drivers exist inside the kernel irrespective of whether or not a device file points to them.
– Philip Couling
2 hours ago
add a comment |
Peter L. is a new contributor. Be nice, and check out our Code of Conduct.
Peter L. is a new contributor. Be nice, and check out our Code of Conduct.
Peter L. is a new contributor. Be nice, and check out our Code of Conduct.
Peter L. is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f507837%2fdoes-the-linux-kernel-need-a-file-system-to-run%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
i think that a running kernel does not "require"
useful exposure to the outside world
– jsotola
3 hours ago
3
Brings to mind the old halted Linux firewall (circa 2002)
– Jeff Schaller
2 hours ago