LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 03-04-2006, 11:53 AM   #1
deggial
Member
 
Registered: Mar 2006
Location: currently in Warsaw, Poland
Distribution: Slackware 10.2 & XP
Posts: 62

Rep: Reputation: 15
hdd partitioning


Hi!

while partitiong my hdd before slackware installation i found that i canīt make more than 4 partitions. I have 2 ntfs partitions(one primaly, one logical), linux swap and ext3 (both primary). Neither fdisk nor cfdisk could create the 5th, even when i intentively left some unallocated space.
Is the number of partitions limited?

second question: iīve read there are many ways of partitioning hdd for linux,
the labels mentioned were, for example, /user/home . does it mean that they are created under / on the main partition, or i need to make them with hdd partitioning programs?
also i see that i have many similar named folders under /, so what is all this mess about?

thanks
 
Old 03-04-2006, 11:58 AM   #2
pdeman2
Member
 
Registered: Jul 2005
Location: Maine, USA
Distribution: OpenSUSE, Gentoo, Fedora, Ubuntu, Mandriva, others
Posts: 413

Rep: Reputation: 30
For IDE hdd's, there is a maximum of 63 partitions, so I suppose that we might need to know what kind of hdd you have. Also when you create a partition for /home or /srv or something, it simply means that the partition is designed to be mounted at that location on your root partition. If you do create a separate /home partition, then you would then have to mount it as /home in you /etc/fstab file.

Last edited by pdeman2; 03-05-2006 at 06:51 AM.
 
Old 03-04-2006, 12:18 PM   #3
anti.corp
Member
 
Registered: Nov 2005
Location: Copenhagen
Distribution: Debian E, Vectorlinux 5.1std, Arch, Gentoo 2006.0
Posts: 576

Rep: Reputation: 30
Quote:
Originally Posted by deggial

second question: iīve read there are many ways of partitioning hdd for linux,
the labels mentioned were, for example, /user/home . does it mean that they are created under / on the main partition, or i need to make them with hdd partitioning programs?
also i see that i have many similar named folders under /, so what is all this mess about?

thanks
/ is the root partition. Its just called /

If you pick a standard installation with linux it will probably throw the whole installation into one partition. Distributions like Mandriva, SuSe, and Debian do that if you pick automatically partition/prepare my harddrives.

If you partition yourself, then you create it like this: (I know that this wasent your question, but im using it to illustrate).

/boot holds the kernel needed to boot the system (seperate partition)
/ holds your root partition = all the files associated to your distribution programs, etc
/Home holds your personal files and folders. Making a seperate /home partition is good especially if you need to reinstall the system later.

Thats just a basic layout. There are many opinons about partitioningtables/layouts, take a look around google it...or try The Linux Documentation project:
http://www.tldp.org/HOWTO/Partition/index.html

Have fun

Last edited by anti.corp; 03-04-2006 at 12:19 PM.
 
Old 03-04-2006, 12:19 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,862

Rep: Reputation: 739Reputation: 739Reputation: 739Reputation: 739Reputation: 739Reputation: 739Reputation: 739
To expand.
You can only have 4 primary partitions. If a primary is configured as an extended partition then you can create the other 59. An extended partition in a nutshell is a container for logical partitions.

The simplest method for partitioning windows is to create the primary for c: and an extended partition that fills the rest of the disk. You can create a logical drive for d: if desired but do not use the entire extended space. Then leave the rest of the extended partition unallocated and let the linux installer do the rest.

Most installers create multiple partitions. /, /boot, and /home (in addition to swap) are typical for a desktop. Unlike windows there are no separate drives (c:, d: etc). Everything is under /. Depending on the distribution removable media and non OS specific drives/partitions are mounted under /media or /mnt. Mounting attaches the filesystem to the file hierarchy /.

http://www.tldp.org/LDP/intro-linux/...ect_03_01.html
http://web.whittier.edu/jlutgen/rute/rute.html

Last edited by michaelk; 03-04-2006 at 12:22 PM.
 
Old 03-05-2006, 03:17 AM   #5
Jaqui
Member
 
Registered: Jan 2006
Location: Vancouver BC
Distribution: LFS, SLak, Gentoo, Debian
Posts: 291

