LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 05-13-2005, 12:43 AM   #1
Cinematography
Member
 
Registered: Apr 2005
Location: Chicago, IL
Distribution: openSUSE 13.1
Posts: 357

Rep: Reputation: 31
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.

Last edited by Cinematography; 05-13-2005 at 07:15 PM.
 
Old 05-13-2005, 01:06 AM   #2
fancypiper
Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 57
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.

Last edited by fancypiper; 05-13-2005 at 01:09 AM.
 
Old 05-13-2005, 01:10 AM   #3
kencaz
Senior Member
 
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468

Rep: Reputation: 47
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
 
Old 05-13-2005, 01:30 AM   #4
fancypiper
Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 57
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.

Last edited by fancypiper; 05-13-2005 at 01:40 AM.
 
Old 05-13-2005, 02:39 AM   #5
Cinematography
Member
 
Registered: Apr 2005
Location: Chicago, IL
Distribution: openSUSE 13.1
Posts: 357

Original Poster
Rep: Reputation: 31
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
 
Old 05-13-2005, 02:45 AM   #6
fancypiper
Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 57
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

Last edited by fancypiper; 05-13-2005 at 02:51 AM.
 
Old 05-13-2005, 02:55 AM   #7
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 61
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.
 
Old 05-13-2005, 03:27 AM   #8
Tanc
Member
 
Registered: Sep 2003
Location: France
Distribution: Debian etch
Posts: 99

Rep: Reputation: 15
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
 
Old 05-13-2005, 03:35 AM   #9
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 46
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.
 
Old 05-13-2005, 04:41 AM   #10
Cinematography
Member
 
Registered: Apr 2005
Location: Chicago, IL
Distribution: openSUSE 13.1
Posts: 357

Original Poster
Rep: Reputation: 31
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.
 
Old 05-13-2005, 04:56 AM   #11
mrcheeks
Senior Member
 
Registered: Mar 2004
Location: far enough
Distribution: OS X 10.6.7
Posts: 1,690

Rep: Reputation: 50
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...
 
Old 05-13-2005, 05:01 AM   #12
Cinematography
Member
 
Registered: Apr 2005
Location: Chicago, IL
Distribution: openSUSE 13.1
Posts: 357

Original Poster
Rep: Reputation: 31
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.
 
Old 05-13-2005, 05:49 AM   #13
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 46
/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)


Last edited by oneandoneis2; 05-13-2005 at 05:51 AM.
 
Old 05-13-2005, 08:09 AM   #14
fancypiper
Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 57
Are you certain that you want that partition /usr/bin rather than /usr?

Again, this is worth a read: Proper Filesystem Layout

Last edited by fancypiper; 05-13-2005 at 08:12 AM.
 
Old 05-13-2005, 08:25 AM   #15
oneandoneis2
Senior Member
 
Registered: Nov 2003
Location: London, England
Distribution: Ubuntu
Posts: 1,460

Rep: Reputation: 46
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. . .
 
  


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
Making new partitions Maintech Linux - Software 5 10-08-2004 01:13 AM
How big should the partitions be? NomDeGuerre Linux - Newbie 3 09-19-2004 01:25 PM
Two big fat32 partitions plus the linux ones... viccavazos LinuxQuestions.org Member Success Stories 7 08-08-2003 10:24 AM
Thinking of making the big jump jpc82 Linux - Hardware 9 08-08-2002 10:41 AM
How big should partitions be? bycoffe Linux - Software 3 07-09-2001 12:16 PM


All times are GMT -5. The time now is 03:23 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration