?
Solved

Disk partitioning questions

Posted on 2003-03-04
4
Medium Priority
?
277 Views
Last Modified: 2013-12-15
Hi,

I am a complete Linux newbie and I have a couple of questions to ask.

1) /boot mount point

a) what is it used for?
b) what should be the size?

2) If I have only one physical harddisk, should I just partition it to a / and a /swap partitions or should I give seperate partitions to things like /usr, /home, etc.?

3) If I sized my /swap partition to twice the size of my RAM and I increased my RAM later.  Should I also increase the size of my /swap partition?  If yes, how to I resize the partition?

Thanks.

Regards,
Kok Hee
0
Comment
Question by:KokHee
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 

Accepted Solution

by:
barnski earned 150 total points
ID: 8071732
The /boot mount point is a filesystem that contains the files necessary to boot the system, including the kernel.
A decent description of the Red Hat boot process can be found at:
http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/ref-guide/s1-boot-init-shutdown-process.html.

To start a Linux system, you need the minimum three partitions, which are:
/boot
/
swap

Any other filesystems (/var, /usr etc.) will be created under / on the same filesystem.
For advanced use, it's sometimes best to place /var on it's own partition (or "slice") of the disk, as /var can be filled with logfiles and dumps from badly configured apps. Clearly if it is on its own partition that is then mounted under /, it can't fill the / filesystem because it can only fill the mounted disk partition.
However, at home, on a PC, I have always created only the 3 partitions mentioned, as it gives you much more flexibility in how you use your disk space without having to change the partition table.

The size of /swap should be approximately RAM x2, but if you add more physical RAM, the system will still boot. If you really feel you want to increase the swap partition size, Linux is quite helpful. I have only done this on Red Hat, and only for ext3 partitions (not swap), but they provide a utility called "parted" (partition editor), which allows you to resize partitions.
However, you cannot resize a mounted filesystem, so to resize / and swap, you need to boot into rescue mode from the CDROM, and NOT mount your filesystems. You can then run parted and resize your partitions.
More details on parted at:
http://www.redhat.com/docs/manuals/linux/RHL-8.0-Manual/custom-guide/ch-disk-storage.html

Sorry the tips are so geared towards Red Hat, but that's what I use!!

Good luck, and persevere: Linux is worth it :)


0
 

Author Comment

by:KokHee
ID: 8077751
Hi,

Thanks for the advice.

I didn't know any better when I loaded my system and I did not create a /boot partition.  It seems o.k.  How big should the /boot partition be?

Thanks.

Regards,
Kok Hee
0
 

Expert Comment

by:barnski
ID: 8078238
Again, I only really know Red Hat, but they recommend that /boot is at least 75MB for Red Hat 8.0.
If you have space, I would suggest 100-150MB would be fine.
Also, note that due to BIOS restrictions, the /boot partition generally needs to be within the first 1024 cylinders of the hard disk, or the system won't boot. It's therefore best to make /boot the first disk partition.
0
 

Expert Comment

by:mjregan
ID: 8185518
I don't know why Red Hat would even want that much space for the /boot partition. The only thing that should be in there is the secondary boot loader, and the kernel. 75M is more than enough.

There are some good reasons for puting /usr and /home in seperate partitions. The biggest is that it stops you from doing too much damage when you enter rm *.* :< (Been there - done that). The rm command doesn't cross partitions. There are other reasons also. The /home directory in particular should have its own partition. Otherwise it will keep taking space from the / partion. This can lead to the system becoming unusable due to a lack of disk space.

The size of the partitions will depend on the distro. Not being familiar with Red Hat I am not sure what sizes they recommend. Most of the files will be in the /usr partition.

I have always found resizing partitions to be a pain even with two drives. If you have the room start with a larger swap partition. The old rule of twice your RAM really doesn't apply any more.
0

Featured Post

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month14 days, 17 hours left to enroll

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question