Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [mkfs]

mkfs is a Linux program used to build filesystems.

6
votes
1answer
175 views

How to calculate partition Start End Sector?

I am wondering what Start and End value to choose when partitioning my ext. SSD using fdisk. fdisk suggests 2048-250069679, default 2048 but 250069679 cannot be divided by 512 nor by 2048. Wouldn't ...
1
vote
1answer
46 views

How can I format a partition into a filesystem quickly?

In gparted, repartitioning a disk into one single partition and formatting the partition to a filesystem is very fast. It seems not write zeros to the partition. How can I achieve the same when ...
0
votes
1answer
64 views

mkfs.ext4 write all over the whole disk?

I it said that mkfs.ext4 overwrites data when run over a disk with existing data. My question is, does it really write from beginning till the very end ? I know that it writes itmaps, inode list, ...
0
votes
0answers
15 views

Formatting a partition through a shutdown service

I'm trying to implement a "factory restore" service that can be activated from a cockpit dashboard. My idea is to create a service that formats the current partition on the next boot (after the ...
-3
votes
1answer
44 views

Data loss in disk in linux

How to get back lost data in /dev/sde? I unmounted a mount point on which /dev/sde was mounted and ran mkfs.ext4 as it was not getting remounted and that lead to data loss. Now I can't find /dev/sde ...
3
votes
1answer
80 views

Partitioning and formatting a 4k-emulated (512e) HDD

I just plugged into USB A 3.0 / C 3.1 my new external HDD to Debian Buster system. The disk was sold as LaCie 2.5" Porsche Design P'9227 2TB USB-C. Here is the output of fdisk -l /dev/sdc: Disk /...
0
votes
0answers
48 views

Relation of max LEB count and vol_size in UBI tools

When creating a UBI image there are two times you can specify the size of your UBIFS volume. Once in 'mkfs.ubifs -c max-leb-cnt' and once in the ubinize config file, vol_size. If I have a LEB size of ...
0
votes
1answer
124 views

can't format usb storage mounted on /dev/sdb

I have an 8Gb usb storage and lsblk shows it its mounted in /dev/sdb. When trying to: sudo mkfs.ntfs -L "label" /dev/sdb I got: /dev/sdb is entire device, not just one partition. Refusing to make a ...
1
vote
0answers
35 views

mkdosfs hangs forever, even when using timeout

I'm testing massive amounts of USB flash drives using a custom bash script that's based on f3. Before I perform f3write and f3read I format the drives, as my experience is some of the drives come ...
0
votes
0answers
61 views

I have unmounted a partition, yet mkfs.ext4 says it won't run on a partition in use, why is that? [duplicate]

/dev/sda11 is a partition that I'd like install NixOS 18.03 on following this guide. The problem is that /dev/sda11 is unmounted, yet mkfs.ext4 is acting like it is still is mounted. I had it mounted ...
2
votes
2answers
899 views

How to erase gpt partition table and how to make old partition forget mount information

We have Beaglbone black based custom board with 256MB RAM and 4GB eMMC. We have script to flash software on the board. Script erases gpt partition table using following commands #Delete primary gpt (...
3
votes
2answers
559 views

Why is 67108864 the maximum bytes-per-inode ratio? Why is there a max?

Formatting a disk for purely large video files, I calculated what I thought was an appropriate bytes-per-inode value, in order to maximise usable disk space. I was greeted, however, with: mkfs.ext4: ...
0
votes
1answer
246 views

is it possible to capture the UUID number before creating file system on disk

