System restore or fast migration to another SSD with different disk structure

Hello to everyone.

I use Ubuntu Mate as my main OS for work and gaming. Also I have to use Windows for some specific software 5-8 hours per week. When I'd changed my laptop I had no time to learn how to install operating systems different ways to prepare it for work, so I made it the way I know how to do it for sure.

The optimum way for me was to install Ubuntu Mate first and then tried to install Windows 10 in Virtualbox with software for work and made sure the software can work in Virtualbox. If not I should install Windows 10 as second OS. But I know that if linux OS was installed first you need to edit grab after installation of Windows to make computer offer you to choose OS to start at the boot. But I didn't know at that momenthow to edit grab and don't know yet and I didn't know anything about installation of Windows in Virtualbox. As I said I had no time to learn it.

So I installed Windows 10 first, then installed Ubuntu Mate.

And it's becoming more and more annoying for me to restart in Windows when I need to work with the specific software. And I wanted to try to use Ubuntu Mate as main and also host system and Windows in Virtualbox. I'm ready to double RAM in laptop to 16GB also I wanted to upgrade SSD (need more space).

So, the question is how could I do it faster? Can I transfer my Ubuntu Mate with all the settings and software to new SSD as first and I hope the only OS? I think that if Ubuntu Mate was installed as first OS I could just clone all the logical disks with grab and Ubuntu Mate to new SSD. But what could I do in my case?

Here is how my SSD looks in Windows and Ubuntu Mate:


I'm new to Ubu/MATE but wanted to mention something I discovered in case it's helpful in your situation. The app named Gparted has a great feature I've used a lot already. It will do an exact mirror backup of any drive or partition to another drive or partition. I also highly recommend having the root/boot and home directories in different partitions fwiw.

I've used Gparted to mirror and restore drives and partitions several times in the few months since getting started on Ubu/M and find it both simple and flawless.

  1. Boot from a Ubu/M "fast" microSD in a USB3 adapter, unmount the drive(s)/partition(s) to back up. That SD comes with Gparted already on it, but I've also installed it on all my Ubu/M systems as a complement to the Disks app.
  2. Select a source Device or Partition in the pulldown menu at top-right. Add, shrink, or expand partitions if desired (in the Partition pulldown menu). With the source selected, in the Partition menu click Copy.
  3. Select a destination Device or Partition in the pulldown menu at top-right. Add, shrink, or expand partitions if desired (in the Partition pulldown menu). Note that the destination must be the same or larger size than the source. With the destination selected, in the Partition menu click Paste.
  4. Click the green checkmark icon, or use the Edit menu to select Apply All Operations.

I then find something else to do for a while, checking in occasionally in case it got stuck on something and waited for input. I find this far simpler than Clonezilla or the other options I've seen. ymmv :slightly_smiling_face:

Yes, I know about Gparted. I also installed it in my system. Interesting that you think it's more convenient then Clonezilla.
In my case I need to copy 1, 5, 6 and 7 logical drives. Will the system srart when I'll restore them one after another in new SSD? How to edit Grab to delete line about Windows?

That's why I mentioned it. I've dabbled a bit with various *nix stuff over several decades but obviously never really delved into it. This fact, along with the vast complexity of computing in general and *nix in particular, is why I seek simplicity in solutions.

So as to your question, I have just this week used Gparted to fix a hosed up Ubu-M 20.04 installation. It's a particularly complex installation due to being on an old MacBook. I had a month old Gparted HDD that worked. I'd used it to copy/paste the root directory into the internal SSD swapped into the MacBook. When it hosed up and I couldn't fix it, I simply did another copy/paste and now it's working.

I was pleased to see that, having done the Ubu-M installation with separate / and /home partitions, all my apps and settings were unaffected. Nice to see, since "moving in" to Ubu-M from MacOS involved many hours of tweaking.

Surely there are other and for many (most?) *nix users, better options like Clonezilla and Timeshift. I just find Gparted quick, easy, and total so that everything just works. ymmv :slight_smile:

