LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 03-07-2009, 05:51 AM   #1
Sgt Canuck
LQ Newbie
 
Registered: Mar 2009
Location: Argentina
Distribution: Xubuntu 8.10, Dreamlinux 3.5 and Debian Lenny
Posts: 26

Rep: Reputation: 15
Using a separate /home partition.


Hi Folks, this thread comes about because of a post I made and a question asked in another thread.

A partial quote of what I said:

Quote:
I've also learned that for as many times as I've broken Linux, or upgrades, and security releases have broken Linux. I have not lost one single byte of information since I have started running it. The key secret is: Put your /home on a separate partition!. I can't possibly stress that more to new people coming to Linux.
and a response:

Quote:
Originally Posted by measekite View Post
Would you please post the detailed steps on how to do this?
Giving a "detailed" post on how to do it is impossible because of the differences between installers.

I've only installed two distros, the second being Dreamlinux just a few days ago, the other *buntu. I use *buntu because I've installed Ubuntu and Xubuntu but they are the same distro. Both, *buntu and Dreamlinux, allow for a user to create a seperate /home partition on install.

In the case of Dreamlinux which has more than one installer, DL Inatall, uses partitions already created. So with gParted in Xubu, I created two partitions in an extended partition since I had free space on my drive, one 20GB, one 91GB. Then when I ran DL Install I "selected" the 20GB partition for /(root) and the 91GB for /home, the third partition I selected was the existing /swap to be used. Linux only needs 1 /swap per machine.

The other installer in Dreamlinux that I looked at was OEM Install, which will install DL using a complete hard drive. Take care, it will wipe out all other info if the drive is in use. But it also allows the user to install /(root) and /home separate with a /swap.

Ubuntu, LiveCD and Alternate CD's give you the option withing the install process to use gParted and create, format and use partitions for various purposes /, /home and /swap being three options. It also allows a users to add access to a second drive or other partitions by manually entering info. For example my second drive is entered manually as /media/Data - DO NOT Format as data exists there.

If you are using *buntu, and have your /home partition on the same partition as your /(root) partition now, there is a very nice HowTo to move it to it's own partition on psychocats.net: Create a separate home partition in Ubuntu. I had to use that after my first install of Ubuntu to get /home away from the /(root) system. As a new user it was a scary thing to do, but it did work.

I'm sure if you ask in another thread, in the right area here, or in the forums of your OS choice, you could get detailed information on how to move it. If you had a second hard drive NOT in use it would be really easy. Copy the contents of your /home directory to it.
EX: mine is /home/bruloo so everything I find in /bruloo I'd copy to the second drive. Then I'd re-install the OS, telling it to use what exists now for /(root) for /(root) and point it to the second drive where I copied /home and tell it to use that for /home - DO NOT FORMAT IT. BINGO! Your done! Of course then you'd have a really large /(root) partition.

Maybe we can get some other people using other distributions to explain how to accomplish this while installing.

The floor is open to discussion.

Have a nice day.
Bruce
 
Old 03-07-2009, 08:51 AM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
The general answer is to opt for manual partitioning so that you control the process and not the installer. Make sure you don't format the old /home partition.

