[OFFTOPIC] Re: Custom Linux Distro

Jelle Foks (jelle@flying.demon.nl)
Thu, 11 Feb 1999 22:29:45 +0100 (CET)


On Sun, 7 Feb 1999, Jeff Knox wrote:

> Hey,
>
> I have been contemplating making a custom linux install of my
> machine for a long time. I find that all linux distrobutions come with
> too much crap that waste hd space, and I like to know exactly what is on
> my machine. So may question is What does the Linux kernel require to
> boot? Are does a very basic base distrobution need? What should I
> include to start with? I figure I will look at some of the floppy linux
> distros and see what they use for a start. Any help would be
> appreciated, thanks.

We should take this to another forum, because there is not much about the
kernel to be said about what is necessary for a distro.

This is the boot sequence for linux, as I know it (without initrd, which
is a bit different).

1. Boot loader starts (lilo)
2. Boot loader reads kernel
3. Boot loader starts kernel
4. Kernel decompresses itself
5. Kernel starts itself
6. Kernel scans the CPU type, speed, lets drivers scan for hardware
7. Process 1 (/sbin/init) is started by kernel
8. init parses /etc/inittab
10. init starts the script on the "si::sysinit:" line

>From then on, the scripts determine what to do, so see
/etc/rc.d/rc.sysinit and follow the scripts...

an important one to do in the startup scripts if you use any shared
libraries, is an /sbin/ldconfig, to make the cache /etc/ld.so.cache so
that the loader at /usr/bin/ld can find the necessary libraries.

Also, during boot it says 'switching to run level x', this is the
'initdefault' from /etc/inittab, unless specified otherwise in the kernel
boot options. This switch is done by init too, which runs the script
pointed to by the "lx:x:wait", with x being the run level to switch to.
When switching run levels, init also parses the lines in /etc/inittab that
start with a number, and generally end with a '/sbin/mingetty tty1' or
alike command. These are the lines that tell init at which virtual
consoles it should which programs (generally, it's a getty program, which
shows the 'login:' prompt). Actually, the way init deals with
/etc/inittab is a bit more generic than that, see 'man inittab'.

Another tip is that you should find out which shared library each program
that you want to use on your linux system uses, and make sure the *.so is
there. You can find out, for example, that /bin/ls needs libc.so.6, and
/lib/ld-linux.so.2 by typing 'ldd /bin/ls' (see 'man ldd').

What I'd like to see is a bootable Linux CDROM, so that in a PC that can
boot from CDROM, it's just a matter of popping in the CDROM, pressing the
reset button, and waiting for the X11 greeting. For this, the startup
scripts should be able to automagically detect a range of graphics,
and setup X11 for that card, because we don't want to be stuck with 16 bit
color at 640x480 or something like that. Same for mice, modems, ISDN
cards, etc, adjusting the gpm and pppd/ipppd settings.

> Jeff Knox
> Linux in the Classroom
>
>
>
> Please read the FAQ at http://www.tux.org/lkml/
>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/