LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   creating partition (https://www.linuxquestions.org/questions/slackware-14/creating-partition-33814/)

nautilus_1987 10-26-2002 05:42 AM

creating partition
 
Hi there!

Can someone help to create a partition from unlocated space ( 2GB ).
Cfdisk can do nothing with it :(
Any suggestions what program can i use?

Excalibur 10-26-2002 06:46 AM

Why is cfdisk not able to able to create the partition?

Any disk is limited to 4 primary partitions. If you have 4 primary partitions defined currently, then the space is unusable. You can delete one of the primary partitions and create an extended partition for logical partitions and continue to use the disk with logical partitions under the extended partition.

nautilus_1987 10-26-2002 06:51 AM

You mean I have lost 2GB!!!???

Excalibur 10-26-2002 06:58 AM

You haven't lost it, just currently unable to use it. Should I take your response that you currently have 4 primary partitions?

If you post your current layout and the use/allocation perhaps I can make a recommendation.

nautilus_1987 10-26-2002 07:11 AM

Here you are:
hda1 - Primary /
hda2 - Primary /usr
Unusable
hda3 - Primary swap
hda5 - Logical
This is all my HDD

nautilus_1987 10-26-2002 07:12 AM

Maybe I can "Maximize" /dev/hda1 merging it with unusable space?

Excalibur 10-26-2002 08:01 AM

If you have the logical defined, that would have created the extended partition. Have you tried using cfdisk to create another logical partition in the unused spaced?

In order to even attempt to grow a partition the space must be continuous. It cannot be spread across another partition.

How much memory is installed in your system? I know on my systems with 384 MByte or more I do not even use a swap partition. I know of systems that run very well on even 256 MByte without a swap partition. However, if less than 256 MByte, then keep the swap partition. It might be possible to use a logical partition for swap space though. I would have to check that out to make sure though. you might increase the RAM to elliminate the swap requirement.

Let me know what you might consider. There are other options but they require substantially more effort to implement.

Excalibur 10-26-2002 08:21 PM

I did some tests with what I think was a similar partition table that you described. If you remove the swap partition and then recreate it as a primary, but specifiy the beginning instead of the end of the free space. That will move the free space down below the swap partition. Be sure to change the type of the partition to 82 (Linux swap). The unused space can then be allocated as a logical partition.

If you attempt the above, be sure to umount your swap partiton with "swapoff" prior to rewriting the partition table. After it is complete the swap partition will then need to be prepared with "mkswap /dev/hda3". The swap can then be remounted using "swapon /dev/hda3". You will probably also need to modify the /etc/fstab file as well. The swap partition is probably defined there as /dev/hda4 and it will probably need to be changed to /dev/hda3.

What ever, your /dev/hda5 partition is now will possibly change to /dev/hda6 or something. This change should also be reflected in the /etc/fstab or as required if different OS.

Hope it helps.

nautilus_1987 10-27-2002 02:23 AM

At first thnx Excalibur - great info!
2. I was thinking of that, but I have only 128Mbytes of Ram.......I am wondering if I have only 3 primary partitions, why cfdisk cannot create one from unusable space? Maybe fdisk can?
3. Is /ets/fstab the only file that controls partition tables? I mine will change I will need to edit fstab only?
4. Won't system crush without Swap?

Excalibur 10-27-2002 05:15 AM

The logical partition has to create an extended partition and that counts as a primary.

/etc/fstab does not control partitions, it controls what/how/where partitions are mounted.

Swap space is not "required". 128 MByte ram would be sufficient for the operation to be performed. And it is only for a short duration. But that is why it has to be unmounted before the partition table is modified. If not, then yes, it would probably panic the kernel because of the loss of the swap partition.

nautilus_1987 10-27-2002 05:27 AM

You mean I can delete swap for a moment, than create a new partition, and then reacreate swap?

Excalibur 10-27-2002 05:35 AM

Yes, but it has to be prepared to be a swap partition prior to mounting it again. That is what the "mkswap" command does.

nautilus_1987 10-27-2002 05:47 AM

Uhhhhhhhhhhhhhh........it would be difficult
It is very risky operation.....3 weeks ago my system crashed, so I need to have more info - I don't want it to crash again
thnx Excalibur :D


All times are GMT -5. The time now is 11:07 PM.