Choose style:

Author Topic: Changing my home directory to an external usb drive  (Read 2945 times)

0 Members and 1 Guest are viewing this topic.

Offline rmcellig

  • Member
  • ***
  • Posts: 205
  • Karma: 13
  • New Forum User
    • View Profile
Changing my home directory to an external usb drive
« on: June 11, 2015, 06:10:09 pm »
At the moment, I have a partition on my internal drive designated as my home directory. I want to see if I can use my external USB drive instead. Is it just a matter of changing the UUID in my fstab file and rebooting my machine?

Code: [Select]
randy@pep6 ~ $ sudo blkid
[sudo] password for randy:
/dev/sda1: LABEL="lxle" UUID="b6000094-7a5c-4c22-a062-da1cc837083b" TYPE="ext4"
/dev/sda2: UUID="6c89c566-13c5-4640-9bbb-31a8bb55c84d" TYPE="swap"
/dev/sda3: LABEL="home" UUID="46f2c656-06e6-4f0f-9e78-42f02f9fbaff" TYPE="ext4"
/dev/sda4: UUID="cb071943-83c5-4eb9-9029-aab3073b6ba1" TYPE="ext4"
/dev/sdc1: LABEL="stuff3" UUID="01490c69-d54d-4b3c-86e9-8e36e1a3f862" TYPE="ext4"


Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26313
  • Karma: 2855
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Changing my home directory to an external usb drive
« Reply #1 on: June 11, 2015, 06:29:34 pm »
see here:
https://help.ubuntu.com/community/Partitioning/Home/Moving
about how to move a home partition to another drive

BUT

I wouldn't advise putting it on an external drive unless it's ALWAYS going to be attached.
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline rmcellig

  • Member
  • ***
  • Posts: 205
  • Karma: 13
  • New Forum User
    • View Profile
Re: Changing my home directory to an external usb drive
« Reply #2 on: June 11, 2015, 07:04:16 pm »
I'm trying this out on my Lenovo T60 which I use as a test computer to learn Linux. My laptop is stationary. I never take it with me anywhere and the external drive will always be plugged in and backup up as well.

Offline rmcellig

  • Member
  • ***
  • Posts: 205
  • Karma: 13
  • New Forum User
    • View Profile
Re: Changing my home directory to an external usb drive
« Reply #3 on: June 11, 2015, 08:23:32 pm »
My Lenovo T60 came with a 100GB drive. If I could replace it with a 1TB drive that would be great and I wouldn't have to use an external HD for my home directory.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26313
  • Karma: 2855
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Changing my home directory to an external usb drive
« Reply #4 on: June 11, 2015, 09:07:41 pm »
OK if this is simply about file storage there are better options than moving the whole /home partition to the external HDD

Like moving the system folders such as "Documents" "Downloads", "Music" (probably best not to move "Desktop") to the external drive then symlinking to them from your home folder.
That way if the external drive is offline at least you should be able to boot to a working system.

Just a thought .. this has recently been discussed on this forum somewhere as a way to make changing distros easier too.
« Last Edit: June 11, 2015, 09:09:43 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline rmcellig

  • Member
  • ***
  • Posts: 205
  • Karma: 13
  • New Forum User
    • View Profile
Re: Changing my home directory to an external usb drive
« Reply #5 on: June 11, 2015, 09:11:19 pm »
Thanks. Something to think about.

Offline AndyInMokum

  • Global Moderator
  • Hero
  • *****
  • Posts: 4808
  • Karma: 1013
  • "Keep on Rockin' in the Free World"
    • View Profile
  • Peppermint version(s): PM 9 & PM 8 Respin-2 (64-bit)
Re: Changing my home directory to an external usb drive
« Reply #6 on: June 12, 2015, 01:44:07 am »
Hi rmcellig, here's the link to the excellent tutorial that, Slim.Fatz  wrote about making a DATA partition with symlinks: How To: Use symlinks to a DATA partition.  You're at an ideal juncture of your build to do this.  I highly recommend this technique for any serious user of a Linux/GNU desktop computer.  It'll keep your critical data separate from your OS.  This is great if you need to do a reinstall for any reason.   It'll also make upgrading your system to a new release, or doing a bit of Distro Hopping an absolute breeze.  It's really worth every bit of the extra effort  ;).
« Last Edit: June 12, 2015, 01:50:30 am by AndyInMokum »
Backup! Backup! Backup! If you're missing any of these -  you ain't Backed Up!
For my system info please L/click HERE.

Offline rmcellig

  • Member
  • ***
  • Posts: 205
  • Karma: 13
  • New Forum User
    • View Profile
Re: Changing my home directory to an external usb drive
« Reply #7 on: June 12, 2015, 04:27:04 am »
I think that is the way I have my hd setup. I have a partition for my system, a swap partition and a home partition

Offline Slim.Fatz

  • Trusted User
  • Veteran
  • *****
  • Posts: 1814
  • Karma: 474
  • Where's the mouse?
    • View Profile
  • Peppermint version(s): Peppermint 7, 8.5 & 10 - 64bit
Re: Changing my home directory to an external usb drive
« Reply #8 on: June 12, 2015, 04:51:24 am »
Hi rmcellig,


