mkfs.fat [options] device [block-count]
Creates an MS-DOS filesystem on
device special file (e.g.
/dev/sdXX). Usually a partition
can not create boot-able filesystems. This isn't as easy as you might think at first glance for various reasons and has been discussed a lot already. mkfs.fat simply will not support it ;)
The home for the dosfstools project is its GitHub project page DOS FS tools.
|disables alignment of data structures to cluster size, to make sure that as
long as the partition is properly aligned, so will all the data structures in the filesystem. |
May provide a some clusters of storage at the expense of a significant performance degradation on RAIDs, flash media or
large-sector hard disks.
|location of the backup boot sector for FAT32. must be within the range of reserved sectors.|
Default usually is sector 6.
|Check for bad blocks
|Create the file given as DEVICE line, and write the to-be-created filesystem to it.
Creates the new filesystem in a file instead of on a real device, and to avoid using dd in advance to create a file of appropriate size. |
BLOCK-COUNT must be given,
The file created is a sparse file, which contains only the meta-data areas (boot sector, FATs, and root directory).
The resulting file can be copied later to a floppy disk or other device, or mounted through a loop device.
| BIOS drive number to be stored in the FAT boot sector. usually 0x80 for hard disks and 0x00 for floppy
devices or partitions to be used for floppy emulation.
| number of file allocation tables in the filesystem. The default is 2.
| type of file allocation tables used (12, 16 or 32 bit).
| Some digital cameras require hidden sectors
| 32-Bit hexadecimal number (for example, 2e24ec82). The default is a based on the time.
| Read the bad blocks list from FILENAME.
| displayed on attempts to boot this filesystem without having installed an operating system.
Maximun 418 bytes once line feeds have been converted to carriage return-line feed combinations, and tabs have been
expanded. If the filename is a hyphen (-), the text is taken from standard input.
| stored in the FAT boot sector. 0xF8 for hard disks and is 0xF0 or a value from 0xF9 to 0xFF for floppies or partitions to be used for floppy emulation.
| aka label of the filesystem. up to 11 characters
|available in the root directory. default 112 or 224 for floppies and 512 for hard disks.
| FAT32 format at least 2 reserved sectors are needed, the default is 32. Otherwise the default is 1 (only the boot sector).
| power of 2, i.e. 1, 2, 4, 8, ... 128.
| bytes per logical sector. 512, 1024, 2048, 4096,
8192, 16384, or 32768. Values larger than 4096 are not conforming to the FAT file system
|Use constants for normally randomly generated or time based data such as volume ID and creation time. |
Multiple runs of mkfs.fat on the same device create identical results with this option. For testing
compressed ROM file system
mkfs.cramfs [options] directory file
Files are compressed,
the metadata is not compressed, but is expressed in a terse representation that is more space-efficient than conventional file systems.
mkcramfs) to pack files into new cramfs images.
File sizes are limited to less than 16 MB.
Maximum file system size is 272 MB.
directory is the root of the directory tree that we want to generate a compressed filesystem out of.
The file will contain the cram file system, which later can be mounted.
| Treat warnings as errors,
|Use defined block size, which has to be divisible by page size.
|Use defined file system edition number in superblock.
-N big| little| host
| Use defined endianness. defaults host.
| Insert a file
| Set name
| Pad by 512 bytes for boot code.
| Make explicit holes.
| version information and exit.
| help and exit.
low-level tool for generating an initramfs image|
mkinitramfs [-c compress] [-d confdir] [-k] -o outfile [-r root] [-v] [version]
mkinitramfs [--supported-host-version= hversion]
mkinitramfs [--supported-target-version= tversion]
generates an initramfs image, a compressed cpio archive. used on a different box
of the same arch with the corresponding Linux kernel.
On your local box update-initramfs calls mkinitramfs with the relevant parameters.
update-initramfs keeps sha1sum of generated initramfs. It takes care to generate backups and eventually runs the bootloader.
At boot time, the kernel unpacks that archive into RAM disk, mounts and uses it as initial root file system.
All finding of the root device happens in this early userspace.
| Override COMPRESS
| alternate configuration directory.
| Keep the temporary directory used to make the image.
| Override ROOT
| kernel version of the initramfs image (defaults to the running kernel).
queries if mkinitramfs can create ramdisks on a running kernel of version hversion.
| queries if mkinitramfs can create ramdisks for kernel version tversion.
/etc/initramfs-tools/initramfs.conf default configuration . See initramfs.conf(5)
/etc/initramfs-tools/modules Specified modules will be put in the generated image and loaded when the system boots.
one per line as is
/etc/modules, See modules(5).
/etc/initramfs-tools/conf.d allows hardcode bootargs at initramfs build time via config snippets.
set ROOT or RESUME. Useful for bootloaders, which do not pass an root bootarg.
/etc/initramfs-tools/DSDT.aml appended to the initramfs in a way that causes it to be loaded by ACPI.
Create an initramfs for current running kernel:
mkinitramfs -o ~/tmp/initramfs-$(uname -r)
Create an initramfs for specific kernel and keep builddirs:
mkinitramfs -k -o ~/tmp/initramfs-2.6.21-686 2.6.21-686
Debug initramfs creation (check out written logfile) :
sh -x mkinitramfs -o ~/tmp/initramfs-$(uname -r) 2> ~/tmp/log