Humongous initrd
By default, Fatdog uses what is called in Puppy Linux terms "humongous initrd"
(see here
and here).
Basically what it means is that there are only two (2) files
needed to boot Fatdog: vmlinuz
and initrd, instead of the usual three
(3) (or more): vmlinuz, initrd and base.sfs
(puppy.sfs, zdrv.sfs, adrive.sfs etc). The base.sfs
file still exists in Fatdog but it is contained within the initrd, thus you can't see it. It also
causes initrd's to swell: initrd's size is usually around 3-5 MB
but in Fatdog it is about 425-450 MB because it contains the base.sfs - hence the name "humongous".
Why use humongous initrd over Puppy's traditional 3-file setup?
- Faster boot on harddisk frugal install.
- Two-file installation makes is very easy to boot Fatdog
remotely using PXE.
- Easier booting on exotic medium - as long as the bootloader can
load vmlinuz and initrd (which most Linux bootloader is
supposed to do), then Fatdog can run.
Of course, like anything else, the "faster boot" part depends
on your BIOS and your hardware. It is generally faster to use
humongous initrd on harddisk frugal install but it isn't always
so. Humongous initrd may be slower to boot on other kind of
setup / install devices, too (though again, not always). You may
have other reasons for preferring the standard 3-file setup:
- You're using optical disc multisession, and you find the
boot time slow.
- You're booting off from USB flash drive or SD card, and you
find the boot time slow
- You cannot install humongous initrd because of limited
available space in the boot partition (e.g. UEFI boot
partition). In this case, you can put a vmlinuz
and small initrd in the UEFI boot
partition, and put the base.sfs in
elsewhere.
Fatdog supports converting the humongous initrd back to a small
initrd, extracting the base.sfs in the process and reverting to
the standard 3-file setup:
- You can use Fatdog Installer to install to USB Flash drive.
If you have large enough RAM (2 GB or more), it will offer to
use either standard initrd or small initrd.
- You can remaster Fatdog to create an ISO with small initrd.
- You can use the command line tool fatdog-split-initrd.sh.
Run the command in terminal to see the options.
(In Fatdog versions prior to 904, this command by default will create
"micro" initrd, in Fatdog 904 onwards it will create "mini" initrd by
default. Please see technical notes below).
Of special
note: the tmpdir (temporary
directory) used by the tool by default is /tmp,
if you have less than 2 GB of RAM and you don't use swap,
you'd better specify a different location or Fatdog can
lock-up due to running out of memory when doing the
splitting.
- Or, if you only want to get a smaller version (not the
smallest), you can extract only the fd64.sfs
by clicking on your installed initrd
(this should open it up), moving fd64.sfs
outside to a place accessible by the bootloader (perhaps the
same location of vmlinuz and initrd itself), and then
re-packing the initrd by clicking repack-initrd.sh. (This is the "mini" initrd - see technical notes below).
From Fatdog 813 onwards, fatdog-split-initrd.sh can also create this type of initrd, just pass the -mini option when running it.
If you use last method, please remember to use the basesfs
parameter on your bootloader to tell Fatdog where
to find the basesfs. Usually setting it to basesfs=local
or basesfs=local:/path/to/fd64.sfs will do (or you can
specify the actual device location like basesfs=device:sda7:/path/to/fd64.sfs
- this will be faster since it means Fatdog doesn't have to
search for the basesfs).
Parting words: Will using a small initrd improve boot speed?
Perhaps. There is not definite answer. You just need to go a
try.
Note: base.sfs is a generic term
for Fatdog's system SFS. The actual filename varies with Fatdog
versions, it is usually called fd64_xxx.sfs
where xxx refers to the version number, e.g. fd64_620.sfs. Starting from Fatdog64 700,
the base sfs is simply named as fd64.sfs;
there is no version number attached anymore.
Nano Initrd
On Fatdog64 720 onwards, in addition to the standard huge
initrd, Fatdog64 also comes with a small initrd that we dub as nano initrd (the actual filename of this
initrd in the ISO file is initrd-nano), to
save the effort of making a small initrd as explained above.
This small initrd is called "nano" because it is the smallest
variant; it is smaller than what can be produced by the above
manual methods. It is also the least flexible and has least
features and least hardware support: because there is also no
additional drivers in it. You can only use this initrd if you're
certain that (as far as booting is concerned) your hardware is
supported by the kernel without any additional modules.
To work, this nano initrd still needs the huge initrd; in fact,
the only thing it does is to find the location of the huge
initrd and then load it up. However, because the loading is done
by the Linux kernel, this is usually much faster than the
bootloader + BIOS combination. The base sfs loaded by nano
initrd will stay in the memory just like the normal huge initrd.
In order to nano initrd, you need to do two things:
- In your bootloader configuration, where you usually specify
"initrd", use "initrd-nano".
But remember to keep "initrd" handy and
remember its location.
- In your bootloader configuration, where you specify kernel
parameters / boot parameters / boot options, you need to add
the option mergeinitrd to tell nano
initrd where to find the huge initrd. You can read more
details about this parameter here.
Note: nano initrd is relatively new and is not well
tested and supported. It works, however, some of Fatdog64 tools
(remasters, installers) may not work correctly with it. If you
encounter an unexpected behaviours, please report them in the
forum and we will do what we can to improve the situation.
Technical notes
Fatdog has 4 types of initrd. Listed in order of decreasing size:
- Standard initrd (the "humongous" initrd) - this is shipped by default.
Size is over 300M. Supports coldplug boot parameter.
- "mini" initrd - an initrd that contains the entire set of kernel modules (device drivers) but without the base.sfs.
Size is over 70M. Supports coldplug boot parameter.
- "micro" initrd - an initrd that only contains minimum essential modules required to boot, without the base.sfs.
Size is less than 20M. Supports limited version of coldplug boot parameter (it can only load a very small subset of modules that exist in initrd, obviously).
- "nano" initrd - an initrd that has nothing, only the boot logic -
this is also shipped by default (because, why not, the size is very
small and in certain situations it can help to boot faster).
Size is less than 15M. Does not support coldplug boot parameter.
Note: absolute sizes shown were correct at the time of writing. They may
changed depending on Fatdog64 versions, however the relative size relationship
is always correct, namely standard, mini, micro and nano - going from largest to smallest initd.
Some documentations (including this page), and commands, mention the
term "small initrd". What does "small initrd" means? How small is
"small" ?
"Small initrd" is an old term (before the mini/micro/nano were coined),
and while it can mean any of the items in 2,3 or 4 (mini,
micro, or nano), in most cases, "small initrd" is actually equivalent to
"micro initrd".
This makes sense as "small initrd", when it was originally coined, meant "
an initrd that was as small as it could be while still having enough drivers to boot the system independently of any other files" - which is what "micro" initrd is.
Going forward, however, it is better to drop the usage of "small initrd" altogether,
and instead use the more descriptive initrd size names listed above.