Friday, July 3, 2009

Create and Delete partitions in Linux system

Installation of REDHAT LINUX

Select option of Custom Layout and then
Make the three partitions in your free hardisk :-
1) /boot ( containing booting files ) Size= 100MB approx.
2) / (System files ) Size= 3 -10GB
3) Swap (virtual memory ) Size = Double of RAM

Creating Partitions

First check the Hard disk free space using command
#fdisk -l
Then create a partitions following commands and steps
#fdisk /dev/sda(if you have sata hard disk ) or /hda (if you have pata hard disk)

[""(then display)
The number of cylinders for this disk is set to 77520.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)


Command (m for help):

Press n to create partition

first create extended partition

By press e

then create logical drives with different size

To refresh the commonds partition use command

#partprobe /dev/sda

then format it

#mkfs.ext3 /dev/sda5( "5" is your drive number)


Then create mount point first make directory

#mkdir /directoryname

#mount /dev/sda5 /directoryname

then edit entry in fstab by

#vim /etc/fstab


then edit entry

for ex:- /dev/sda5 /dirname ext3 defaults 0 0

then save and exit form vim editor

#mount -a




Delete partition

first check the name of directory name &then
#umount /dirname
#vim /etc/fstab
delete entry from fstab

#mount -a

and delete partiton in
#fdisk /dev/sda
#partprobe

No comments:

Post a Comment