LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-13-2007, 10:18 AM   #1
jpostma
Member
 
Registered: Jun 2003
Location: Alphen ad Rijn -- The Netherlands
Distribution: Fedora Core 2 - Slackware 12
Posts: 119

Rep: Reputation: 15
Are partitions necessary?


I want to install Slackware on a new harddisk. Is it necessary to create partitions? I don't want to install Windows on the same machine only Linux.

Johannes
 
Old 07-13-2007, 10:22 AM   #2
slackhack
Senior Member
 
Registered: Jun 2004
Distribution: Arch, Debian, Slack
Posts: 1,016

Rep: Reputation: 47
strictly speaking, no, except for a root partition, obviously, and perhaps a separate partition if you want swap.
 
Old 07-13-2007, 10:35 AM   #3
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
You have to have at least one partition, the drive is useless without a partition table on it. As for how many you will have, that is up to you. Technically you only need one, but you should have at least three in most cases (/, /home, swap).
 
Old 07-13-2007, 10:43 AM   #4
jpostma
Member
 
Registered: Jun 2003
Location: Alphen ad Rijn -- The Netherlands
Distribution: Fedora Core 2 - Slackware 12
Posts: 119

Original Poster
Rep: Reputation: 15
Thanks. Can you add the 'label' e.g. /usr with fdisk or cfdisk to the partition? Or do you this with the setup of Slackware?

Johannes
 
Old 07-13-2007, 11:34 AM   #5
arubin
Senior Member
 
Registered: Mar 2004
Location: Middx UK
Distribution: Slackware64 15.0 (multilib)
Posts: 1,350

Rep: Reputation: 75
I always have one swap partition and everything else on one big partition. Everyone has their pet scheme and many preople advise puting /home on a separate partition but I have never found that necessary. However, if you have a big hard disc you should consider making several partitions so that if you want to upgrade or try another distribution you can do it on a spare partition without disturbing your existing installation. You can also keep some of your data on separate partitions.

For what it's worth my current scheme is something like:

swap
Slackware 11
Slackware 12
mp3 files
FAT partition for sharing with Windows and photographs (though I hardly ever run Windows these days)
small partition for installing other distros
 
Old 07-13-2007, 11:54 AM   #6
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Quote:
Originally Posted by jpostma
Thanks. Can you add the 'label' e.g. /usr with fdisk or cfdisk to the partition? Or do you this with the setup of Slackware?

Johannes
During setup.
 
Old 07-13-2007, 12:17 PM   #7
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,432

Rep: Reputation: 110Reputation: 110
Quote:
Originally Posted by jpostma
Thanks. Can you add the 'label' e.g. /usr with fdisk or cfdisk to the partition? Or do you this with the setup of Slackware?
That is not a "label", that is a mount point.

A "label" is a name you can give the partition, just like with the DOS format command. If you really want a label, you can format the partition before you install the system:

# mkfs.ext3 -L Your_Label /dev/hdb8

Of course, you'll have to adjust "Your_Label" and "hdb8" to your particular case.

If you do that from the Slack CD, mkfs.ext3 is not available. Use mkfs.ext2:

# mkfs.ext2 -j -L Your_Label /dev/hdb8

The -j option gives you a journal (ext3). Then you can change the type with cfdisk, and when you install Slackware, tell setup NOT to format your partition.

I like to format my partition like this:

# mkfs.ext3 -m 2 -b 1024 -O has_journal -O dir_index -L label /dev/xxxx

It seems to give me better performance.
 
Old 07-13-2007, 02:10 PM   #8
Ilgar
Senior Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware64 15.0, Slackwarearm 14.2
Posts: 1,157

Rep: Reputation: 237Reputation: 237Reputation: 237
Quote:
Originally Posted by arubin
Everyone has their pet scheme and many preople advise puting /home on a separate partition but I have never found that necessary
It is not necessary but personally I find it very useful. Makes things a lot easier when you need to reinstall your OS or want to share your personal settings between two different distributions.
 
Old 07-13-2007, 03:10 PM   #9
justwantin
Member
 
Registered: Aug 2003
Location: Melbourne, Australia
Distribution: Slackware, Slackwarearm
Posts: 878

Rep: Reputation: 120Reputation: 120
Having more than one partition is standard on our machines. You can reinstall on the computer without losing data on all partitions. If you have only one partition you lose everything unless it is backed up somewhere else.

If you have something go feral and start writing/saving/recording on a single disk you may end up with an inoperable machine. with partitons this is much less likely.

/, /usr, /usr/local, /home and /opt all go on separate partitions. The first two just to be tidy, the last three because there are things in those partitions that belong to the user and not the system. In the case of /opt, there are self contained applications like acroreader and cxoffice which are not distro specific. On the server /var is on a seperate partition in case something goes wrong and it fills up with log(s)

On a large disk there is no need to waste space. what isn't given over to the install or required by the user is wasted. I leave a spare partion on my workstation in case I want to install current, everything after that is for music storage/encoding or video processing.

In general, I prefer reiserfs but jfs is better/faster for large video files so there is another good reason for my workstation to have separate partitions. Here's a snipped version of /etc/fstab on my workstation.

Quote:
/dev/hda5 swap swap
/dev/hda1 / reiserfs
/dev/hda6 /usr reiserfs
/dev/hda7 /usr/local reiserfs
/dev/hda8 /opt reiserfs
/dev/hda9 /home reiserfs
/dev/hda10 /mnt/hda10 reiserfs # for 2nd install
/dev/hda3 /music jfs # for music
/dev/hdc1 /vidproc jfs # for video processing
192.168.1.4:/mnt/hda8 /var/backups nfs # for backup via lan
192.168.1.4:/mnt/hdd1/videos /videos nfs # dvb timeshifting avilable via lan
cfdisk is available after you login as root during a slack install. It simple to use after you get the hang of it. It don't matter if you get it wrong the first time, you've hosed the disk so it don't matter, try again until you're happy.

