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

Bo Berglund bo.berglund at gmail.com
Tue Oct 19 22:20:56 UTC 2021


On Tue, 19 Oct 2021 19:54:52 +0200, Bo Berglund <bo.berglund at gmail.com> wrote:

>Once I get to use GParted I can set it up as follows (I believe)
>- Shrink the current Ubuntu 20 partition from 415 GB to 40
>- Copy the 30 GB ubuntu 18 partition from backup
>- Create a 80 GB empty partition
>- Copy the 264 GB home partition from backup
>- Fix the boot loader so it includes the Ubuntu 18 system too (how?)
>
>Now, if I can boot the Ubuntu18 partition it will attach the home partition
>because fstab is set to use UUID mounts. So it "should" work, I believe.
>
>But:
>- How to boot to USB now so I can repartition?
>- How to add a new OS to the boot loader (grub?)

FOLLOW-UP:
----------
What I did in the end was to select the Windows Boot Manager in the boot menu,
which brought up Windows.

Then I used the Shift-Start-Power-Reboot trick in Windows to get to the (UEFI?)
dialog where I could select what to boot from and could choose the Live Ubuntu
USB key.

So I got to perfrom the planned partition operations listed above to copy the
Ubuntu 18.04 partitions on to the PC hard disk.

I had no idea on how to fix the boot loader though....
It was not on the boot menu.

So I booted back to Ubuntu 20.04 and did an update run:
sudo apt update
sudo apt full-upgrade

This ran for a while (found 99 updates) and at the end the following appeared:

Processing triggers for linux-image-5.11.0-38-generic (5.11.0-38.42~20.04.1) ...
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.11.0-38-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.11.0-38-generic
Found initrd image: /boot/initrd.img-5.11.0-38-generic
Found linux image: /boot/vmlinuz-5.11.0-27-generic
Found initrd image: /boot/initrd.img-5.11.0-27-generic
Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Found Ubuntu 18.04.6 LTS (18.04) on /dev/nvme0n1p6
Found Ubuntu 18.04.6 LTS (18.04) on /dev/sda1
Adding boot menu entry for UEFI Firmware Settings

When I rebooted Ubuntu after seeing this I was greeted by the following boot
menu:

Ubuntu
Advanced options for Ubuntu
Windows Boot Manager (on /dev/nvme0n1p6)
*Ubuntu 18.04.6 LTS (18.04) (on /dev/nvme0n1p6)
Advanced options for Ubuntu 18.04.6 LTS (18.04) (on /dev/nvme0n1p6)
Ubuntu 18.04.6 LTS (18.04) (on /dev/sda1)
Advanced options for Ubuntu 18.04.6 LTS (18.04) (on /dev/sda1)
UEFI Firmware Settings

Notice how now the menu contains *both* the Ubuntu 18.04 entries from the system
disk (/dev/nvme0n1p6) AND the same entries from the backup disk attached by USB
(/dev/sda1), which I had not removed!

I am happy it found the installation on the hdd, but I do not want the /dev/sda1
entries to remain there!

How can I force its removal?
I will pull the USB backup disk out, but will that fix the grub menu?

If it still remains in the boot menu, is there a command to force an update when
the backup disk is disconnected?

Has to wait until tomorrow....


-- 
Bo Berglund
Developer in Sweden





More information about the ubuntu-users mailing list