Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I was wondering, how one would go about creating a Linux distro. LFS seems like overkill, I would rather fork an existing distro. I know there are several "respin" applications, but these only seem to allow you to add extra applications to be installed, they don't seem to allow you to modify repositories, configs, and etc etc.

What I'm looking for is knowledge on how to take an existing distro, and modify it significantly, ideally by modifying Fedora or Mint, although I might need to use an older kernel.

General advice is appreciated, how would you modify the files it ships with? What tools do you use? How would you wrap it into a liveCD? How do you host a repository?

share|improve this question
add comment

5 Answers 5

You can create a distro simply by creating your own package repository with customized packages in it. That's all a distro is. It doesn't matter how big or little the changes are.

So if you wish to fork a distro, just copy the entire source repository, change whatever packages you want, and the publish the repo as your own (making sure you don't violate any licensing agreements of the distro you're copying from).

That by definition, is creating a new distro.

share|improve this answer
    
How would you wrap that into a CD? How would you host it? –  Not a Name Mar 20 '12 at 3:26
    
Depends on the packaging system, but they'll have ways to do CD repositories and installers and network hosting. –  XTL Mar 20 '12 at 11:04
add comment

See this question and this question for other takes on it.

The classic answer is "start with Linux From Scratch", go from there. And that's a valid way of doing it: many distros derive from Debian, for example. Lots of distros derive from Red Hat or Slackware or evan Arch linux.

I would say that you need to have a really clear and defensible goal for this distro. Earlier, distros had goals like "fits on a single floppy" or "runs live from a CD", or "develop a package manager that solves all problems".

I'm not sure that's enough in these modern times, though. Just about every weird beard niche has a distro that goes with it: penetration testing has BackTrack, absolutely free has gNewSense, the linst could be extended indefinitely. You will need to have more than a niche, otherwise just do Linux From Scratch and be done with it.

share|improve this answer
    
In light of this answer (or comment), I will modify the question to make it a bit more clear. –  Not a Name Mar 20 '12 at 0:37
5  
add comment

Fedora is actually very simple (although not easy) to fork, or "remix" as they call it. The repo definitions are in fedora-release. Configurations are packaged with the apps themselves, so you'll have to rebuild them from SRPM. Once you've gathered the packages you want to create your fork from, you run createrepo to turn them into an actual repo. You can then use the tools listed in the wiki to generate media from the repo.

share|improve this answer
add comment

When you come to Linux, modifying becomes a thing with a very large scale.

You should create for yourself a clear boundaries on what you would like to add or remove or modify from a particular distro. if you don't you will find yourself wondering endlessly at every step that you take. (from experience).

share|improve this answer
    
downvoted since this doesn't really say anything super useful. –  strugee Oct 14 '13 at 18:50
add comment

I can answer this! A GNU/Linux distribution is an amalgamation of software pieces from GNU and elsewhere. At the very least, you want to fork the software packages you wish to modify, modify them, recompile them, and then redistribute your fork of the distribution of choice.

That wouldn't be all however, as you have to be very careful with the trademarks and copyrights of the distribution you are forking. (I am not a lawyer) but it would be advised to change the branding of the distro you are forking, as you (probably) don't want to associate your distribution with the parent one (I'm not sure about that one, but it might create issues with the parent distribution. If you want to say that you forked a specific distribution explicitly, you can mention it explicitly, but don't use their trademarks. Again, I am not a lawyer).

You also have to find a way to provide a repository with software for your distribution, and also figure out if you want your repositories to exist besides the main distribution's ones or be the only ones for your distribution, and also find out ways to not break the distribution when someone updates it.

Apart from that, there are also 3 files you may explicitly want to change, them being /etc/issue (perhaps /etc/issue.net too), /etc/os-release and /etc/lsb-release, with the last one need to be changed to change the GRUB listing for your distro. Be sure to checkout /etc/default/grub for the line GRUB_DISTRIBUTOR. It should be something like GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null

Now, how you would go about software wise is entirely up to you (subtracting and adding software), but your new distribution should be ready by now (I don't know if I forget anything at this point).

Still however, if you want my personal opinion, I would rather create a new linux distribution following Linux from Scratch, and then throw a package manager on top, rather than directly fork a distribution. Forking a distribution has the advantage that you get a headstart, but if you decide to remove things, it might become a headache very very fast, as you can never be sure about dependencies in the parent distribution.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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