LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Create partition? (https://www.linuxquestions.org/questions/linux-general-1/create-partition-143696/)

mikeshn 02-08-2004 11:54 AM

Create partition?
 
I need to create /tmp partition. Any help how I can do this?

[root@localhost root]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda2 73G 11G 58G 16% /
/dev/hda1 99M 6.3M 88M 7% /boot
none 252M 0 252M 0% /dev/shm

DrOzz 02-08-2004 12:03 PM

well first do you have free unpartitioned space on the drive ?
otherwise your going to need to get an app that will allow you to resize your present partitions, to make room ...

but to do this you will fire up :
fdisk /dev/hdX (where X is replaced of course by you to the proper letter)
after you make the partition, write the table and then :
mkfs -t ext3 /dev/hdX (again replace X, and replace ext3 if you use a different fs)

and then make changes to your fstab to reflect the changes ... it will look something like this ... (remember this is false info, and you'll have to replace the /dev/hdX and fs type if need be)
Code:

/dev/hda8    /tmp        ext3          defaults        1  2

mikeshn 02-08-2004 01:31 PM

What application can resize the partition?

Quote:

Originally posted by DrOzz
well first do you have free unpartitioned space on the drive ?
otherwise your going to need to get an app that will allow you to resize your present partitions, to make room ...

but to do this you will fire up :
fdisk /dev/hdX (where X is replaced of course by you to the proper letter)
after you make the partition, write the table and then :
mkfs -t ext3 /dev/hdX (again replace X, and replace ext3 if you use a different fs)

and then make changes to your fstab to reflect the changes ... it will look something like this ... (remember this is false info, and you'll have to replace the /dev/hdX and fs type if need be)
Code:

/dev/hda8    /tmp        ext3          defaults        1  2


DrOzz 02-08-2004 03:40 PM

since i don't know what the fs is on the partition you are resizing, i am just going to suggest to you to do a search on this site, cause I along with many others have gave suggestions. ..
worse comes to worse use google, but you will find the answer on here. ...
i usually just say Partition Magic (which is for windows, but supports linux ext3 fs) just to give an example, but there are others, such as GNU Parted which is of course for linux ..

jlturbos 02-08-2004 03:52 PM

Try qtparted and then edit your /etc/fstab to reflect the new partition.

JL

mikeshn 02-08-2004 04:32 PM

I installed qparted on Fedora. And the program works

I have the following partitions:
[root@localhost root]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda2 73G 12G 58G 17% /
/dev/hda1 99M 6.3M 88M 7% /boot
none 252M 0 252M 0% /dev/shm


Before I can resize the partition I have to unmount. When I try to do so, I get the following message:

[root@localhost root]# umount /dev/hda2
umount: /: device is busy

Any idea how I can unmount the partition?

colnago 02-08-2004 05:37 PM

The problem being umount-ing / when you are using a bunch of stuff from there. If you don't have one already, get a linux boot cd like knoppix or pclinuxos and then you can do partition stuff like this w/o having to worry about the os on the hard drive.

If you ever screw up your boot loader or fstab, one of these cd based distributions is great to have as well.

michaelk 02-08-2004 08:31 PM

df only displays information on mounted partitions. You also have a swap partition which is not displayed with the df command.

To see all of your partitions log in as root
fdisk -l /dev/hda

You can also you the 1st CD and boot to rescue mode.


All times are GMT -5. The time now is 02:08 AM.