Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/etc/fstab.empty is created and not used #2371

Closed
LaszloGombos opened this issue Jun 3, 2023 · 3 comments
Closed

/etc/fstab.empty is created and not used #2371

LaszloGombos opened this issue Jun 3, 2023 · 3 comments
Labels
stale communication is stuck

Comments

@LaszloGombos
Copy link
Collaborator

dracut creates /etc/fstab.empty for each generated initramfs and this does not seem to be used for anything. Get rid of it.

@aafeijoo-suse
Copy link
Member

It's for fsck. See fsck(8):

If no filesystems are specified on the command line, and the -A option is not specified, fsck will default to checking filesystems in /etc/fstab serially. This is equivalent to the -As options.
...
FSTAB_FILE
This environment variable allows the system administrator to override the standard location of the /etc/fstab file. It is also useful for developers who are testing fsck.

@aafeijoo-suse aafeijoo-suse removed the bug Our bugs label Jul 20, 2023
@LaszloGombos
Copy link
Collaborator Author

LaszloGombos commented Jul 20, 2023

@aafeijoo-suse I agree that this is not a bug and I think the original issue report does not quite explain all the motivations. There is a performance benefit for not creating an extra empty file - especially when it is never needed - see #2386 (review)

This module is almost always included, so it make sense to be stringent about performance.

Due to ramfs' design, at least one page will be allocated for one file however small the file is. On machine with large page size, this will become worse and waste too many memory.

@stale
Copy link

stale bot commented Sep 16, 2023

This issue is being marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. If this is still an issue in the latest release of Dracut and you would like to keep it open please comment on this issue within the next 7 days. Thank you for your contributions.

@stale stale bot added the stale communication is stuck label Sep 16, 2023
@stale stale bot closed this as completed Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale communication is stuck
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants