Copied system partitions to USB disk, how to proceed to make a clone?

Liam Proven lproven at gmail.com
Wed Oct 20 21:30:34 UTC 2021


Sorry for the slow reply. I finished at my current job today _and_ I
am making 2 international flights tomorrow, which means a tonne of
paperwork.

On Tue, 19 Oct 2021 at 15:17, Bo Berglund <bo.berglund at gmail.com> wrote:
>
> >You can do
> >powercfg /h off
>
> Did this too. Before rebooting...

Good good. Saves several potential problems, and Microsoft's own
instructions are complicated and don't always work.

> Then used the trick Shift-Winkey-Power-Reboot to get to a menu where I could
> select the Ubuntu USB key to boot from.

(!)

That's a new one to me.

> I did not realize before that one could do this, but once GParted showed the
> device names I could start a terminal and mount the Windows partition at
> /mnt/windr and then I could navigate into the drive and remove all 3 sys files
> (they were all there) and clean out Windows/Temp too. Pretty big the sys files
> were too.

Yup.

Pagefile is about 2x RAM. Hiberfil the same as RAM. Swapfile is a new
Metro thing and I don't know.

Usually saves many gigabytes so IMHO worth doing.

> I shrunk it to 60 GB giving me even bigger free space, now at 416 GB

Good!
>
> No display problems just that I will at the end have Ubuntu 20.04 *server* and I
> am uncomfortable with how Ubuntu has changed the desktop so there is no menu
> anymore and one has to search for everything which was at a known position in
> the main menu before!

I agree very strongly indeed, and in general regarding that, if you
used Unity before, I recommend the Unity remix:
https://ubuntuunity.org/

> But I have now replaced Mint with stock Ubuntu on the USB key, I will probably
> only use GParted and the terminal before it is all gone again anyway.

Fair enough!
> >
> >Aha! It's not upgraded yet.
>
> Haven't dared yet...

:-)

> >Well, if you have backups, you could upgrade it first.
>
> This involves an unknown amount of down time for the running server. I don't
> want that so this is why I wanted to make full partition copies of the active
> server (while it was shut down).
> I used the GParted live CD then.
> The plan is to use GParted Live again after Ubuntu 20.04 is installed to move
> the backed up system partition from the backup disk onto the new system.

Reasonable. It should be much quicker on the new machine, and
therefore, the upgrade should be quicker too.

> Can one copy *data* from one partition into another existing partition instead
> of into empty disk space?

Yes, with rsync or cp etc, or the "pro" way, piping tar to untar...
but it's harder and more work IMHO.

> At that moment I will have the Ubuntu 20.04 system partition with a working
> Ubuntu and a backup clone of my 18.04 system partition on the existing server.
> Either I will be able to overwrite the system partition on the new server or I
> have to first erase it and copy/paste from the backup drive into the empty
> leftover space...
> I suspect that the dvice name will change if I first erase the partition and
> then copy paste and that might screw up the booting?

It will change but you'll have to fix/reinstall GRUB anyway so I would
not worry.


> I will install 20.04 first and see if I can switch the Ubuntu partition from
> 20.04 to 18.04 after I have verified that it all works so far.

OK.

> QUESTION:
> ---------
> I have never used dual-boot systems before and now I wonder if there is some
> kind of menu popping up on start which needs to be interacted with in order to
> boot the correct system?

Yes. It's from GRUB normally.

> If so, how can I issue a sudo reboot from an SSH session to Ubuntu so it will
> reboot to Ubuntu and not Windows?
> I will not be able to see the boot menu if such is popping up since at that time
> I have lost connection by SSH.

You have 3 choices.

[1] By default it boots Ubuntu
[2] You can change the default  if you wish
[3] You can set it so that it remembers the last OS you booted and
boots the same one again.

> This is by far the most advanced Linux operations I have done, my only exposure
> before has been to install Ubuntu Server 18.04 on two PC:s and then install
> openvpn etc on them.
> And of course all of the Raspberries I have cluttering my desk...
> But these are all one-off installs on SDcard.

You are brave! :-)

But I think it will work... ;-)

-- 
Liam Proven ~ Profile: https://about.me/liamproven
Email: lproven at cix.co.uk ~ gMail/gTalk/FB: lproven at gmail.com
Twitter/LinkedIn: lproven ~ Skype: liamproven
UK: (+44) 7939-087884 ~ Czech [+ WhatsApp/Telegram/Signal]: (+420) 702-829-053




More information about the ubuntu-users mailing list