Initrdrewrite

From FedoraProject

(Difference between revisions)
Jump to: navigation, search
(ordering, cluster by disk/network)
(formatting, add some more bits)
Line 1: Line 1:
initrd rewrite.
 
 
 
The current incarnation of mkinitrd sucks for a variety of reasons.
 
The current incarnation of mkinitrd sucks for a variety of reasons.
This page documents some of the plans to replace it with something better.
+
This page documents some of the plans to replace it with something better. This is not yet a feature, it's currently just a playground to try some things out
  
Initial ideas:
+
== Planning ==
 
+
* One initrd to rule them all
+
Instead of one for the livecd, one for the installer, one for the distro
+
 
+
* Death to nash.
+
The bits of nash that don't currently exist in other tools need factoring out and putting into util-linux or similar packages.
+
 
+
* Use the same bits the rest of the distro uses instead of custom functionality.
+
No custom udev, just use the regular one etc.
+
 
+
* Include a shell for diagnostic/debugging purposes.
+
 
+
* Probe at runtime instead of buildtime
+
Include all drivers, not just the drivers necessary for the hardware being run.
+
(For storage, the common ones will be built-in to the kernel anyway)
+
 
+
* The initrd will be usable on other distros.
+
The idea being that it can be included in the upstream kernel, and changed when kernel interfaces change etc to prevent breaking distros.
+
  
 +
=== Initial ideas ===
 +
* '''One initrd to rule them all''' - Instead of one for the livecd, one for the installer, one for the distro
 +
* '''Death to nash''' - The bits of nash that don't currently exist in other tools need factoring out and putting into util-linux or similar packages.
 +
* '''Same bits''' - Use the same bits the rest of the distro uses instead of custom functionality.  No custom udev, just use the regular one etc.
 +
* '''Diagnostics''' - Include a shell for diagnostic/debugging purposes.
 +
* '''Probe at runtime instead of buildtime''' - Include all drivers, not just the drivers necessary for the hardware being run.  (For storage, the common ones will be built-in to the kernel anyway)
 +
* '''The initrd will be usable on other distros.''' - The idea being that it can be included in the upstream kernel, and changed when kernel interfaces change etc to prevent breaking distros.
  
 +
=== Major Cases ===
  
 
The first cut of this will just support the simple case of root on a hard disk.  Eventually we want to support the numerous esoteric cases the existing initrd supports. Namely root on..
 
The first cut of this will just support the simple case of root on a hard disk.  Eventually we want to support the numerous esoteric cases the existing initrd supports. Namely root on..
 
* Disk based devices
 
* Disk based devices
* -on-lvm
+
** -on-lvm
* -on-dm-crypt
+
** -on-dm-crypt
* -on-dmraid
+
** -on-dmraid
* -on-mdraid
+
** -on-mdraid
* -on-multi-path
+
** -on-multi-path
 
* Network based devices
 
* Network based devices
* -on-iSCSI
+
** -on-iSCSI
* -on-nfs
+
** -on-nfs
* -on-nbd
+
** -on-nbd
 +
* Special cases to revisit later:
 +
** livecd (/ on dm-snapshot over ext3 on squashfs on iso9660)
 +
** installer
 +
** kdump
  
special cases to revisit later:
+
=== Other tasks performed by the initrd other than mounting rootfs ===
* livecd (/ on dm-snapshot over ext3 on squashfs on iso9660)
+
* installer
+
* kdump
+
 
+
Other tasks performed by the initrd other than mounting /
+
 
* restore from hibernate
 
* restore from hibernate
 
* start 'pretty' plymouth
 
* start 'pretty' plymouth
Line 49: Line 36:
 
* Loading initial SELinux policy.
 
* Loading initial SELinux policy.
  
Utilities to include in the initrd
+
=== Utilities to include in the initrd ===
 
* libc
 
* libc
 
* udev
 
* udev
Line 56: Line 43:
  
  
Other stuff.
+
=== Other stuff ===
 
* The code in the kernel for creating minimal initramfs's (scripts/gen_initramfs_list.sh & usr/*) is kind of useless. It's probably for the best if this just goes away and gets replaced by something useful.
 
* The code in the kernel for creating minimal initramfs's (scripts/gen_initramfs_list.sh & usr/*) is kind of useless. It's probably for the best if this just goes away and gets replaced by something useful.
 +
 +
 +
== Bits ==
 +
 +
Stay tuned...

Revision as of 23:09, 10 December 2008

The current incarnation of mkinitrd sucks for a variety of reasons. This page documents some of the plans to replace it with something better. This is not yet a feature, it's currently just a playground to try some things out

Contents

Planning

Initial ideas

  • One initrd to rule them all - Instead of one for the livecd, one for the installer, one for the distro
  • Death to nash - The bits of nash that don't currently exist in other tools need factoring out and putting into util-linux or similar packages.
  • Same bits - Use the same bits the rest of the distro uses instead of custom functionality. No custom udev, just use the regular one etc.
  • Diagnostics - Include a shell for diagnostic/debugging purposes.
  • Probe at runtime instead of buildtime - Include all drivers, not just the drivers necessary for the hardware being run. (For storage, the common ones will be built-in to the kernel anyway)
  • The initrd will be usable on other distros. - The idea being that it can be included in the upstream kernel, and changed when kernel interfaces change etc to prevent breaking distros.

Major Cases

The first cut of this will just support the simple case of root on a hard disk. Eventually we want to support the numerous esoteric cases the existing initrd supports. Namely root on..

  • Disk based devices
    • -on-lvm
    • -on-dm-crypt
    • -on-dmraid
    • -on-mdraid
    • -on-multi-path
  • Network based devices
    • -on-iSCSI
    • -on-nfs
    • -on-nbd
  • Special cases to revisit later:
    • livecd (/ on dm-snapshot over ext3 on squashfs on iso9660)
    • installer
    • kdump

Other tasks performed by the initrd other than mounting rootfs

  • restore from hibernate
  • start 'pretty' plymouth
  • kdump
  • Loading initial SELinux policy.

Utilities to include in the initrd

  • libc
  • udev
  • switchroot
  • bash (no nash!)


Other stuff

  • The code in the kernel for creating minimal initramfs's (scripts/gen_initramfs_list.sh & usr/*) is kind of useless. It's probably for the best if this just goes away and gets replaced by something useful.


Bits

Stay tuned...