Questions tagged [mkfs]

mkfs is a Linux program used to build filesystems.

Filter by
Sorted by
Tagged with
0 votes
0 answers
32 views

How to run mkfs on a BD-RE in linux

~ # mkfs.btrfs /dev/sr0 btrfs-progs v6.3.3 See https://btrfs.readthedocs.io for more information. ERROR: '/dev/sr0' is too small to make a usable filesystem ERROR: minimum size for each btrfs device ...
Gooberpatrol66's user avatar
0 votes
0 answers
31 views

mkfs.vfat -- No such file or directory [duplicate]

I'm on Debian Bookworm. I am trying to format my USB drive to FAT32 filesystem. ~$ lsblk -f NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS sdb ...
vrgovinda's user avatar
  • 279
0 votes
0 answers
53 views

How create isolated ext4 filesystem on file

There is a 25G /dev/sda6 ext4 partition mounted on /data. I'm trying to make a fixed size filesystem on a file using fallocate, mkfs.ext4, mount: fallocate -l 5G /data/new_storage mkfs.ext4 -E ...
TheAct1on's user avatar
9 votes
3 answers
4k views

Minimalistic ext4 filesystem without journal and other advanced features

I have a small "rescue" system (16 MB) that I boot into RAM as ramdisk. The initrd disk that I am preparing needs to be formatted. I think ext4 will do fine, but obviously, it doesn't make ...
Martin Vegter's user avatar
0 votes
0 answers
92 views

I altered the partition table (resized the root and created a new partition and formatted it) but can't log into my arch system anymore

Yesterday, I had an idea of having two root partitions for my arch system, one which would contain packages and system files and another one to store my personal files (music, videos, etc). With that ...
Asmit Das Choudhury's user avatar
0 votes
1 answer
283 views

How do I put the XFS journal on another drive?

Trying to put the journal of a big hard drive on a smaller, but faster SSD. $ sudo mkfs.xfs -N -l logdev=/mnt/data-journal/journal /dev/sdc unable to get size of the log subvolume. $ sudo mkfs.xfs -N ...
martixy's user avatar
  • 111
12 votes
4 answers
2k views

Difference between mkfs -t ext4 and mkfs.ext4

Is there a difference between sudo mkfs -t ext4 /dev/sdb and sudo mkfs.ext4 /dev/sdb? Or is the latter just an alias of the former?
Nepumuk's user avatar
  • 687
3 votes
1 answer
205 views

mkfs ext2 ignore number-of-inodes

I want to make ext2 file system. I want to set "number-of-inodes" option to some number. I tried several values: if -N 99000 then Inode count: 99552 if -N 3500 then Inode count: 3904 if -N ...
Андрей Тернити's user avatar
0 votes
1 answer
665 views

grub does not recognise specially-formatted ext4 partition

As the title states, grub is unable to recognise my ext4 partition: GNU GRUB version 2.06-3~deb11u5 Minimal BASH-like line editing is supported. For the first word, TAB ...
ManSamVampire's user avatar
1 vote
1 answer
260 views

Unix ext2 superblock - file system creation date

I am trying to find the creation date on an ext2 file system. I seem to get a current date using dumpe2fs. The problem is that the original ext2 superblock specification does not contain such ...
Panagiotis Stefanis's user avatar
0 votes
1 answer
607 views

how do I make a new filesystem image?

I know I used to be able to do it, and its frustrating I cant recall. I want to write an ext4 filesystem to a disk image in a folder. I don't want to re-partition my drive, I just need the filesystem ...
j0h's user avatar
  • 3,617
1 vote
1 answer
119 views

External HDD disconnects when formating. Disk or SATA-to-USB adapter problem?

My SATA HD used as an external disk connected to a USB port is not working. When I try to format it using sudo mkfs.ext4 /dev/sdj1, I get: "Input/output error while writing out and closing file ...
toliveira's user avatar
  • 347
2 votes
1 answer
233 views

