[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Home Directory on External Drive



On Thu, Mar 22, 2007 at 04:38:19PM +0530, Masatran, R. Deepak wrote:
> I want to keep my home directory on an external drive and move it between
> computers as required.
> 
> 1. It is asking for super-user privileges to mount it. How can I avoid this?
> 

Make sure you have it set to user in your fstab.

# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
proc            /proc           proc    defaults        0       0
/dev/sda1       /               ext3    defaults,errors=remount-ro 0
1
/dev/sda3       /home           ext3    defaults        0       2
/dev/sda2       none            swap    sw              0       0
/dev/scd0       /mnt/cdrom   udf,iso9660 user,noauto     0       0
/dev/sdb1       /mnt/usb        vfat    user,noauto     0       0

noauto is for drives that you don't want automatically mounted, like
CDs and thumb drives.

>
> 2. Should I place "/home/masatran", or "/home", on the drive?
> 

The drive's / is /home. So the folders on the drive (As far as I know)
should be your home folders, for example the drive if mounted as root
would look like:

foo@bar:~$ ls /
michael  pobega  masatran  mom
dad      susie   geoffrey

>
> 3. How can I get it to use the external drive as my home directory during
> login, for the application data, etc.?
>

That's a bitch, because if the drive isn't connected you may run into
problems. I'm guessing though, that the external is /dev/sdb, and the
partition is 1, so you might want to add this to your /etc/fstab file:

/dev/sdb1	/home	ext3	defaults

That should attempt to mount your external drive. Although personally
I would do it by UUID since it is external, and if you have a thumb
drive / multiple external drives  inserted into your computer that
could mess you up while booting.

>
> 4. I read somewhere that the external drive must be named for the links to
> remain permanent. Is this correct? How do I name it?
>

That's what a UUID is for. A UUID is a specific ID that each drive
has, so that you don't have to use the device name. For example, if
you have two CD drives and they're each being picked up as /dev/scd0
and /dev/scd1, but which drive is which is alternating between boots,
you may want to use the device's UUID instead of it's /dev/* device
name. The only reason /dev/* is good is because it's human readable,
as opposed to UUIDs. But as long as you don't go overboard with your
external drives you should be fine with one or two UUIDs.



Reply to: