Move home folder to Separate Disk Partition

Please post suggestions for improvement of Cinnamon here
https://github.com/linuxmint/Cinnamon

Move home folder to Separate Disk Partition

Postby MirrorTorrent on Sat Aug 18, 2012 4:27 am

Just got a new Linux build with Maya and I am trying to customizes it to fit my needs
and the fist thing I need to figure out is how do you move the home
folder too a Separate Disk Partition. I am a new user so still need a formal introduction to the
Terminal I did find this article “Move Your Home Directory To Separate Disk Partition”
http://joshua14.homelinux.org/blog/?p=660
but maybe a little advance for me and I cant afford to do the reinstall/update every time I screw
up. so dose any buddy have a easier way to move a the home folder, don't tell me it is not as easy as replacing the shortcuts,
thank you for any help you can provide
Processor: 8x Intel Core i7-3770 CPU 3.40GHz
Memory: 7865MB
Operating System: Linux Mint 13
Motherboard: Asus Sabertooth Z77
Network controller: Realtek RTL8188CE 802.11b/g/n
Video Card: EVGA 9800 GTX
Resolution: 1920x1080 pixels(16:9) + 1680x1050(16:10)
MirrorTorrent
Level 1
Level 1
 
Posts: 10
Joined: Fri Aug 17, 2012 8:13 pm
Location: Westminster MD, USA

Linux Mint is funded by ads and donations.
 

Re: Move home folder to Separate Disk Partition

Postby cwsnyder on Sat Aug 18, 2012 5:12 am

The absolute easiest way is to copy your /home to an external hard drive, then re-install Mint with this time setting up a separate partition designated for /home, that is, create your / partition of at least 40G, a 3G (or so) swap partition, and the rest of the drive dedicated to your /home partition, which you will have to do as a custom installation. Mint, by default does not set up a separate /home partition. You can setup your partitions separately to the installation from the Live CD using Gparted in the System sub-menu. If you are attempting to install Mint as a dual (or triple) boot with Windows and use GRUB to select the operating system, the instructions will be a little more complicated. After you re-install Mint, just copy the old version of the /home folder to your new /home partition.
LMDE Mate 64-bit, LM16 Mate 64-bit
Debian Xfce 64-bit, Xubuntu 13.10 64-bit, Xubuntu Trusty Tahr 64-bit, Antergos Xfce 64-bit, PCLinuxOS LXDE 64-bit
cwsnyder
Level 6
Level 6
 
Posts: 1039
Joined: Wed Oct 20, 2010 6:49 am
Location: Nappanee, IN, USA

Re: Move home folder to Separate Disk Partition

Postby squeezy on Sat Aug 18, 2012 11:29 am

Edit: Removing stupid remark.
Last edited by squeezy on Sun Sep 02, 2012 1:17 am, edited 2 times in total.
squeezy
Level 5
Level 5
 
Posts: 567
Joined: Thu Feb 23, 2012 2:05 pm
Location: The Land of Enchantment

Re: Move home folder to Separate Disk Partition

Postby MirrorTorrent on Sun Aug 19, 2012 5:46 am

WOW... Thank you for the detailed reply. Unfortunately I already installed, running Mint and using it to write this post, its this home folder problem that prevents me from using it the way i want to, If re-installing is the only way it can be done then I guess that's what
I will have to do (Very slow crappy internet here) its just that it will cost me a day or two.

what I am looking for is to use my SSD(64GB) as a OS drive (or C:/ drive for windows) and have one of my HHD (500GB) to automatically mount on boot (D:/ drive). This is to put my OS and Files/Setting on different partition different drives. Is so easy done on windows I thought it was stander on customs that geeks build I would have though that any distro would have already made that UI change to make it easily set, I always have two drives in all my computers, I installed Windows 95' enough to learn that the hard way.

Well thank you for you're help, I hope I made it clear on what I want I hated for you to write all that up and not be what I was asking for. As for the second drive I have it formatted to EXT4 and is named "/home". Again THANK YOU!
Processor: 8x Intel Core i7-3770 CPU 3.40GHz
Memory: 7865MB
Operating System: Linux Mint 13
Motherboard: Asus Sabertooth Z77
Network controller: Realtek RTL8188CE 802.11b/g/n
Video Card: EVGA 9800 GTX
Resolution: 1920x1080 pixels(16:9) + 1680x1050(16:10)
MirrorTorrent
Level 1
Level 1
 
