SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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).
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
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.
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.
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.
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.
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.
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:
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.