[WNYLUG-Users] Cloning root and home

Andrew Potozniak tyraziel at gmail.com
Mon Mar 9 12:14:40 EDT 2015


Can you share a compare of the /etc/fstab files between root and root2,
along with the files for reference?


-- 
010100000110111101110100011011110111101001101110011010010110000101101011
Andrew
www.potozniak.org
"Changing the world one character at a time."
010100000110111101110100011011110111101001101110011010010110000101101011
--END OF LINE--


I'm trying to copy root and home to other partitions on my notebook
internal drive and then boot from them (root2 and home2).

Once it works, it can be an (almost) live backup or I could upgrade from
Kubuntu Trusty to Utopic on the new partitions and smooth out any
wrinkles while still having Trusty working in the other partitions so I
can continue to get things done.

I copied home too because I don't want to have to deal with things like
config file changes in Utopic which might screw up Trusty when I boot
back into it.

(I had some fun with that on my other notebook when I upgraded from
Oneiric to Precise using a separate partition for root, but just one
home. Some things went a bit bonkers.)

It didn't quite work, so I must have missed something.

Here's what I did:

Used gparted to reformat /dev/sda5 and /dev/sda7 as ext4 (which should
have cleared out what was on them) and labeled them as root2 and home2
again.

Stopped user tasks that modify files like bittorrent. (But I didn't boot
from a live CD, etc.. I made the copies on the running system.)

Used rsync to copy everything with permissions, etc. preserved from root
(/dev/sda3) to root2 (/dev/sda5)
and from home (/dev/sda6) to home2 (/dev/sda7). (sda3 and sda5 are both
the same size as are sda6 and sda7.)

I don't think it makes a difference, but sda3 is labeled "root", sda5 is
labeled "root2", sda6 is labeled "home" and sda7 is labeled "home2".

Mounted /dev/sda5 on /media/bigbird/root2

Edited /media/bigbird/root2/etc/fstab and changed the uuids for root and
home to the ones for /dev/sda5 and /dev/sda7.
(Got them by running ls -l /dev/disk/by-uuid and copy and pasting them.)

Ran grub-customizer which updated the boot menu to show the new OS on
/dev/sda5.

Thought I was done and rebooted, selecting the OS on /dev/sda5 on the
grub2 menu.

Boot looked fine, but when I ran df, it showed root as /dev/sda3 and
home as /dev/sda6 - like nothing had changed.

Mounted /dev/sda5  again and verified that my changes to fstab were
still there. They were.

Noticed that /etc/fstab~ was left over from the editing and deleted it.

Tried to get online, but couldn't. My wifi said it was connected, but
there was a second instance of the connection available that should not
have been there. Tried to connect to that, which appeared to work, but I
still couldn't get online.

Rebooted into my original partition (/dev/sda3) - which still works fine
and has no problem coming online - and wrote this email.

Apparently, I've missed some steps needed to make this work.

Also, I seem to have made my router unhappy because it wouldn't let me
connect to the Internet when I booted the new way. I didn't try to just
login to the router.

It did seem a little too simple just to copy everything, change fstab,
grub, and reboot.

What do I need to do to get this to work?

TIA

Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://wnylug.org/pipermail/users_wnylug.org/attachments/20150309/90f4411b/attachment.html>


More information about the Users mailing list