Clone boot disk

I have Endeavour running to my satisfaction on a small SSD. I would like to clone it to a similar SSD and be able to boot from it. I suspect I will need to edit some boot file to change the boot drive id. Any suggestion will be appreciated.

If you ‘clone’ it using dd you get exactly the same drive with some unused space (if you take a bigger one).
gparted will/can expand your last partition or you may add some more partitions…

Edit: you should not clone the running system. Use a live-stick or whatever you have.

2 Likes

Are you going to use the cloned system in another machine?

That worked out just fine. Thank you.

Not at this point, but since I will be doing it in the future some instructions would be appreciated.

To clone with DD:

There are 2 things you need to know:

if (input file) & of (output file)

Example for a whole drive: dd if=/dev/sdb of=/dev/sda bs=4096 conv=notrunc,noerror,sync status=progress (this clones everything on sdb to sda–sda needs to be the same size or larger than sdb. Use gparted after the clone is done to reconcile space.)

if is the drive to be cloned. of is the drive cloned to. notrunc is do not truncate any data. noerror is do not stop on errors (if any). sync is write zeros to the disc for read errors (this keeps data offsets in sync). bs=4096 is block size setting. status=progress gives a visual indication of the clone progress.

This process takes time on a drive that is NOT IN USE. As said above, boot off of a live USB to do this.

ALWAYS VERIFY every detail BEFORE issuing DD commands–DD is VERY literal & will copy EXACTLY as the command is written….so a wrong command will really barf up things…I check at least 3 times before i commit the DD line.

If you use the cloned disk on another hardware which has other requirements for drivers, for example Nvidia, then you will have to take some extra steps to install those.

Also, depending on the UEFI of the new machine, you may need (or not) to reinstall the bootloader.

1 Like

I will be transferring my functioning Endeavour to another desktop with an identical motherboard. How do I know whether I need to reinstall the bootloader?

You just connect your disk and start up your system.

Some UEFI implementation will find the bootloader efi binary and automatically create a boot entry. If yours does, then fine.

If it doesn’t, you would need to use your live EOS usb, chroot into your system and reinstall the bootloader.

If that is the case and you don’t know how to do it, that would be a subject for another topic. Post about it in a new thread.

Slipped the cloned disk into computer #2 and it booted just fine. Thanks for all the advice.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.