Linux - NewbieThis 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
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.
I'm at the point now where I'm setting up partitioning on the hard drive that I'm installing Linux on.
The Machine:
IBM ThinkPad 560
Hard Drive 2GB
RAM 40GB
Distribution:
Slackware 10.2
I chose this distro because the laptop will support it. Also this distro has the option of switching to a 2.6 kernel, which includes SE Linux, which is what I'm really after for my school lab project.
My thinking:
It seems clear to me after spending time this evening looking at other peoples' postings to this site, that there aren't any hard and fast rules about how to set up partitioning on one's hard drive when installing Linux. It seems like some people generally agree that there should be a swap partition and that it should be 1.5 to 2 times the size of a machine's RAM. But other than that it seems like it's really a person's personal choice depending on what they want to do with their machine. i.e some people set up separate partitions for /usr, /home, /etc, /tmp. of varying sizes. Some people don't bother with this.
For me, since I'm just starting out, I think I'm going to be ok with just two partitions: a swap and a main partition for Linux.
My questions:
--> Is the main Linux partition also called the root partition? So am I going to be setting up a root partition and a swap partition?
--> Will a setup program typically set up space for a boot partition automatically for me?
--> After I set up a swap partition, can I use all of the remaining hard drive space (almost the entire 2 GB) for the main Linux partition? And if I do that - will it screw up the boot partition by taking away space that the boot partition needs?
--> If I'm not mistaken, I don't think I've seen anyone on any discussion board create partitions that in total take up more than 80% of their hard drive space. Should partitions *not* take up all the space? Is this because after the boot partition took up it's space during the initial install, that 80% was all that was left for all other partitions?
Hi, Ged - twice you've referred to your HDD as 2Gb and RAM as 40Gb. Will you just confirm that it's the other way round? We know it is, but just for confirmation.
Secondly, before discussing partitions, will this be a dedicated Linux machine, or sharing it with another OS?
Anyway, with such a low amount of ram, I'd recomend at least 126mb for a swap partition.
Also, I've run setups with just a swap partition and a main partition, with no other partitions for boot, home, etc, or anything else, and they have always worked fine for me. I'm not sure, but I think it's just an orginizational thing.
If you want to keep it simple, just try the above, 126mb swap partition and use the rest for the main linux partition.
Well, it is not just for orginization. You would want to partition your hard disk that makes sense on how you are going to be using the computer. For example, if you are using it as a webserver/sqlserver then you might want a seperate partition for /var or /var/log you don't want something writing a bunch of log files that fills up your hard drive, it would be better to just fill up the log partition so that you computer won't bog down. With a server, you wouldn't need a large /home partiton. But, if you are using it in a multiuser enviroment, than you probably would want a larger /home partition for all of your users' files.
Now it is not neccessary to have these partitions, I think it is a good idea. On my laptop, I just have three partitions /, /home and a swap partition. I like have a seperate /home partition incase something goes wrong and I need to reinstall Linux, my files will remain since I won't be formatting the /home partition when reinstalling.
I guess you can say the main partition is the / partition and yes, you can use the rest of the disk for the partition, no reason to leave part of your hard drive unused.
The setup program will give you options on how you want to boot, at least I belive Slackware will give you these options.
Is the main Linux partition also called the root partition? So am I going to be setting up a root partition and a swap partition?
The root (/) "partition" is the main "partition." Technically it is the top of the filesystem hierarchy not a partition. You can equate this with C:\ in a Windoze system (pardon me all you Linux experts).
The swap partition is used by the system when your RAM is all used up. You can equate this with the page files (?) in Windoze. I'd agree with saitoshi that 126MB is a good size.
Quote:
Will a setup program typically set up space for a boot partition automatically for me?
If you only create root (/) and swap, the setup program will put everything where it needs to go. Just like installing Windoze with only one partition (C:\). The installation program creates the folders it needs (e.g., Windows, Documents and Settings, Program Files, etc.).
Most, if not all, Linux installers will create the necessary structure if you only have root (/) and swap. The installer will create /boot, /usr, /var, /home, etc. and install the appropriate files in the appropriate places.
Quote:
After I set up a swap partition, can I use all of the remaining hard drive space (almost the entire 2 GB) for the main Linux partition? And if I do that - will it screw up the boot partition by taking away space that the boot partition needs?
Yes, you can use the remainder of the drive for root (/). With only one partition, /boot will be a directory structure under root (/). The installation will make sure everything has enough space. Unless, of course, 2GB is not enough for the installation.
Quote:
If I'm not mistaken, I don't think I've seen anyone on any discussion board create partitions that in total take up more than 80% of their hard drive space. Should partitions *not* take up all the space? Is this because after the boot partition took up it's space during the initial install, that 80% was all that was left for all other partitions?
I think this is done more for future expansion. With 2GB, you don't have much future expansion. I used my entire hard drive(s) when I installed Linux.
SweetLou (is that Lou Whitaker of Detroit Tigers fame?) is correct about separate partitions for different portions of the file system hierarchy. Depending on the end use of the machine, the separation would be designed differently. Since you'll be using this machine for a school project, there's probably no need to get too fancy with a partitioning scheme. Also, unless you have a very good idea what you are or will be using the machine for, creating a grunch of partitions and making sure they're sized appropriately could be very tricky with only 2GB.
On 2GB, don't worry to much. Some swap (I think that 80 MB will do) and the rest as root partition.
On 2 GB, you can NOT do a full install of Slackware (10.1 states during installation that it is somewhere between 3 and 4 GB). So select packages according to your needs. I did a full 10.1 install recently, found out that I did not have disk 2 and ended up with approx 1.8 GB (and that does not include KDE and Gnome).
Wow. Thanks for all the responses! This has been a really positive experience working on my small Linux project and getting help from others in the Linux community. I feel like I have a much MUCH better understanding of partitions now. I'm going to go partition my hard drive now (and not do a *full* Slackware 10.2 install) THANKS EVERYONE!!!!!!!!!!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.