mke2fs what is the command to format a FAT23 or SWAP hd?
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Coming from a red-hat background, I personally use the commands like 'mkfs.ext3' and 'mkfs.vfat' (FAT 32). Not sure if those are universal or not tho, never done swap.
Last edited by r3sistance; 04-14-2009 at 06:58 AM.
excerpt from 'man mkfs';
NAME
mkfs - build a Linux file system
SYNOPSIS
mkfs [ -V ] [ -t fstype ] [ fs-options ] filesys [ blocks ]
DESCRIPTION
mkfs is used to build a Linux file system on a device, usually a hard
disk partition. filesys is either the device name (e.g. /dev/hda1,
/dev/sdb2). blocks is the number of blocks to be used for the file
system.
The exit code returned by mkfs is 0 on success and 1 on failure.
In actuality, mkfs is simply a front-end for the various file system
builders (mkfs.fstype) available under Linux. The file system-specific
builder is searched for in a number of directories like perhaps /sbin,
/sbin/fs, /sbin/fs.d, /etc/fs, /etc (the precise list is defined at
compile time but at least contains /sbin and /sbin/fs), and finally in
the directories listed in the PATH environment variable. Please see
the file system-specific builder manual pages for further details.
Code:
excerpt from 'man mkswap';
mkswap - set up a Linux swap area
SYNOPSIS
mkswap [-c] [-vN] [-f] [-p PSZ] [-L label] device [size]
DESCRIPTION
mkswap sets up a Linux swap area on a device or in a file.
(After creating the swap area, you need the swapon command to start
using it. Usually swap areas are listed in /etc/fstab so that they can
be taken into use at boot time by a swapon -a command in some boot
script.)
The device argument will usually be a disk partition (something like
/dev/hda4 or /dev/sdb7) but can also be a file. The Linux kernel does
not look at partition Id's, but many installation scripts will assume
that partitions of hex type 82 (LINUX_SWAP) are meant to be swap parti-
tions. (Warning: Solaris also uses this type. Be careful not to kill
your Solaris partitions.)
The 'man command' is available to you online or from the command line if you have 'man' installed.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.