Creating customized installs of Linux?

Red Squirrel

No Lifer
May 24, 2003
69,721
13,340
126
www.betteroff.ca
It's time for me to start upgrading my CentOS 6.x stuff to a newer distro. Rather than having to manually configure everything each time. (ex: making sure certain packages are installed or certain config files are a certain way etc) I want to automate it better and I also want it to be self contained in an ISO for offline installs. I'm leaning towards also switching to Debian as it's probably considered a bit more "standard" so I would be doing this with Debian most likely.

I read up on simple-cdd, so I think this is what I want to use, but I really can't find much details on how to use it. It talks about brief stuff like "the configuration file" or profiles, but no details on what these actual files are called, where yo put them, or the different options you can put in them etc. Same with preseed files. Like if I want to select a locale, where is the list of possible locales? Lot of details like that I can't really find. Everything I read on it is really brief.

Can someone point me to a place where it goes into more step by step details of how to setup a custom ISO? Essentially what I want is to have it preinstall specific packages and have those packages be on the ISO. I also want to be able to update the packages from the online repo once in a while to update my ISO. Lot of other minor things I may not be thinking of that I may want to do. Bottom line is just looking for some kind of tutorial that covers all the options, and possibilities of options. Have not been too successful in finding proper detailed info when googling.
 

mv2devnull

Golden Member
Apr 13, 2010
1,519
154
106
Can't help with Debian or ISOs. A thorough ISO is probably larger than DVD, so you would write it on USB.

Red Hat uses "kickstart install" a configuration file that lists packages to install and other config.
Basically answers to all questions that the interactive install would ask and then some. RH's "Anaconda" installer reads that file.
One should be able to supply the kickstart file within the ISO. I have network and PXE, so no need for ISO.


Install is only a brief moment. As you said, the content of install is likely to "update".
You surely want the installed systems to stay coherent? That means updating the already installed systems too (unless you prefer to reinstall).

One tool for maintenance is "Ansible" https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html
You define configuration (packages, etc) and the script ensures that target systems match it.

That could simplify the initial install; all you need is a system, where ansible can run. Add the ansible config to ISO and make the install start ansible at end.
 

Red Squirrel

No Lifer
May 24, 2003
69,721
13,340
126
www.betteroff.ca
Yeah found that too. I think that's more of a deployment system, like there is a server running that manages it all. It's a neat solution for like say, enterprise or home or any specific set environment etc but I really want to be able to essentially make my own custom ISO that way I can install it on any system including offline VMs etc. I just want to standardize a baseline unattended install so I'm always starting off the same way when I setup a system. I want to be able to fairly easily update it as well. I've been playing with simple-cdd as based on the docs it does seem like it's what I want, I'm just having trouble finding documentation that goes into more specific details on each aspects, like all the different options in config files etc.
 

mxnerd

Diamond Member
Jul 6, 2007
6,799
1,103
126
Some links.

The Debian Administrator's Handbook



==

https://github.com/nodiscc/dlc/blob/master/doc/custom.md
 
Last edited:

Red Squirrel

No Lifer
May 24, 2003
69,721
13,340
126
www.betteroff.ca
So I'm getting somewhere, found out how to modify and respin the ISO here so don't need simple-cdd. With that knowledge and capability then practically anything will be possible from this point. Still need to read up more to get the preseed to do what I want etc, but I have a starting point anyway and more reading to do.
 

Red Squirrel

No Lifer
May 24, 2003
69,721
13,340
126
www.betteroff.ca
Ok so I followed these instructions more or less but having some issues getting it to detect upon install:

https://wiki.debian.org/DebianInstaller/Modify/CD

As a baseline test, I did not modify any of the files from the ISO (tried that previously but that failed too, so took a step back to eliminate variables). I simply mounted it, copied the files to another folder so they are ready to be modified, and then I ran this command:

Code:
genisoimage -r -J -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -o /localdata/www/isotest/debian-10.2.0-amd64-DVD-1_custom.iso isodata

isodata is the folder the ISO's contents was copied to.


However when I boot the ISO (in Virtualbox) and select any installation option, it fails at detecting the cd-rom and fails with this error:

Code:
Incorrect CD-ROM detected
The CD-ROM drive contains a CD which cannot be used for installation.
Please insert a suitable CD to continue with the installation.

So something it does not like about the customized ISO. Anything else I can try or any variants of that command that will work? I presume the failure has to do with the way the ISO is being created, as the original ISO works fine.
 

Shamrock

Golden Member
Oct 11, 1999
1,441
567
136
MX Linux can make custom ISO.

You make the installation to your liking, then go into tools, and click "snapshot" and it will make an ISO.

 

Red Squirrel

No Lifer
May 24, 2003
69,721
13,340
126
www.betteroff.ca
Ok got the ISO generation working. Turns out it really matters how you take the files out. I was just mounting it and copying the files, but looks like the bsdtar command does something special so if I use that to get the files from the ISO and then the other command works.

I have not played much with the actual customization part yet but now that I have the basic process down path for creating the ISO I can explore the customization options more. I do get a weird error that it can't mount something when the installer starts but it flashes too fast so I can't see it, but it does seem to work otherwise... I will find out later if this is an issue or not once I'm actually testing a full install from the custom ISO.