I'm not sure that I follow the rationale. If this is your only active machine, what is the issue with having to shut down and boot into an installer to install Linux?
Is your goal to overwrite your existing OS with Linux, or to dual boot?
I'm not sure that I follow the rationale. If this is your only active machine, what is the issue with having to shut down and boot into an installer to install Linux?
Is your goal to overwrite your existing OS with Linux, or to dual boot?
It sounds to me like you are looking to create a "portable" linux install.
This used to be quite common when linux was much less common.
A lot of live distros, including ubuntu, support using an extra partition on the USB as the 'drive', so you boot to the standard live distro but your files and history are all there too.
Here's a couple links. Google "portable linux" for more info.
A general list of portable linux distros.
https://www.ubuntupit.com/best-portable-linux-os-distros-to-install-run-from-usb/
Detailed instructions on doing this.
(I reviewed this, looks accurate, didn't really dig through it. Their method is to create an installer USB in one port, boot from it, and then install to another USB in another port. The UEFI directions at the end look a bit sus. YMMV.)
https://coastipc.com/blog/post/creating-a-portable-linux-operating-system-on-a-usb-drive
debootstrap handles that, arch-install-scripts has got a lot of helpful tools. after the initial install, you arch-chroot to it and install stuff you want, via apt, tasksel, etc.
I think the most straigthforward solution for you would be to boot the live ISO installer in a virtual machine, and then connect the USB device to it and then install. This is mostly guaranteed to work, since it is already using the actual ISO.
Alternatively, the program that most Linux distro's use to install nowadays is called calamares. And yes, you can install it on a non-live system.
sudo apt install calamares calamares-settings-debian
This might be easier, but it also might be harder, if say, the installer is not preconfigured with the various settings the live ISO comes with.
Format the drive, mount it, chroot the filesystem, install. It's basically how you install Arch, the Archwiki will tell you how it's done.
What you want is to bootstrap using a tool called debootstrap
If you want to run NixOS (which you don't seem to wamt) this is a possibility!
Look up NixOS amywhere.
Can install NixOS from almost any running Linux system live without boot USB.
Requires a machine on the same network though.
Pretty cool!
I would use a virtual machine
all 14 comments