Title.
I know there are tools to set up a linux distro’s installer on a USB flashdrive. What I’m looking for is slightly different: I want to install a linux distro (a Debian derivative, but am still unsure which) on a USB hard drive, but I want to do it from a running system, rather that have to boot into installer mode.
The rationale is that this is the only active machine I have ATM. I guess this exists since that’s how “live distros” with installers even function in the first place, but I haven’t had much luck searching for information.


Good question.
Hrmm. First janky thought… “
ddthe running system to the USB”. LOL. Dear oh dear, do not do that, LOL.Actually, first thought, before reading the post, just from the title, was “install gentoo”, … and that still works, … if it’s gentoo you want.
I wonder if you could do it from a virtual system… with whatever passthrough(?) or whatever needed to let it install to USB. So [in virtualbox or qemu or whatever] boot from whatever distro’s live/installer [~ even, ventoy(?)], and install to USB, much like you would if running the live/installer on bare metal, except you’re in virtual, and have access to your current daily driver OS and all your comforts there.
I noticed recently some distros do not like being installed to USB (~ is that a recent thing? Maybe I’d not been installing distros to USB from as diverse a pool of distros as I thought, and it’d always been like this.)
I feel like I’m forgetting some other obvious avenue. There may be just distro-specific methods. Like gentoo’s stage3 handbook install method’s already sufficiently flexible way [(or exherbo or decibellinux (oh noes, decibellinux.org is still down) or other distro that does a similar manual install)]. [edit: oh!]
… Then, depending upon what you need/want it for, and need/want avoid a reboot for, other options may offer solutions not considered further back in the decision tree… distrobox, bedrocklinux, distro-agnostic package management, manual (compile&)installs, or perhaps even just using something like virtualbox gets you far enough? … But no, none of that’s what you asked for. What you asked for is better. :)
[edit: oh!: I did make a start on a distro-agnostic distro-installer script, a decade or two ago, before life interrupted. I must have thought it possible. It would have allowed you to accomplish this. … Pity “life” happened, or I’d surely have that made already. Is doable.]
Same! I get capitalist anxiety every time I have to write a bootable ISO to a thimb drive!