[Novalug] More than one linux version on a machine question
James Ewing Cottrell 3rd
JECottrell3 at Comcast.NET
Sun Apr 29 21:11:55 EDT 2012
On 4/29/2012 7:59 PM, Don E. Groves, Jr. wrote:
> the answer to "Part 2" is YES it's fairly simple. <GRIN>
>
> Create a partition, format it (ext3 or something equal or better)
> mount it:
> $ sudo mkdir /tmp/newhome
> $ sudo mount /dev/(your new partition) /tmp/newhome
> { where (your new partition) is the device for your new
> partition.}
> $ sudo telinit s // switch to single user mode
Three sudos in a row suggests you should just log in as root, or do sudo
bash, or sudo -i, or sudo -s.
No need to switch to single user mode. And even if so...just use "init s".
>
> now comes the fun parts(?) in single user mode the following steps
>
> Transfer (copy) the files from /home to /tmp/newhome
> # (cd /home; tar cf - *) | ( cd /tmp/newhome; tar xfp -)
Use rsync instead.
It's not clear whether any user will be logged on during this or not. If
they are, you can use rsync once to get most of the files moved, then
rsync again after you kick them off.
If no users are logged on, I would simply do:
umount /home; mv /home /oldhome; mkdir /home; vi /etc/fstab; mount
/home; rsync -ax /oldhome/. /home
However, having said all that, if you use KDE or Gnome, your dot files
are likely to end up differently. I share the same /home partitions, but
my home directory is a subdirectory: /home/jcottrell/{rh5,f16,ubu11}
depending on the distribution.
I learned the hard way years ago when editing the preference under one
OS I trashed my user setting under another.
If I want to share directories, I do something like:
mv src ..; ln -s ../src . the first time and simply do the symlink for
all other OS.
JIM
>
> # unmount /tmp/newhome
> # edit /etc/fstab
> /\ add the '/home' entry, you can do this step to a copy before
> switching to single user mode. /\
>
> {note: the following steps must be done in single user mode or from an
> alternate boot}
>
> # mv /home /oldhome // rename your current home directory
> # mkdir /home // create a new mount point.
> # mount /home // mount the new /home partition
>
> If the 'mount' works you've edited 'fstab' correctly, else fix things now
> Once that's done it safest to 'reboot' the system:
> # reboot
>
> Later you can clean up the /oldhome directory/tree
>
> On Sun, Apr 29, 2012 at 2:21 PM, Bonnie Dalzell <bdalzell at qis.net
> <mailto:bdalzell at qis.net>> wrote:
>
>
> Part 2 - if answer to the above is "yes" is there a simple way to
> reassign to a different /home partition one a linux os is already
> installed on a harddrive in its own / partition.
>
> --
> --
> Don E. Groves, Jr.
>
> Tag it's your turn now... ... ....
>
>
> _______________________________________________
> Novalug mailing list
> Novalug at calypso.tux.org
> http://calypso.tux.org/mailman/listinfo/novalug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://calypso.tux.org/pipermail/novalug/attachments/20120429/c1568b48/attachment-0001.html
More information about the Novalug
mailing list