LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Making Partitions: How big, how many, what kind? (https://www.linuxquestions.org/questions/linux-newbie-8/making-partitions-how-big-how-many-what-kind-322996/)

Cinematography 05-13-2005 12:43 AM

Making Partitions: How big, how many, what kind?
 
I have 75 gigs that I would like to split and use for Linux. I've done some research on this, but I just want to confirm a few things before I continue.

Should I make ext2 or ext3 partitions?

I can vaguely remember seeing something about a '/' directory and a 'home' directory during the last installation. I chose to install everything to one partition. Now I would like to put the OS on one partition and the programs and everything else on another. How much space should I reserve for the OS, or "home" partition? Or is it called "/"? :( Grr... Dang confusing programmer terms...

And... I think that's it. If you know of an EASY to read tutorial about this, please post it.

However, your personal help would be greatly appreciated.

fancypiper 05-13-2005 01:06 AM

Here are some good guides.

Preparing to install Linux:
# Choosing a Linux Distribution:
Will your hardware work?
Do you have good RAM? Memtest86 - A Stand-alone Memory Diagnostic
A Beginner's Guide to Choosing a Linux Distribution
Reasons to Choose or Not Choose Linux
LWN distro list
elinux Linux Distributions
# Freeware tools for partitioning/resizing hard drive partitions:
Any Linux Live CD usually have fdisk, cfdisk and other tools available
Ranish Partition Manager
# Understanding Linux Filesystem layout:
Directory Navigation Help File
Filesystems, Directories, and Devices Help File
Proper Filesystem Layout
Advanced filesystem implementor's guide (requires registration)

My /etc/fstab file (for FC1) for a working example:
Code:

# Duron 950 Fedora Core 1 uilleann /etc/fstab file
/dev/hdb8      /              ext3            defaults                1 1
/dev/hdb1      /boot          ext3            defaults                1 2
none            /dev/pts        devpts          gid=5,mode=620          0 0
/dev/hdb11      /home          ext3            defaults                1 2
none            /proc          proc            defaults                0 0
none            /dev/shm        tmpfs          defaults                0 0
/dev/hdb12      /pub            ext3            defaults                1 2
/dev/hdb2      swap            swap            defaults                0 0
/dev/cdrom      /mnt/cdrom      udf,iso9660    noauto,owner,kudzu,ro  0 0
/dev/fd0        /mnt/floppy    auto            noauto,owner,kudzu      0 0
#/dev/hdb9      /mnt/debian    ext3            defaults                1 2
#/dev/hdb10    /mnt/fc3        ext3            defaults                1 2
#/dev/hdc1      /mnt/backup    ext3            defaults                1 2
#/dev/hdc1      /mnt/wav        ext3            defaults                1 2
#/dev/hdc1      /mnt/fat32      vfat            defaults,umask0,0,0    0 0
/dev/hda1      /mnt/WindowsXP  ntfs            defaults                0 0
/dev/hda5      /mnt/NTFSStorage        ntfs    defaults                0 0

As you see, I prefer the ext3 as it is proven and reliable. I am going to experiment with reiserfs and xfs when I get tinwhistle rebuilt.

kencaz 05-13-2005 01:10 AM

Here is a pretty easy to follow Mandrake install...

http://www.neolinkcomputers.com/newb...installing.htm

How to partition your drive is a hotly debated issue only surpassed buy which distrobution to install.

KC

fancypiper 05-13-2005 01:30 AM

Here is my Gentoo /etc/fstab which I took the time to figure out exactly what I wanted partition wise:
Code:

# Duron 950 Gentoo uilleann /etc/fstab file: static file system information.
# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/fstab,v 1.14 2003/10/13 20:03:38 azarah Exp $
#
# noatime turns off atimes for increased performance (atimes normally aren't
# needed; notail increases performance of ReiserFS (at the expense of storage
# efficiency).  It's safe to drop the noatime options if you want and to
# switch between notail and tail freely.
                                                                                                                   
# <fs>                  <mountpoint>    <type>          <opts>                  <dump/pass>
                                                                                                                   
# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.
/dev/hdb1              /boot          ext3            noauto,noatime          1 2
/dev/hdb3              /              ext3            defaults,noatime        0 1
/dev/hdb2              none            swap            sw                      0 0
/dev/hdb5              /usr            ext3            defaults,noatime        0 1
/dev/hdb6              /opt            ext3            defaults,noatime        0 1
/dev/hdb7              /var            ext3            defaults,noatime        0 1
#/dev/hdb8              /mnt/fc1        ext3            defaults,noatime        0 1
#/dev/hdb9              /mnt/debian    ext3            defaults,noatime        0 1
#/dev/hdb10            /mnt/fc3        ext3            defaults,noatime        0 1
/dev/hdb11              /home          ext3            defaults,noatime        0 1
/dev/hdb12              /pub            ext3            defaults,noatime        0 1
#/dev/hdc1              /mnt/wav        ext3            defaults,noatime        0 1
#/dev/hdc1              /mnt/backup    ext3            defaults,noatime        0 1
#/dev/hdc1              /mnt/fat32      vfat            defaults                0 0
/dev/cdroms/cdrom0      /mnt/cdrom      iso9660        noauto,user,ro          0 0
/dev/fd0                /mnt/floppy    auto            noauto                  0 0
                                                                                                                   
# NOTE: The next line is critical for boot!
none                    /proc          proc            defaults                0 0
                                                                                                                   
# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
#  use almost no memory if not populated with files)
# Adding the following line to /etc/fstab should take care of this:
                                                                                                                   
none                    /dev/shm        tmpfs          defaults                0 0
                                                                                                                   
# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for
# POSIX shared memory (shm_open, shm_unlink).
# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will
#  use almost no memory if not populated with files)
# Adding the following line to /etc/fstab should take care of this:
                                                                                                                   
none                    /dev/shm        tmpfs          defaults                0 0

Partition sizes (160 gb drive)
Code:

Fri May 13 02:28 AM root@uilleann ~ # df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/hdb8            4.6G  3.0G  1.5G  67% /
/dev/hdb1              54M  17M  35M  33% /boot
/dev/hdb11            33G  26G  4.9G  85% /home
none                  631M    0  631M  0% /dev/shm
/dev/hdb12            84G  50G  30G  63% /pub
/dev/hda1              39G  23G  17G  58% /mnt/WindowsXP
/dev/hda5              39G  26G  13G  67% /mnt/NTFSStorage
/dev/hdc1              75G  38G  38G  51% /mnt/fat32
/dev/hdb3            102M  92M  11M  91% /mnt/gentoo
/dev/hdb1              54M  17M  35M  33% /mnt/gentoo/boot
/dev/hdb5            7.0G  3.9G  3.2G  56% /mnt/gentoo/usr
/dev/hdb6            4.7G  2.7G  2.1G  57% /mnt/gentoo/opt
/dev/hdb7            4.7G  2.7G  2.0G  58% /mnt/gentoo/var

I like to use as much room as I can afford for /home as that is where all your own stuff goes. When you change distros, just choose the expert install and choose not to format the /home partition. I use the /pub partition for sharing between my boxen on my network.

hdc1 is in a removable ide box that fits in one of the 5-1/2" places in the box, just above my DVD-RW drive and 3 drives that I have some important stuff on, like my backups and .wav recordings of my fave music (almost fills another 160 GB drive), plus an 80 gig drive for stuff I need when working on those Microsoft operating systems.

Cinematography 05-13-2005 02:39 AM

Thanks a lot for the very educational replies!

On ext3 partitions I'm going to do the following:
* Make one partition that's 5 gigs for my /
* Make one partition that's 70 gigs for my /home

fancypiper 05-13-2005 02:45 AM

Don't forget to make a swap partition as well as it will be more efficient than a swap file.

For a server, it is essential, if a personal workstation with lots of ram, you can probably get by without one.

I made a 1 gig swap partition (probably much more than I need because it seldom gets touched)

Code:

Fri May 13 03:50 AM root@uilleann ~ # free
            total      used      free    shared    buffers    cached
Mem:      1291780    1269832      21948          0    187216    526344
-/+ buffers/cache:    556272    735508
Swap:      987988    194304    793684


theYinYeti 05-13-2005 02:55 AM

On my site, I explain how I do it and why:
http://yves.gablin.club.fr/pc/linux....fig/partitions

But for a serious server machine, you have to have more partitions.

Yves.

Tanc 05-13-2005 03:27 AM

Here is what i did for my pcs


For a personal computer ( 256 Mb of memory )

Swap 512 Mb
/ the rest


For a server

Swap depends on ur memory ( must be equal or twice as your memory )
/ 200 Mo
/tmp 150 Mo
/var 300 Mo
/usr 2 Go
/home 100 Mo per user

oneandoneis2 05-13-2005 03:35 AM

Quote:

On ext3 partitions I'm going to do the following:
* Make one partition that's 5 gigs for my /
* Make one partition that's 70 gigs for my /home
IMHO, don't. Unless you're really, really sure you'll need the 70 gigs for /home and only 5 for /

Don't fall into the trap of thinking you should partition & format the whole drive right at the start. When I first formatted my 80GB drive, it was like this:

/boot = 50mb
/ = 5gb
/home = 5gb

The rest of the drive was untouched. Since / used about 2gig and /home less than one, it would have been pointless adding any other partitions.

And when I wanted to try new distros, I just created a new 5gig partition for the new / and installed it. In fact, I had 4 distros all at once, at one point, and it was never difficult to install them.

Eventually, I switched to gentoo, which tends to need a lot of space because of the source code & the files it generates when compiling, which I don't often bother to delete. So I resized / to 20gig - really easy because I had so much space spare. I also ripped my entire CD collection onto my HD, for which I added a new /mp3 partition.

If I'd paritioned the whole drive at once, this would all have been a big headache. By only making small partitions as & when I needed them, it was blissfully easy to chop & change them as and when I needed to. I still have 20-odd gig unpartitioned, because I have no use for it.

If you don't NEED the space, leave it alone. That way, when you DO need it, it's really easy to put it where you want it. Resizing partitions is a PITA compared to just creating a new one.

Cinematography 05-13-2005 04:41 AM

Let me make sure I'm following...

/ is where the operating system is installed
/home is where the program files and your data go
the swap partition is for swap stuffs
the boot partition is for the boot stuffs

How about this setup?
/ (5 gig)
/home (69 gig)
/boot (50mb)
swap (512mb)


Thanks a lot for the help with this. I'm almost ready to give Mandrake another try. ^_^ And nice tutorial page, theYinYeti.

mrcheeks 05-13-2005 04:56 AM

almost every program you are going to install if it is not firefox like(unzip and ready to go) will be in /
some you might want less for your home partition and more in /usr unless all you do using few programs and downloading few gigs of music,movies,etc...

Cinematography 05-13-2005 05:01 AM

Quote:

Originally posted by mrcheeks
almost every program you are going to install if it is not firefox like(unzip and ready to go) will be in /
some you might want less for your home partition and more in /usr unless all you do using few programs and downloading few gigs of music,movies,etc...

How about if I just made a 'programs' directory in my home folder?

I'm almost ready to begin backing up, repartitioning, and reinstalling. I just need to make sure I understand everything first, and learn how to backup my program/os settings.

oneandoneis2 05-13-2005 05:49 AM

/home is only for software that you only want that user to have. Everything else goes in the root filesystem so everyone ca use it. /usr/bin is a popular choice. . .

Seriously: Create some small partitions now, leave the rest of the space unused, and then re-partiton a few months down the line when you know where the space will be needed.

So long as you're only making educated guesses about what your space requirements will be, you can gaurantee you won't guess right & will have to re-partition somewhere down the line.

Quote:

How about this setup?
/ (5 gig)
/home (69 gig)
/boot (50mb)
swap (512mb)
Unless you actually have 69 gigs of mp3s or something that you want to keep in your user area, change /home to 5gig and leave the rest as-is. If you really want executables to be on their own partiton (not sure why you would want this tho?, split your / partition into
/ (2gig)
/usr/bin (3 gig)


fancypiper 05-13-2005 08:09 AM

Are you certain that you want that partition /usr/bin rather than /usr?

Again, this is worth a read: Proper Filesystem Layout

oneandoneis2 05-13-2005 08:25 AM

Good point: /usr will probably be a better catch-all than just /usr/bin

But that still leaves the /sbin apps, if he really wants to keep all executables on their own partition, of course. . .


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