linuxnewbie.org.gif
Tuesday, 12-Dec-2000 10:39:27 EST
Newbized Help Files articles discussion board bookshelf sensei's log advertising info

Creating Filesystems

(cont'd)

--Creating an ext2 filesystem--

The command for this is mke2fs. Again, you have to be root to run this, and the same advice applies to those of you who get the "command not found" error message because mke2fs is in /sbin as well.

The options for mke2fs are far too numerous to list here, so I'll just list the ones that we are going to use:


-c     Check the device for bad blocks before creating the
       file system, using a fast read-only test.

-v     Verbose execution.

Again, checking the device is never a bad idea, and I always like verbose output just because it helps in case something goes wrong. The format is almost identical to the mkswap command:


/sbin/mke2fs -c -v 

This time, mine on /dev/hdb14 would be:


/sbin/mke2fs -c -v /dev/hdb14

This step then spits out a bunch of garbage, and took about a minute and a half (a little over a minute of which was the bad block checking). Here's what came out:


[root@half-life ddipaolo]# /sbin/mke2fs -c -v /dev/hdb14
mke2fs 1.15, 18-Jul-1999 for EXT2 FS 0.5b, 95/08/09
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
131616 inodes, 263056 blocks
13152 blocks (5.00%) reserved for the super user
First data block=0
9 block groups
32768 blocks per group, 32768 fragments per group
14624 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 

Running command: badblocks -b 4096 -s /dev/hdb14 263056
Checking for bad blocks (read-only test): done                        
Writing inode tables: done                            
Writing superblocks and filesystem accounting information: done

Your messages of course, will vary, depending upon how big of a partition you created, and whether or not you put the "-c" flag on the mke2fs call. I see no reason why you wouldn't though.

And, basically, we're done. To use this brand new partition with its fresh new filesystem, all you have to do is mount it. As an example, I'll mount this at /mnt/temp and copy some files to it just to show you.


[root@half-life ddipaolo]# mkdir /mnt/temp
[root@half-life ddipaolo]# mount /dev/hdb14 /mnt/temp
[root@half-life ddipaolo]# cp ~/*rpm /mnt/temp/
[root@half-life ddipaolo]# ls /mnt/temp
Eterm-backgrounds-0.9-2.i386.rpm    licq-0.81-1.i386.rpm
NVIDIA_GLX-0.9-2.i386.rpm           licq-data-1.6-1.noarch.rpm
NVIDIA_kernel-0.9-2.i386.rpm        lost+found
ORBit-0.5.0-1.i386.rpm              lpr-0.48-1.i386.rpm
ORBit-devel-0.5.0-1.i386.rpm        mc-4.5.40-2.i386.rpm
SDL-1.1.2-1.i386.rpm                mdkrpm
audiofile-0.1.9-1.i386.rpm          mtv-1.1.1.0-1.i386.rpm
enlightenment-0.16.4-1.i386.rpm     ncurses-5.0-12.i386.rpm
esound-0.2.15-1.i386.rpm            nmap-2.53-1.i386.rpm
esound-devel-0.2.15-1.i386.rpm      nmap-frontend-0.2.53-1.i386.rpm
fnlib-0.5-1.i386.rpm                oregano-0.16.1-1.i386.rpm
fnlib-devel-0.5-1.i386.rpm          plugger-3.2-1.i386.rpm
gaim-0.9.15-1.i386.rpm              popt-1.5-6x.i386.rpm
gaim-0.9.18-1.i386.rpm              qt-2.1.0-4.beta1.i386.rpm
gkrellm-0.9.8-1.i386.rpm            rp7_linux20_libc6.i386.b2.rpm
gkrellm-0.9.8-1mdk.i686.rpm         rpm-3.0.4-6x.i386.rpm
gmc-4.5.40-2.i386.rpm               samba-2.0.7-20000425.i386.rpm
gnapster-1.3.9-1.i386.rpm           spice-rhcn-3f5-3.i386.rpm
gnome-libs-1.0.53-1.i386.rpm        vim-athena-rhcn-5.0-1.i386.rpm
gnome-libs-devel-1.0.53-1.i386.rpm  wine-20000430-7.i386.rpm
gtkicq-0.62-1.i386.rpm              xmms-1.0.1-1.i386.rpm
imlib-1.9.8-1.i386.rpm              xmms-devel-1.0.1-1.i386.rpm
imlib-cfgeditor-1.9.8-1.i386.rpm    xmms-esd-1.0.1-1.i386.rpm
imlib-devel-1.9.8-1.i386.rpm        xmms-gnome-1.0.1-1.i386.rpm

Wow, I have far too many RPMs in my home directory. :) Guess that means it's time for me to go clean that out, because we are DONE!

Send me feedback - Danny "Strike" DiPaolo




Would you like to have your article published online? Send them in to newfiles@linuxnewbie.org
The Linux Channel at internet.com
Linux Planet
Linux Today
Linux Central
Linuxnewbie.org
PHPBuilder
Just Linux
Linux Programming
Linux Start
BSD Today
Apache Today
Enterprise Linux Today
BSD Central
All Linux Devices
SITE DESCRIPTIONS
[-What's New-]
Order a Linuxnewbie T-Shirt
Easy Webcam NHF
Directory Navigation NHF
Installing Snort 1.6.3 on SuSE 6.x-7.x
Customizing vim
The SysVinit NHF
Installing ALSA for the VT82C686 integrated sound
USB Creative Video Blaster II for Linux
Configuring the Intellimouse Explorer in XFree86 V4+
The beginnings of a distro NHF
Getting Past Carnivore?
Getting and Installing PGP
Getting your ATI Rage 128 Working
How to create a multiple partition system
Using Fdisk
Introduction to Programming in C/C++ with Vim
Adding a Hard drive in Linux -- In five steps
Installing ALSA for the Yamaha DS-XG Sound Card
Getting your Diamond Rio Mp3 Player to work with Linux
Bash Programming Cheat Sheet
Installing NVIDIA Drivers for Mandrake
Setting up Portsentry
Hard Drive Speed Tweak for Linux
Sensei's Log
Chat room
Join: Linuxnewbie.org SETI Black Belts!
Send in your news
Click the image to add Linuxnewbie.org to your MyNetscape Page
[-LNO Newsletter-]

[-Archive-]
The beginnings of a distro NHF
Connecting to the Internet using KPPP
Getting your SBLive to work
Unreal Tournament NHF
LWE Day 2 Pictures
LWE Day 1 Pictures
The LNO FAQ!
WoW (Words of Wisdom)
Other sites news
What is Linux?
What is Linux? part deux (ups & downs)
Search newsgroups
The List
ALS Report
Feedback Form
jobs.linuxtoday.com.gif
Match: Format: Sort by:
Search:
[-Quick Links-]

Copyright 2000 internet.com Corp. All Rights Reserved. Legal Notices Privacy Policy

internet.com.gif