Posts: 10
Joined: Fri Aug 17, 2012 8:13 pm
Location: Westminster MD, USA

Re: Move home folder to Separate Disk Partition

Postby cwsnyder on Sun Aug 19, 2012 6:40 am

What you need to do is to designate your 64G SSD as your / partition, then have the HDD with a swap partition and the rest as your /home partition.

Again, this is fairly easy to set up, but not automatic.
LMDE Mate 64-bit, LM16 Mate 64-bit
Debian Xfce 64-bit, Xubuntu 13.10 64-bit, Xubuntu Trusty Tahr 64-bit, Antergos Xfce 64-bit, PCLinuxOS LXDE 64-bit
cwsnyder
Level 6
Level 6
 
Posts: 1039
Joined: Wed Oct 20, 2010 6:49 am
Location: Nappanee, IN, USA

Re: Move home folder to Separate Disk Partition

Postby MirrorTorrent on Sun Aug 19, 2012 5:00 pm

OK. Sounds easy enough and I don't have to re-install?
I would do this under the "disk utility" program and
"Edit File system Label" Change the OS partition on
64G SSD from "file system" to "/ partition"
Do I leave the Swap and Extended as they are?
HDD will be 95% "/home" with 5% swap
something like this? did i get it right?
and all this is labels and definitions for Mint?
Attachments
Drive as they are now.png
Drive as they are now.
Drive as they are now.png (170.63 KiB) Viewed 11931 times
Processor: 8x Intel Core i7-3770 CPU 3.40GHz
Memory: 7865MB
Operating System: Linux Mint 13
Motherboard: Asus Sabertooth Z77
Network controller: Realtek RTL8188CE 802.11b/g/n
Video Card: EVGA 9800 GTX
Resolution: 1920x1080 pixels(16:9) + 1680x1050(16:10)
MirrorTorrent
Level 1
Level 1
 
Posts: 10
Joined: Fri Aug 17, 2012 8:13 pm
Location: Westminster MD, USA

Re: Move home folder to Separate Disk Partition

Postby MirrorTorrent on Mon Aug 20, 2012 1:49 am

here is what I did so far downloaded Gparted and edit the HHD now Labeled "/home" with a swap no Extended.
as for the main drive all I have to do is change the label to "/partition", should I do this on the
live CD or in the OS is fine after that I should be good to go? I hope. MAYA will see a drive Label
"/home" and save every thing to my home folder.

Sorry if I am acting slow but I have used Gparted to format the wrong drive before and
I just got this PC to do duel monitors, Every thing is working great this being my first
Linux build as long as Cinnamon can stop crashing, I can move on to the projects

Again think you for your help!
Attachments
this is the HHD.png
this is the HHD.png (169.6 KiB) Viewed 11918 times
Processor: 8x Intel Core i7-3770 CPU 3.40GHz
Memory: 7865MB
Operating System: Linux Mint 13
Motherboard: Asus Sabertooth Z77
Network controller: Realtek RTL8188CE 802.11b/g/n
Video Card: EVGA 9800 GTX
Resolution: 1920x1080 pixels(16:9) + 1680x1050(16:10)
MirrorTorrent
Level 1
Level 1
 
Posts: 10
Joined: Fri Aug 17, 2012 8:13 pm
Location: Westminster MD, USA

Re: Move home folder to Separate Disk Partition

Postby austin.texas on Mon Aug 20, 2012 6:57 am

MAYA will see a drive Label "/home" and save every thing to my home folder.

This is definately not the way it works. The label is not critical to any operating function. Your label could be "Abraham Lincoln" and it wouldn't affect anything.
Setting a separate drive as /home is a bit more complicated than that.
See these instructions http://embraceubuntu.com/2006/01/29/move-home-to-its-own-partition/
Mint 17 v2 Cinnamon (64 bit), Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Microsoft-free environment since 1996

To help Linux Mint with a donation, please visit http://www.linuxmint.com/donors.php
User avatar
austin.texas
Level 10
Level 10
 
Posts: 3309
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: Move home folder to Separate Disk Partition

Postby austin.texas on Mon Aug 20, 2012 7:38 am

Mint 17 v2 Cinnamon (64 bit), Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Microsoft-free environment since 1996

To help Linux Mint with a donation, please visit http://www.linuxmint.com/donors.php
User avatar
austin.texas
Level 10
Level 10
 
