I have a Dell desktop which I bought used, at which time it was set up to dual boot Windows (on disk 0 - /dev/sda ) and Ubuntu (on disk 1 - /dev/sdb). I nuked the Windows installation and /dev/sda now contains data.
Fdisk shows:
Device Start End Sectors Size Type
/dev/sda1 2048 1023999 1021952 499M Windows recovery environment
/dev/sda2 1024000 1228799 204800 100M EFI System ( mounted at/boot/efi)
/dev/sda3 1228800 1261567 32768 16M Microsoft reserved
/dev/sda4 1261568 656621567 655360000 312.5G Microsoft basic data (really linux ext4 fs)
/dev/sda5 656621568 976773119 320151552 152.7G Linux filesystem (ext4)
I am purchasing an SSD which I want to use as the boot device (UEFI, not legacy) and which will contain the root partition. I want to clone the current root partition (/dev/sdb1) to the SSD rather than do a new install of Ubuntu, so I can preserve all customizations and configuration.
I assume the steps, in order, are
- Format SSD, create empty GPT partition table (maybe it will have one ???)
- Create required partitions on SSD - EFI (fat32), root (ext4)
- Populate EFI (grub-install ?)
- Copy root from /dev/sdb to SSD
I'm not at all sure how to proceed - should I do all this from a liveUSB of my current Ubuntu (22.04) ? Once I've copied the existing root partition to the SSD I assume I'll need to tweak /etc/fstab ? Are there any other gotchas ?
I'd appreciate a sanity check and feedback.
TIA.