mkinitrd update discussion/survey

Chris Hamilton <[email protected]>
Newsgroups gmane.linux.distributions.rock.devel
Message-ID <[email protected]>
Since the current mkinitrd seems to be broken, I have been looking around trying
to see what other people are doing.  I realize this turns out to have
importance on more than just a 2.4-2.6 module support update.  So I would like
input from everyone before I just start randomly working on it.

Below is my current requirements list, please discuss/comment on these:

###############
Need a kernel installer that also installs correct initrd for the new kernel
  Should safely store old kernels (space constraints?) move old kernel
  down in boot options - may make into 2 actions install versioned
  kernel/initrd, move boot options/links around

Make an initrd builder that supports
  mknode, devfs, udev
  raidtools, mdadm, lvm1&2, evms
  all filesystems(if modules)
  optionally uses cramfs not just gzip
  cdrom, usb, etc. boot support
  net/nfs root
  2.4 and 2.6+ kernels
  gets modules from:
    static module loading from specified file
    current running modules from lsmod
      and their parameters from modules.conf or in a modprobe.conf file
  not dietlibc, please -maybe klibc
  a smart linuxrc option ie.
    strict load order/parameters or a hotplug option
  selinux
  crypt filesystems


####################
Below are the notes I made from a survey of the latest released mkinitrd's I
could find.  Please excuse my ignorance on some issues.  This was done by going
through the packages file by file and glancing at the code.  Somethings I try
to interpret, others I just note when there are differences/strangeness.

Notes:
Suse (mkinitrd-1.1-7.src.rpm):
  mkinitramfs-kinit.sh
    uses udev, very much 2.6 only
    does static reloading of md devices after device creation
      relies on udev/hotplug loading correct devices here I think
      what about recursives?
    mknodes fb0 and fb1
    mknodes isdn,ppp,net stuff for nfs root, iscsi
    (why udev and mknode? - does udev need that?)
    no root discovery
    then it does selinux, iscsi, nfs, regular mount/fsck root, init
    uses /root as / aliases, appears to load init after cleanup
    it appears to be dynamically loading modules?

  mkinitramfs-hotplug.sh
    just loads udev

  mkinitramfs
    splash screen loader option
    runs with static kernel loading only
    uses different kernel names for some archs
    it does multiple kernel/initrd - why??
    does ldd for needed libs
      they have optimize and reg libs, pick reg for safety
      what is linux-gat and what other libs does this use?
    uses /etc/modprobe.conf and modprobe to get dependency list
    ACPI DSDT table loader
    doesn't use dietlibc!! and can use dynamic or static insmod

  mkinitrd.spec
    just a simple install

  new-kernel-pkg
    loads kernel into bootloader
    only does lilo, grub, zipl

  installkernel
    standard

  mkinitrd
    code repeats mkinitramfs it appears so check its notes
    glibc/klibc option for binaries
    net setup
    s390, power, x86 compatible
    linuxrc built inside, is shell based
    does all filesystem work in linuxrc, supports everything
    ugly and huge
    but all output appears to be shell based, need to see
    no crypt?

  Nothing in the packages specifies how the other scripts integrate and when


mandrake (mkinitrd-3.5.18-14mdk.src.rpm):
  mkinitrd.spec
    uses dietlibc
    standardish, everything is patches to mkinitrd

  uses nash which is an initrd specific shell/busybox w/devfs support
  uses grubby for grub,  lilo,  elilo,  and yaboot boot loaders

  uses loadinitrd which has a newt/ncurses prompt for initrd second bootdisks

  installkernel
    standard

  mkinitrd
    can make scsi,raid,lvm modules optional -- for space
    preload,builtin,with modules -- preload list before modprobe.conf
      builtin assumes in monolithicly, with is after modprobe.conf
    uses /etc/modprobe.conf for module loading
    can pick initrd fs ie. cramfs and compression
    nopivot option
    ACPI DSDT support
    fstab reader for root
    some bloat-ie. makes sure ataraid off in 2.6 sata kernels
    module dependency by modules.dep parsing
    usb/forceusb mdk specific options
      ie. loading usb modules to make usb boot devices
    where is cryptofs support?
    how does it support space?

  special net specific mkinitrd package
    uses ulibc, devfs, nfs, busybox, and udhcp to have
    etherboot(using mknbi) supported net module initrd
    includes wlan-ng wireless


redhat (mkinitrd-4.2.0.3-1.src.rpm):
  similar setup as mandrake as mandrake copied

  mkinitrd
    same cli options as mandrake - minus forceusb (appears no specific usb boot)
      adds udev support
    s390 support
    crypto loop support?
    how does it support spacr?

  grubby in redhat supports s390 zipl


debian (initrd-tools_0.1.76.tar.gz):
  initrd-tools the default package
    /etc/mkinitrd/modules used instead of modprobe.conf to hold modules
    mkinitrd.conf
      specifies options that other mkinitrd get cli passed/integrated
      ie. make image command, library path, busybox added in
      probe to find root using fstab
      and whether to install all modules, most needed to find root, specific
      modules and dep, or none

    mkinitrd
      specifically does work for raidtools and mdadm in scanning for root
      dmcrypt support
      code seems pretty clean considering root search effort
        though it contains embedded lists of modules ie. most module list
      2.4 and 2.6 support
      udev not supported?

    uses dash shell

    linuxrc.conf is where?

  other initrd packages - bootcd/gibraltar for bootdisks
    bootcd
      bootcdmkinitrd
        assumes running kernel is one for cd
	specifically loads modules just to get to cd

    gibraltar
      same idea as bootcd, though well documented and supports usb bootdisks
      uses uclibc for busybox


slackware (10):
  simple mkinitrd that just copies a static root system/busybov
    and modules to initrd - no real advanced capabilities as usual

----------------------------------------------------------------
Mail by Ambiguous Computer Computer Ltd. an open source company.
http://www.ambigc.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.