Posts: 3309
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: Move home folder to Separate Disk Partition

Postby mintybits on Mon Aug 20, 2012 8:15 am

I like to use rsync. :)

First, back up any critical data somewhere safe. There is always a small chance of deleting all or part of your system.

Boot live CD/USB (don't do this running the OS whose /home you want to copy)
Identify/create a partition of your separate /home. Format it ext4.
Mount the root partition and the new home partition (in this example sda1 is root and sdb3 is the new home partition)
Code: Select all
sudo mkdir /mnt/root /mnt/newhome
sudo mount /dev/sda1 /mnt/root
sudo mount /dev/sdb3 /mnt/newhome

Then copy your /home over
Code: Select all
sudo rsync -vaxHAX /mnt/root/home/ /mnt/newhome/

This will take some time and you can see the progress. You can interrupt it at any time and simply re-run the rsync command to make it start again from where it left off.
The trailing / on /mnt/root/home/ is critical!
Once finished, visually inspect /mnt/newhome to make sure it looks right. "ls /mnt/newhome" and "ls /mnt/root/home" should look identical.

Finally, identify the UUID number of newhome and make an entry in fstab to mount it at boot. Find out the UUID number of the newhome partition
Code: Select all
sudo blkid

And add this UUID to fstab
Code: Select all
gksudo gedit /mnt/root/etc/fstab

and add a line such as
Code: Select all
UUID=014f2bd7-fc54-43b7-a067-77a42cacedc4      /home           ext4    defaults               0       2

Obviously, use your partition's UUID number.

Then reboot your OS. Open a terminal and type
Code: Select all
mount

and check that /dev/sdb3 is mounted at /home

You are done except that the original /home contents are still in your root partition and are wasting disk space. So again boot from live CD/USB, mount the root partition and delete the original /home directory.
mintybits
Level 5
Level 5
 
Posts: 836
Joined: Fri Jan 27, 2012 5:09 pm

Re: Move home folder to Separate Disk Partition

Postby MirrorTorrent on Tue Aug 21, 2012 5:13 am

OK this sounds more like the Linux that I barely know, More command and less UI. Thank you Mintybits Ill give this a try and see if end up having to re-install. What little i understand from the
commands that you suggest it look like i am moving some files in the command line, I take it that I wont have to re-install unless i screw up.

Would it matter if there is little syncing going on? I have nothing in the home folder yet.
What is UUID? And where can I look that up? I know it pertains to the HHD,

Mintybits, if I end up re-installing could I assign the home folder like cwsnyder suggested?

Thanks for the help!
Processor: 8x Intel Core i7-3770 CPU 3.40GHz
Memory: 7865MB
Operating System: Linux Mint 13
Motherboard: Asus Sabertooth Z77
Network controller: Realtek RTL8188CE 802.11b/g/n
Video Card: EVGA 9800 GTX
Resolution: 1920x1080 pixels(16:9) + 1680x1050(16:10)
MirrorTorrent
Level 1
Level 1
 
Posts: 10
Joined: Fri Aug 17, 2012 8:13 pm
Location: Westminster MD, USA

Re: Move home folder to Separate Disk Partition

Postby mintybits on Tue Aug 21, 2012 8:06 am

MirrorTorrent wrote:OK this sounds more like the Linux that I barely know, More command and less UI. Thank you Mintybits Ill give this a try and see if end up having to re-install. What little i understand from the
commands that you suggest it look like i am moving some files in the command line, I take it that I wont have to re-install unless i screw up.

No, you don't have to reinstall anything and you won't screw up.

Would it matter if there is little syncing going on? I have nothing in the home folder yet.

No. There are some hidden files that will be there. It may only take a few seconds.

What is UUID? And where can I look that up? I know it pertains to the HHD,

Every filesystem has a UUID (Universally Unique IDentifier) that, in the case of linux is a 32 digit hexadecimal number. It is randomly generated each time you format a partition. The idea is that when an OS boots it can scan your devices to find the correct filesystem to mount. This is more reliable than scanning for a partition name like sdb4 because sometimes the partition names can change (such as when you add more disks or change the disk connector or move a partition).
So your /etc/fstab file normally refers to filesystems by their UUID number.

You can list all the UUIDs of all the filesystems with the terminal command
Code: Select all
sudo blkid

and you can cut and paste the UUID into fstab.

Mintybits, if I end up re-installing could I assign the home folder like cwsnyder suggested?

I think so. But you won't need to reinstall. 8)

In your case, your root partition is shown as /dev/sdd1 and your new home is /dev/sdb1. When you boot live CD/USB check these again in case they have changed. With some systems the device names change depending on which OS on which device you booted.
mintybits
Level 5
Level 5
 
Posts: 836
Joined: Fri Jan 27, 2012 5:09 pm

Re: Move home folder to Separate Disk Partition

Postby MirrorTorrent on Sat Sep 01, 2012 11:55 pm

Hay guess what! I screwed up now it boots to a black screen, I have below what i past in and what I got back I cant make heads or tails of it, maybe you can? it all happen quit so i don't think i formatted the root drive maybe just lost the directory? think i can get it back?

Help me! MintyBits Help me! YOUR MY ONLY HOPE


sudo mkdir /mnt/root /mnt/newhome
sudo mount /dev/sdd1 /mnt/root
sudo mount /dev/sdb1 /mnt/home

sudo rsync -vaxHAX /mnt/root/home/ /mnt/home/

/dev/sdb1: LABEL="/home" UUID="a82308f8-c0e9-4fb5-8145-92578432f2a9" TYPE="ext4"

gksudo gedit /mnt/root/etc/fstab

UUID="a82308f8-c0e9-4fb5-8145-92578432f2a9" /home ext4 defaults 0 2
Processor: 8x Intel Core i7-3770 CPU 3.40GHz
Memory: 7865MB
Operating System: Linux Mint 13
Motherboard: Asus Sabertooth Z77
Network controller: Realtek RTL8188CE 802.11b/g/n
Video Card: EVGA 9800 GTX
Resolution: 1920x1080 pixels(16:9) + 1680x1050(16:10)
MirrorTorrent
Level 1
Level 1
 
Posts: 10
Joined: Fri Aug 17, 2012 8:13 pm
Location: Westminster MD, USA

Re: Move home folder to Separate Disk Partition

Postby MirrorTorrent on Sun Sep 02, 2012 4:28 am

Too late, In prep I hit the wrong key and now doing a install (the night is shot for internet) oh well, I think I set up the portions so I do get what I want.

Note to self: must learn more about terminal so don't have to keep re-installing, This marks the 6th time,
Processor: 8x Intel Core i7-3770 CPU 3.40GHz
Memory: 7865MB
Operating System: Linux Mint 13
Motherboard: Asus Sabertooth Z77
Network controller: Realtek RTL8188CE 802.11b/g/n
Video Card: EVGA 9800 GTX
Resolution: 1920x1080 pixels(16:9) + 1680x1050(16:10)
MirrorTorrent
Level 1
Level 1
 
Posts: 10
Joined: Fri Aug 17, 2012 8:13 pm
Location: Westminster MD, USA

Re: Move home folder to Separate Disk Partition

Postby mintybits on Mon Sep 03, 2012 2:56 pm

Hi. I've been away for the last few days. How's progress?
mintybits
Level 5
Level 5
 
Posts: 836
Joined: Fri Jan 27, 2012 5:09 pm

Re: Move home folder to Separate Disk Partition

Postby MirrorTorrent on Fri Sep 07, 2012 5:26 am

well I did end up doing a restall, I did get what I want. Now moving forward in a list of projects that will take the rest of the year to do, know any tricks for a 800 CD batch ripping Like BPpowerAmp?, NO? that's OK...

799 CD's on the wall,799 CD's on the wall,
take one down rip it and now you have
798 CD's on the wall,798 CD's on the wall,
take one down rip it and now you have
797 CD's on the wall...
Processor: 8x Intel Core i7-3770 CPU 3.40GHz
Memory: 7865MB
Operating System: Linux Mint 13
Motherboard: Asus Sabertooth Z77
Network controller: Realtek RTL8188CE 802.11b/g/n
Video Card: EVGA 9800 GTX
Resolution: 1920x1080 pixels(16:9) + 1680x1050(16:10)
MirrorTorrent
Level 1
Level 1
 
Posts: 10
Joined: Fri Aug 17, 2012 8:13 pm
Location: Westminster MD, USA

Re: Move home folder to Separate Disk Partition

Postby BillV on Sun Oct 20, 2013 3:28 am

boot with a live CD with GParted, resize the Home partition, create new partition in the free space, install the OS in the new partion, do not format the home partition, you can always install the whole enchilada in the new partition, then mount the home partition in by pointing the root/home to it,same as you would if creating a separate partition for /var
BillV
Level 1
Level 1
 
Posts: 10
Joined: Sat Jul 14, 2012 2:54 pm

Re: Move home folder to Separate Disk Partition

Postby ben2talk on Mon Feb 17, 2014 8:26 am

MirrorTorrent wrote:OK. Sounds easy enough and I don't have to re-install?
I would do this under the "disk utility" program and
"Edit File system Label" Change the OS partition on
64G SSD from "file system" to "/ partition"
Do I leave the Swap and Extended as they are?
HDD will be 95% "/home" with 5% swap
something like this? did i get it right?
and all this is labels and definitions for Mint?


Actually, you'll start with ROOT which is /
This contains 'initrd.img' 'initrd.img.old' and 'vmlinuz' files and then more folders....
/home and /media are ones you'll visit most often. I set disks to mount in /media - but a fresh mint install sets them in /media/home/ben or something weird like that... can't remember, fixed it last week... /media/Storage is fine and doesnt upset my shortcuts.

/usr is a biggie - any properly installed wallpapers n themes n fonts are in there, in the /share folder. Keep that backed up whenever you can, reinstalling means copying that straight back home!

If you're doing it manually, research 'install linux ssd' first. Some things are best kept off the SSD.
Personally I don't keep my Pictures or Music there, if my wife wants to use Windows I want to be able to access stuff - and /home shouldn't be NTFS because Linux runs faster using it's own ext4 (looking forwards to BTRFS coming soon... ish).... and it's easy enough to remap system shortcuts for Pictures/Documents etc...

If you're exporting your /home directory, I'd be sure to send it to an NTFS partition - it helps with permission problems when you re-import them. If you're going to install to SSD, I also read that you need to think about customising your choice of folder locations. I don't have an SSD, but I certainly don't keep many documents in /home any more.... my big folders (for Music, Pictures etc) permanently sit on my 2GB Green disk - accessible to both Linux and Windows installations. It's easy to map your default 'Music' and 'Pictures' shortcuts to these new locations too. No need to copy everything to the 'system' home directory is there? unless you want a separate '****' and 'dirty secrets' folder.... Then when you fire up Banshee, just select your /media/Storage disk and select the folder you actually want Banshee to handle.

Take great care re-importing stuff to /home. Show all your hidden files, and only import what is really necessary.
ben2talk
Level 1
Level 1
 
Posts: 39
Joined: Tue Jun 28, 2011 12:46 am

Re: Move home folder to Separate Disk Partition

Postby wanthai on Wed Apr 02, 2014 11:17 am

Hope to find some help here. I am a newbee to Linux, so bear with me.

I have made an installation on my Latitude DELL D510. It is Mint petra cinnamon ed. :D
Now I would like to part my 34 GB dis ( aprox. 18-20 GB for root and the rest for /home). :D
I use GPARTED in grafik mode :D
But the partitons are locked and I am not allowed to part it. I have made an LMV when I installeed the OS. :cry:
Can anyone help me? :(
wanthai
Level 1
Level 1
 
Posts: 6
Joined: Sat Jun 29, 2013 7:29 pm

Re: Move home folder to Separate Disk Partition

Postby wanthai on Fri Apr 04, 2014 9:37 am

wanthai wrote:Hope to find some help here. I am a newbee to Linux, so bear with me.

I have made an installation on my Latitude DELL D510. It is Mint petra cinnamon ed. :D
Now I would like to part my 34 GB dis ( aprox. 18-20 GB for root and the rest for /home). :D
I use GPARTED in grafik mode :D
But the partitons are locked and I am not allowed to part it. I have made an LMV when I installeed the OS. :cry:
Can anyone help me? :(

Never mind. I opened my computer with my usb-pen and made the changes I wanted. Ufortunately it formated all the disk, but that I had expected, so I made a new installation of Mint16.
I do now hav parted my disk sa this:

Swap 2 GB / 20 GB and the rest is /home. That works fine.
wanthai
Level 1
Level 1
 
Posts: 6
Joined: Sat Jun 29, 2013 7:29 pm

Linux Mint is funded by ads and donations.
 

Return to Cinnamon

Who is online

Users browsing this forum: No registered users and 5 guests