VectorLinux
September 23, 2014, 04:03:57 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: Shared Home partition  (Read 2193 times)
kedarm
Member
*
Posts: 28


« on: March 22, 2009, 08:48:27 pm »

Hi!

I use Ubuntu and am installing Vector Linux 6.0 (Light). It is my first time with Vector Linux.

While reading the installation guide, I saw that it expects us to have a separate home partition or place the home partition on the root. Now, I have a separate home partition which I use for Ubuntu. Can't I use the same partition for VL home?

The guide says (page 15 of 23, point no. 12) :
Quote
Once you hit OK, and the installation proceeds, it will f ormat the partitions you selected f or root and /home, and any inf ormation in them w ill be erased, so please verif y everything bef ore continuing.

Is there any way I can use the same partition for home? The filesystem is ext3, so there should be no compatibility problems...

Thanks
Kedar
Logged
bodfish
Member
*
Posts: 6


« Reply #1 on: March 22, 2009, 09:38:48 pm »

Hi, Ked! I'll give you some general info I picked up over the years..

The answer is "maybe".

IF you allow VC to auto install, it will use your entire partition and wipe everything. IF you can manual install, and select the partitions, you have a chance. I just installed it, too, and can't remember if it's an option! I've also heard it's not a good idea somewhere. What I do, is partition using PartedMagic, and not allow any install to do it. That way, I can choose to place the parts in any order I choose. However, not all distros are that friendly. Most slack derivatives, are, however.

My usual way is to use PM (or any 3rd party partitioner) and make my first part the swap. Then I add 3 more about 10 G each for the various distros. I ALWAYS leave a chunk not allocated for moving stuff around. About 10 G on my rig. HTH>
Logged
MikeCindi
Tester
Vectorian
****
Posts: 1073


« Reply #2 on: March 23, 2009, 03:53:44 am »

During installation don't format your home partition as the option is there to either format or not. I would also recommend a different user name from the one you use with ubuntu.
HTH,
Mike
Logged

The plans of the diligent lead to profit...Pro. 21:5
VL64 7.1b3                                     RLU 486143
nightflier
Administrator
Vectorian
*****
Posts: 4023



« Reply #3 on: March 23, 2009, 04:22:38 am »

A separate /home partition is not necessary. You can start without one, and then re-configure VL to use your Ubuntu home part once you are comfortable with it.

As MiceCindi pointed out, using different user names between distros will maintain separation between them. The swap partition is another story, it is good resource use to share it between all installs.
Logged
M0E-lnx
Administrator
Vectorian
*****
Posts: 3180



« Reply #4 on: March 23, 2009, 04:42:41 am »

One side note about sharing a swap partition. Keep in mind that if you suspend/hibernate a kernel to a swap partition, you still cannot use any other kernel without harming the suspended one.
Logged

kedarm
Member
*
Posts: 28


« Reply #5 on: March 23, 2009, 11:21:38 pm »

@nightfigher :

To be on the safer side (and not lose all data on my home partition), I installed vector linux without a separate home partition.
Your post mentions reconfiguring VL to use a separate drive for the home partition. How do I configure it now?

My home partition is on a logical partition - /dev/sda9

Thanks
Kedar
Logged
nightflier
Administrator
Vectorian
*****
Posts: 4023



« Reply #6 on: March 24, 2009, 05:07:31 am »

Sounds like VL is working for you so far. Very good.  Smiley

To give you detailed instructions on how to proceed, some background information is needed.

First, temporarily mount /dev/sda9 on /mnt/hd by entering this in a root terminal:
mount /dev/sda9 /mnt/hd

Now we need the output of a few commands. To make it simple, you can pipe the output to a text file that can be opened for copy and paste operations, like this:
ls -al /home > ~/home.txt
This will create a file "home.txt" in the home dir that contains the result of the command.

Provide the result of the following:
mount
cat /etc/fstab
ls -al /home
ls -al /mnt/hd
Logged
kedarm
Member
*
Posts: 28


« Reply #7 on: March 25, 2009, 08:18:37 am »

Hi!

Here are the outputs of the commands you mentioned -

Contents of home.txt (output of mount -al) -
Quote
total 8
drwxr-xr-x  4 root  root    28 2009-03-24 12:12 ./
drwxr-xr-x 21 root  root  4096 2009-03-25 18:57 ../
drwxr-xr-x  3 root  root    16 2008-12-07 13:14 ftp/
drwxr-xr-x 25 kedar kedar 4096 2009-03-25 19:17 kedar/

mount -
Quote
$ mount
/dev/sda12 on / type xfs (rw)
tmpfs on /dev/shm type tmpfs (rw)
usbfs on /proc/bus/usb type usbfs (rw,devmode=0666)
/dev/sda9 on /mnt/hd type ext3 (rw)

fstab file -
Quote
$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# The following is an example. Please see fstab(5) for further details.
# Please refer to mount(1) for a complete description of mount options.
#
# Format:
# <file system>   <mount point>   <type>   <options>   <dump>   <pass>
#
# dump(Cool uses the <dump> field to determine which file systems need
# to be dumped. fsck(Cool uses the <pass> column to determine which file
# systems need to be checked--the root file system should have a 1 in
# this field, other file systems a 2, and any file systems that should
# not be checked (such as MS-initrd/mnt or NFS file systems) a 0.

# The Linux partitions
/dev/sda12 / xfs  defaults  0  1

