1

Suppose I install an ISO of Linux Mint as a virtual machine on VirtualBox.

I want to install several programs, such as Terminator, Netbeans, Java, Ruby on Rails, etc.

How can I convert the virtual machine back to ISO so when I install on any other physical computer I have already my programs working as I configured?

  • You have not defined wether installing in another computer is physical or another vbox, or how many times you are replicating the image – Rui F Ribeiro Jul 28 '18 at 14:07
  • It's to be installed in a physical computer – Aleksandrus Jul 28 '18 at 14:33
  • If it were several computers, I would point you out to vagrant+packer – Rui F Ribeiro Jul 28 '18 at 14:34
1

I would not do it that way.

Debian, Ubuntu, Mint, etc

If you are using Debian or derivatives (e.g. mint), then have a look at equivs-control. It is a stupidly named tool, to allow you to make your own deb packages, so long as they only have dependencies (it is easier that making more general debs). You then only need to install this one package on all of your machines, and it will the other packages to be installed.

There are also tools to allow you to build Debian based ISO/Usb images, that are same as standard, but some extra packages pre-installed.

Any

  • Write a shell script.
  • Or use configuration management.
1

Vagrant

I like using Vagrant to do this type of customization. You can either use the stock CentOS/Ubuntu/Debian box files (.box) as initial base boxes or you can start with a stock ISO and build your own Vagrant box file using it.

The .box files that most will typically want to use are here:

Example

Now take one of the sample Vagrantfiles:

$ cat Vagrantfile
Vagrant.configure("2") do |config|
  config.vm.box = "centos/7"
end

or you can use one of mine via my github.com vagrantfiles repo. Now start it up, and SSH into it:

$ vagrant up
$ vagrant ssh

Once in, customize it. Once you're done exit the VM. Now you can package it:

$ vagrant package --base my-centos7

Once this is done, you'll get a .box file. This .box file can be referenced in other Vagrantfiles for further reuse.

Managing .box files

If you just want to download a .box file you can use vagrant to do this like so:

$ vagrant box add centos/7

See vagrant box for additional usage details.

References

  • Did you make an error in paragraph 1? You say start with a stock system, or with a stock system. – ctrl-alt-delor Jul 28 '18 at 9:34
  • @ctrl-alt-delor nope. You can start with the vagrant cloud box files which are stock builds from canonical, CentOS, Debian projects, or build your own using the iso. I'll elaborate that paragraph – slm Jul 28 '18 at 11:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.