Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 407999 - Include xfs_repair into the genkernel-generated initramfs
Summary: Include xfs_repair into the genkernel-generated initramfs
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: genkernel (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo Genkernel Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-13 09:28 UTC by Jan Kundrát (RETIRED)
Modified: 2019-07-15 10:38 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Kundrát (RETIRED) gentoo-dev 2012-03-13 09:28:21 UTC
I'd got an XFS corruption which required manual xfs_repair. The initramfs image does not include any FS checkers, AFAIK. It would be nice to have a way of adding these packages to the initramfs.
Comment 1 Sebastian Pipping gentoo-dev 2012-03-13 19:23:40 UTC
Disclaimer: Personal view only

With the way genkernel currently works (compiling stuff to include itself) I personally don't see this as a likely change for the future.  You could try asking dracut upstream for this as they use files as-is from the system to my understanding.  However, their ~"get throught to the real root and get out of the way" approach may not include file system checkers, either - no idea.  For now I would say that an initramfs and a sysadmin repair disc is two distinct things with overlap but distinct cases of use.
Comment 2 Xake 2012-03-14 06:56:03 UTC
From the config file of dracut:

# A list of fsck tools to install. If it's not specified, module's hardcoded
# default is used, currently: "umount mount /sbin/fsck* xfs_db xfs_check
# xfs_repair e2fsck jfs_fsck reiserfsck btrfsck". The installation is
# opportunistic, so non-existing tools are just ignored.
#fscks=""


So dracut installs this. IIRC dracut also does a pre-mount-fsck of the rootfs and /usr if configured correctly.
My personal opinion is that if the proper patches surfaced (i.e. proper compiling and integration into genkernel) I would not turn them down, but in the meantime I would refer people to use dracut.
Comment 3 Richard Yao (RETIRED) gentoo-dev 2012-07-21 06:43:06 UTC
(In reply to comment #1)
> Disclaimer: Personal view only
> 
> With the way genkernel currently works (compiling stuff to include itself) I
> personally don't see this as a likely change for the future.  You could try
> asking dracut upstream for this as they use files as-is from the system to
> my understanding.  However, their ~"get throught to the real root and get
> out of the way" approach may not include file system checkers, either - no
> idea.  For now I would say that an initramfs and a sysadmin repair disc is
> two distinct things with overlap but distinct cases of use.

We have copy_binaries(), which lets us do this too. It should be a simple patch to have genkernel grab whatever filesystem repair tools that happen to be built when it is building an initramfs. Does anyone have any objections to this?
Comment 4 Sebastian Pipping gentoo-dev 2012-07-21 20:30:05 UTC
(In reply to comment #3)
> We have copy_binaries(), which lets us do this too. It should be a simple
> patch to have genkernel grab whatever filesystem repair tools that happen to
> be built when it is building an initramfs. Does anyone have any objections
> to this?

I'm not too happy with auto-detection magic for it.  A default of requiring seems as troublesome as omitting, though.
Comment 5 Richard Yao (RETIRED) gentoo-dev 2012-07-21 21:29:36 UTC
Perhaps we could provide users with an --include-binaries= hook that will allow users to decide what to add to the initramfs without having to go through the trouble of making an overlay directory.
Comment 6 Larry the Git Cow gentoo-dev 2019-07-14 13:00:28 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=ccfe8f4a8123bf2c64e77879aea1ad475caa2a23

commit ccfe8f4a8123bf2c64e77879aea1ad475caa2a23
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2019-07-14 10:42:41 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2019-07-14 11:58:18 +0000

    Add --xfsprogs support
    
    Bug: https://bugs.gentoo.org/407999
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 defaults/software.sh                               |   7 ++
 doc/genkernel.8.txt                                |   3 +
 gen_cmdline.sh                                     |   6 ++
 gen_determineargs.sh                               |   1 +
 gen_initramfs.sh                                   |  22 +++++
 gkbuilds/xfsprogs.gkbuild                          |  42 +++++++++
 .../5.0.0/xfsprogs-4.15.0-sharedlibs.patch         | 105 +++++++++++++++++++++
 .../5.0.0/xfsprogs-4.9.0-underlinking.patch        |  11 +++
 8 files changed, 197 insertions(+)