Issue
I've tried both virtual box and docker to install centos, latest version, neither has "mke2fs" command. I then tried to use root and type:
yum install mke2fs*
Loaded plugins: fastestmirror, ovl
Setting up Install Process
Loading mirror speeds from cached hostfile
...... No package mke2fs* available.
Why is this? Is it inside another package name other than mke2fs?
Solution
You can use yum provides
.
Provides=Find what package provides the given value
$ yum provides mke2fs
e2fsprogs-1.42.9-9.el7.x86_64 : Utilities for managing ext2, ext3, and ext4 filesystems
Repo : base
Matched from:
Filename : /usr/sbin/mke2fs
So I installed e2fsprogs (I did it in docker):
FROM centos:7
RUN yum -y update && \
yum -y install e2fsprogs
build it and started my container:
$ docker run -it my-centos bash
[root@1ef2a7d930cf /]# mke2fs
Usage: mke2fs [-c|-l filename] [-b block-size] [-C cluster-size]
[-i bytes-per-inode] [-I inode-size] [-J journal-options]
[-G flex-group-size] [-N number-of-inodes]
[-m reserved-blocks-percentage] [-o creator-os]
[-g blocks-per-group] [-L volume-label] [-M last-mounted-directory]
[-O feature[,...]] [-r fs-revision] [-E extended-option[,...]]
[-t fs-type] [-T usage-type ] [-U UUID] [-jnqvDFKSV] device [blocks-count]
Answered By - lvthillo Answer Checked By - Katrina (WPSolving Volunteer)