Mounting using alternate fstab file
Clash Royale CLAN TAG#URR8PPP
I need to use an alternative fstab file for mounting a folder in another folder, like the command
mount --bind /folder1 /folder2
I tried the command
mount --fstab /pathToFile.fstab
as stated in the man:
-T
,--fstab path
Specifies an alternative fstab file. If path is a directory then the files in the directory are sorted by
strverscmp(3)
; files that start with.
or without an.fstab
extension are ignored. The option can be specified more than once. This option is mostly designed forinitramfs
orchroot
scripts where additional configuration is specified beyond standard system configuration.
I create the file this way:
/folder1 /folder2 auto bind 0 0
but the command
mount --fstab /path
does nothing.
I added the line from the alternative file in /etc/fstab
and with the
mount -a
the folder is mounted correctly.
Does anybody have experience with the --fstab
option?
mount fstab bind-mount
add a comment |
I need to use an alternative fstab file for mounting a folder in another folder, like the command
mount --bind /folder1 /folder2
I tried the command
mount --fstab /pathToFile.fstab
as stated in the man:
-T
,--fstab path
Specifies an alternative fstab file. If path is a directory then the files in the directory are sorted by
strverscmp(3)
; files that start with.
or without an.fstab
extension are ignored. The option can be specified more than once. This option is mostly designed forinitramfs
orchroot
scripts where additional configuration is specified beyond standard system configuration.
I create the file this way:
/folder1 /folder2 auto bind 0 0
but the command
mount --fstab /path
does nothing.
I added the line from the alternative file in /etc/fstab
and with the
mount -a
the folder is mounted correctly.
Does anybody have experience with the --fstab
option?
mount fstab bind-mount
2
I guess you should trymount --fstab /path -a
ormount --fstab /path /folder1
.
– Bodo
Feb 13 at 9:53
Is your alternatefstab
file calledpath
and is it located in the root directory? This is what yourmount --fstab /path
command implies.
– Kusalananda
Feb 13 at 9:54
@Kusalananda /path was an example, my fstab file is in /ftp/mountFile.fstab, the file exist, but I didn't use the -a option, that solve my problem
– Andy
Feb 13 at 13:54
add a comment |
I need to use an alternative fstab file for mounting a folder in another folder, like the command
mount --bind /folder1 /folder2
I tried the command
mount --fstab /pathToFile.fstab
as stated in the man:
-T
,--fstab path
Specifies an alternative fstab file. If path is a directory then the files in the directory are sorted by
strverscmp(3)
; files that start with.
or without an.fstab
extension are ignored. The option can be specified more than once. This option is mostly designed forinitramfs
orchroot
scripts where additional configuration is specified beyond standard system configuration.
I create the file this way:
/folder1 /folder2 auto bind 0 0
but the command
mount --fstab /path
does nothing.
I added the line from the alternative file in /etc/fstab
and with the
mount -a
the folder is mounted correctly.
Does anybody have experience with the --fstab
option?
mount fstab bind-mount
I need to use an alternative fstab file for mounting a folder in another folder, like the command
mount --bind /folder1 /folder2
I tried the command
mount --fstab /pathToFile.fstab
as stated in the man:
-T
,--fstab path
Specifies an alternative fstab file. If path is a directory then the files in the directory are sorted by
strverscmp(3)
; files that start with.
or without an.fstab
extension are ignored. The option can be specified more than once. This option is mostly designed forinitramfs
orchroot
scripts where additional configuration is specified beyond standard system configuration.
I create the file this way:
/folder1 /folder2 auto bind 0 0
but the command
mount --fstab /path
does nothing.
I added the line from the alternative file in /etc/fstab
and with the
mount -a
the folder is mounted correctly.
Does anybody have experience with the --fstab
option?
mount fstab bind-mount
mount fstab bind-mount
edited Feb 13 at 10:44
Stephen Kitt
175k24400477
175k24400477
asked Feb 13 at 9:43
AndyAndy
31
31
2
I guess you should trymount --fstab /path -a
ormount --fstab /path /folder1
.
– Bodo
Feb 13 at 9:53
Is your alternatefstab
file calledpath
and is it located in the root directory? This is what yourmount --fstab /path
command implies.
– Kusalananda
Feb 13 at 9:54
@Kusalananda /path was an example, my fstab file is in /ftp/mountFile.fstab, the file exist, but I didn't use the -a option, that solve my problem
– Andy
Feb 13 at 13:54
add a comment |
2
I guess you should trymount --fstab /path -a
ormount --fstab /path /folder1
.
– Bodo
Feb 13 at 9:53
Is your alternatefstab
file calledpath
and is it located in the root directory? This is what yourmount --fstab /path
command implies.
– Kusalananda
Feb 13 at 9:54
@Kusalananda /path was an example, my fstab file is in /ftp/mountFile.fstab, the file exist, but I didn't use the -a option, that solve my problem
– Andy
Feb 13 at 13:54
2
2
I guess you should try
mount --fstab /path -a
or mount --fstab /path /folder1
.– Bodo
Feb 13 at 9:53
I guess you should try
mount --fstab /path -a
or mount --fstab /path /folder1
.– Bodo
Feb 13 at 9:53
Is your alternate
fstab
file called path
and is it located in the root directory? This is what your mount --fstab /path
command implies.– Kusalananda
Feb 13 at 9:54
Is your alternate
fstab
file called path
and is it located in the root directory? This is what your mount --fstab /path
command implies.– Kusalananda
Feb 13 at 9:54
@Kusalananda /path was an example, my fstab file is in /ftp/mountFile.fstab, the file exist, but I didn't use the -a option, that solve my problem
– Andy
Feb 13 at 13:54
@Kusalananda /path was an example, my fstab file is in /ftp/mountFile.fstab, the file exist, but I didn't use the -a option, that solve my problem
– Andy
Feb 13 at 13:54
add a comment |
1 Answer
1
active
oldest
votes
The command
mount --fstab /pathToFile.fstab
is the same as mount
with no options when using the standard fstab file, i.e. "list mounted filesystems".
To actually mount all automountable filesystems specified in a custom fstab file similar to using mount -a
with the standard fstab files, you'll need to use the --fstab
option together with the -a
option:
mount --fstab /pathToFile.fstab -a
Thank you very much, this answer solve my question!
– Andy
Feb 13 at 13:50
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
);
);
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%2f500362%2fmounting-using-alternate-fstab-file%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
The command
mount --fstab /pathToFile.fstab
is the same as mount
with no options when using the standard fstab file, i.e. "list mounted filesystems".
To actually mount all automountable filesystems specified in a custom fstab file similar to using mount -a
with the standard fstab files, you'll need to use the --fstab
option together with the -a
option:
mount --fstab /pathToFile.fstab -a
Thank you very much, this answer solve my question!
– Andy
Feb 13 at 13:50
add a comment |
The command
mount --fstab /pathToFile.fstab
is the same as mount
with no options when using the standard fstab file, i.e. "list mounted filesystems".
To actually mount all automountable filesystems specified in a custom fstab file similar to using mount -a
with the standard fstab files, you'll need to use the --fstab
option together with the -a
option:
mount --fstab /pathToFile.fstab -a
Thank you very much, this answer solve my question!
– Andy
Feb 13 at 13:50
add a comment |
The command
mount --fstab /pathToFile.fstab
is the same as mount
with no options when using the standard fstab file, i.e. "list mounted filesystems".
To actually mount all automountable filesystems specified in a custom fstab file similar to using mount -a
with the standard fstab files, you'll need to use the --fstab
option together with the -a
option:
mount --fstab /pathToFile.fstab -a
The command
mount --fstab /pathToFile.fstab
is the same as mount
with no options when using the standard fstab file, i.e. "list mounted filesystems".
To actually mount all automountable filesystems specified in a custom fstab file similar to using mount -a
with the standard fstab files, you'll need to use the --fstab
option together with the -a
option:
mount --fstab /pathToFile.fstab -a
answered Feb 13 at 11:15
telcoMtelcoM
18.8k12347
18.8k12347
Thank you very much, this answer solve my question!
– Andy
Feb 13 at 13:50
add a comment |
Thank you very much, this answer solve my question!
– Andy
Feb 13 at 13:50
Thank you very much, this answer solve my question!
– Andy
Feb 13 at 13:50
Thank you very much, this answer solve my question!
– Andy
Feb 13 at 13:50
add a comment |
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%2f500362%2fmounting-using-alternate-fstab-file%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
2
I guess you should try
mount --fstab /path -a
ormount --fstab /path /folder1
.– Bodo
Feb 13 at 9:53
Is your alternate
fstab
file calledpath
and is it located in the root directory? This is what yourmount --fstab /path
command implies.– Kusalananda
Feb 13 at 9:54
@Kusalananda /path was an example, my fstab file is in /ftp/mountFile.fstab, the file exist, but I didn't use the -a option, that solve my problem
– Andy
Feb 13 at 13:54