is it possible to capture the UUID number before creating file system on disk? if yes how - by which command ? blkid ( before run mkfs.ext4 on sdb disk ) <no output> blkid ( after run mkfs....
2
votes
1answer
261 views

blkid + print only the disks that are with filesystem

regarding blkid command please help me to approve this assumption can we say that blkid will print all disk devices only if these disks are with filesystem ( by mkfs ) blkid /dev/sda1: UUID="...
0
votes
1answer
88 views

How to migrate partitions and file systems to another device

I have an existing system with partitions but want to move them to a new device. The new device may be smaller and be connected to the system differently then the existing device. How do I move the ...
5
votes
4answers
274 views

How to capture all disks that don’t have a file system

I want to capture all disks that do not have a filesystem ( all disks that mkfs not runs on them ) I tried the below, but still gives the OS ( sda ). What is the best approach with lsblk or other ...
0
votes
2answers
331 views

Wipe a USB flash drive and recreate a filesystem

I'm using this to wipe a USB flash drive and recreate a FAT filesystem: dd if=/dev/zero of=/dev/sdb bs=1M #I don't need more advanced wiping fdisk /dev/sdb (a few keystrokes to select partition ...
5
votes
1answer
780 views

File system block size differs between different ext4 partitions

we have BBB based custom board with 256MB RAM and 4GB eMMC, I have partitioned it using below code, parted --script -a optimal /dev/mmcblk0 \ mklabel gpt \ mkpart primary 128KiB 255KiB \ ...
1
vote
1answer
8k views

How to clear ext4 filesystem of partition in arch

I'm installing Arch Linux by guide and misinterpreted some stuff about installing the bootloader. Therefore I went back and cleared my /dev/sdb partitions. Before that I made sdb1 as linux filesystem (...
1
vote
1answer
392 views

linux gdisk (on 4TB USB drive) followed my mkfs — but mkfs doesn't see new partitions

I just bought two new 4TB external USB disks for backups http://www.bestbuy.com/site/wd-my-passport-4tb-external-usb-3-0-portable-hard-drive-black/5605533.p that came performatted with a single ...
0
votes
2answers
152 views

/sbin/mkfs.fs acts like a binary file even though it's a symbolic link file

Considering the output from the ls command: $ ls -l /sbin/mkfs.ext4 lrwxrwxrwx 1 root root 6 Aug 4 00:10 /sbin/mkfs.ext4 -> mke2fs $ type mkfs.ext4 mkfs.ext4 is hashed (/sbin/mkfs.ext4) mkfs....
0
votes
2answers
2k views

linux + mkfs + how to avoid loss data

hi colleagues and friends before we run this command ( mkfs ) to create FS on some device for example /dev/sde how to know if some data already exist on /dev/sde ? mkfs.ext4 -j -m 0 /dev/sde -F ...
0
votes
2answers
450 views

Newly formatted USB storage device, doesn't mount

I'm having issues with a cheap USB drive I just bought. This is what I've done so far. First, after checking its device id, I wiped it: $ sudo dd status=progress if=/dev/zero of=/dev/sdi 4027441664 ...
1
vote
1answer
956 views

Create a file that's treated like a btrfs file system [duplicate]

I want to do a few experiments on the btrfs file system, but I don't want to make any changes to my existing partitions, and I want full control over things like device size. Is it possible to create ...
1
vote
0answers
182 views

Why mkfs can write the SSD at a speed of 10GB/s

I have an intel SSD 480GB. It's peak write speed is about 300MB/s under various benchmark programs (including dd and programs written by myself). However, when I execute mkfs.ext4 with the option -E ...
0
votes
1answer
6k views

mkfs taking too long

I'm doing data recovery right now from a disk I've extracted from an old NAS. It looks like mkfs.ext3 froze on Writing superblocks and filesystem accounting information: since it's more that one hour ...
1
vote
0answers
443 views

How do I get ext3/ext4 filesystem features to apply in mke2fs?

As many of you know, ext3/ext4 have filesystem features that make up the special functionalities that they have already, some of these features you can get them from "dumpe2fs", for example this ...
1
vote
0answers
32 views

How do I create an img image just big enough to hold one specific file?

I need to create an img disk image (using mkfs.fat) that will contain only one file. I know I need to do this: dd if=/dev/zero of=disk.img bs=1 count=SIZE mkfs.fat disk.img sudo mkdir /tmp/bla sudo ...
1
vote
1answer
331 views

How to format a 16GB pendrive to store only 2GB

I need to produce a custom live Lubuntu version on a 2GB pendrive. But don't have the pen right now, so I need to test it with the 16GB that I have at hand. The system won't start the live version if ...
3
votes
1answer
1k views

How to increase number of inodes at partitioning during installation of Debian?

My system needs a very high number of inodes on the partition because it is going to store many, many small files. (It's going to be an OSM, OpenStreetMap TileServer running mapnik and tirex). As ...
9
votes
2answers
6k views

Is it ok to mkfs without partition number?

I have a pen drive and one partition: NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 931.5G 0 disk └─sda1 8:1 0 931.5G 0 part / sdb 8:16 1 7.5G 0 disk └─sdb1 8:17 ...
4
votes
2answers
5k views

mkfs is extremely slow

Formatting xfs volumes on ubuntu 16.04 is extremely slow in our Virtualbox hypervisor, but not vms running inside Nutanix. Virtualbox 100 GB => seconds 2TB => seconds Nutanix (HyperConverged) 100 ...
0
votes
1answer
721 views

New SSD USB drive: fdisk doesn't change partitions and mkfs doesn't change format

I have this portable SSD drive that I am trying to format for use with my Raspberry Pi 3: https://www.amazon.com/gp/product/B00N0V4JG2 In the past I have used this exact product, but the 128GB ...
0
votes
2answers
1k views

Excluding bad sectors from list when formatting

I am preparing a old HDD for use with my Pi. But it has >36 bad sectors (avoce threshold). So I ran badblocks to investigate which sectors are affected and saved them to a file. The file now contains ...
0
votes
1answer
1k views

Reformat SD card

I need to reformat an SD card back to factory status. SD card filesystem used for media has become corrupted. Accessing a certain directory causes the filesystem to be remounted readonly, and it ...
4
votes
2answers
766 views

Resizing a virtual hard drive

I found a very nice tutorial on how to create virtual hard disks, and I am considering using these for my work in order to store reliably and portably large datasets with associated processing results....
1
vote
1answer
211 views

What happens if I format a mounted USB drive with --force flag?

It occurred that I typed -F (--force) instead of -f (--fast) while running mkfs.ntfs command. The USB drive was mounted. What are possible consequences to the drive? There's also a message "Hope /etc/...
0
votes
1answer
79 views

Create a new volume on free diskspace from inside Dom0

I have a server with two HDDs (/dev/sda and sdb) with 1.8TB each. On both disks, there is a 500MB Swap and an 800GB partition, that are in a raid md0 and md1: pvs PV VG Fmt Attr PSize ...
5
votes
2answers
2k views

How to run mkfs on file image partitions without mounting?

I am creating an empty file... dd if=/dev/zero of=${SDCARD} bs=1 count=0 seek=$(expr 1024 \* ${SDCARD_SIZE}) ...then turning it into an drive image... parted -s ${SDCARD} mklabel msdos ...and ...
1
vote
2answers
170 views

Bash script fail to detect disk

I got a script that is supposed to reformat and mount /dev/disk/by-label/backup_disk into /mnt/backup_disk. Like this: /sbin/mkfs.ext4 -q -L backup_disk /dev/disk/by-label/backup_disk mount -t ext4 /...
6
votes
2answers
11k views

mkfs.ext4 command not found in Debian (Jessie)

I have just installed Debian 8.4 (Jessie, MATE desktop). For some reason the following command is not recognized: mkfs.ext4 -L hdd_misha /dev/sdb1 The error I get: bash: mkfs.ext4: command not ...
4
votes
2answers
6k views

How do you make filesystems in mac OSX

How do you make filesystems in OSX? Mac OSX doesn't have the mkfs command.
3
votes
1answer
663 views

How to create a RAM disk from the Kickstart environment?

I'm installing a CentOS 7 VM, and I would like to create a RAM disk inside the %pre section of a Kickstart file. However, doing so via mkfs -q /dev/ram1 8192 is not possible as the mkfs binary is ...
3
votes
1answer
9k views

Use “tune2fs” on XFS filesystem, get “Couldn't find valid filesystem superblock.”

I ran into this message two days ago=: tune2fs: Bad magic number in super-block while trying to open /dev/vdc1 Couldn't find valid filesystem superblock. The system is Ubuntu, a KVM virtual machine ...
1
vote
1answer
1k views

I can't access my USB device after mkfs.ntfs command

I had used these commands (as root): umount /dev/sdb1 After, mkfs.ntfs /dev/sdb1 It took a long time to format it and I couldn't wait it. Before it finished formatting, I had canceled operation. ...
1
vote
2answers
208 views

Need to format 5 disks in parallel

I tried this xargs -p 5 -n1 mke2fs -t ext4 /dev/sd[d-p]1 and got this [/dev/mapper]# seq 1 15 | xargs -p 5 -n 1 mke2fs -t ext4 /dev/sd[b-p]1 5 -n 1 mke2fs -t ext4 /dev/sdb1 /dev/sdc1 /dev/sdd1 /...
7
votes
1answer
11k views

Formatting an sdcard with mkfs hangs indefinitely

I am trying to format an sdcard following this guide. I am able to successfully create the partition table, but attempting to format the Linux partition with mkfs yields the following output: mke2fs ...
0
votes
1answer
3k views

Using badblocks with mkfs -l

mkfs.vfat -c does a simple check for badblocks.badblocks runs multiple passes with different patterns and thus detects intermittent errors that mkfs.vfat -c will not catch. mkfs.vfat -l filename can ...
2
votes
1answer
436 views

Meaning of “mkfs.ext3 -cc” error report

I'm trying to format a supposedly defective hard disk using "mkfs.ext3 -cc /dev/sda1" on a partition that spans over the entire disk. I wish to understand the meaning of the ongoing error report in ...
1
vote
1answer
1k views

System claims my USB is mounted when I insert it and I cannot (un)mount it. How do I fix this?

I'm running Ubuntu 14.10 Server (headless). I have a group of USB flashdrives that I need to reformat for use across several devices. I've successfully mounted, formatted, copied files to, and ...