LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Distributions (https://www.linuxquestions.org/questions/linux-distributions-5/)
-   -   Looking for some reading on making my own distro (based on an existing) (https://www.linuxquestions.org/questions/linux-distributions-5/looking-for-some-reading-on-making-my-own-distro-based-on-an-existing-4175656826/)

Red Squirrel 07-03-2019 07:29 PM

Looking for some reading on making my own distro (based on an existing)
 
I want to take an existing distro, probably Debian and basically make my own distro, kinda like how Ubuntu is based on it. Not looking at maintaining my own packages or anything crazy like that, more a custom version of Debian with custom installer, if you will. What I essentially want to do is build a distro that has my own custom software and pre-chosen packages built in to speed up deployments. I want to write software that automates lot of Linux stuff as well think something like cpanel, without the price tag. I would roll it all up into a nice custom distro where all the security and other stuff is preconfigured so it's super simple and fast to deploy.

My end goal is to have a very consistent server install from ISO for every server I setup. Ideally I want to learn to do it more or less manually and not depend on any kind of web based service or tool etc. Will also act as a learning experience on how the process of a Linux install works.

My train of thought is the installer process would be something like this:

-> Prompt for any questions so they don't need to be asked later. IP address, hostname, etc. Maybe partition info as well.
-> Setup disks (bootloader, partition, raid etc)
-> install all the packages from .deb files that are on the ISO (I would want to easily be able to update these occasionally and remake the ISO)
-> run a custom script, which would perform any special configurations, like enabling/disabling services, copying certain config files in some places, installing my own custom software etc...
-> System ready - reboot into new system.

Ideally what I'd want is for the install ISO to boot into a console that also starts a SSH server. You can either SSH in and start the setup or do it at the console.

Long story short I just want to be able to do a mostly unattended install of a distro with specific packages and after that I want it to run a custom script. I think that would essentially be the jist of it. Ideally I'd want to be able to fairly easily update that image using apt-upgrade or some form of command that automagically updates all the packages from the official repository. That way I'd create a new ISO once in a while which would essentially be a newer "version" of my distro.

It does not HAVE to be Debian - I'm actually a CentOS guy but since RH is owned by IBM now I might want to look at switching the Debian route anyway so that's kind of what I have in mind.

This custom "distro" would essentially just be a standard I would follow throughout my whole network or any other server I setup so I can gain some consistency with my systems and also automate repetitious "new install" tasks. Like I would follow various guides on Linux hardening and all those would also be built in to the distro. My custom management software would then provide a nice web front end to all of this. Depending how far I go I would probably also release it to the public.

Can someone point me to some reading on how I can learn how to do this? I found some stuff online such as special tools that can do some of what I want, but I have not found anything that really goes into good details. Thanks in advance!

michaelk 07-03-2019 07:55 PM

debian does have an automatic installer similar to RH's kickstart file. I have never played with preseed but I believe you can run shell scripts at certain steps during the install process. A remastering tool also might be something to consider for what you want to accomplish.

Fs-57 08-11-2020 08:14 AM

Old post but I'm looking for the same thing.

Anyone know good books/docs for do that?

I think to use a basic boot with Busybox and run a program for installing the kernel and packages. (like the Slackware installation?)

Or anyone have maybe a documentation for modify the Slackware Iso? It's maybe the simplest way?

Thanks for reading.


All times are GMT -5. The time now is 02:47 AM.