mkfs fails if called after a 'dd' operation

I want to delete all files on one my eMMC blocks (e.g. /dev/mmcblk0p1) and re-create the filesystem afterward (with ext4). So I unmount and erase: umount /dev/mmcblk0p1 dd if=/dev/zero of=/dev/...
DEKKER's user avatar
  • 948
0 votes
1 answer
20 views

/dev/sda4/ on USB stick isn't available after formatting. 'Discs' shows the following:

size: 58 GB contents: unknown device: /dev/sda4 partition type: basic data When I ran the format, I selected the type which I expected result in type of Linux. I found a similar issue from 2019, but ...
user546640's user avatar
0 votes
0 answers
1k views

Creating a "virtual/ fake" usb drive on linux filesystem

Reference post: Create virtual USB drive Problem statement: I would like to create/ convert and area on my (Ubuntu 20.04) filesystem such that application's think a USB is connected to my machine, and ...
LaBeaux's user avatar
2 votes
1 answer
5k views

Bad magic number in super-block

So I have three disks. I had thought to label the volumes themselves: $ e2label /dev/sda d80-JD-75MS $ e2label /dev/sdb e2label: Bad magic number in super-block while trying to open /dev/sdb Found a ...
Ray Andrews's user avatar
  • 2,349
2 votes
1 answer
247 views

mkfs ext4 on Debian 11 - inconsistent resize_inode results on filesystem creation

I am running Debian 11 with all current updates (kernel 5.10.0-18 and e2fsprogs 1.46.2-2). I have been mkfs.ext4 some filesystems on various volumes - with lvm2 on top of mdraid, fwiw. Specifically, ...
lfabio's user avatar
  • 131
0 votes
0 answers
128 views

Disabling reliability features on an ephemeral ext4 filesystem

I am using cryptsetup to create a new, temporary filesystem with a random, ephemeral key. This is an alternative to creating an encrypted swap file and using a giant tmpfs mount, as that would have ...
forest's user avatar
  • 2,655
0 votes
1 answer
134 views

Mystery of the missing disk space

I have about ~350Gb that I wanted to copy from server to a new local 1Tb external ssd I bought for the task. So I used rsync but the 1Tb disk ran out of space during the copy, which was odd. So I ...
jeremy_rutman's user avatar
0 votes
1 answer
55 views

linux + is it possible to understand when filesystem was created on disk

is it possible to understand , when filesystem was created on disk ( date and time ) we try the following ( on sdb disk ) tune2fs -l /dev/sdb | grep time Last mount time: Mon Aug 1 19:17:...
yael's user avatar
  • 13.1k
0 votes
0 answers
1k views

Formatting USB external HDD fails with IO error

Output of lsblk: root@pve:~# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 1.8T 0 disk ├─sda1 8:1 0 1007K ...
James Wagner's user avatar
1 vote
1 answer
793 views

Backup created with rsync takes up more space on external drive than on source

I am using rsync to make a backup of Ubuntu running on a Raspberry Pi. I exclude all the usual directories whose contents are only created after boot up anyway. The rsync writes to a backup image that ...
FlexMcMurphy's user avatar
0 votes
1 answer
3k views

how to make `mkfs.ext4 /dev/block/sda1` quickly?

I develop an application on Android, need to manage the disk, my program is root permission to run in the background of Android.One problem is that formatting disk partitions is so slow that it takes ...
Clancy Zeng's user avatar
1 vote
1 answer
867 views

Why does Parted mkpart ask for file system type, if I can later format with another file system? [duplicate]

What I Did I attach an HDD, lsblk -S shows this drive as sdc I use sudo parted /dev/sdc/ to start parted against sdc I create a partition table as: mklabel gpt I make a partition: mkpart my-cool-...
dungarian's user avatar
  • 445
0 votes
1 answer
255 views

How does "Inodes per group" and "lazy_itable_init" flag relate to the "Inode count" value in an ext4 filesystem?

