Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
Let The Music Play: Join EFF Today

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents
Up to --> Installing and Upgrading

· Doing the Installation
· Installing the File System

Glossary
MoreInfo
Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
FAQ
Copyright Info
Terms of Use
Privacy Info
Disclaimer
WorkBoard
Thanks
Donations
Advertising
Masthead / Impressum
Your Account

Communication
Feedback
Forums
Private Messages
Recommend Us
Surveys

Features
HOWTOs
News
News Archive
Submit News
Topics
User Articles
Web Links

Google
Google


The Web
linux-tutorial.info

Who's Online
There are currently, 197 guest(s) and 2 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here

  
Linux Tutorial - Installing and Upgrading - Doing the Installation - Installing the File System
  Doing the Installation ---- Upgrading an Existing System  


Installing the Filesystem

When doing a fresh install there is generall very little that you need to do in regard to installing a filesystem. Most of the work is done for you. All you really need to do is choose the filesystem(s) you want to use. However, for many people (newbies and experienced users alike), which file system to choose it not always clear-cut.

In the section on supported filesystems, we talk about some of the various filesystem types and what things to consider when choosing one over the other.

If you expect that you are going to have a large number of files on your systems (like hundreds of thousands or millions), then you will need to increase the number of inodes. Basically, inodes are pointers to the data on the disk, as well as contain information about the file such as the file owner, permissions and so on. In most cases, you are limited by the number of inodes which are created when the filesystem is created. Once you run out, you need to either move the files to another filesystem, or backup the data, recreate the filesystem then restore the tape. Both are sometimes not possible. Keep in mind, however, that for most home users, the defult number of inodes is usually enough.In the section on the disk layout we talk about inodes in detail.

Generically, filesystems are created using using the mkfs command. One of the options it takes is the filesystem type. The basically tells mkfs to start the real program which then creates the filesystem. For example, the mke2fs is called when create an ext2fs. When calling mkfs, you typically have few options. So if you need to specify the number of inodes, you will need to start the real program by hand. In the case of the ext2fs, you can use the -i option to specify the number of inodes. Check out the appropriate man-page for details.

One interesting thing about the ReiserFS is that inode are allocated dynamically. That means you will only run out of indode when you run out of space on the disk.

Examples of mkfs commands are:

FilesystemCommand
EXT2 FSmkfs.ext2
EXT4 FSmkfs.ext3
SCO BFSmkfs.bfs
Minix FSmkfs.minix
DOS (FAT) FS mkfs.msdos
Virtual FAT FSmkfs.vfat
XFSmkfs.xfs
XIA FSmkfs.xiafs

A list of supported filesystem types can be found in the here. and the section on file system tools.

By default all of these reside in the /sbin directory. If we do an ls -li to get the inode number, as well, we end up with something like this:

481394 -rwxr-xr-x 1 root root 5124 Sep 23 2003 /sbin/mkfs 481395 -rwxr-xr-x 1 root root 7744 Sep 23 2003 /sbin/mkfs.bfs 481396 -rwxr-xr-x 1 root root 15196 Sep 23 2003 /sbin/mkfs.cramfs 480620 -rwxr-xr-x 3 root root 31252 Sep 23 2003 /sbin/mkfs.ext2 480620 -rwxr-xr-x 3 root root 31252 Sep 23 2003 /sbin/mkfs.ext3 480930 -rwxr-xr-x 2 root root 61691 Sep 23 2003 /sbin/mkfs.jfs 481397 -rwxr-xr-x 1 root root 15488 Sep 23 2003 /sbin/mkfs.minix 480434 lrwxrwxrwx 1 root root 7 Dec 28 10:43 /sbin/mkfs.msdos -> mkdosfs 480413 -rwxr-xr-x 2 root root 142344 Sep 23 2003 /sbin/mkfs.reiserfs 480551 -rwxr-xr-x 1 root root 342040 Sep 23 2003 /sbin/mkfs.xfs

Note that both mkfs.ext2 and mkfs.ext3 both have the same inode number and are thus the exact same program. This makes sense since the ext3fs is just an extension of the ext3fs.s

In it's simplest form, you can usually run the appropriate mkfs command and pass it just the name of the partition, without any option. For example, if we wanted to create and ext3fs, we could do it like this:

/sbin/mkfs.ext3 /dev/hda12

This gives us an output like this:

mke2fs 1.34 (25-Jul-2003) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 2247744 inodes, 4494175 blocks 224708 blocks (5.00%) reserved for the super user First data block=0 138 block groups 32768 blocks per group, 32768 fragments per group 16288 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 4096000 Writing inode tables: done Creating journal (8192 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 38 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override.

Note that the very first line indicates that the program called is mke2fs, although we started it as mkfs.ext3. If we were to start it as mkfs.ext2, the output would be the same except that you would not have the line:

Creating journal (8192 blocks): done

This is quite simply because the ext2fs is not a journalling filesystem where the ext3fs is. If were ran mkfs.ext2 a said we wanted a journalling filesystem (using the -j option) the output would be the same.

Note that the program created 10 copied of the superblock. Each being an exact copy of the other. The superblock contains information about the type of file system, its size, how many data blocks there are, the number of free inodes, free space available, and where the inode table is. Detail can be found in the section on disk layout.

Details on checking the file system can be found in the section on filesystem tools.

 Previous Page
Doing the Installation
  Back to Top
Table of Contents
Next Page 
Upgrading an Existing System


MoreInfo

Test Your Knowledge

User Comments:


You can only add comments if you are logged in.

Copyright 1997-2004 by James Mohr. Licensed under modified GNU Free Documentation License. See here for details. All rights reserved.
  




Login
Nickname

Password

Security Code
Security Code
Type Security Code


Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!


Amazon Wish List

Did You Know?
The Linux Tutorial can use your help.


Friends



Tell a Friend About Us

Bookmark and Share



Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.08 Seconds