[TUHS] Unix install & "standalone" package

Theodore Ts'o tytso at mit.edu
Tue Sep 5 05:59:18 AEST 2023

On Mon, Sep 04, 2023 at 11:20:31AM -0600, Warner Losh wrote:
> Yea, it was an effort to move mounting of root out of the
> kernel. The earliest scripts just mounted the right disk and moved
> on, and didn't load any new drivers: they just had the logic to pick
> the desired root. But at the same time, there were a lot of people
> that were running on 4MB and 8MB systems that noticed they could put
> all the router software in the initramfs and never pivot to
> something else and they could have quite the product with that. And
> those were the first few bricks that paved the road to hell :)

The other reason why you might need something like an initial ramdisk
is if you don't yet *have* a root file system on the hardware, and you
are trying to install a system using TFTP boot.  At that point, you
have three choices:

(a) Use a NFS root

(b) Use a read-only network block device (for example, MIT Project
Athena had a read-only Remote Virtual Disk which was a network block
device that was used to provide a read-only system image used for
installation and update, as well as a read-only /usr image).

(c) Use a built-in ramdisk.  (And here's not just Linus which has
adopted this strategy; OpenBSD's installer does this as well.)

The other dynamic at play was that ramdisks were needed when you were
installing on a 386 PC with, say, 16 megs of memory, a 320 megabyte
hard disk, and a *single* 1.44MB floppy --- and no ethernet, because
this was for the home PC user, so the best that you had might be a
38kbps dialup link with PPP --- if you were lucky.

So putting the kernel on the first floppy disk, and putting a ramdisk
image on the second floppy disk, so you could then eject the floppy
disk and insert subsequent floppy disks so you could install rest of
the installation binaries (including the shell utilities, the C
compiler, X windows systems, etc.) and then reboot onto the HDD with a
fully set up system, was a pretty natural evolution.

And since we had the ramdisk infrastructure, and most users didn't
want to configure their own kernel as part of the installation
process, that begat kernel modules and the initial ramdisk being used
to store the kernel modules.  In the very early days, this made Linux
*far* more user friendly for non-system programmers to install,
compared to say, FreeBSD during that era, which was still stuck in the
BSD 4.x days of a generic kernel, followed by a kernel configuration
step, etc.

These days, given that some enterprise setups what their servers to be
installed from a Fibre Channel Storage Area Network, or iSCSI, perhaps
using Kerberos to authenticate to the iSCSI target, it makes
absolutely a huge amount of sense to have an initial ramdisk as an
option.  That being said, for a long time, the initial ramdisk was an
*option*.  You didn't have to use it, if you were willing to have a
custom kernel and you are using a device which has a fixed and stable
boot-time enumeration.

This tended to only be used by people who knew what they were doing,
but for example, my file system test appliance VM system doesn't use
an initial ramdisk at all.  It uses qemu, and has a built-in kernel
configuration and build system, and this works perfectly fine booting
into the latest Debian stable distribution, with no initial ramdisk
used at all:


						- Ted

the root filesystem on the second floppy disk (the first
floppy disk contained the kernel), which was then copied into a
ramdisk, so you could 

Trying to fit the kernel and the root file system on a single 1.44MB
floppy, was (barely) doable, but you certainly wouldn't have space for
a C compiler so you build or link your own custom kernel.  So one of
the first things that we did was to put the kernel on a single floppy
disk, and then but the root on a single floppy disk, and then copy the
root to the HDD, and then reboot onto the HDD, and then take the
installation procedure from there.  But that was awkward and 

More information about the TUHS mailing list