I am trying to root cause a customer case where 2 Identical drives, formatted with the same command, led to a difference of ~55GB in total disk space due to additional Inode overhead. I want to ...
RuMAN S's user avatar
  • 19
1 vote
1 answer
425 views

Define Data Mode in mkfs.ext4 command

Is there an option to define the default data mode when using mkfs? The command mkfs -t ext4 /dev/sdc1 format a partition as ext4 with default journal mode data=ordered. I could set the data=journal ...
moudi's user avatar
  • 111
0 votes
1 answer
677 views

Partitions for loop device not found from script, visible elsewhere

I'm currently trying to partition and then format a disk image using parted, by first mounting a blank disk image onto a loop, creating the appropriate partitions, and then formatting these partitions ...
Larry Tang's user avatar
1 vote
1 answer
142 views

Creating Filesystem on File that has definied size

I know that when you make a new file and create a ext4 filesystem on it with mkfs, the filesystem will be smaller than the file because of the blocksize. However, when I want to have a filesystem that ...
SummerRain's user avatar
0 votes
0 answers
372 views

How do I reformat/clean this drive with lvms on it?

I have two RAID-10 spans. One I had misconfigured into an lvm-thin. It currently looks like this. sdb 8:16 0 1.8T 0 disk ├─sdb1 8:17 ...
Pietro Aretino's user avatar
0 votes
1 answer
1k views

Why can mkfs.ext4 not create a 2048 block size file system on 650 MB image file?

The commands I invoke are the following Create image file dd if=/dev/zero of=benj.luks bs=1k count=666000 Set up LUKS container cryptsetup luksFormat benj.luks Set up loop device and open the ...
Benj's user avatar
  • 123
0 votes
1 answer
141 views

How to create mkfs for LFS? [closed]

I am trying to run following command mkfs -v -t ext4 /dev/sda1 to create file system but I got an output /dev/sda1 is apparently in use by the system; will not make a filesystem here!. How can I ...
Leviathan's user avatar
  • 113
0 votes
1 answer
176 views

Query detected badblocks from NTFS

When creating an ntfs partition with mkfs.ntfs, it does zeroing and badblocks scanning by default. But unlike e2fsck -fccky it does not output how many badblocks it actually found. I would like to get ...
xeruf's user avatar
  • 551
1 vote
1 answer
425 views

Unable create ext4 filesystem under LUKS

I've successfully created a LUKS drive from a 32Mb USB flash drive. However when I write an ext4 filesystem to it I am unable to mount the result, or even run fsck or dumpe2fs etc. The drive shows up ...
GydeonMylls's user avatar
2 votes
1 answer
5k views

Fail to format disk, missing mkfs file. [mkfs: failed to execute mkfs.* : No such file or directory]

While working on a fresh install of debian on GCP, I am trying to format a disk to xfs. sudo mkfs -t xfs -n ftype=1 /dev/sdb -f which gives me this error: mkfs: failed to execute mkfs.xfs: No such ...
Paulo's user avatar
  • 151
1 vote
1 answer
4k views

mkfs error: /dev/nvme0n1 apparently in use by the system; will not make a filesystem here

I added a nvme storage device to a Dell 7820 workstation (alias: new-machine). The storage device was used in another server (alias: old-machine) and it seems like it was configured as RAID. Anyway I ...
pepsiblossom's user avatar
1 vote
1 answer
6k views

mkfs doesn't work -- hangs on "Creating journal"

I needed to reformat my 14GB stick to ext4. I used mkfs.ext4. But this program hung on Creating journal Neither Ctrl c nor kill -9 could interrupt this. I rebooted and now there is a similar problem ...
Алексей Сазыкин's user avatar
3 votes
1 answer
759 views

How can I enable transparent compression on exisitng f2fs partition?

As far as I know it is possible to enable on new partition. Is there any way to enable compression on existing f2fs partition? I don't want to wipe and create a new partition to enable this feature.
Arun_005's user avatar
5 votes
2 answers
4k views

