LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-21-2013, 06:10 AM   #16
BoraxMan
Member
 
Registered: Apr 2010
Posts: 103

Rep: Reputation: 11

There used to be a benefit to putting /boot first, when the bootloader couldn't access parts of the hard drive towards the end. Putting the kernel in a seperate /boot ensured that it would be near the start of the disk and always accessible. This is something you don't need to worry about now. The only other advantage, is that you may want to use a filesystem for your root partition which the bootloader might not support. You can keep /boot something generic like ext2 and experiment with your / partition. But if you're not going to do this, there is no real advantage to a seperate /boot.

As for a seperate /home, the big advantage is you can reinstall Linux, without having to wipe your home partition.
 
1 members found this post helpful.
Old 02-22-2013, 10:29 PM   #17
selfprogrammed
Member
 
Registered: Jan 2010
Location: Minnesota, USA
Distribution: Slackware 13.37, 14.2, 15.0
Posts: 635

Rep: Reputation: 154Reputation: 154
He already did almost exactly what I was going to recommend but there are some other issues that are worth my 2 cents.

This concerns single user systems.
I have 15 partitions, but Linux resides entirely on one of them.

It is interesting that some users have tried using a /home that is shared between two versions of Linux. I would not do that because of all the version dependent history and caches kept in hidden directories, so my /home is always with its Linux.

So many recommendations about making partitions separate. The directory structure already is a logical separation that handles most needs. I can move an entire directory from one partition to another, several times, more easily than figuring separate partitions for main directories.
Partitions are not much of a physical separation when the drive dies, or gets too busy.
For the best benefits of separate partitions, they need to be on separate drives.

Several reasons to keep data and programs together.
1. Partitioning forces the heads to move extra distance. This slows up drive accesses more that anything else, I think even more than rotational latency.
2. Splitting data among partitions does not allow the advanced disk allocation code
to operate maximally. It is more constrained by the smaller disk spaces.
3. Do not need to re-partition later to move space from program partition to data partition.
You probably put the swap partition between them for speed reasons.
4. Of course putting the swap at the farthest partition makes for slowest swap paging, so if there is any heavy swapping it needs to be centered.
5. Partitioning is a headache, and unlike directories, is difficult to alter. Parted just makes it easier than entirely starting over.

Reasons to partition:
1. Partition for shared data.
Common data is going to occur. Make a separate partition for data that is shared between windows and Linux. Linux versions can mount and share data in other Linux partitions.
2. Partition for infrequently accessed data.
This also gets used for backing up user space for system upgrades.
3. Partition for alternate or new Linux installation (recommended).
4. To limit disk hogs that cannot be controlled with quota. Quotas do not work well on single user system.
5. /Boot when size, or numbers, or kinds provide adequate reasons.
Boot is separate partition on this one machine because there are 8 boot possibilities and
it would be affected by individual Linux upgrades, as it would if it was on a partition that was going to be wiped.
On another machine, boot is in the Linux partition because it will only have 1 Linux version at a time.
6. Partition for any new Linux version, with its cache, history, and /home directories (because of the hidden directories with cache).
7. /tmp on a separate drive, when speed is needed. Because /tmp files are not discovered upon reboot, I expect there is little conflict in using the same /tmp for several Linux versions. /tmp on a separate partition when space needs to be conserved (but /tmp access will be slower because of extra head travel).
8. Spare partition for unknown reasons and emergencies.

This is incomplete ...
 
1 members found this post helpful.
Old 02-23-2013, 08:10 AM   #18
johnsfine
LQ Guru
 
Registered: Dec 2007
Distribution: Centos
Posts: 5,286

Rep: Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197Reputation: 1197
Quote:
Originally Posted by selfprogrammed View Post
I would not do that because of all the version dependent history and caches kept in hidden directories, so my /home is always with its Linux.
Same here. I also agree with most of the rest of what you wrote, but ...

Quote:
4. Of course putting the swap at the farthest partition makes for slowest swap paging, so if there is any heavy swapping it needs to be centered.
Heavy swapping is an almost entirely obsolete concept. A swap partition is used as a minor optimization to keep stale anonymous memory from competing with active file mappings, and it is a safety valve for situations with unusually high anonymous memory use. Each of those implies the actual transfers to/from swap are rare. All that matters is that the space exists. Farthest partition is fine.

I use a swap partition instead of a swap file so it can be shared between distributions or across a reinstall. (I don't use the feature of suspend to disk, which would change and complicate the decisions regarding swap space).

Quote:
7. /tmp on a separate drive, when speed is needed. Because /tmp files are not discovered upon reboot, I expect there is little conflict in using the same /tmp for several Linux versions. /tmp on a separate partition when space needs to be conserved (but /tmp access will be slower because of extra head travel).
I almost always make /tmp a tmpfs (and allow for that when deciding the swap size).
I haven't run into a situation where the size of /tmp usage is large enough that active data in /tmp goes to/from swap. Stale /tmp data getting written to swap has the same performance characteristics as stale anonymous data written to swap.

File caching works well enough that data frequently read from a file on any partition will stay in ram and not really be read from disk. So a tmpfs is not faster than a normal partition for such things. But for short lived files a tmpfs is much more efficient in creating and destroying the directory info of the file. When a small file is created, written once, read once, and then quickly deleted, the directory operations in a normal file system are a significant fraction of the total work. In a tmpfs, those directory operations are trivial. So a tmpfs has a big advantage if you have such files.

Using ram and a shared swap partition for /tmp has the extra advantage that the space is shared across multiple Linux installs.

When I reinstall Linux, I prefer to shrink (rather than initially destroy) the old one. Then install the new one in its own partition set up to dual boot with the old one. Then I switch back and forth a few times to make sure I understand the changes and didn't forget to restore any settings or customizations I wanted. It is hard to guess what settings need backup before the reinstall. It is easier to copy them from a full shrunken original partition than from a backup.

I keep any very large data files in a data partition. If they ought to appear to be in subdirectories of home, I can soft link them there. That and shared swap etc. (and a large drive) means it is not a tight squeeze to reinstall Linux to a new partition before removing it from the old one.

Last edited by johnsfine; 02-23-2013 at 08:11 AM.
 
Old 02-23-2013, 11:00 AM   #19
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,297

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
I find the unmentioned big advantage of a separate /home is that when installing ideologically different distros like /slackware and the red hat stable, you can do a 'usermod' on one of your users (the one you install on the second distro) and have all your files available from both distros.
Slackware sets up 1000:100 as your first user; Red Hat distros use 500:500. By usermodding, each user
/distro_1/you
/distro_2/You have access to both sets of files. I have landed the 2 lusers on top of each other, but I wouldn't recommend it.
 
  


Reply

Tags
partitioning, partitions



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
benefit of mounting luks encrypted partition at boot Wojk Linux - General 2 11-02-2012 07:57 PM
Using a separate /home partition. Sgt Canuck Linux - General 6 03-10-2009 01:22 PM
Home directory on separate partition Steve W Linux - Newbie 23 03-19-2008 01:51 PM
Home directory on separate partition Steve W Linux - Newbie 5 03-12-2008 12:37 PM
Does anyone here have a separate /root and /home partition? Kramer Linux - General 12 03-17-2004 05:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:53 PM.

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