Friday 31 August 2012

how to create simple partition


Add a new logical partition having size 100MB and create the /data directory which will be the mount point for the new partition.
To accomplish this task you must be login form root account. So first login from root and verify your hard disk status with fdisk –l command ( This command will show that where your hard disk is mounted. You should use the mount point which show in the output of this command. For example if you see /dev/hda then you should use fdisk /dev/hda in next command. Or if you see /dev/sdb then you should use fdisk /dev/sdb in next command.
As you can see in image shown below that My hard disk is mounted as /dev/sda so I will use fdisk /dev/sda)
fdisk linux command
Follow these steps at command prompt in same sequence
n
    press enter
      +100MB
    press enter
        w

#partprobe /dev/sda
fdisk commands is used to create new partitions. partprobe command is used to inform kernel about this change.
Create a /data folder and mount the partition with these commands
mount linux command
lost+found is a partition specific folder that will appear only in those directory that represent an active partitions.

How to mount simple partition permanently

Create a entry for newly created partition in /etc/fstab so that it can be mount automatically after reboot as shown in image
fstab linux file system
Reboot the system with this command 
#reboot -f
If you got no error while system boot then run fdisk -l command to verify that partition has successfully mounted.
rhce linux partition
You have effectively accomplished the task given you now its time to remove these partition.
rhce linux fdisk partition
don't forget to remove entry from /etc/fstab files also otherwise you will get error on next boot.
rhce linux fstab
rhce linux fstab file



0 comments:

Post a Comment

 
Design by Wordpress Theme | Bloggerized by Free Blogger Templates | coupon codes