Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[gentoo-user] where is 'mke2fs' ?

2 views
Skip to first unread message

Philip Webb

unread,
Nov 17, 2022, 3:40:03 PM11/17/22
to
I need to rewrite the filesystem on a USB stick after it got damaged.
My notes tell me to use 'mke2fs', but 'which' doesn't find it :
has it been replaced by something else ?
I have 'e2fsprogs' installed, but there's no 'man' file for it
& it doesn't seem to create filesystems.
There is a utility 'sys-fs/genext2fs', which I emerged & looked at,
but it's not clear whether it does the simple job I need.

Can anyone advise ?

--
========================,,============================================
SUPPORT ___________//___, Philip Webb
ELECTRIC /] [] [] [] [] []| Cities Centre, University of Toronto
TRANSIT `-O----------O---' purslowatchassdotutorontodotca

ralfconn

unread,
Nov 17, 2022, 3:50:03 PM11/17/22
to
On 11/17/22 21:30, Philip Webb wrote:

> I need to rewrite the filesystem on a USB stick after it got damaged.
> My notes tell me to use 'mke2fs', but 'which' doesn't find it :
> has it been replaced by something else ?
> I have 'e2fsprogs' installed, but there's no 'man' file for it
> & it doesn't seem to create filesystems.
> There is a utility 'sys-fs/genext2fs', which I emerged & looked at,
> but it's not clear whether it does the simple job I need.
>
> Can anyone advise ?
>
You have the right package, mke2fs is inside it:

$ equery f sys-fs/e2fsprogs ... /sbin/mke2fs /sbin/mkfs.ext2 -> mke2fs
/sbin/mkfs.ext3 -> mke2fs /sbin/mkfs.ext4 -> mke2fs

Here man page is installed
$ man mke2fs

And which/whereis also:

$ which mke2fs
/sbin/mke2fs

$ whereis mke2fs
mke2fs: /sbin/mke2fs /usr/share/man/man8/mke2fs.8.bz2

Arve Barsnes

unread,
Nov 17, 2022, 3:50:04 PM11/17/22
to
On Thu, 17 Nov 2022 at 21:30, Philip Webb <pur...@ca.inter.net> wrote:
>
> I need to rewrite the filesystem on a USB stick after it got damaged.
> My notes tell me to use 'mke2fs', but 'which' doesn't find it :
> has it been replaced by something else ?
> I have 'e2fsprogs' installed, but there's no 'man' file for it
> & it doesn't seem to create filesystems.
> There is a utility 'sys-fs/genext2fs', which I emerged & looked at,
> but it's not clear whether it does the simple job I need.

# equery b `which mke2fs`
* Searching for /sbin/mke2fs ...
sys-fs/e2fsprogs-1.46.5-r4 (/sbin/mke2fs)

Might it be hidden behind USE="tools"?

Regards,
Arve

Matt Connell

unread,
Nov 17, 2022, 4:00:04 PM11/17/22
to
On Thu, 2022-11-17 at 21:41 +0100, Arve Barsnes wrote:
> Might it be hidden behind USE="tools"?

This is correct.

$ equery uses e2fsprogs
...
+ + tools : Build extfs tools (mke2fs, e2fsck, tune2fs, etc.)

Philip, make sure you have the 'tools' USE flag enabled for e2fsprogs
and it should be available in /sbin/

Jack

unread,
Nov 17, 2022, 4:20:04 PM11/17/22
to
On 11/17/22 15:30, Philip Webb wrote:
> I need to rewrite the filesystem on a USB stick after it got damaged.
> My notes tell me to use 'mke2fs', but 'which' doesn't find it :
> has it been replaced by something else ?
> I have 'e2fsprogs' installed, but there's no 'man' file for it
> & it doesn't seem to create filesystems.
> There is a utility 'sys-fs/genext2fs', which I emerged & looked at,
> but it's not clear whether it does the simple job I need.
>
> Can anyone advise ?
On my system, /sbin/mke2fs is part of sys-fs/e2fsprogs-2.46.5-r3 with
the tools USE FLAG set.

Philip Webb

unread,
Nov 17, 2022, 6:50:03 PM11/17/22
to
221117 Matt Connell wrote:
> On Thu, 2022-11-17 at 21:41 +0100, Arve Barsnes wrote:
>> Might it be hidden behind USE="tools"?
> This is correct.

> $ equery uses e2fsprogs
> ...
> + + tools : Build extfs tools (mke2fs, e2fsck, tune2fs, etc.)
>
> Make sure you have the 'tools' USE flag enabled for e2fsprogs
> and it should be available in /sbin/

Yes : sometime ago the 'tools' flag must have been introduced
& since I don't format devices often, it didn't trip me up till now.
I've updated my notes.

I formatted the stick, copied the files it had before the damage,
then discovered that it was in fact physically bad,
so 'mke2fs' wasn't needed today. I used another formatted stick instead.

Thanx to both + Jack as well.
0 new messages