03-04-2020, 09:50 PM
That looks right to me but I'm no authority. I don't get why your SD doesn't boot, mine does. I tried the Debian Bullseye debootstrap on the SD and it booted and ran. Then there was a problem with the files it uses preventing it from working again.
Use a bs=1M in your dd line, it'll speed it up.
I'd be very nervous about overwriting the only thing that boots, in fact I think the OS won't let you do that. Don''t know if you have spare SDs or a reader and space on another machine, but you could back up your eMMC first. While booted from the eMMC be sure the SD is mounted and formatted. Then do a dd of the eMMC (both partitions at once like /dev/mmcblk1) to a new file on the SD, use an img extension. When that's done shut down and take it out, set it aside if you have spares or move the file off onto some other machine if not.
You might be able to just clone your eMMC onto the SD with dd, then after you see that it can boot copy your new image onto it as a file. Boot from the SD and dd the image to the eMMC. Shut down, take out the SD, it should now boot from the new image on the eMMC. It's better if you have a backup so you can restore your original eMMC if needed. Or you could write the new image to the SD, test that it boots, and dd it to the eMMC. Maybe. I think you can't overwrite your boot drive, you need to be booted from the SD to overwrite the eMMC.
I have a new SSD sitting here, I'm waiting for the adapter, then I'll be doing something similar.
Use a bs=1M in your dd line, it'll speed it up.
I'd be very nervous about overwriting the only thing that boots, in fact I think the OS won't let you do that. Don''t know if you have spare SDs or a reader and space on another machine, but you could back up your eMMC first. While booted from the eMMC be sure the SD is mounted and formatted. Then do a dd of the eMMC (both partitions at once like /dev/mmcblk1) to a new file on the SD, use an img extension. When that's done shut down and take it out, set it aside if you have spares or move the file off onto some other machine if not.
You might be able to just clone your eMMC onto the SD with dd, then after you see that it can boot copy your new image onto it as a file. Boot from the SD and dd the image to the eMMC. Shut down, take out the SD, it should now boot from the new image on the eMMC. It's better if you have a backup so you can restore your original eMMC if needed. Or you could write the new image to the SD, test that it boots, and dd it to the eMMC. Maybe. I think you can't overwrite your boot drive, you need to be booted from the SD to overwrite the eMMC.
I have a new SSD sitting here, I'm waiting for the adapter, then I'll be doing something similar.