Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
TetraWiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Linux 101 hacks
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=='''Hack 66. Format a partition using mke2fsk'''== After partitioning the disks, it is still not ready for usage, as we need to format the disk. At this stage, if you try to view the disk information, it will give the following error message indicating that no valid superblock is present. <nowiki># </nowiki>'''tune2fs -l /dev/sda1''' tune2fs 1.35 (28-Feb-2004) tune2fs: Bad magic number in super-block while trying to open /dev/sda1 Couldn't find valid filesystem superblock. To format the disk, use mke2fs as shown below. <nowiki># </nowiki>'''mke2fs /dev/sda1''' You can also pass the following optional parameter to the mke2fs. # -m 0 : reserved-blocks-percentage β This indicates the percentage of the filesystem blocks reserved for the root user. Default is 5%. In the following example, it is set to 0. # ## -b 4096 : block-size specified in bytes. Valid values are 1024, 2048 and 4096 bytes per block. # '''mke2fs -m 0 -b 4096 /dev/sda1 ''' mke2fs 1.35 (28-Feb-2004) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 205344 inodes, 70069497 blocks 0 blocks (0.00%) reserved for the super user First data block=0 Maximum filesystem blocks=71303168 2139 block groups 32768 blocks per group, 32768 fragments per group 96 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000, 7962624, 11239424, 20480000, 23887872 Writing inode tables: done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 32 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. The above command will create an ext2 filesystem. To create an ext3 file system do the following: # '''mkfs.ext3 /dev/sda1 ''' # '''mke2fs βj /dev/sda1 '''
Summary:
Please note that all contributions to TetraWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
TetraWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)