So, I created images of every of my six partitions with Disks into external HDD.
I thought that first partition is /boot, but I was wrong and learned that first partition is for Windows and the second is /boot.
Third partition is something for Windows also.
Fourth - disk C:/ for Windows.
Fifth - swap for Ubuntu.
Sixth - /.
Seventh - /home.

As I wrote earlier I don't want use Windows as real system and want to try to install Windows in VirtualBox.

So, I changed SSD for once with more capacity, also add RAM in my laptop. Then I boot in Ubuntu live and create with GParted four partitions in which I backup my previous second, fifth, sixth and seventh partitions.

As result I have line with option to boot Windows at start (of course) and not so fast start of Ubuntu as it was. I think that I must to edit grub to delete line with Windows and also correct grub regarding Ubuntu as now number of partitions has changed to return the speed of Ubuntu loading.

So, the question is what exactly I need to do step by step? Please, help me.

Things are going not so easy as I planned. :frowning:

Another problem. When I created an images of partitions with Disks to an external usb HDD, replaced an old SSD with new one in laptop and restore the only needed for me partitions I realized, that I can't resize restored partition. Even if I resize a partition with GParted the added space is unallocated and didn't formatted as the original partition. So the system sees the same space in partitions even if the new SSD four times bigger.

I think if I copy partitions with Gparted from the old SSD to a new SSD directly then I can resize each one right after copy done. But I have only one M2 slot in my laptop. And I haven't any enough size 2,5" SATA SSD/HDD to insert in empty slot to use it as transit disk for copying partitions. I have only external usb 3,5" HDD and it's not empty, so as I understand I can't copy a partition in one of its folders, only an image of partition.

How can I clone partitions from one SSD to another with resizing after copying done? Could I do it with Clonezilla?

Hi @cyril
So the new larger SSD actually does boot after installing it in the M2 slot and restoring solely the Linux partition ISO's to it? If I understand you correctly?

Somewhat surprised as I would think that the MBR would be missing a bootloader then.
New disk and all. But not my forte this...

What exactly did you use as boot device when you restored the ISO's to the new SSD with Disks?
Were you running from the new SSD already then or from a live CD or USB?

Just a guess but you could try:
sudo update-grub
after booting from the new SSD (if it actually does boot).
This should remove the missing partitions including the old Windows bootentry and speed things up

Also check each new partition for errors after unmounting them before attempting resize.
I would use gparted for this, but personal preference:

  • Boot from a livecd (or live usb/gparted stick) with the new SSD installed
  • Unmount ALL restored partitions on the new SSD from within Gparted by rightclicking->unmount
  • Right click on each, choose "check" and then "apply all operations" (aka the green V symbol).
  • Check output for errors (and post here if any).
  • After that try to resize/reposition them if desired.
  • Again "apply all operations" or the green V symbol.

Do they have the proper size if you boot from the SSD then?

Disclaimer: always make sure you have a backup of your data first!

Well ,I did a lot of trying to transfer certain partitions to a new ssd (want to transfer only partitions with Ubuntu). The only semi-sucsess try was made with Disks. I wrote about that. But the system loaded a slower. I thik it because I had ti edit grub as quantity of partitions cnanged, but I don't know how to edit.

Tnen I'd try several unsuccessful ways with Clonezilla.

After all I decided just to manual install Ubuntu Mate, Virtualbox , Windows in Virtualbox and try my sofrware for work.
I faced several problems with installing Windows 10 in Virtualbox (blue screen). And couldn't install some of the software. So, I realized I have to stay with two operating systems.

So, I decided to make image of the whole disk with Clonezilla and to restore it at bigger new SSD. And as I hope I could just increase the size of /home as last partition.

But after I'd made an image of disk and restored it at new SSD I was shocked another problem. :sob: And when I replaced new SSD with the old one ad I need to work, the problem didn't get away. What could I do?

I just found that if I click F12 at start to choose the source to download I see two lines of Ubuntu and one - Windows and I successfully loaded Windows and Ubuntu from the second line.

P.S. I entered BIOS and changed the order of load in EFI. All is working. ))) Now I'll try to encrease the /home by using an unallocated space as /home - the last partition.

