[WNYLUG-Users] Cloning root and home

Monkberry.com peter at monkberry.com
Tue Mar 10 19:02:47 EDT 2015

I like how you've just dismissed all that because you've had previous 
problems, a bit short sighted if you ask me but that's up to you.
I've done this, numerous times, with really no issue that I can think of 
and I'm fully aware of the config file changes. If this is such a 
problem under KDE (mate does not seem to have these issues), you could 
simply copy off all the .config files to somewhere else where each OS 
would read what their respective .config files were. Symbolic links for 
the data only (not .config files) in 2 different home locations would 
work around this.

On 03/10/2015 04:48 PM, Joe wrote:
> That's why I titled my post "Cloning ...".
> Installing a clean distro is way easier and way faster (I don't need to
> ask any questions to do that.), but:
> I do extensive customization on my installs and it takes a couple of
> weeks of clock time to get a fresh one put back together.
> I set it up from the start with 2 home and 2 root partitions, so I don't
> need to do any partition level stuff at all (once I cleaned out the
> destination partitions).
> Having /home on a separate partition (as I have done for some years now)
> is a great idea for several reasons, but sharing it between two distro
> releases isn't always one of them. I had all sorts of grief when I did a
> clean install of Kubuntu 13.10 on another partition of my other notebook
> and then tried to reboot into Oneiric on the original partition. Desktop
> search (which I never had or wanted) started running "all by itself" and
> I had to swat a bunch of processes to stop it and then figure out how to
> keep it disabled. Config files change!
> Joe
> On 03/09/2015 07:13 PM, Monkberry.com wrote:
>> I would do this entirely different, as I've done it with my laptop
>> because of the limited time I had to tweak things to the new and
>> didn't want to be without critical operational stuff.
>> 1. Boot the laptop with a rescue cd/stick.
>> 2. Fireup gparted (or whatever you like) and shrink down the old root
>> partition. Leaving the /home and swap partitions as they are.
>> 3. In the new space, create a new root partition.
>> 4. Install the new OS to the new root partition.
>> 5. Have the new OS mount the existing /home and swap partitions.
>> 6. Install grub to the drive again and update it, it will find the old
>> root and give you the ability to dual boot into either.
>> DONE.
>> On 03/09/2015 02:41 PM, Joe wrote:
>>> Looked into this a bit further.
>>> grub.cfg looks weird. Here's the entry for my new OS partition (with
>>> long lines truncated).
>>> It has the new uuid everywhere (truncated in this email), but the old
>>> uuid in the line that actually boots.
>>> I tried manually changing it to the new uuid, but that made booting
>>> hang.
>>> The new uuid is 25... The old one is 9a...
>>> Joe
>>> ### BEGIN /etc/grub.d/30_os-prober_proxy ###
>>> menuentry "Kubuntu 14.04.2 LTS (14.04) (on /dev/sda5) Testing/backup"
>>> --class gnu-linux --class gnu --class os $menuentry_id_option '$
>>>           insmod part_msdos
>>>           insmod ext2
>>>           set root='hd0,msdos5'
>>>           if [ x$feature_platform_search_hint = xy ]; then
>>>             search --no-floppy --fs-uuid --set=root
>>> --hint-bios=hd0,msdos5
>>> --hint-efi=hd0,msdos5 --hint-baremetal=ahci0,msdos5  2540779$
>>>           else
>>>             search --no-floppy --fs-uuid --set=root
>>> 2540779b-43d7-4e38-a227-68057afceb47
>>>           fi
>>>           linux /boot/vmlinuz-3.13.0-46-generic
>>> root=UUID=9aae2d22-4393-436a-a505-130db27e0e55 ro quiet splash
>>> $vt_handoff
>>>           initrd /boot/initrd.img-3.13.0-46-generic
>>> }
>>> On 03/08/2015 10:
>>> 51 PM, Joe wrote:
>>>> 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
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at wnylug.org
>>>> http://wnylug.org/mailman/listinfo/users_wnylug.org
>>> _______________________________________________
>>> Users mailing list
>>> Users at wnylug.org
>>> http://wnylug.org/mailman/listinfo/users_wnylug.org
>> _______________________________________________
>> Users mailing list
>> Users at wnylug.org
>> http://wnylug.org/mailman/listinfo/users_wnylug.org
> _______________________________________________
> Users mailing list
> Users at wnylug.org
> http://wnylug.org/mailman/listinfo/users_wnylug.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: peter.vcf
Type: text/x-vcard
Size: 123 bytes
Desc: not available
URL: <http://wnylug.org/pipermail/users_wnylug.org/attachments/20150310/9b17cd67/attachment.vcf>

More information about the Users mailing list