Difference between revisions of "Initramfs zfs boot"

From copec
Jump to: navigation, search
(Created page with "== Overview == Both Debian and Ubuntu fail to boot when there is an arbitrarily more complex zpool than a single vdev that contains the bootfs. === Notes on Boot Process ===...")
 
 
(7 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
* The linux kernel is initially bootstrapped.
 
* The linux kernel is initially bootstrapped.
 
* The compiled-in initramfs is mounted and executed.
 
* The compiled-in initramfs is mounted and executed.
* * It mounts the external initramfs; Deletes everything under its own initramfs; Executes the external initramfs /init
+
** It mounts the external initramfs; Deletes everything under its own initramfs; Executes the external initramfs /init
 +
 
 +
==== (External) initramfs init ====
 +
* Create
 +
** /dev
 +
** /root
 +
** /sys
 +
** /proc
 +
** /tmp
 +
** /var/lock
 +
* Mount
 +
** /sys
 +
** /proc
 +
** /dev
 +
** /dev/pts
 +
** /run
 +
* Create
 +
** /run/initramfs
 +
* Setup bash exports
 +
* Setup hostname
 +
* Source
 +
** /conf/initramfs.conf
 +
** /conf/conf.d/*
 +
** /scripts/functions
 +
 
 +
* Parse command line options
 +
** init root rootflags rootfstype rootdelay resumedelay loop loopflags loopfstype crytopts nfsroot netboot ip ip6 boot ubi.mtd resume resume_offset noresume drop_capabilities panic quiet ro rw debug break blacklist netconsole BOOTIF hwaddr fastboot forcefsck fsckfix fsckmode fsck.repair recovery
 +
 
 +
* Default
 +
** BOOT=local
 +
** noresume
 +
 
 +
* maybe_break top
 +
** export BOOT
 +
** run_scripts /scripts/init-top
 +
* maybe_break modules
 +
** load_modules
 +
* maybe_break premount
 +
** run_scripts /scripts/init-premount
 +
* maybe_break mount
 +
* /scripts/local
 +
* /scripts/nfs
 +
* /scripts/BOOT
 +
* parse_numeric ROOT
 +
* maybe_break mountroot
 +
* mount_top
 +
* mount_premount
 +
* mountroot
 +
 
 +
* Mount
 +
** /usr
 +
 
 +
* mount_bottom
 +
* nfs_bottom
 +
* local_bottom
 +
* maybe_break bottom
 +
** run_scripts /scripts/init-bottom

Latest revision as of 12:40, 24 January 2017

Overview

Both Debian and Ubuntu fail to boot when there is an arbitrarily more complex zpool than a single vdev that contains the bootfs.

Notes on Boot Process

  • The linux kernel is initially bootstrapped.
  • The compiled-in initramfs is mounted and executed.
    • It mounts the external initramfs; Deletes everything under its own initramfs; Executes the external initramfs /init

(External) initramfs init

  • Create
    • /dev
    • /root
    • /sys
    • /proc
    • /tmp
    • /var/lock
  • Mount
    • /sys
    • /proc
    • /dev
    • /dev/pts
    • /run
  • Create
    • /run/initramfs
  • Setup bash exports
  • Setup hostname
  • Source
    • /conf/initramfs.conf
    • /conf/conf.d/*
    • /scripts/functions
  • Parse command line options
    • init root rootflags rootfstype rootdelay resumedelay loop loopflags loopfstype crytopts nfsroot netboot ip ip6 boot ubi.mtd resume resume_offset noresume drop_capabilities panic quiet ro rw debug break blacklist netconsole BOOTIF hwaddr fastboot forcefsck fsckfix fsckmode fsck.repair recovery
  • Default
    • BOOT=local
    • noresume
  • maybe_break top
    • export BOOT
    • run_scripts /scripts/init-top
  • maybe_break modules
    • load_modules
  • maybe_break premount
    • run_scripts /scripts/init-premount
  • maybe_break mount
  • /scripts/local
  • /scripts/nfs
  • /scripts/BOOT
  • parse_numeric ROOT
  • maybe_break mountroot
  • mount_top
  • mount_premount
  • mountroot
  • Mount
    • /usr
  • mount_bottom
  • nfs_bottom
  • local_bottom
  • maybe_break bottom
    • run_scripts /scripts/init-bottom