SlackwareThis Forum is for the discussion of Slackware Linux.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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.
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.
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.
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?
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.