When you first symlink all of your folders (hidden as well as "normal" visible ones) and then also symlink all files (hidden as well as normal visible ones that are directly in ~ and not in sub-folders, since the sub-folders will already have been symlinked) then your /home is very small and can be scaled down greatly in size with gparted (run from another installed OS or from a live USB -- since you never want to modify a mounted partition!).  ;)


This is probably your best bet rather than putting everything (i.e. your entire /home) onto an external device and deleting the /home from your installed HDD.  8)


Regards,


-- Slim
"Life first -- Peppermint a close 2nd!" -- Zeb

Tread lightly: Fluxbox, JWM, i3, Openbox, awesome

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26313
  • Karma: 2855
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Changing my home directory to an external usb drive
« Reply #9 on: June 12, 2015, 05:09:28 am »
Personally I wouldn't symlink hidden directories and any hidden files in the root of you home directory .. these tend to be things like application configuration files and follders.
it's the moving of these that'll break booting if the external drive is removed .. they're *usualy* not that big either.
(except for .cache and whichever directory(s) contains your web-browser cache(s) .. these may be large but I'd still not advise moving them, and with 100GB to play with there's absolutely no need, hell I'm on a 16GB SSD and te caches don't really get out of hand)

also if you're move then symlink everything, you may as well just move the entire /home partition . thensuffer the consequences if you ever boot without the external HDD attached .. you're effectively doing this anyway.

Just my tuppence :)
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline rmcellig

  • Member
  • ***
  • Posts: 205
  • Karma: 13
  • New Forum User
    • View Profile
Re: Changing my home directory to an external usb drive
« Reply #10 on: June 12, 2015, 05:18:38 am »
I'm going to see if my local computer store has a replacement 1tb drive for my  lenovo t60. This way I can install multiple distros on it to try out.

Offline Slim.Fatz

  • Trusted User
  • Veteran
  • *****
  • Posts: 1814
  • Karma: 474
  • Where's the mouse?
    • View Profile
  • Peppermint version(s): Peppermint 7, 8.5 & 10 - 64bit
Re: Changing my home directory to an external usb drive
« Reply #11 on: June 12, 2015, 05:28:53 am »
I'm going to see if my local computer store has a replacement 1tb drive for my  lenovo t60. This way I can install multiple distros on it to try out.
The possibly BEST solution, rmcellig -- go for it!  8)


Regards,


-- Slim

"Life first -- Peppermint a close 2nd!" -- Zeb

Tread lightly: Fluxbox, JWM, i3, Openbox, awesome

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26313
  • Karma: 2855
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Changing my home directory to an external usb drive
« Reply #12 on: June 12, 2015, 05:53:39 am »
Or that :)

but bear in mind, unless you're going to store a LOT of user files such as films/images/docs/etc (which you could always store on the external drive anyway) then 100GB is PLENTY .. in fact it's a huge amount for a Linux system.

I'm currently using a 16GB SSD ;)
2GB of that is set aside for swap so really I have 14GB
I have all the main stufff installed Firefox/Chrome/WPSoffice/GIMP/Inkscape/Blender/MasterPDF/Xfburn/accounting software (Manager)/and a TON of other tools and utilities (including the kernel headers and build-essential)
I haven't limited the browser cache size
I have all the Peppermint 6 build packages uncompressed for editing (but not the ISO's)
I have tons of pics/docs/etc .. and uncompressed packages and source code I'm testing
and it STILL only uses 64% of my available space (as long as I occasionally remove old kernels and "apt-get clean") .. go figure :)
« Last Edit: June 12, 2015, 06:20:32 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline AndyInMokum

  • Global Moderator
  • Hero
  • *****
  • Posts: 4808
  • Karma: 1013
  • "Keep on Rockin' in the Free World"
    • View Profile
  • Peppermint version(s): PM 9 & PM 8 Respin-2 (64-bit)
Re: Changing my home directory to an external usb drive
« Reply #13 on: June 12, 2015, 07:05:07 am »
I think that is the way I have my hd setup. I have a partition for my system, a swap partition and a home partition

A seperate DATA partition is different to just having a Home partition.  You move not copy, all of your critical data to the DATA partition.  These are your Documents, Pictures, Music, Videos, AudioBooks etc.  I also move as ROOT my: /usr/share/pixmaps and /usr/share/peppermint/wallpapers.  I find these always useful to preserve.  In your Home folder that has been shrunk to around 20 GB.  You really won't need anything larger.  You create symlinks to the corresponding folders in your DATA partition.  For the folders moved as ROOT.  You make the symlinks to these folders from the original location of these folder.  You can also prior to moving folders to your DATA partition, format it to NTFS.  This way it can be shared with Windows on a dual boot system.  When it comes to upgrading or moving to a new distro.  You can install over your existing OS while leaving the DATA partition untouched.  After the new installation is complete.  It's a 10 minute job to edit the fstab file and create new symlinks - boom!  You're up and running, without the necessity of transferring any folders and files.  Before doing this.  It's still very important you do a full backup of your critical data.  It's better to be safe than sorry!  Are you seeing the huge advantages of having a separate DATA partition  ;)?
Backup! Backup! Backup! If you're missing any of these -  you ain't Backed Up!
For my system info please L/click HERE.

Offline rmcellig

  • Member
  • ***
  • Posts: 205
  • Karma: 13
  • New Forum User
    • View Profile
Re: Changing my home directory to an external usb drive
« Reply #14 on: June 12, 2015, 08:06:07 am »
Yes. It's finally sinking in. :)