Differences between revisions 2 and 3
Revision 2 as of 2011-04-22 18:29:15
Size: 1452
Editor: RichardDarst
Comment: update with more info
Revision 3 as of 2019-05-08 22:10:49
Size: 1452
Editor: 2620:15c:38:200:1327:261e:3c75:9892
Comment: spelling error.
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:
 * `/usr/share/initramfs-tools/scripts/local-*` - scirpts that run for the `local` boot method (the default). Other boot methods could be `nfs` (order: top, premount, bottom)  * `/usr/share/initramfs-tools/scripts/local-*` - scripts that run for the `local` boot method (the default). Other boot methods could be `nfs` (order: top, premount, bottom)

This page documents things useful for being able to fix things in the initramfs stage of booting.

  • /usr/share/initramfs-tools/init - main init script

  • /usr/share/initramfs-tools/scripts/local-* - scripts that run for the local boot method (the default). Other boot methods could be nfs (order: top, premount, bottom)

  • LVM roots: root=/dev/mapper/vgname-lvname

  • break=NAME, break at these given places (see initramfs-tools/init for locations, such as top, premount, bottom, mount, mountroot, init)

  • debug, or debug=* - be more verbose (set -x), and log to /dev/.initramfs/initramfs.debug

There are two sources for hook directories, /etc/initramfs-tools/scripts/, and /usr/share/initramfs-tools/scripts/.

The hooks.d directory is called to move important files into the initramfs when it is created

The conf.d is moved into the initramfs as configuration variables.

The general boot sequence is:

  • /usr/share/initramfs-tools/init

    • parse boot arguments
    • /scripts/init-top

    • load_modules

    • /scripts/init-premount/*

    • /scripts/$BOOT, BOOT=local or nfs

    • mountroot function - defined in scripts/BOOT

      • (for local) calls pre_mountroot (and scripts/local-top/*)

      • (for local) calls scripts/local-premount/*

      • (for local) mounts

      • (for local) calls scripts/local-bottom/*

    • /scripts/init-bottom/*

    • exec init

DebianNotes/initramfs-tools (last edited 2019-05-08 22:10:49 by 2620:15c:38:200:1327:261e:3c75:9892)