LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-03-2009, 11:35 PM   #1
mprogrammer
LQ Newbie
 
Registered: Jul 2009
Posts: 20

Rep: Reputation: 0
Problems Adding Partitions to The Hard Drive


Hi everyone,

This is my first post here, I usually find a lot of help on this website even though I wasn't registered. But now I need to ask a specific question so I had to register.

Anyway,

I installed suse on my 250GB sata drive. During the installation I created 3 partitions with file system Resier and one swap partition. So a total of 4.

However I still have about 225GB free. I tried to install other distro's and when I tried to use their partitioner I couldn't create new partitions. I looked up for an answer online and I found some information that said I couldn't have more then 4 partitions on a hard drive.

Now is that true? and if it is, how can I modify my partition table and merge all the paritions in one partition and mount it on /?
right now that's how my partition table look like
partition file system mount point
1 reiser /boot
2 swap
3 reiser /
4 reiser /var

Thanks in advance,
 
Old 07-04-2009, 12:23 AM   #2
mdg
Member
 
Registered: Sep 2003
Distribution: Slackware
Posts: 626

Rep: Reputation: 37
You can only have a maximum of four primary partitions on one disk. However, you can put as many logical partitions as you need.

Make the root partition a primary and use extended partion to hold the others.
 
Old 07-04-2009, 12:43 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,839

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
Let's see "fdisk -l" (may need to be root). Post all the output.
 
Old 07-04-2009, 03:10 AM   #4
peacenik
LQ Newbie
 
Registered: Apr 2007
Distribution: Slackware w/grub (mostly), Debian, NetBSD
Posts: 5

Rep: Reputation: 1
Here are a few things that I have found useful. (They are also pretty obvious, so please bear with me).

I have found that I can get 3 Primary partitions (usually /dev/xdx1 - 3 ) and 1 Extended partition usually (usually /dev/xdx4 ) per disk.
The most I have been able to divide the Extended partition is into 11 partitions (/dev/xdx5 - 15 ). After that, the problem you described starts happening.

(If anyone has gotten more on a disk, I would be interested to know the layout/method used).

Keep in mind that all distros can share the same Swap partition.
With a little bit of imagination you can also share a /home.

Symbolic links (ln -s /path/to/source /path/to/target ) can be very useful.

Remember that partitions can only be reworked if they are not mounted. Using a live distro (i.e. SystemRescueCD et al) is useful.