When I fresh install over an older distribution, I will rename my home directory adding `-bu' to its name before booting up the install disk. After the installation, I will copy files I want from the old *-bu directory to the new one. Some distro's use different ranges for the UIDs so it may be necessary to chown the file in the old home directory.
 
Old 03-07-2009, 09:08 AM   #3
SilverBear2006
Member
 
Registered: Oct 2006
Location: Great Lakes region, North America
Distribution: Mepis 7.0, Mepis 8.0, ArchLinux, Pardus 2008, Kubuntu 8.04, Ubuntu 8.10
Posts: 69

Rep: Reputation: 16
Thumbs up

Good advice, Bruce,

It can save a lot of tinkering at reinstall time if all the user configuration files for your most-used programs are safe in a separate partition.
I think most distros now give you the option to install /home on a separate partition. If not, or if you didn't do it at instalation and want to do it now, see Daniel Robbins's tute on moving your /home:
http://www.funtoo.org/en/articles/linux/partitioning/1/


I especially endorse the notion of keeping one's other data in dedicated partitions. I have a couple HDDs that are divided into 15 separate data partitions: one for music, one for vids, one for filesharing uploads/downloads, one for my webdev projects, etc. Plus a few empty partitions for backups.

The beauty of GNU/Linux is that I can arrange all those partitions to act as if they were subdirectories within my /home/user directory. By using symbolic links, a very small /home/user partition can be the "command centre" directory to terabytes of data on other hard disk drives.

For setting up data partitions to automatically mount at boot time and be sym-linked into your /home/user directory, see:
http://sblinux.org/pages/symlink-home.html
 
Old 03-09-2009, 12:06 AM   #4
opensuse4life
Member
 
Registered: Nov 2008
Distribution: openSUSE 11.1
Posts: 36

Rep: Reputation: 16
Ah, the beauty of separate partitions. My setup is a bit different, being that I use /media instead of /home/me as command central. The big reason being my wife and I both use this computer, so having a central shared location for common files like music, video, etc makes sense. Automated scripts keep files permissions at group read/write, so either party can view or change data.
We still have a separate /home partition, where one can keep files that are of no interest to the other. It's also useful for keeping evidence of an upcoming anniversary gift away from a pretty set of wandering eyes

So far it's been mentioned that keeping personal files in a separate partition is a great way to simplify re-installation, installing a new version or changing distros. So what's good about the sub-separation of your data into multiple partitions? One reason is it makes life easier in the event of corrupt data. Let's face it, storage media does not last forever. Hard disks fail, and even the new solid state mediums can go bad. If you have one or just a few partitions holding data for everything and a few sectors go bad, typical fragmentation on a partition can mean damaged data will vary greatly. With many categorized partitions, you can zero in on the damage zone, know what partition it's on, and then know where to expect corruption. This shouldn't replace frequent backups, but for those times you just haven't "got to it yet", it saves you a huge headache.
 
Old 03-10-2009, 05:58 AM   #5
Sgt Canuck
LQ Newbie
 
Registered: Mar 2009
Location: Argentina
Distribution: Xubuntu 8.10, Dreamlinux 3.5 and Debian Lenny
Posts: 26

Original Poster
Rep: Reputation: 15
As a side note I'd like to point to a post I made on the Dreamlinux forums. Since I did mention in my first post that it was the second "distro" I've installed, and the installer there is "different" to what I'm used to with *buntu. Different but really great, simple, efficient and affective.

Read about that test I did here: My DL Installer Guide; for first time Linux Installs.

I'd also like to point out that I've only got a couple of years under my Linux belt and my computer needs are simple, as I'm retired. I only "need" email and access to online banking. After that it's all gravy, so /, /home and /swap are perfect for me. As it sits: / = 3.54GB, /home = 2.2GB and /swap is 0B, No swap%

I've heard that if you install a virtual machine you'd definitely want a large separate /var partition as well. I wonder how many "new" to Linux users will need that? By the time one gets to that stage, they have some Linux under their belt and because of their need will find the answers.

I've found any Linux forums I'm on to be a "gold mine of information" and have "almost" (hey, I am human) come to the realization that: search first ask second always gets results. Why almost? Simple, sometimes I feel rushed, and ask first and search second. And wouldn't you know it, Murphy is there, 90% of the time the search finds what I want before the answer appears.

Have a nice day.
Bruce
 
Old 03-10-2009, 12:24 PM   #6
ErV
Senior Member
 
Registered: Mar 2007
Location: Russia
Distribution: Slackware 12.2
Posts: 1,202
Blog Entries: 3

Rep: Reputation: 62
Quote:
Originally Posted by SilverBear2006 View Post
It can save a lot of tinkering at reinstall time if all the user configuration files for your most-used programs are safe in a separate partition.
It is not necessary to store data on separate partition. You can keep old data if you skip formatting of / during (re)installation of your distribution and instead clean old files (everything except /home and perhaps /etc) manually.
 
Old 03-10-2009, 01:22 PM   #7
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,141

Rep: Reputation: 329Reputation: 329Reputation: 329Reputation: 329
As an alternative suggestion, note that you can symlink directories to other directories, so, for example, if you and some "significant other" wanted to share your "Pictures" directory, you could create a partition called, say, "/Shared," and do a ln -s /Shared/ ~/Pictures/ to make the "Pictures" directory in your home directory point to the "/Shared" partition.

Of course, as was mentioned, everyone sharing the directory or partition needs to be in the same group, and that group need to have appropriate access to the shared directory. Setting the directory permissions properly should simplify that problem.

I have several distributions installed on this laptop, so I use a symlink to point Thunderbird to a central mail directory. That way I see the same mail on any of the distribution I'm using. (The only tricky part is the above mentioned default userid number, but it's trivial to use the user manager to set all the user ids on each distribution to the same number. Just remember to chown all files owned by the old number so they'll be owned by the new number, and remember to also change the primary group number.)
 
  


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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
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
Home directory on separate partition Steve W Linux - Newbie 2 03-12-2008 12:36 PM
How - Kubuntu Dapper with separate /home partition Optiker Linux - Newbie 20 01-21-2007 05:20 PM
Does anyone here have a separate /root and /home partition? Kramer Linux - General 12 03-17-2004 05:52 AM


All times are GMT -5. The time now is 04:08 PM.

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