Feedback

type to search

What is the best way to create non-interactive installers that include a custom set of packages?

Asked by [ Editor ] , Edited by Gabe [ Editor ]

I find myself adding the same set of additional packages to new desktop installations over and over again. 


What is the best way to automate the debian installer to make it as non-interactive as possible and install a custom set of packages?
or Cancel

4 answers

5

joey [ Editor ]

Create a preseed file. Yours can start off as simple as this one line:


d-i pkgsel/include string openssh-server build-essential

Put that file up on a web server somewhere. Then when you boot the installer, type “install url=example.com/preseed”


NN comments
gabe
-

This looks very Debian-ish, perfect. If I have a preseed file on the installation media, I suppose there is a way to pull that in as well.

goacid
-

I used preseed file also, and despite you can’t uninstall package, you can install everything silently with you custom answer to each debconf question for each packages with the xxx-auto d-i command.

or Cancel
2

rhonda [ Editor ]

You might want to create a pkg-fcestrada metapackage that depends on all the packages you usually want to install. The best tool to do so is called equivs. Actually it’s as simple as running equivs-control pkg-fcestrada, editing the pkg-fcestrada file (add all your packages to the Depends: line and remove the comment character) and then running equivs-build pkg-fcestrada. You then should have a .deb in your directory that you can dpkg -i and after that run apt-get -f install to make it pull in the dependencies.

NN comments
gabe
-

Now that’s an interesting approach – make a metapackage to suit my needs. Not quite what I was looking for, but I’m definitely filing this tip away. Thank you.

or Cancel
1

amacater [ Editor ]

From a machine that is running your set of packages

dpkg —get-selections >> /root/myfavouritepackages
scp /etc/apt/sources.list >> /root/sources.list

Do a minimal install using a netinst .iso image – don’t specify any mirrors and unselect all preselected packages

Copy the two files from that you saved earlier across to the new machine using USB stick/floppy or whatever

cp /root/sourceslist to /etc/apt/sources.list on the new machine

dpkg —set-selections < /root/myfavouritepackages

aptitude update ; aptitude full-upgrade

[Rationale: this gives you a known minimal state and set of packages. Somewhere buried on the 'Net is similar information that will also save debconf information, though the hardware would have to be pretty much identical. With care, this approach can also be used to migrate across architectures e.g. x86 --> sparc, though you have to be careful about inadvertently installing architecture specific packages]


NN comments
gabe
-

That’s certainly a viable approach, but there’s a little bit too much room for pulling unintended packages into the mix for my liking. Also a little bit more interactive that I need. Thanks for your answer.

or Cancel
0

fcestrada [ Admin ]

Maybe FAI (Fully Automatic Installation) is your option.

Regards,

NN comments
gabe
-

That’s a pretty amazing-looking system, and not Debian-specific either. I was looking for a simpler solution, but thank you for making me aware of that project.

or Cancel

Your answer

You need to join Debian to complete this action, click here to do so.