[SOLVED] How to create 5 primary partitinos (more than 4 as a matter of fact )
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to create 5 primary partitinos (more than 4 as a matter of fact )
How to create more than four primary partitions in order to create the following file systems in their own respective partitions; /, /boot, /usr, /var, /tmp, /tmp and /opt and /home.
Does LVM allow it? Or is it only possible in non-pc
system?
Thanks..
Click here to see the post LQ members have rated as the most helpful post in this thread.
How to create more than four primary partitions in order to create the following file systems in their own respective partitions; /, /boot, /usr, /var, /tmp, /tmp and /opt and /home.
Does LVM allow it? Or is it only possible in non-pc
system?
Thanks..
It is definitely possible to create more than 4 primary partitions. Just use GPT instead of msdos partition table. However, what you are trying to do can be done with just 2 primary partitions.
1st primary partition of ext3/4: /boot
(512MB should be good enough for /boot)
2nd primary partition of LVM: this will hold the other partitions separately
First create 2 primary partitions using fdisk or parted. Then
LVM is possible, but "logical partitions" can also be used for what vectrum wants. You don't need a partition to be a primary one to use a different filesystem on it.
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
Rep:
You can fiddle around and make more than four primaries but... why? Three primaries and some number of logical partitions accomplishes what you want to do without the need to fiddle and twiddle when you get around to updating or reinstalling or whatever may come up. Maybe the only thing you have to worry about is how much the drive heads are flying around to read or write although that's more or less moot nowadays.
I use nine partitions: /root, /swap, /home /usr/local, /opt, /var/lib/mysql, /var/lib/virtual, /spares and /var/lib/psql. I do it so that I do not have to back off large-scale data bases (in /var/lib/mysql and /var/lib/psql), virtual machines (in /var/lib/virtual -- do not want to have to reinstall Windows!), additional applications (/opt), additional utilities, all my user's stuff (/home) and other software (/usr/local) when I upgrade to a new release of Slackware (all you do is not format the partitions you want to "save" when assigning the partition names to fstab during installation -- gives me a "clean" install rather than going through all the trouble of upgrading). I've never needed a /boot partition for anything I know of (it's in /root, why fiddle?), I don't do /usr because that's were all the system libraries live and, well, that works for me.
You can, of course, add additional drives (just make sure they get mounted at the right time so the the thing'll boot, eh?). I have kept the data bases on separate drives but anymore I just let 'em live in their own logical partitions and life (so far) is good. Everything works if you let it.
Thank you very much for the suggestions. One thing I should have mentioned that when I referred to a primary
partition, I actually wanted to mean physical partition
because if I was able to set up aforementioned file systems in separate physical partitions then, in case of any particular file system damage, other file systems wouldn't be affected as this is not the case in logical partitions where a corrupt logical partition will destroy other logical partitions.
wildwizard told me 'Now did you really want the answer?'
Yes, Your link has reminded me of setting up solaris and freebsd sys(many slices inside a partition). Thanks for providing the empirical knowledge.
LVM solution is really nice. Master's solution without any gripe. Thanks.
tronayne: Here is my scenario. Why I have had to fiddle with boot partition. I have got two hdds, sda and sdb. I installed win, solaris and linux 100mb boot partitions in three primary partitions in sda(sda1, sda2, and sd3) and installed freebsd, slack and linux swap in three primary partitions, sdb1, sdb2 and sdb3. My boot manager is lilo (I could have used soalaris' grub)and it couldn't boot if I place boot in sdb so I have had to keep /boot in sda.
I don't know whether that was possible to make solaris, freebsd boot from logical partitions. My entire partition scheme was faulty I suppose but I can't make it from scratch due to the admin level hitch.
You have created nine partitions!
How did you do it?
Are all these primary partitions?
Are all in a single hdd?
Thanks again.
Thank you very much for the suggestions. One thing I should have mentioned that when I referred to a primary
partition, I actually wanted to mean physical partition
because if I was able to set up aforementioned file systems in separate physical partitions then, in case of any particular file system damage, other file systems wouldn't be affected as this is not the case in logical partitions where a corrupt logical partition will destroy other logical partitions.
Where did you get that from? Logical partitions are physical partitions, they are just organized differently.
To clarify that: Due to limitations of the old MS-DOS style partition table you can not create more than 4 primary partitions when using this style (when using GPT instead you can create many more). One of these primary partitions can be an extended partition. Extended partitions are nothing more than a way to overcome the partition tables limitation with creating a container for more physical partitions, called logical partitions. There are only two things that are different for a logical partition compared to a primary partition:
1. They have to be in an extended partition.
2. There data (read: start-sector, end-sector, ID, ..) is not stored in the partition table in the MBR.
Nonetheless, they are physical partition, a corrupted logical partition has the same chance of corrupting other partitions as a primary partition.
Thank you. I need a time out as I discard the concept about logical partition. It might be possible that I came to know from a dos community when I learnt to install dos. I hadn't got any chance to install *nix.
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541
Rep:
Quote:
You have created nine partitions!
How did you do it?
With cfdisk, see below.
Quote:
Are all these primary partitions?
No. See below.
Quote:
Are all in a single hdd?
Yes.
Well, I don't have multiple Linux distributions, just Slackware (hmm. "just?" Well, go with the best, methinks). I do have two virtual machines, XP and Win7, and those are in the partition mounted to /var/lib/virtual. Right now, in this box, there is only one drive -- the other box has two (both 500G).
There are only three primary partitions -- as explained above by TobiSGD, you can only have four primaries (and no logical) or three primaries plus X number of logical.
I use the cfdisk utility to set up disk drives (it uses ncurses to display all the drive information and permit easy editing). cfdisk is on the Slackware installation CD-ROM/DVD and you use it to partition your drive before you execute setup to install Slackware.
The display looks like this:
Code:
cfdisk (util-linux 2.19)
Disk Drive: /dev/sda
Size: 500107862016 bytes, 500.1 GB
Heads: 255 Sectors per Track: 63 Cylinders: 60801
Name Flags Part Type FS Type [Label] Size (MB)
------------------------------------------------------------------------------
sda1 Primary ext4 15998.17
sda2 Primary swap 15998.17
sda3 Primary ext4 20003.89
sda5 Logical ext4 20003.89
sda6 Logical ext4 20003.89
sda7 Logical ext4 20003.89
sda8 Logical ext4 100002.96
sda9 Logical ext4 100002.96
sda10 Logical ext4 188087.48
[ Bootable ] [ Delete ] [ Help ] [ Maximize ] [ Print ]
[ Quit ] [ Type ] [ Units ] [ Write ]
Quit program without writing partition table
Of course you can, logged in as root or su - or sudo, look at your drive(s) with cfdisk on a running system -- you don't want to fiddle around and try to edit a drive on a running system (except a new one you're formatting and partitioning), but you can look at any drive with
Code:
su -
cfdisk /dev/sda
cfsisk (and fdisk) are standard utilities installed in /usr/sbin; they're not to be used by any but root. When you've partitioned a drive using either of them, you need to add entries in /etc/fstab for it (which is done during Slackware installation because you partition fist, then run setup and you're asked for the partition information).
The primary-logical thing is a hangover from olden days and Miserydos, partition tables and MBRs and who knows what all. Keep in mind that your partitions, whether they're called primary or logical start and end at specific addresses on the drive and have a specific size. You don't really care what the addresses are (that's taken care of by the controller and system software) and utilities such as df and du will tell you how much storage space you've got available and how much you've used. And when you run out of space in a given partition, well, then you'll find out that it really is physical space and holy toot, what do I do now.
If you use either EFI or UEFI instead of BIOS then you are not limited to just four primary partitions. The upper limit is not a fixed number, but is typically more than 128 partitions.
There are reasons to have separated file system areas. Some of those reasons go away, when we're talking about a system without multiple physical drives, and without NFS mounts.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.