moving home to /dev/sda6
Michael Havens
bmike1 at gmail.com
Wed Jan 4 22:55:22 MST 2012
Well this is fun: I'm trying to move my <users> directory to its own
partition and am having problems doing so. I followed the directions at
this page-
http://embraceubuntu.com/2006/01/29/move-home-to-its-own-partition/- (steps
taken below)
On my first attempt at doing this it would get to the password page just
fine. However, upon entering my password the screen would go black and some
text would appear then it would go back to the password page no matter
which user I tried to login with. So I went back in and fiddled with fstab
again and now when I try to load my preferred user it says it '[Can't]
update ICEauthority file /home/bmike1/ICEauthority'. I know what the
problem with that is.... /home/bmike1 is now /home/bmike1.old. In other
words it is still looking for the old directory.
What to do oh what to do! One more question..... why did the UUID of
/dev/sda5 (swap) change when I moved it? hmmmmm.... is it because I deleted
it and then recreated it where I wanted it? Yeah... I bet that is the
problem.
(steps)
1st-
create a partition of sufficient size for your “/home” directory. You may
have to use that new hard drive, or adjust/resize the existing partition on
your current hard-drive to do this. Let me skip those details.
2nd
mount the new partition:
$mkdir /mnt/newhome
$sudo mount -t ext3 /dev/hda5 /mnt/newhome
2.5
Now, Copy files over:
Since the “/home” directory will have hardlinks, softlinks, files and
nested directories, a regular copy (cp) may not do the job completely.
Therefore, we use something we learn from the Debian archiving
guide<http://www.us.debian.org/doc/manuals/reference/ch-tips.en.html#s-archiving>
:
$cd /home/
$find . -depth -print0 | cpio --null --sparse -pvd /mnt/newhome/
3rd
unmount the new partition:
$sudo umount /mnt/newhome
4th
Make way for the new “home”
$sudo mv /home /old_home
5th
recreate a new /home by:
sudo mkdir /home
6th
Mount the new home:
$sudo mount /dev/hda5 /home
7th
Now, you have to tell Ubuntu to mount your new home when you boot. Add a
line to the “/etc/fstab” file that looks like the following:
/dev/hda5 /home ext3 nodev,nosuid 0 2
//////////////////////////////////////////////////////////////////
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=9f55ed51-fe35-406c-865d-beb5d83917b2 / ext4
errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=d1b6c267-6e83-4756-b1c7-1e531cedfd1c none swap
sw 0 0
# /home/bmike1 is on sda6
UUID=46758120-c0c7-444a-a313-b58168af05b5 /home/bmike1 ext4
nodev,nosuid 0 2
WOW! I just figured out that it is doing just what i want (in that it is
mounting /dev/sda6 to /home/bmike1)
Michaels-Laptop ~ # blkid
/dev/sda1: UUID="9f55ed51-fe35-406c-865d-beb5d83917b2" TYPE="ext4"
/dev/sda5: UUID="d1b6c267-6e83-4756-b1c7-1e531cedfd1c" TYPE="swap"
/dev/sda6: UUID="46758120-c0c7-444a-a313-b58168af05b5" TYPE="ext4"
/dev/sda7: UUID="9be45b98-d619-4a31-a951-5dd63fab9775" TYPE="ext4"
/dev/sda8: UUID="9a4d41b2-28c6-4907-8463-00d519a36774" TYPE="ext4"
/dev/sda9: UUID="fcd01ca7-d230-4cbe-acf1-200810245394" TYPE="ext4"
/dev/sdb1: LABEL="USB20FD" UUID="0000-0001" TYPE="vfat"
Michaels-Laptop ~ #
--
:-)~MIKE~(-:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.PLUG.phoenix.az.us/pipermail/plug-discuss/attachments/20120104/f95001c8/attachment.html>
More information about the PLUG-discuss
mailing list