LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 10-26-2002, 05:42 AM   #1
nautilus_1987
Member
 
Registered: Aug 2002
Distribution: Slackware 8.1
Posts: 750

Rep: Reputation: 30
Lightbulb 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?
 
Old 10-26-2002, 06:46 AM   #2
Excalibur
Senior Member
 
Registered: Jun 2002
Location: Northern VA, USA
Distribution: Ubuntu
Posts: 1,180

Rep: Reputation: 45
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.
 
Old 10-26-2002, 06:51 AM   #3
nautilus_1987
Member
 
Registered: Aug 2002
Distribution: Slackware 8.1
Posts: 750

Original Poster
Rep: Reputation: 30
You mean I have lost 2GB!!!???
 
Old 10-26-2002, 06:58 AM   #4
Excalibur
Senior Member
 
Registered: Jun 2002
Location: Northern VA, USA
Distribution: Ubuntu
Posts: 1,180

Rep: Reputation: 45
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.

Last edited by Excalibur; 10-26-2002 at 07:05 AM.
 
Old 10-26-2002, 07:11 AM   #5
nautilus_1987
Member
 
Registered: Aug 2002
Distribution: Slackware 8.1
Posts: 750

Original Poster
Rep: Reputation: 30
Here you are:
hda1 - Primary /
hda2 - Primary /usr
Unusable
hda3 - Primary swap
hda5 - Logical
This is all my HDD
 
Old 10-26-2002, 07:12 AM   #6
nautilus_1987
Member
 
Registered: Aug 2002
Distribution: Slackware 8.1
Posts: 750

Original Poster
Rep: Reputation: 30
Maybe I can "Maximize" /dev/hda1 merging it with unusable space?
 
Old 10-26-2002, 08:01 AM   #7
Excalibur
Senior Member
 
Registered: Jun 2002
Location: Northern VA, USA
Distribution: Ubuntu
Posts: 1,180

Rep: Reputation: 45
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.
 
Old 10-26-2002, 08:21 PM   #8
Excalibur
Senior Member
 
Registered: Jun 2002
Location: Northern VA, USA
Distribution: Ubuntu
Posts: 1,180

Rep: Reputation: 45
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.
 
Old 10-27-2002, 02:23 AM   #9
nautilus_1987
Member
 
Registered: Aug 2002
Distribution: Slackware 8.1
Posts: 750

Original Poster
Rep: Reputation: 30
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?
 
Old 10-27-2002, 05:15 AM   #10
Excalibur
Senior Member
 
Registered: Jun 2002
Location: Northern VA, USA
Distribution: Ubuntu
Posts: 1,180

Rep: Reputation: 45
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.
 
Old 10-27-2002, 05:27 AM   #11
nautilus_1987
Member
 
Registered: Aug 2002
Distribution: Slackware 8.1
Posts: 750

Original Poster
Rep: Reputation: 30
You mean I can delete swap for a moment, than create a new partition, and then reacreate swap?
 
Old 10-27-2002, 05:35 AM   #12
Excalibur
Senior Member
 
Registered: Jun 2002
Location: Northern VA, USA
Distribution: Ubuntu
Posts: 1,180

Rep: Reputation: 45
Yes, but it has to be prepared to be a swap partition prior to mounting it again. That is what the "mkswap" command does.
 
Old 10-27-2002, 05:47 AM   #13
nautilus_1987
Member
 
Registered: Aug 2002
Distribution: Slackware 8.1
Posts: 750

Original Poster
Rep: Reputation: 30
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
 
  


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
Creating A Partition mailnickykav Red Hat 1 02-23-2005 02:09 PM
creating partition putteand Linux - Hardware 7 01-08-2005 04:02 PM
Partition mounting/KDE errors after creating Fat32 Partition BertBert Linux - General 1 07-07-2004 10:59 AM
creating new partition before boot partition?? rose_bud4201 Linux - General 17 02-07-2003 12:25 PM
Newbie Installing Debian3 on m68k w/250M Partition Needs help creating swap partition AppleMac Linux - Newbie 2 11-01-2002 08:45 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration