04-28-2021, 03:38 PM
Yes, that's commonly done from live cds too. But it may not include stuff about your hardware enough to boot. Example: I have a Pinebook Pro and it's easy enough to download an image and write it to SD card. But getting it to boot the nvme SSD is another matter involving uboot.
I did it once on a Raspberry Pi and a USB hard drive. Booted from a downloaded image on an sd and cloned it onto the hard drive. Then in the copy I had to change /etc/fstab to point to the new locations. Also in the string the kernel sees I had to change the root= part to the new drive. Which can be a uuid or the older /dev/sda1. If you're booting an actual hard drive you probably want a rootwait or you'll get frequent crashes after idle periods. https://unix.stackexchange.com/questions...-rootdelay
You'll find the root= in /boot/extlinux/extlinux.conf Which has to exist on the new drive too but the paths will probably be different. UUIDs might solve this. An actual installer would ask what you want to boot from and set it up for you.
I did it once on a Raspberry Pi and a USB hard drive. Booted from a downloaded image on an sd and cloned it onto the hard drive. Then in the copy I had to change /etc/fstab to point to the new locations. Also in the string the kernel sees I had to change the root= part to the new drive. Which can be a uuid or the older /dev/sda1. If you're booting an actual hard drive you probably want a rootwait or you'll get frequent crashes after idle periods. https://unix.stackexchange.com/questions...-rootdelay
You'll find the root= in /boot/extlinux/extlinux.conf Which has to exist on the new drive too but the paths will probably be different. UUIDs might solve this. An actual installer would ask what you want to boot from and set it up for you.