The question is why is in list of loaded systems in EFI is appeared second (not working) line of Ubuntu and how to delete it?

Yes, it booted. But system loaded a little bit slow compare to the origin.

I restrored not only /linux-swap , /, /home, but also a partition it the beginning of disk which I understand is /boot for both systems. So, the grub menu was the same although I hadn't Windows 10.

After I made image of every partition by Disks, I decided to restore only some of them with Ubuntu also using Disks. But as I wanted to get larger partitions.

So, I boot Ubuntu live from USB, and restored first of needed partitions by Disks and then resized it to a larger one by GParted. And so I did it to other partitions. So, I get a bootable Ubuntu Mate without Windows 10 but with option in Grub menu too choose Windows. It was seemed ok, but then I noticed that system didn't see added space. A looked at disk in Gparted and found that I have got larger partitions but each of them consist of two parts: previous size and allocated space. And I couldn't merge these two parts of each partition. So actually additional space of new SSD was not available.

And I gave up with Disks and Gparted and swithed to Clonezilla. The problems with it I described above.

Here is photo of my BIOS. I moved working line with Ubuntu up and not working line - down. Where's exactly BIOS take information about options for load and how to delete unnecessary mention of Ubuntu?

OK, so Clonezilla it is then!

In your case I would try Boot-Repair.
Read this and choose option 2 so just install it on your now running Mate system.

  • connect to the Internet
  • open a new Terminal, then type the following commands (press Enter after each line):

sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair && boot-repair

After that choose "create boot info summary" and post the result here so we know what partitions (and types) were restored by using CloneZilla.
Do NOT use any of the other options in Boot-Repair yet.

Sorry for a long reply, I was very busy.

I've just did what you recommend.

Here's my report: https://paste.ubuntu.com/p/cy9JgmDrv2/

Did you make a diskimage or partition image of the "old" laptop/ssd using Clonezilla?
Looks like you restored the complete disk (including Windows 10 and the dual-boot config) to the new SSD/laptop?

If you run recommended-fixes now, can you then boot Windows 10 again? Mind you; It will probably give you lots of errors/bluescreen on you because it was installed on the old laptop and not sysprepped before making the image (probably).

Maybe you could:
Make a partition image of /home from the old SSD.
Restore this /home partition to the new SSD (and remove everything else) using Clonezilla
Install Ubuntu Mate using the "something else" method on the partitioning/disk screen
Install / (root) partition and use the /home partition from Clonezilla as the new /home (untick format so you won't lose it's data).
Install the bootloader to /dev/nvme0n1

As I couldn't make run the software for my work in Virtualbox, I decided keep two operating systems as is. It is sad that I couldn't change the size of partitions except the last one - /home.

So, I cloned the whole disk with Clonezilla and restored it at new SSD. Then I resized the last partition. All work, I could start both operating systems. But right after I restored the image I couldn't start any system as it's appeared one additional line with Ubuntu that don't work. When I realized it, I changed the order of load in BIOS UEFI and moved working option up. The only quiestion now to delete additional Ubuntu line in UEFI options.

ah, yes,sorry, misread. Maybe with efibootmgr? Use at your own risk/make sure to have a backup.

Also; is Windows available as a boot option in the Grub menu at the moment?
How are you selecting to boot to Windows or Linux? Grub menu entry or F12/bootorder?

Quote from the pastebin you posted:

Suggested repair: ______________________________________________________________

The default repair of the Boot-Repair utility would reinstall the grub-efi-amd64-signed of
nvme0n1p7,
using the following options: nvme0n1p2/boot/efi,
Additional repair would be performed: unhide-bootmenu-10s win-legacy-basic-fix use-standard-efi-file

Final advice in case of suggested repair: ______________________________________

Please do not forget to make your UEFI firmware boot on the ОС уже используется - Ubuntu 20.04.2 LTS CurrentSession entry (nvme0n1p2/efi//shim.efi (**** will be updated in the final message) file) !
If your computer reboots directly into Windows, try to change the boot order in your UEFI firmware.