Anaconda/Features/NoLoader

From FedoraProject

< Anaconda | Features(Difference between revisions)
Jump to: navigation, search
(Boot Options: fix noshell)
(Boot Options: update lang, mediacheck, nofirewire, nokill, nopass, noprobe, noverifyssl, noselinux, sshd, syslog, updates, vncpassword)
 
Line 112: Line 112:
 
| [[Anaconda/Options#ks|ks]] || KEEP || dracut || ||
 
| [[Anaconda/Options#ks|ks]] || KEEP || dracut || ||
 
|-
 
|-
| [[Anaconda/Options#lang|lang=&lt;lang&gt;]] || KEEP || dracut
+
| [[Anaconda/Options#lang|lang=&lt;lang&gt;]] || KEEP || dracut/anaconda
 
| Implies <code>locale.LANG=&lt;lang&gt;</code> (and/or <code>locale.LC_ALL=&lt;lang&gt;</code>?)
 
| Implies <code>locale.LANG=&lt;lang&gt;</code> (and/or <code>locale.LC_ALL=&lt;lang&gt;</code>?)
 
|
 
|
Line 118: Line 118:
 
| [[Anaconda/Options#loglevel|loglevel]] || KEEP || || ||
 
| [[Anaconda/Options#loglevel|loglevel]] || KEEP || || ||
 
|-
 
|-
| [[Anaconda/Options#mediacheck|mediacheck]] || || || ||
+
| [[Anaconda/Options#mediacheck|mediacheck]] || KEEP || anaconda || if the media's so bad we can't get into anaconda, we'll know. ||
 
|-
 
|-
 
| [[Anaconda/Options#method|method]] || DEPRECATE || dracut || <code>repo</code> ||
 
| [[Anaconda/Options#method|method]] || DEPRECATE || dracut || <code>repo</code> ||
 
|-
 
|-
| [[Anaconda/Options#nofirewire|nofirewire]] || REMOVE || || <code>blacklist=firewire-ohci</code> ||
+
| [[Anaconda/Options#nofirewire|nofirewire]] || DEPRECATE || dracut || <code>blacklist=firewire-ohci</code> ||
 
|-
 
|-
| [[Anaconda/Options#nokill|nokill]] || || || ||
+
| [[Anaconda/Options#nokill|nokill]] || KEEP || anaconda || ||
 
|-
 
|-
| [[Anaconda/Options#nopass|nopass]] || || || ||
+
| [[Anaconda/Options#nopass|nopass]] || REMOVE || || ||
 
|-
 
|-
| [[Anaconda/Options#noprobe|noprobe]] || || || ||
+
| [[Anaconda/Options#noprobe|noprobe]] || REMOVE || || useless - skips a <code>udevadm trigger</code> after it's already been run twice ||
 
|-
 
|-
 
| [[Anaconda/Options#noshell|noshell]] || KEEP || systemd || shell on <code>tty2</code>/<code>hvc1</code> is set up by <code>anaconda-shell@.service</code> ||
 
| [[Anaconda/Options#noshell|noshell]] || KEEP || systemd || shell on <code>tty2</code>/<code>hvc1</code> is set up by <code>anaconda-shell@.service</code> ||
Line 134: Line 134:
 
| [[Anaconda/Options#nousb|nousb]] || REMOVE || kernel || the kernel handles <code>nousb</code> itself these days. || YES
 
| [[Anaconda/Options#nousb|nousb]] || REMOVE || kernel || the kernel handles <code>nousb</code> itself these days. || YES
 
|-
 
|-
| [[Anaconda/Options#noverifyssl|noverifyssl]] || || || ||
+
| [[Anaconda/Options#noverifyssl|noverifyssl]] || KEEP || dracut/anaconda || ||
 
|-
 
|-
 
| [[Anaconda/Options#repo|repo]] || KEEP || dracut
 
| [[Anaconda/Options#repo|repo]] || KEEP || dracut
Line 142: Line 142:
 
| [[Anaconda/Options#rescue|rescue]] || KEEP || || ||
 
| [[Anaconda/Options#rescue|rescue]] || KEEP || || ||
 
|-
 
|-
| [[Anaconda/Options#selinux|selinux]]<br/>[[Anaconda/Options#noselinux|noselinux]] || || || ||
+
| [[Anaconda/Options#selinux|selinux]]<br/>[[Anaconda/Options#noselinux|noselinux]] || DEPRECATE || use <code>enforcing=0</code> or <code>selinux=0</code> instead || ||
 
|-
 
|-
 
| [[Anaconda/Options#serial|serial]] || DEPRECATE || || <code>console=ttyS0</code> ||
 
| [[Anaconda/Options#serial|serial]] || DEPRECATE || || <code>console=ttyS0</code> ||
 
|-
 
|-
| [[Anaconda/Options#sshd|sshd]] || || || ||
+
| [[Anaconda/Options#sshd|sshd]] || KEEP || systemd || ||
 
|-
 
|-
| [[Anaconda/Options#syslog|syslog]] || || || ||
+
| [[Anaconda/Options#syslog|syslog]] || KEEP || || TODO ||
 
|-
 
|-
| [[Anaconda/Options#updates|updates]] || || || ||
+
| [[Anaconda/Options#updates|updates]] || KEEP || dracut || TODO ||
 
|-
 
|-
 
| [[Anaconda/Options#utf8|utf8]] || || || ||
 
| [[Anaconda/Options#utf8|utf8]] || || || ||
 
|-
 
|-
| [[Anaconda/Options#vncpassword|vncpassword]] || || || ||
+
| [[Anaconda/Options#vncpassword|vncpassword]] || KEEP || anaconda || ||
 
|-
 
|-
 
!colspan=5|NETWORK
 
!colspan=5|NETWORK

Latest revision as of 23:24, 18 November 2011

Contents

[edit] Get rid of anaconda's loader

[edit] Summary

Stop using our old, crufty, hard-to-maintain C-based custom initrd. Move everything out of loader and into dracut or anaconda proper.

[edit] Owner

[edit] Current status

  • Targeted release: Fedora 17
  • Last updated: Nov. 14, 2011
  • Percentage of completion: 50%

[edit] Detailed Description

Since 1999, anaconda has been divided into two parts:

  • stage1, a.k.a. initrd.img: the blue and red text loader environment (no shell, no virtual terminals, just a custom startup binary written in C - statically linked until 2008)
  • stage2, a.k.a. install.img: the full installer environment (for graphical or text installs), complete with Python interpreter and shells and stuff.

In olden days, loader did what its name says - it loaded the stage2 (full graphical) anaconda environment and did a couple other tasks required to reach that objective. Those other tasks include things like:

  • Prompting for language and keyboard (if loader goes interactive for one of the other tasks)
  • Bringing up the network (if required by one of the other tasks)
  • Fetching kickstart files, product.img, and updates.img (if requested)
  • Loading driver disks (if required)
  • Running media check

Most of the time, all of these things are skipped or happen automatically. If you use a boot.iso, you will most likely never see anything besides a blue background and the "Loading anaconda..." message. This means it's a whole lot of code that is just special cases and receives less testing all the time. Further, it's a special environment: It's newt, it's C, it's old, and it's another layer of stuff getting execed between startup and anaconda.

We need to decide how many of these tasks anaconda still needs to do. For those that are still important, they need to move either into the initramfs (if it's something that needs to happen before anaconda can start) or into the main anaconda program - or some other tool that anaconda can run when we're in the full graphical environment. Everything else should go away.

This may mean we keep some sort of loader-like program, but it could be Python based and non-interactive.

[edit] Benefit to Fedora

  • Maintainability!
    • Gobs of custom code will move into upstream dracut modules or nice neat Python modules.
    • New stuff added to dracut will automatically appear in the installer!
  • Debuggability!
    • There's a shell available as soon as the installer boots
    • Every part of the anaconda startup process becomes much easier to modify, since it's all shell or python
  • Flexibility!
    • Moving to dracut-based initramfs means that anaconda can mount anything that dracut can mount
      • preupgrade won't need need to cram files into /boot anymore!
  • Consistency!
    • The installer boots up the same way as a normal system, and the same as the Live images

[edit] Scope

There's 3 major sets of things that loader does: interactive screens, boot arguments, and kickstart commands.

Warning (medium size).png
Work In Progress
These sections are still being filled in. Contents are volatile. Filling may be hot.

[edit] Interactive Screens

All interactive prompts presented by loader will either be moved later (into anaconda proper) or earlier (configure on boot commandline).

Step Names Status Handled By Notes Complete?
STEP_LANG move anaconda already present in anaconda UI Yes
STEP_KBD move anaconda already present in anaconda UI Yes
STEP_METHOD boot opt dracut only needed for netboot.
use repo=, verify validity, give clear error message on failure
STEP_DRIVER boot opt dracut unlikely, usually represents a bug.
use rd.driver.pre and/or rd.driver.post to manually load drivers.
fail with a clear error message if we can't find usable devices at boot.
STEP_DRIVERDISK boot opt dracut make dd/driverdisk take an argument specifying location.
STEP_NETWORK
STEP_IFACE
STEP_IP
boot opt dracut configure network at boot prompt
if network required and unconfigured, try autoconfig (dhcp/auto6/etc).
STEP_EXTRAS keep dracut non-interactive check for updates.img/product.img inside installation source

[edit] Boot Options

Note.png
Not a complete option list
Some options (e.g. autostep, nogpt) are handled by the main anaconda program and don't need to be changed.

Some boot options may be removed, since they no longer apply.
Anything that says deprecate will still be accepted (with a warning/error message) for a release or two.

Boot Option Status Handled in Notes Done?
askmethod REMOVE bootloader use repo= YES
asknetwork REMOVE bootloader use ip= YES
blacklist=<module> DEPRECATE dracut rd.driver.blacklist=<module>
dd
driverdisk
KEEP dracut
display=<display> KEEP? anaconda just exports DISPLAY=<display>
gdb
graphical
text
cmdline
KEEP anaconda anaconda can figure this out itself
keymap=<keymap> KEEP dracut Implies vconsole.keymap=<keymap>
ks KEEP dracut
lang=<lang> KEEP dracut/anaconda Implies locale.LANG=<lang> (and/or locale.LC_ALL=<lang>?)
loglevel KEEP
mediacheck KEEP anaconda if the media's so bad we can't get into anaconda, we'll know.
method DEPRECATE dracut repo
nofirewire DEPRECATE dracut blacklist=firewire-ohci
nokill KEEP anaconda
nopass REMOVE
noprobe REMOVE useless - skips a udevadm trigger after it's already been run twice
noshell KEEP systemd shell on tty2/hvc1 is set up by anaconda-shell@.service
nousb REMOVE kernel the kernel handles nousb itself these days. YES
noverifyssl KEEP dracut/anaconda
repo KEEP dracut set root=live:XXX from repo value
rescue KEEP
selinux
noselinux
DEPRECATE use enforcing=0 or selinux=0 instead
serial DEPRECATE console=ttyS0
sshd KEEP systemd
syslog KEEP TODO
updates KEEP dracut TODO
utf8
vncpassword KEEP anaconda
NETWORK
Boot Option Status Handled in Notes Done?
ip MODIFIED dracut ip={dhcp|dhcp6|auto6|ibft}
see dracut.kernel(7) and items below
ipv6 DEPRECATE dracut ip={[v6addr:goes::here]|auto6|dhcp6}
dns=<ip> DEPRECATE dracut nameserver=<ip>
gateway=<gw>
netmask=<nm>
DEPRECATE dracut ip=<ip>::<gw>:<nm>:<hostname>:<iface>
dhcpclass
dhcptimeout
ethtool
mtu KEEP dracut
ksdevice KEEP dracut add special handling for link, bootif, ibft?
kssendmac
kssendsn
KEEP dracut
linksleep
nicdelay
noipv4
noipv6
proxy
essid
wepkey
wpakey

[edit] Kickstart Commands

Note.png
This is not the main kickstart parser
loader only handles commands that might be needed to find the anaconda runtime. The anaconda runtime contains the normal kickstart parser which handles all the usual kickstart commands.

Yes, loader has its own kickstart parser. Here are the kickstart items it cares about.

Kickstart Command Handled by Notes Done?
lang
keyboard
dracut see lang/keymap above
network dracut see dns/mtu/dhcpclass/etc. above
mediacheck dracut
install
dracut includes cdrom, harddrive, nfs, and url
selinux anaconda systemd loads SELinux policy if needed Yes
graphical
text
cmdline
anaconda
vnc dracut
updates dracut
driverdisk dracut
%include dracut

[edit] Test Plan

The normal Install Test Plans should suffice.

[edit] User Experience

TBD. Some notes:

  • We may remove all the interactive bits, so a few things there used to be (crappy text-based) UI for will now be configured on the boot commandline and/or in the bootloader menu.
  • Some of the anaconda boot options may change or become deprecated.
    • We will do our best to keep backwards compatibility - for a few releases.

[edit] Dependencies

TBD; currently none.

[edit] Contingency Plan

Leave the system as-is - one big combined image, with loader still setting up for anaconda.

[edit] Documentation

[edit] Release Notes