2

Is there a way where I could install needed apps on Debian, configure it and save this image to the USB stick so that I could easily and fast install my desired environment any time on any machine?

2 Answers 2

2

Short answer: Yes :-)

Long answer:

  1. You can create a persistent live drive and install your apps. This is a direct way to do it; the system will be created directly in the USB drive. mkusb is a tool, that can create persistent live drives from Debian and Ubuntu live iso files. (But it does not work from Debian installer iso files.)

    help.ubuntu.com/community/mkusb

    help.ubuntu.com/community/mkusb/install-to-debian

  2. You can install the Debian system when booted from one USB pendrive into another USB pendrive pretty much like the following description for doing it with Ubuntu,

    How do I install Ubuntu to a USB key? (without using Startup Disk Creator)

  3. And you can install the Debian system into a hard disk drive or SSD and clone it to another drive or create an image on another drive. This other drive can be a USB pendrive, if it is big enough. (A compressed image is smaller than a direct clone.)

    • It is possible to clone with dd or some other simple tool, that can read from and write to a device.

    • It is possible (and safer) to get a Clonezilla iso file, make a Clonezilla live drive, boot from it and create a cloned copy or image. A Clonezilla image is a directory with a set of files, where the big files are compressed. Clonezilla is faster than dd because it is smart enough to only copy used blocks of the file systems (and skip free blocks), and it does not copy swap partitions. It keeps track of everything (so that a fully working image can be restored from the image).

    • Please notice that you cannot easily clone from a big drive to a small drive. The target drive must have at least the same size as the source drive. If there is a GUID partition table, GPT, and the drives have not exactly the same size, you must also repair the backup partition table.

Comment

A [persistent] live drive is more portable than an installed system (in the same kind of drive), but if the computers are not too different, an installed system will work not only in the computer, where it was installed, but also in the other computers.

1

Create a Live ISO from a running (optionally live) system

There are some applications to create a live ISO from a running system, even another running live system in ram. Then you have the advantages of a live ISO that has a good chance to run on different hardware, no slow USB writes, and don't have to do a full install to a USB device (I had terrible luck getting Ubuntu & Mint to actually work with a Lexar USB, write speeds were glacier and they slowed to a crawl before crashing & completely irreparably corrupting the filesystem).

MX-Linux (based on Debian stable) has an application called mx-snapshot, it's github page says:

Program for creating a live-CD from MX Linux and antiX running system

JUST TO CLARIFY, this program is meant for MX Linux and antiX it won't work on other system without considerable modifications because other systems don't have the infrastructure needed to run this program. Don't try to install the deb it won't work and might ruin your system.

It's incredibly easy to use, just set up the system how you like (if running from another live ISO you can install & change settings, provided you have enough ram), run the program and basically click "Next" twice and "OK" once, and it creates a live ISO to use. (I'd keep most programs closed, like web browsers, in case their files are left in an "open" state.)

enter image description here

The size of the created ISO depends on how many new files/programs were added, for a running live ISO that's about 1.4GB with only updates the new ISO should be roughly the same size.


MX-Linux also has a MX-RemasterCC program for updating a live USB with new changes, similar to snapshot but it modifies a live USB directly (an extra gig or two of free space is all that's needed). I think it works best (maybe exclusively?) on a USB created with MX's Live-usb Maker.


Other distributions might have similar tools, I remember Mint used to have a guide online, but it was removed a few years ago (from changes to Mint perhaps), and Ubuntu might have some too, but I'm not sure if they're still up-to-date and working.

1
  • +1. Interesting tool for MX and AntiX :-) But I must say that I have better luck getting Ubuntu, Mint and Debian to actually work with several USB drives (I prefer fast USB 3 drives), persistent live as well as installed systems ;-) Commented Dec 30, 2018 at 23:06

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.