moving home to /dev/sda6

Stephen cryptworks at gmail.com
Thu Jan 5 07:17:15 MST 2012


There is probably more to it tthan what i am about to tell you,
however this may get you going on a direction that is more digestible.

format the new partition as needed, but before mounting rename your
old home directory (aka /home) to /home.old. use mkdir to create /home
but leave it empty and then mount your new partition as /home and move
the data from the renamed directory.

These are pretty rough steps but what i would have chosen as the
solution. and are very similar to your page.

Something to consider maybe is doing this in single user mode as root
then there is no change of ANY files being in use touched or what have
you while you are migrating data.

alternatively you can tar/untar  your home directory as if you were
making a backup.

On Wed, Jan 4, 2012 at 10:55 PM, Michael Havens <bmike1 at gmail.com> wrote:
> 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:
> $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~(-:
>
> ---------------------------------------------------
> PLUG-discuss mailing list - PLUG-discuss at lists.plug.phoenix.az.us
> To subscribe, unsubscribe, or to change your mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss



-- 
A mouse trap, placed on top of your alarm clock, will prevent you from
rolling over and going back to sleep after you hit the snooze button.

Stephen


More information about the PLUG-discuss mailing list