LinuxQuestions.org
Register a domain and help support LQ
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 01-01-2004, 09:44 PM   #1
johnklvr
Member
 
Registered: Dec 2003
Posts: 31

Rep: Reputation: 15
Simple Partitioning Question


When I installed Red hat 9.0 I realized that it set up 3 primary partitions automatically for the /, boot, and swap partitions. I know that I have one primary partition left, and I was wondering what partitions needed to be primary - just the boot? I read that you need a primary partition to boot an OS, and I didn't really want to waste 3 on red hat. So if anybody could explain to me what would be the best idea and how I could go about doing it that would be great (because I'm trying to install another distrobution)
thanks
 
Old 01-01-2004, 09:54 PM   #2
amOrpheus
LQ Newbie
 
Registered: Jan 2004
Location: Purgatory
Distribution: Fedora Core
Posts: 14

Rep: Reputation: 0
I am also a newbie, but I believe the swap can be logical and the / and boot partitions can be combined. I think what you want is 3 primary parts -XP, Linux1, and Linux2) and 2 or 3 logical (Swap, Swap2 I don't know if both Linuxes can use the same swap, and a OSShare). Make the OSShare partition a Fat32 type so that XP and your Linuxes can all mount it and use it the share files (instead of letting Linux mount your XP part directly).
 
Old 01-01-2004, 09:58 PM   #3
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 64
It was not so bad partitioned. With Linux you need (don't have too though, but it's good to have) two partitions. "/" where all the stuff goes and "swap".

The swap partitions "need" to be twice as the amount of your RAM. I don't do that. I've 512 and I don't need so much partition. So I did a partition of 512 as well. Unless you are running a server, you don't need much of swap.

Some peoples make even more partitions. /, /home, swap. You can brake Linux partitions as much as you want .

I use in this machine a dual boot with win2k. So I've parted it like this: Two small partitions (One for Linux, one for Windows) and a big one (of FAT32) so both Linux and Windows can write to it (installing games, downloading stuff... etc).

The boot partition is not really necessary. It's safe to install the boot loader at the MBR (Master Boot Record) as long as you have a relatively "new" computer.

Good luck!
 
Old 01-01-2004, 10:03 PM   #4
johnklvr
Member
 
Registered: Dec 2003
Posts: 31

Original Poster
Rep: Reputation: 15
Let's say I decide to make a /, /home, /usr, and /boot partitions. Which one of these needs to be primary? And the rest can be logical?
 
Old 01-01-2004, 10:07 PM   #5
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 64
I usually make only the first partition primary (with fdisk) and the rest as logical. I think Redhat will handle it automatically for ya. During Slackware installation, you've to say which partition is active for boot though, but Redhat will do it automatically... as far as I know . Partitioning ain't my strength though
 
Old 01-01-2004, 10:20 PM   #6
eddieman
LQ Newbie
 
Registered: Dec 2003
Distribution: Mandrake 9.2
Posts: 28

Rep: Reputation: 15
Hehe I asked the exact same question earlier today...I wasn't sure...I was told...

With linux is doesn't really matter whether it's primary or logical...

For me I'm using windows xp and vector linux

My windows is a primary partition...and linux and the linux swap are logical partitions...being housed in an extended partition
 
Old 01-02-2004, 01:08 AM   #7
wartstew
Member
 
Registered: Apr 2002
Location: Albuquerque, NM USA
Distribution: Slackware, Ubuntu, Debian, Maemo
Posts: 464

Rep: Reputation: 30
Quote:
Originally posted by johnklvr
Let's say I decide to make a /, /home, /usr, and /boot partitions. Which one of these needs to be primary? And the rest can be logical?
To answer your question: Yes, only the /boot partition (as long as that is where your Linux Kernel is) actually needs to be a primary partition. If you are booting using an initial ramdisk (initrd), then that needs to be in the primary partition (ie, boot) as well. The 2nd stage of Lilo needs to be there too (it usually is by default). I don't know how GRUB works. The idea is that everything the OS needs to get going far enough to learn about extended partitions and file systems needs to be in the primary partition. In other words, everything that depends on the PC's BIOS (boot loaders all up to starting the kernel needs to be in a primary. Everything else can be on an extended partition.

I seem to remember that some distros (like Mandrake) do things kind of like this by default.
 
Old 01-02-2004, 09:55 AM   #8
TKS
Member
 
Registered: Dec 2003
Location: NC, USA
Distribution: Slackware, VectorLinux, Smoothwall, and PCLinuxOS
Posts: 40

Rep: Reputation: 15
Here's what you need.

Ok...I've been installing and using Linux since 1995 and have never EVER changed partitioning schemes. Mine is as follows...

2 Primary Partitions (boot, root)
the rest Logical


Here's what I did for a 120GB HD...make adjustments accordingly

/boot = 50MB
/swap = 512MB
/root = 5 GB
/usr = 10GB
/home = 20GB
/var = 15GB
/tmp = 10GB

and I include the rest under a /mnt partition so that I can keep it in with all of my windows machines spare space as well that I mount under samba...

/mnt = 60GB
/
 
Old 01-02-2004, 11:02 AM   #9
amOrpheus
LQ Newbie
 
Registered: Jan 2004
Location: Purgatory
Distribution: Fedora Core
Posts: 14

Rep: Reputation: 0
Maybe I misread the post, but I thought the primary goal was to have a Tri-boot system, with XP, Linux Distro 1, and Linux Distro 2.

IMHO, some of the proposed schemes seem to have too many partitions per OS to manage them well. I think I would use a much simpler schema - one partition per OS, one shared partition for the OS to share files, and a swap partition for those OSes that need them.

I am unsure if two Linux Distros can use the same swap partition.

I would suggest something like:
- XP (Primary)
- Linux Distro 1 (Primary)
- Linux Distro 2 (Primary)
- Extended (Primary)
- - Linux Swap 1 (Logical)
- - Linux Swap 2 (Logical) if Swap 1 can't be used by Linux 2
- - OS Share (Logical)
 
Old 01-02-2004, 06:01 PM   #10
TKS
Member
 
Registered: Dec 2003
Location: NC, USA
Distribution: Slackware, VectorLinux, Smoothwall, and PCLinuxOS
Posts: 40

Rep: Reputation: 15
Quote:
Originally posted by amOrpheus
I am unsure if two Linux Distros can use the same swap partition.

They can...I've had up to three different Distros running off of the same swap at the same time. However, each one needs a separate /root partition. The install should be able to automatically detect the swap and all you have to do is select it. Should be a breeze.
 
Old 01-03-2004, 02:05 PM   #11
wartstew
Member
 
Registered: Apr 2002
Location: Albuquerque, NM USA
Distribution: Slackware, Ubuntu, Debian, Maemo
Posts: 464

Rep: Reputation: 30
Quote:
Originally posted by amOrpheus
IMHO, some of the proposed schemes seem to have too many partitions per OS to manage them well.
Yes, for either new users or people like me that are mostly experimenting on a desktop system, too many partitions can be an annoyance. However, Anytime I build a "real" server that needs to be used and maintained over a long time, all these partitions can be real handy. So it really depends on what you are trying to do. In the case of the triple-boot computer here, I'd expect minimizing the partitions would be the easiest to deal with.

Quote:
I think I would use a much simpler schema - one partition per OS, one shared partition for the OS to share files, and a swap partition for those OSes that need them.


Yes, guessing at what this user is probably wanting to do, this would be the best. I usually have the "shared" partition as an old fashioned VFAT32 for maximum compatibility. Linux distros can easily share swap partitions unless you are sharing a very new kernel with a very (V 2.0.x) one. There isn't a lot of distros around anymore that use such an ancient kernel anyway, although I've always liked ones like Freesco and MuLinux.

Quote:
I would suggest something like:
- XP (Primary)
- Linux Distro 1 (Primary)
- Linux Distro 2 (Primary)
- Extended (Primary)
- - Linux Swap 1 (Logical)
- - Linux Swap 2 (Logical) if Swap 1 can't be used by Linux 2
- - OS Share (Logical)
This looks real good. You can even put in an additional hard drive and get 4 more primary partitions that you can boot to. Boot loaders like lilo can be configured to boot to other [BIOS recognized] hard drives without any problems.
 
Old 01-05-2004, 10:17 AM   #12
billtnor
LQ Newbie
 
Registered: Jun 2003
Location: Canada
Distribution: Debian
Posts: 5

Rep: Reputation: 0
The requirement for a primary partion is mainly for the boot loader.
The partion marked active usually needs to be primary, as do your
windows partions.
Depending on usage I have one root (/) partion primary.
Boot where the kernels actually are is often a logical drive.
Swap is reset when you boot, and can be shared by any number of
distributions.
I agree that for a real system there are good reasons to split the
partitions. See the File Hierarchy Standard for the rational.
If you are testing distros you can go with a single / partion and
an optional swap partion.
You can also use a swap file if you need temporary swap space.
You may also want to make /home a separate partion as this is
where all your personal files should be. However create a
user-id from each distro as you may get diffeerent default
files.
 
Old 01-05-2004, 12:39 PM   #13
wartstew
Member
 
Registered: Apr 2002
Location: Albuquerque, NM USA
Distribution: Slackware, Ubuntu, Debian, Maemo
Posts: 464

Rep: Reputation: 30
Quote:
Originally posted by billtnor
The requirement for a primary partion is mainly for the boot loader.
The partion marked active usually needs to be primary, as do your
windows partions.
This is the requirement of the boot loader that resides on the MBR. So in my previous recommenation of using the Microsoft MBR bootloader to chain over to the Lilo bootloader on the front of the Linux partition, then the limitation is from the Microsoft bootloader.

The reason this is an important distinction is that you'll sometimes get different behavior depending on how things are set up.

If I'm not mistaken, only primary partitions can be marked "active" which is why these are the only ones you can actually boot on. The "extended" partition scheme is just a kludgy add on.

Lilo on the MBR can probably boot to anywhere because it doesn't even know much about partitions. It seems run everything from logical sector offsets as reported by the BIOS, which can lead to a whole different set of confusions.
 
Old 01-05-2004, 12:42 PM   #14
masinick
Member
 
Registered: Apr 2002
Location: Clinton Township, MI
Distribution: Debian, antiX, Kubuntu, Xubuntu, and many others
Posts: 573
Blog Entries: 14

Rep: Reputation: 44
To address and answer not only the original post, but several others at the same time, as far as GNU/Linux systems go, very few, if any, of them require any partitions to be primary partitions. Moreover, as far as swap partitions go, as long as you have only one system running at any given instant (which is normally the case anyway), you can have several systems that use the same SWAP partition.

I have a system with a single 40 GB disk that typically runs 8 Linux distros. I share the same swap with all of them, and usually only one or two of them even have primary partitions, everything else is in a logical partition.
 
Old 01-05-2004, 12:56 PM   #15
billtnor
LQ Newbie
 
Registered: Jun 2003
Location: Canada
Distribution: Debian
Posts: 5

Rep: Reputation: 0
I have seen recent reports that some newer boot systems can boot from active logical partions. I haven't needed to try.

Some partion managers allow marking any partion active.

The boot block can be in the root partion of the logical partions, but many tools don't like this.

Lilo boots linux by loading the kernel from blocks contained in its boot map. This results in a need to rerun lilo whenever the kernel is moved or replaced.

I am considering switching to GRUB as I understand that it does not need to
be rerun when the kernel changes or is moved.
 
  


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
Need simple partitioning software for ntfs sc123 Linux - Software 4 02-06-2006 12:47 PM
Ubuntu Fluxbox simple question, simple answer? generallimptoes Linux - Software 3 09-26-2005 03:03 PM
Installing Programs - A simple question from my simple mind jmp875 Linux - Newbie 6 02-18-2004 10:03 PM
partitioning question digger Linux - Newbie 2 06-23-2003 09:49 AM
simple question seeking simple answer enzo250gto Linux - Newbie 1 10-27-2001 05:08 AM


All times are GMT -5. The time now is 12:04 PM.

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