Rep: Reputation: 36
there are several differences between windows and linux filesystem structure. these differences are the way linux ( and other unix os ) protect against both data loss and filesystem corruption.

t begin with a basic terminology definition ( most likely not needed, but included for completeness )

root is both the system admin, and the foundation of the file system. the differentiation is:
root = system admin
/ = foundation of file system

Directory: a folder on a partition. the biggest difference is a directory can be a partition name as well, when this happens accessing the directory is changing drives in windows.

filesystem type: this is the underlying structure of the filesystem, e2fs, reiserfs.... a windows version is fat, fat32 or ntfs.

partition: the same as windows, a section of physical hard drive set up to act as a hard drive in and of itself.

where a directory or partition has an * after it will be where the term is applying to more than one definition.

now that this is clarified, the linux names and the windows equivalents.

/ this is the same as the c drive with windows.

/bin this directory is used to store the command line executables that any use can access. comparable to c:\windows\command

/boot this directory can be, and usually is, a separate partition. this contains the kernel, and those parts of the bootloader that are not able to fit in the mbr ( master boot record )

/dev this directory is used to store the definitions of all known devices. it is not recommended to make this it's own partition.
this is most closely matched to device manager in windows, though this is not a good match, as it also resembles the c:\windows\system folder

/etc this directory is used to store system configuration data, such as what drivers, default fonts, default interface, default runlevel... are setup for the system. it contains the configuration defaults for every distribution included application. the closest windows has to this is the windows directory itself.

/home* this is comparable to the c:\documents and settings in windows nt family of products. it is recommended that this be a separate partition

/lib this is the core shared libraries and kernel modules. again this is the windows\system folder

/media a directory detailed to be used for removable media, such as floppys and cdroms, this is often not included. my computer in windows

/mnt this directory is always used, it is intended to hold mount points for filesystems, it is also used for the media mout points mentioned above. my computer in windows.

/opt* : Add-on application software packages.
by making this a partition, not just a directory in the / filesystem, you can control the space available for after market applications. unfortunately, this usage has not happened as much as it should have. c:\program files ( need I say more? )

/proc this is a depreciated structure, it was used to store active processes. newer systems will no longer have this.

/root this is the system admin users home directory, locked to root access only. optionally, but not recommended, a separate partition it is comparable to c:\windows

/sbin this is the root user only executable tools.
comparable to c:\windows\command

/srv : Data for services provided by this system
no real windows equivalent, other than c:\windows

/tmp : Temporary files, optionally a separate partition. comparable to c:\windows\temp
I personally do make this a separate partition, as some cd burning software creates temporary disc images in this, and I can ensure enough space for this activity this way.

/usr this is the area that the actual programs, libraries sources for the kernel... are installed.
most 3rd party software also installs itself here, despite the existance of the /opt directory / partition. this is c:\program files there is an entire heirarchy under this, that breaks the contents into even smaller areas, the url supplied at the bottom has these details. I always set this as it's own partition and ensure it is twice the size required for the system ( those 3rd party apps you know. )

/var optionally it's own partion, recommended to be so. this is used to store logs, default for webserver root. public ftp mailcap ( email server ) in short to store anything that is changed regularly, and that a record is needed. most closely matched by c:\windows

and there you have a brief outline of what each of those cryptic directories are for on your linux workstation. this should help you to find your way around, if / when you are troubleshooting a system. ( like finding default font setting for xfs ( x font srever ) )
all of this, in technical detail, including options can be found here:

http://www.pathname.com/fhs/pub/fhs-2.3.html
 
  


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
Partitioning NEW HDD Thanotos Linux - Hardware 2 12-30-2005 11:35 PM
adding Slackware to HDD - partitioning/lilo Atnot Slackware 1 02-18-2005 06:44 PM
partitioning a large HDD powadha Linux - General 1 03-05-2004 03:59 AM
partitioning hdd Nick5449 Linux - Hardware 1 06-29-2003 07:35 PM
partitioning 40 gb hdd using diskdruid cyberswami Linux - Hardware 2 06-26-2003 12:43 AM


All times are GMT -5. The time now is 03:27 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