There are many existing Linux distros. See Distro Watch
But there is always a reason to build your own... e.g. size, appearance, installed software, running services
You can build a distro from scratch using source code, or base it on an existing distro
The book Linux from Scratch shows how to build a Linux system from source code
Advantages: you control exactly what goes into the system; you can make it small; you can use the latest versions of each piece of software
Disadvantages: time consuming; requires lots of knowledge
There are several distros that build from source code, such as Gentoo and Source Mage
They use a package management system, such as Portage for Gentoo
Requires compilation of each package, so takes time
Build instructions at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml
You need to download the Gentoo stage 3 files
The package management system is called portage
: you
need to download and install it too
Decide which packages you want to include
by setting a parameter in /etc/make.conf
e.g.
USE="gnome firefox mplayer gstreamer"
You update the packages and install kernel sources
Configure the kernel and build the kernel
Build the packages
Setup boot, networking, etc
There are several tools which take standard distros such as Fedora and allow you to customise them to a new distro
Suse Studio shows how to build a distro based on Suse Linux
Build Your Own Linux Distro is a good walkthrough
I wanted to build a distro with web browser and A/V player to play all media types without downloading extra codec players
Revisor built 700+ packages at 680Mb and did not include vlc or gstreamer-bad/ugly
Reconstructor allowed inclusion of all gstreamer packages but did not include vlc. Final ISO was 96Mb, but would not boot in VirtualBox
SuseStudio allowed all gstreamer modules but had no vlc. ISO was 337Mb.