# Shared Windows/Linux partition
#/dev/hda1   /mnt/dos  msdos  umask=0   0  0
#/dev/hda1   /mnt/win  vfat   fmask=111,dmask=0,quiet,shortname=mixed,user  0  0
#/dev/hda1   /mnt/win  ntfs   umask=0   0  0

# Floppy disks
# The 'noauto' option indicates that the file system should not be mounted
# with 'mount -a' 'user' indicates that normal users are allowed to mount
# the file system.
/dev/fd0   /mnt/floppy   auto   defaults,noauto,user   0 0
#/dev/fd1  /mnt/floppy   auto   defaults,noauto,user   0 0

# If you have a ls-120 floppy drive, it could be on /dev/hda b c d etc.
#/dev/hdd   /mnt/ls120   auto   defaults,noauto,user   0 0

# CDROM, CDWRITER, DVD
/dev/cdrom    /mnt/cdrom   iso9660   defaults,noauto,ro,user   0 0
#/dev/cdwriter /mnt/cdwriter   iso9660   defaults,noauto,rw,user   0 0
#/dev/dvd      /mnt/dvd    auto   defaults,noauto,ro,user   0 0

# NFS file systems:
#linux01.gwdg.de:/suse/6.3/i386.de  /mnt/nfs  nfs  defaults  0 0

# proc file system:
proc   /proc   proc   defaults   0 0

# Unix98 devpts filesystem:
none  /dev/pts  devpts  gid=5,mode=666  0 0

# Shared memory filesystem:
tmpfs   /dev/shm    tmpfs defaults 0  0
# Basic USB filesystem
sysfs  /sys  sysfs  defaults  0 0
usbfs /proc/bus/usb usbfs rw,devmode=0666 0 0

# example of a VFAT USB pendrive
#/dev/sda1  /mnt/pendrive vfat   fmask=111,dmask=0,noauto,user,quiet,shortname=mixed 0 0

# Swap partitions
# The 'sw' option means auto activating with 'swapon -a'.
/dev/sda10   none   swap   sw   0  0

Contents of /home : (mentioned above)

Contents of /mnt/hd :
Quote
$ ls -al /mnt/hd
total 40
drwxr-xr-x  7 root  root   4096 2009-03-05 16:34 ./
drwxr-xr-x 16 root  root   4096 2009-03-24 15:17 ../
drwxr-xr-x  2  1002  1002  4096 2009-02-24 16:09 guest/
drwxr-xr-x 62 kedar kedar  4096 2009-03-25 20:26 kedarm/
drwxr-xr-x  3  1003  1003  4096 2009-03-10 00:15 lfs/
drwx------  2 root  root  16384 2008-10-15 00:11 lost+found/
drwxr-xr-x 31  1001  1001  4096 2008-11-10 17:03 mkurve/
(Note: I changed the permissions of one of the mounted directories in order to access some other files)

Thanks
Kedar
Logged
nightflier
Administrator
Vectorian
*****
Posts: 4023



« Reply #8 on: March 25, 2009, 08:57:31 am »

Nice work providing the requested info. That makes it much easier for us to help.

Now log out of your normal user account and use the root account.
Temporarily mount /dev/sda9 as you did before: mount /dev/sda9 /mnt/hd

Next, let's use the Midnight Commander utility; type "mc" and hit enter. You should see a two pane display of your file tree. Navigate by using the up/down arrows, and hitting "Enter" to go into a directory. Go all the way to the top (the .. entry) and hit Enter to go back. Use Tab to switch between the panels. Navigate so that you have /home displayed in one, and /mnt/hd in the other one. Now highlight your user dir "kedar" in /home and press the "F6" key. It will ask you for conformation about the move operation before performing it. Do the same for "ftp".

Unmount /dev/sda9: umount /dev/sda9

Edit your fstab file: mcedit /etc/fstab
- add this line in the "Linux partitions" section:
Code:
/dev/sda9  /home  ext3  defaults,noatime  0  2
Press F2 to save, F10 to exit.

Re-mount with final configuration: mount -a

If all went well, /dev/sda9 will now be mounted on /home and contain all your user home dirs.

Let us know how it goes.
« Last Edit: March 25, 2009, 09:13:42 am by nightflier » Logged
kedarm
Member
*
Posts: 28


« Reply #9 on: March 25, 2009, 08:12:03 pm »

@ nightflier :
Thanks a lot! It worked perfectly. I have a common home drive for all my Linux distros.

Just had a few of doubts, although it's more out of curiosity than anything else -

1) Why do we use mc? Won't a simple move do the trick?
Quote
$ mv -r /home/kedar /mnt/hd/
$ mv -r /home/ftp     /mnt/hd/
To be more precise, does mc have any advantages (other than the UI) over a 'mv' command?

2) Is the unmounting necessary? Could we just change the fstab file and remount all drives in fstab (with 'mount -a')?

Logged
nightflier
Administrator
Vectorian
*****
Posts: 4023



« Reply #10 on: March 25, 2009, 09:45:19 pm »

1) A simple move command would indeed have done the job, but I like to plug mc as a powerful utility. It is also more comfortable for people that are used to GUI's.

2) Unmounting was strictly not necessary, as the temporary mount would have disappeared on reboot. Still good housekeeping.

Glad it worked as advertised. Hope you enjoy using Vector.  Smiley
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!