(dev designations can be /dev/sda,b, . . . or /dev/hda,b, . . . and maybe other things I haven't come across which is why /dev/xdx is used above)

syg00's advice to backup is important to consider.

Last edited by peacenik; 07-04-2009 at 03:21 AM.
 
Old 07-05-2009, 09:42 PM   #5
mprogrammer
LQ Newbie
 
Registered: Jul 2009
Posts: 20

Original Poster
Rep: Reputation: 0
Thank you all for helping and sorry for replying late. This is the output from fdisk -l.
So are you guys saying that a maximum of three distros can share one hard drive? is that right? And if that's the case how can I fix the mess I have right now?

Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000ab6a3

Device Boot Start End Blocks Id System
/dev/sda1 * 2 26 200812+ 83 Linux
/dev/sda2 27 548 4192965 82 Linux swap / Solaris
/dev/sda3 549 3159 20972857+ 83 Linux
/dev/sda4 3160 3420 2096482+ 83 Linux
 
Old 07-05-2009, 11:17 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,839

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
Historically the partition table comes from DOS - and is somewhat limited. Various workarounds have evolved.
The classic partition table only has room for 4 entries - these are the "primary" partitions. To use more than 4, one of the primaries must be deleted, and an extended partition created (note I didn't say "converted"). This extended partition is merely a container inside which logical partitions are allocated. Some care still needs be taken to ensure space is still usable - for example if you were to delete /dev/sda2 (the swap) and replace it with an extended, you would be no better off. For you to get access to the space from cylinder 3421 to 30401 you'll need to (at least) delete /dev/sda4 and create an extended that occupies the entire (free) space. Then allocate (logical) partitions as you need them.
Note that Linux does not require any primary partitions at all - this is contrary to much of what you will see on the net which is written based on Windozw/DOS limitations.
 
Old 07-06-2009, 04:29 AM   #7
mprogrammer
LQ Newbie
 
Registered: Jul 2009
Posts: 20

Original Poster
Rep: Reputation: 0
Ok, so how do I change the mounting of the folder /var to be in sd3 then so I can delete sd4 and repartition the free space? And based on the fact that linux doesn't require any primary partitions does that mean I can have as many distros on one hard drive as I want??
Thank you,
 
Old 07-06-2009, 05:31 AM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530
There was this post somebody made (on LQ, IIRC) about booting over a hundred distributions. Can't remember his name or the threads location unfortunately though.
 
Old 07-06-2009, 06:06 AM   #9
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,839

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
That would be saikee - prior to the change of the disk driver no doubt. I would expect the SCSI limit (15 ?) to apply nowadays but I haven't bothered to check.
For the OP, a reinstall might be best - fiddling with partition can be done, but is just messy.
 
Old 07-06-2009, 06:16 AM   #10
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 7,453
Blog Entries: 55

Rep: Reputation: Disabled
Do you really need those separate partitions /boot and /var? I've always managed with just / and swap.
 
Old 07-06-2009, 06:24 AM   #11
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530
Quote:
Originally Posted by syg00 View Post
That would be saikee - prior to the change of the disk driver no doubt. I would expect the SCSI limit (15 ?) to apply nowadays but I haven't bothered to check.
Thanks. Good remark about SCSI. Remembers me of an error message fdisk displayed on an Intel machine with over 15 partitions. The partitions were accessable fine nonetheless.


Quote:
Originally Posted by brianL View Post
Do you really need those separate partitions /boot and /var? I've always managed with just / and swap.
Goes to show you never had or seen a machine go completely mental over a filled-up /var ;-p
 
Old 07-06-2009, 07:33 AM   #12
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 7,453
Blog Entries: 55

Rep: Reputation: Disabled
Quote:
Originally Posted by unSpawn View Post
Goes to show you never had or seen a machine go completely mental over a filled-up /var ;-p
No, not yet.(Fingers crossed, touch wood, etc). Isn't that more likely to happen with servers?
 
Old 07-06-2009, 08:16 AM   #13
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,331
Blog Entries: 55

Rep: Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530Reputation: 3530
Quote:
Originally Posted by brianL View Post
Isn't that more likely to happen with servers?
Yes and no. Could happen to everyone basically. Suppose you were remuxing a DVD in /home, or better: troubleshooting something really innocuous, say nscd at debug level three, and you forgot about that for a couple of days. Since nscd logs a lot, if you fill a separate /var things will die unexplicably (Apache for instance) or spit out warnings (any good example?) but you'll still be able to work the system to some extent. If you fill your / then you might not even be able to log in the next time.
 
Old 07-06-2009, 08:34 AM   #14
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware & Slackware64 14.1
Posts: 7,453
Blog Entries: 55

Rep: Reputation: Disabled
Thanks. This is what makes Linux so interesting - there's so much to learn.
 
Old 07-06-2009, 08:39 AM   #15
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 14,839

Rep: Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822Reputation: 1822
Quote:
Originally Posted by unSpawn View Post
If you fill your / then you might not even be able to log in the next time.
This is why I still use ext3, and distros that allow root login ...
BTDTGTS
 
  


Reply

Tags
partition


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
hard drive partitions the_cat123 Linux - Newbie 2 08-17-2006 03:53 PM
hard drive partitions irishbantam Ubuntu 7 12-07-2005 02:58 PM
adding hard drive linoj Linux - General 6 12-25-2004 01:51 PM
hard drive partitions bm1 Linux - Hardware 3 11-26-2003 05:32 PM
Hard Drive / Partitions Starburn Linux - Hardware 2 10-29-2003 10:59 AM


All times are GMT -5. The time now is 06:34 AM.

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