fdisk is available too but if you read th manpage for fdisk, in the BUGS section they recommend using cfdisk.
 
Old 07-13-2007, 03:22 PM   #10
gargamel
Senior Member
 
Registered: May 2003
Distribution: Slackware, OpenSuSE
Posts: 1,839

Rep: Reputation: 242Reputation: 242Reputation: 242
With modern file systems one partition is ok on home pc's. However, I have these: /boot, /, /home and swap. To have /home as a separate partition helps in situations when you want or need to install a new system and format / (root partition). /home is then untouched, and your data are preserved. If you have only /, all your user data will be lost after formatting.

To sum it up, it's not necessary to spend as much thinking on partitioning as in earlier days, but it's still good to separate user data from system data.

Note that on a production server partitioning can heavily influence the overall performance, so it's a totally different story there.

gargamel
 
Old 07-13-2007, 03:52 PM   #11
jpostma
Member
 
Registered: Jun 2003
Location: Alphen ad Rijn -- The Netherlands
Distribution: Fedora Core 2 - Slackware 12
Posts: 119

Original Poster
Rep: Reputation: 15
I have bought a 400G harddisk, 2G memory.

Is this a good idea?

/ 48G
/boot 1G
/swap 1G
/home 150G
/usr 100G
/tmp 50G
/opt 50G

I don't need all the Gigs at most maybe 200G. I have another pc for Windows. Dual boot is not necessary. It will only be a workstation for java developing.
 
Old 07-13-2007, 04:05 PM   #12
Ilgar
Senior Member
 
Registered: Jan 2005
Location: Istanbul, Turkey
Distribution: Slackware64 15.0, Slackwarearm 14.2
Posts: 1,157

Rep: Reputation: 237Reputation: 237Reputation: 237
I'd recommend a separate partition for /usr/local as most user-compiled apps will install there (and you should choose to install them in /usr/local/, unless you're trying to replace some official package in /usr/). Now that $KDEDIR is out of /opt with Slackware 12.0, I don't think that 50G space is needed for opt. 2-3 GB would be enough, so you may even keep /opt on the same partition as /. This is how I divided my partitions:

Code:
/dev/sda7              56G   52G  4.0G  93% /
/dev/sda6              28G   23G  2.8G  90% /home
/dev/sda5              28G   21G  7.4G  74% /usr/local
If you're going to use multiple distros making /boot a separate partition may be useful, otherwise it's just fine to keep it together with /.

Last edited by Ilgar; 07-13-2007 at 04:07 PM.
 
Old 07-13-2007, 04:19 PM   #13
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian
Posts: 1,432

Rep: Reputation: 110Reputation: 110
Quote:
Originally Posted by jpostma
I have bought a 400G harddisk, 2G memory.

Is this a good idea?

/ 48G
/boot 1G
/swap 1G
/home 150G
/usr 100G
/tmp 50G
/opt 50G
Hardly.

I only have 500 Mb for swap, and never use even half of it. I have 1 Gb of RAM.

My / partition is just 7 Gb. I have a lot of applications and just use 3.9 Gb right now. Most of it is the /usr dir. The /opt dir has nothing but OpenOffice, 321 Mb. I don't see that partition needing more than 7 Gb anytime in the next couple of years.

My /boot dir is inside / too, includes 5 kernels and takes just 20 Mb right now. Why would it ever need 1 Gb?

My /tmp dir is just 340 Mb and is mounted in RAM (/dev/shm). Everything has been running smoothly for one year and a half.

I really think you should bring those numbers way far down, unless you're planning to edit a lot of graphics and video. Leave all the space you can to your /home directory. That's where the bulk is ever going to be.

Last edited by lucmove; 07-13-2007 at 04:24 PM.
 
Old 07-13-2007, 04:32 PM   #14
jpostma
Member
 
Registered: Jun 2003
Location: Alphen ad Rijn -- The Netherlands
Distribution: Fedora Core 2 - Slackware 12
Posts: 119

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by lucmove
My /boot dir is inside / too, includes 5 kernels and takes just 20 Mb right now. Why would it ever need 1 Gb?
The 'problem' is that it's a big disk. Is it maybe a good idea (for speed) to leave a part of the disk unused (no partitions)?

Johannes
 
Old 07-13-2007, 04:59 PM   #15
adriv
Member
 
Registered: Nov 2005
Location: Diessen, The Netherlands
Distribution: Slackware 15
Posts: 700

Rep: Reputation: 43
With the amount of RAM you have, the disk size won't be a problem.
BTW: I have
swap = 1GB
/ = 10 GB
/home/ the rest of the disk.
I don't see / being filled for a long time...
At the moment it's not even 6.2 GB on a Slackbox that's almost a year old and loaded with software.
 
  


Reply



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
windows killed my partitions! no linux partitions found on this computer. The MJ Linux - Software 10 01-05-2007 08:31 AM
Question on creating more partitions than default ones, i.e. /home,/root partitions casmac SUSE / openSUSE 1 12-20-2006 05:02 PM
e2fsck: root partitions and ro mounted partitions Clemente Linux - General 4 11-06-2006 09:32 PM
how do I add partitions to drives that have Logical Volume (LVM) partitions? The MJ Linux - Software 5 08-17-2006 06:15 PM
/proc/partitions showing wrong partitions netstv Linux - General 1 07-10-2006 01:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:40 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration