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

Using fdisk

(cont'd)

Creating an ext2 partition
These days, Linux is using the ext2 filesystem as its default, so that's what we're going to learn how to make next. I'm going to go over this very quickly because it's pretty much exactly the same as the swap partition creation, minus that system ID switch.

In this example, I'm going to create a 1GB partition. Again, first step is "n".


Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)

Then, for reasons explained earlier, I have to choose "l" for logical.


l
First cylinder (1384-2491, default 1384): 

Use the default (hit Enter).


Using default value 1384
Last cylinder or +size or +sizeM or +sizeK (1384-2491,
default 2491): 

We want a gigabyte, so we want 1024MB, so we enter in "+1024M":


Last cylinder or +size or +sizeM or +sizeK (1384-2491,
default 2491): +1024M

Command (m for help):

List the partitions to see if we got it right, I get this for the last line:


/dev/hdb14         1384      1514   1052226   83  Linux

Once again, all we have to do now is write the table to disk, and then create a filesystem on that partition and we are ready to go. So, we hit "w" and we are done with creating partitions.

Deleting Partitions
This is so incredibly easy, I'm not even going to DO an example. It's option "d" in fdisk. When you hit that, it will ask for a partition number. Simply give it that number and the partition is deleted! However, as a technicality (and as a way to insure against people accidentally deleting partitions), this change doesn't take effect unless you write the partition table to disk again. So, once your partition is deleted, simply hit "w" and then it's gone for good.

IMPORTANT NOTE - You can never have gaps in the partition numbering scheme once you get past 5. If you delete a logical partition that isn't the last one, it WILL mess up all the partitions that came after it because it will shift them all down. In my example, if I were to delete partition 13, partition 14 would then become partition 13. This is very dangerous on a running system! If you delete partitions that come before partitions that are normally mounted on startup you MUST edit /etc/fstab to fix the changes.

That's it for fdisk! You can now create the two necessary types of partitions to build a Linux system the way you want it.

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