LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Moving /home dir to separate partition before 7.10 install (https://www.linuxquestions.org/questions/ubuntu-63/moving-home-dir-to-separate-partition-before-7-10-install-591124/)

Thane 10-11-2007 01:23 PM

Moving /home dir to separate partition before 7.10 install
 
Trying to move my "/home" files into a new partition on another drive (sdc2) to keep them permanently separate from the operating system, prior to soon making a clean install of 7.10. Using a tutorial page from the LQ wiki I have temporarily mounted the disk, copied my /home directory to it, unmounted and edited my fstab as directed to mount the new partition on bootup (or so I thought). After booting up though, I'm not sure if Feisty is using the old /home directory or the new one. I've checked my mtab file and I don't see any reference to sdc2 being operational. Gparted shows quite a sizeable chunk of new data in there though. I had thought, that if fstab installed the drive, it would then show up in mtab as being presently installed and running -- am I wrong? Here are the lines which I added to my fstab:

# /dev/sdc2 keep "home" files in this partition
/dev/sdc2 /home ext3 defaults,errors=remount -rw 0 1


Here are the lines in my mtab file:

/dev/sdb1 / ext3 rw,errors=remount-ro 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
/sys /sys sysfs rw,noexec,nosuid,nodev 0 0
varrun /var/run tmpfs rw,noexec,nosuid,nodev,mode=0755 0 0
varlock /var/lock tmpfs rw,noexec,nosuid,nodev,mode=1777 0 0
procbususb /proc/bus/usb usbfs rw 0 0
udev /dev tmpfs rw,mode=0755 0 0
devshm /dev/shm tmpfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
lrm /lib/modules/2.6.20-16-generic/volatile tmpfs rw 0 0
nfsd /proc/fs/nfsd nfsd rw 0 0
rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0


I am running a dual-boot XP and 7.04 with each on a separate drive at present and the new partition on a third drive. I'd like to know for sure, that I've got my sdc2 /home partition dir working before I reformat my present 7.04 drive partition in a few days. Many thanks.

Hiko 10-11-2007 01:31 PM

Aloha,
In a Terminal type mount and see what it says. That should prove it is mounted and doing ok. Or, unmount the new /home and bring the old /home back up. Create a blank file called test.txt or whatever and look at it in Nautilus. Remount the new /home and the file won't be there. This also proves the new /home is active.
Mahalo,
Edward

Thane 10-11-2007 06:18 PM

Thanks for reply Hiko. The first time I read my post, there was a direction (auto or from one of the moderators) to first try some related posts. Tried adapting some of those posting suggestions to my case with no positive results. The new lines I tried to use in different attempts in my fstab were
/dev/sdc2 /home ext3 defaults,errors=remount-rw 0 1
/dev/sdc2 /home ext3 defaults,user_xattr 0 3
/media/disk /home ext3 defaults,errors=remount-rw 0 1
/dev/sdc2 /home ext3 auto,user,rw 0 1

There were also a couple of others, which I don't have a record of. Each of these entries locked up the computer and had to be subsequently removed. I tried your mount command also and saved a dummy file. The result seems to be, that Ubuntu still recognizes my former /home directory as the default. I can now see the /dev/sdc2 partition if I click on Places-Computer, although I need to enter my sudo password to access the directory/files. The dummy file doesn't show up in its files though - only in the former /home directory. My problem seems to me to be somehow one of redirecting Feisty to the /dev/sdc2/home directory. The files are there... I just cannot seem to get at them.
My fstab now reads:
/etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sdb1
UUID=d15cc0ab-7102-42de-8133-90734bd6084d / ext3 defaults,errors=remount-ro 0 1
# /dev/sdb5
UUID=2e0e84e0-e29b-4fbe-b57a-f8c93ebab01c none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
# /dev/hdd /media/cdrom1 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
# /dev/sdc2 keep "home" files in this partition
# /dev/sdc2 /home ext3 defaults,errors=remount-rw 0 1
# /dev/sdc2 /home ext3 defaults,user_xattr 0 3
# /media/disk /home ext3 defaults,errors=remount-rw 0 1
# /dev/sdc2 /home ext3 auto,user,rw 0 1

and my mtab now reads:
/dev/sdb1 / ext3 rw,errors=remount-ro 0 0
proc /proc proc rw,noexec,nosuid,nodev 0 0
/sys /sys sysfs rw,noexec,nosuid,nodev 0 0
varrun /var/run tmpfs rw,noexec,nosuid,nodev,mode=0755 0 0
varlock /var/lock tmpfs rw,noexec,nosuid,nodev,mode=1777 0 0
procbususb /proc/bus/usb usbfs rw 0 0
udev /dev tmpfs rw,mode=0755 0 0
devshm /dev/shm tmpfs rw 0 0
devpts /dev/pts devpts rw,gid=5,mode=620 0 0
lrm /lib/modules/2.6.20-16-generic/volatile tmpfs rw 0 0
nfsd /proc/fs/nfsd nfsd rw 0 0
rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs rw 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
/dev/sdc2 /media/disk ext3 rw,nosuid,nodev 0 0

Don't know if the partition is supposed to show up under /media/sdc2 or not.


All times are GMT -5. The time now is 02:38 PM.