What am I doing wrong when formatting my flash drive to NTFS?

Before the attempt to format a flash drive: $ sudo fdisk -l ... ... Disk /dev/sdc: 7.32 GiB, 7864320000 bytes, 15360000 sectors Disk model: DataTraveler 3.0 Units: sectors of 1 * 512 = 512 bytes ...
Enlico's user avatar
  • 1,586
1 vote
2 answers
3k views

How to create a mkfs.ext4 file system on an SD card that can be written to by anyone?

I'm using up to date Arch Linux 5.12.5. SD cards from time to time become corrupted, and if not bricked have to be reset/ reformatted. I do this as follows # 1. unmount the card / make sure it's ...
Kes's user avatar
  • 859
1 vote
1 answer
475 views

badblocks and mkfs.ext4

I've ran badblocks on a disk /dev/sdc and now I want to use the saved file with badblocks as an argument to mkfs.ext4 -l on a partition. Block size used in both commands are the same. But I'm ...
Adriano dos Santos Fernandes's user avatar
0 votes
1 answer
219 views

Create ext4 img from diff

I'm trying to create an update image from an ext4 filesystem which should only consists of the changed files. So basically I have a Debian distro with an ext4 root file system. I want to create a base ...
Florian Bader's user avatar
3 votes
0 answers
419 views

Building Custom Kali Linux ISO Image Failed

I'm using a Kali Linux on virtual box and I'm currently trying to create a custom Kali Linux ISO using the following commands: apt-get install git live-build cdebootstrap git clone https://gitlab.com/...
Karim's user avatar
  • 31
0 votes
3 answers
916 views

how to create disk label without creation filesystem on new disk

we have rhel 7.2 server , server is VM server and we add new disk - sde with the following example we create ext file system with label - disk2 mkfs.ext4 -L disk2 /dev/sde mke2fs 1.42.9 (28-Dec-2013) /...
yael's user avatar
  • 13.1k
1 vote
0 answers
2k views

mkfs complain about disk is apparently in use by the system

on our rhel server we want to re-create ext4 filesystem as [root@worker ~]# mkfs.ext4 -j -m 0 /dev/sdd -F mke2fs 1.42.9 (28-Dec-2013) /dev/sdd is apparently in use by the system; will not make a ...
yael's user avatar
  • 13.1k
0 votes
1 answer
320 views

how to format a partition of a diskimage?

I made an empty binary image file with fallocate -l 500M sd.img command and then partitioned it using gdisk and now I can see my partitions using gdisk: Command (? for help): i Partition number (1-2): ...
Mahyar Shokraeian's user avatar
0 votes
0 answers
220 views

Undo a disk format while disk is still attached

I've been struggling with a disk that's a logical volume. Disk would not work with me and I decided to partion and format the disk.. Then realized that I have de-attached and attached the disk without ...
anonymously132526's user avatar
0 votes
2 answers
401 views

massive resource consumption during mkfs.ntfs on a zvol, why (and how can I limit this)?

On my machine mkfs.ntfs is slow and results in massive use of resources, preventing me from using the machine for anything else. According to top it (or rather directly related zvol processes) is ...
Stonecraft's user avatar
0 votes
1 answer
81 views

Format microSDCard which has an OS written on it

I've got a 32G micro SDCard which I created a bootable ubuntu installation on it for use on a home server some while ago. I want to format it to FAT32 but have been unable to do so with either gParted/...
droid001's user avatar
0 votes
0 answers
390 views

Change File Permissions inside an Image File in Linux

I have an application (running in an IDE under my user account) that does the following: It creates an empty file with ~1GiB size. It calls mkfs on this file (btrfs currently, but may change in ...
user1994405's user avatar
2 votes
1 answer
2k views

Accidentally ran mkfs command on already available disk

I had a volume of 350Gb attached to my Linode server. It was running out of space so I resized it to 400GB from the dashboard and restarted my server. Then I used the df -h command to check if the ...
zish's user avatar
  • 121