My system:
openSUSE Leap is installed and running on sdb which is a 1 T drive
sdb1 is the UEFI partition
sdb2 is the swap partition
sdb3 is the root partition
sdb4 is /home
I installed a 2 T NVMe drive in my machine and want to move Leap 15.3 to it.
It is shown as nvme0n1 in the device viewer.
I created a GPT table in it
I created 4 partitions that were the same sizes as sdb and tried using rsync, but the directories /dev and /sys did not come over on the nvme. I tried cp with the same results.
I am not sure how to copy the UEFI partition either.
I think I should use dd, but have some questions:
Should I start the computer using a live version and make sure that the ssd is still sdb and the nvme is still the same?
Should I remove the partitions from the nvme first?
Will dd leave the nvme with unused space when finished?
Can I resize the /home partition, using gparted, to use the extra space on the nvme?
And, most important, will
As /dev and /sys are temporary file systems created at boot and maintained by the kernel during the running of the system, there is no need to copy them. It can even be harmful when you change things there.
You should use a LIVE-system to copy the existing files.
If your partitions on /dev/sdb are smaller as the ones you would like to have on nvme0n1 then using dd is not ideal: You will have to resize and shuffle partitions on nvme0n1.
I would pre-partition nvme0n1 (as you already did), boot a live system and copy (with rsync) the content from every partition on /dev/sdb to the corresponding partition on /dev/nvme0n1.
Alright, I did all that. I made all the partitions the same size except I for /home which I used all the available space left. All the files seem to have copied over. But! The system doesn’t recognize the new (nvme) drive at boot. I was expecting to see two entries for Leap 15.3 in the grub menu. Could it be because both the nvme and sdb have the same entries? Or is it because I didn’t do an install and the bios doesn’t recognize the nvme as bootable? The nvme isn’t shown as a bootable device in the bios boot selection menu.
I looked at os=prober but although it shows the installation of Windows and arch, it doesn’t show either installations of Leap. ???
All this seems too much as I’m going to remove sdb as soon as the nvme is working.
Could it be because both the nvme and sdb have the same entries?
That’s certainly part of it. For years openSUSE fstabs have been using UUIDs for mounting. Until you adapt fstab, generate a grub.cfg for the NVME, and create a new entry in the BIOS for the new ESP’s Leap, you can’t expect anything to work right.
Or is it because I didn’t do an install and the bios doesn’t recognize the nvme as bootable? The nvme isn’t shown as a bootable device in the bios boot selection menu.
Try creating one using efibootmgr, after grub.cfg and fstab have been appropriately adjusted to the new UUIDs and device names. Here’s one I have used in the past you can use as a template:
You’ll want to follow that up by using efibootmgr to reset the boot device order to put the NVME’s ESP entry for Leap first. Or, use YaST to reconfigure these. Note that “opensuse153” here is a match to my /etc/default/grub’s GRUB_DISTRIBUTOR=, which by default is null, and causes additional openSUSE installations beyond the first to overwrite each other’s boot entries on the ESP.