Command to create new fs using free space available
UbuntuThis forum is for the discussion of Ubuntu Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Command to create new fs using free space available
Dear all,
I am using Ubuntu 8.04 on Intel and i have about 12GB unpartitioned free space. I would like to use this free space and how do i do this using the command line?
I have partition editor and its easy to do this using the GUI, but i would like to do this through commands. How do i get the disk information for this free space to use the newfs command.
You need two steps:
1. create a partition (fdisk, cfdisk, parted, GParted, and many more)
2. create a filesystem (typically mkfs and its various cousins)
I know, i have to do this.
But, my question was how do it using the command line.
how do i create a partition using the fdisk command? To do this i will have to know the start and end cylinder, heads etc..
how will i get these details?
You can see all cylinder information by issueing the command sudo fdisk -l. To create/delete/edit partitions, you would next run the command sudo fdisk /dev/sdX and select the desired option(s).
fdisk -l will show the cylinder information for the whole disk or for the existing partitions!
I need to know this for the unpartitioned free space. Correct me if am wrong?
Avinash
Quote:
Originally Posted by jay73
You can see all cylinder information by issueing the command sudo fdisk -l. To create/delete/edit partitions, you would next run the command sudo fdisk /dev/sdX and select the desired option(s).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.