sudo su -
cd /boot
cp -a cmdline.txt cmdline.old
Now, with the Pi still ON, plug the M.2 drive and run this:
blkid # <- It will show something like this:
pi@chaleira:~ $ blkid
/dev/mmcblk0p1: LABEL_FATBOOT="boot" LABEL="boot" UUID="4BBD-D3E7" TYPE="vfat" PARTUUID="738a4d67-01"
/dev/mmcblk0p2: LABEL="rootfs" UUID="45e99191-771b-4e12-a526-0779148892cb" TYPE="ext4" PARTUUID="738a4d67-02"
/dev/sda1: LABEL_FATBOOT="boot" LABEL="boot" UUID="4BBD-D3E7" TYPE="vfat" PARTUUID="738a4d67-01"
/dev/sda2: UUID="feb67ccf-d57a-41cc-a1d0-5b0d8e6011da" TYPE="ext4" PARTUUID="1c310018-1d9f-7244-be0b-a03609427f8d"
Take note of your's PARTUUID=xxxxxxxxx from the /dev/sda2
Now, to make the SDcard boot the sda2 partition:
nano cmdline.txt # <- Open the file on the editor nano and change the PARTUUID= to the same as the /dev/sda2
In my above example, it was changed from this:
console=serial0,115200 console=tty1 root=PARTUUID=738a4d67-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
To this:
console=serial0,115200 console=tty1 root=PARTUUID=1c310018-1d9f-7244-be0b-a03609427f8d rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
Now, Ctrl+O, Enter, Ctrl+X