On Thu, Dec 05, 2024 at 08:24:05PM +0100, Hans wrote:
What can I do? I would like to keep the existing partitions. However, I could
shrink them. At the moment, my drive looks at this:
primary partition Windows-boot ntfs
primary partition Windows ntfs
primary partition /boot /dev/sda3 ext4
extended partition /dev/sda4
logical partition /dev/sda5 swap
logical partition /dev/sda6 / ext4
logical partition /dev/sda7 encrypted home
logical partition /dev/sda8 encrypted usr
logical partition /dev/sda9 encrypted var
logical partition /dev/sda10 encrypted data
You can't just dd the disks if you have an old style dos partition
table, you need to create a GPT partition table on the new drive, then
dd the individual partitions. I'm unaware of a tool that would automated
this, though one may exist. You don't need a separate /boot for the
scenario above, and you could turn partition 3 into the EFI partition
(moving the stuff currently in /boot into /boot on the / drive.) This is
technically straightforward, but there are a lot of fiddly bits, and I
have no idea whether windows would still work. If you had just linux and
a couple of partitions it would be much easier.
Honestly, you're in partition hell and I'd start over with fewer.
(Though it is possible to keep this structure.) Maybe use a windows disk
migration tool to copy the windows stuff to the new drive, then create a
new empty encrypted / + boot + EFI, sync the current / to it, then sync
the other partitions to new /. There are several ways to solve this
problem but none automated or simple. When you first talked about
migrating I kinda assumed a typical install with a small number of linux
partitions, not this. :-)