LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-03-2012, 05:28 AM   #1
johnsonkv91
Member
 
Registered: Jan 2012
Posts: 52

Rep: Reputation: Disabled
Question creating new free space partition


I want to create New free space partition in ubuntu
how can i create it. anyone who know this steps
if you. thanks in advance



Thanks,
Johnson
 
Old 01-03-2012, 06:43 AM   #2
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Have you tried searching on google? Try searching on google and if you face any problem in creating partition then we are here to solve the problem.

Well, I am giving you a link, try this:
http://www.easy-ubuntu-linux.com/ubu...ion-606-9.html
 
Old 01-03-2012, 11:48 PM   #3
johnsonkv91
Member
 
Registered: Jan 2012
Posts: 52

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Satyaveer Arya View Post
Have you tried searching on google? Try searching on google and if you face any problem in creating partition then we are here to solve the problem.

Well, I am giving you a link, try this:
http://www.easy-ubuntu-linux.com/ubu...ion-606-9.html




Tanks

but, sir i want to create partition by command line (CLI)
i have already tried it (GParted). I think fdisk is the command but i dont know how it is use...?

Regards
Johnson
 
Old 01-04-2012, 12:14 AM   #4
Satyaveer Arya
Senior Member
 
Registered: May 2010
Location: Palm Island
Distribution: RHEL, CentOS, Debian, Oracle Solaris 10
Posts: 1,415

Rep: Reputation: 305Reputation: 305Reputation: 305Reputation: 305
Ok then, do as follows:

Suppose you have /dev/sda disk

First start fdisk from the shell prompt:

Quote:
# fdisk /dev/sda
When you print the (empty) partition table, you just get configuration information.

Quote:
Command (m for help): p

Disk /dev/sda: 64 heads, 63 sectors, 621 cylinders
Units = cylinders of 4032 * 512 bytes
Now create partition using by pressing n and then selecting the primary or logical partition:

Quote:
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-621, default 1):<RETURN>
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-621, default 621): +100M

Then press w for writing changes:

Quote:
Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
[root@testmachine ~]#
Then type partprobe, this command informs OS or kernel that new partition has been created.

Quote:
[root@testmachine ~]# partprobe
[root@testmachine ~]#
Remember, if you do not give the type of partion then by default linux takes as Linux partition i.e., type 83

After that format the partition:

Quote:
[root@testmachine ~]# mkfs.ext3 /dev/sda6
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
26104 inodes, 104388 blocks
5219 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67371008
13 block groups
8192 blocks per group, 8192 fragments per group
2008 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729

Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 22 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@testmachine ~]#

then create a directory and mount that partition on that directory:

Quote:
[root@testmachine ~]# mkdir /data
[root@testmachine ~]# mount /dev/sda6 /data
[root@testmachine ~]#

Then make the entry in /etc/fstab in the end to mount it permanently:

Quote:
[root@testmachine ~]# vi /etc/fstab
/dev/sda /data ext3 defaults 0 0


now save the file and quit.

And you have done with your creating a new partition.

Last edited by Satyaveer Arya; 01-04-2012 at 12:19 AM.
 
1 members found this post helpful.
Old 01-04-2012, 12:26 AM   #5
fukawi1
Member
 
Registered: Apr 2009
Location: Melbourne
Distribution: Fedora & CentOS
Posts: 854

Rep: Reputation: 190Reputation: 190
OP, you need to be clear about what you want to achieve.

Quote:
I want to create New free space partition in ubuntu
Is extremely ambiguous and if you aren't clear on the question you ask, you may get advice that will lead you to results other than what you expected.

Last edited by fukawi1; 01-04-2012 at 12:31 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
partition space and disk space usage and free don't match nsic Linux - Newbie 3 02-22-2013 01:57 PM
can't partition free space from shrunken partition john_b Linux - Newbie 7 01-14-2006 05:43 AM
Creating new partition with my free space akilhoffer Fedora 1 09-01-2004 08:43 PM
Partition Free Space - Move /home to the new partition gregkise Linux - General 5 12-16-2003 11:19 PM


All times are GMT -5. The time now is 10:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration