Friday, October 12, 2012

Text Mode for Fedora 18

Anaconda has been through a pretty major UI rewrite.  Anybody that has tried either Fedora 18 Alpha or any of the nightly images since then should be well aware of this.

The UI rewrite was done for many reasons and accomplishes many goals.  I'm not going to rehash that here.  What I am going to talk about is what happened to text mode.

Text mode in F17 and before was ncurses based.  This gave some kind of pretty UI to do things.  There were drawbacks though.  ncurses didn't work on all the terminals people throw at Anaconda, in particular dumb serial terminals and x3270, the terminal for s390x.  Because of that we also had a (non-interactive) very simple display mode called 'cmdline'.  This just did simple line printing of progress during a kickstart.  Unfortunately due to the way the old UI was coded there wasn't a good complete separation of presentation from computation so many things were written 3 times.  Once for gui, once for text, and once for cmdline.  Fun right?

With Fedora 18 there is one text UI.  It is used on full featured consoles as well as dumb ones.  It doesn't use ncurses, it just uses simple line printing.  It can be used over serial (interactively!) and over x3270 (non-interactively).  It is a simple question and answer prompt.

The design of text mode for F18 and beyond is closely modelled after the design of the GUI for F18 and beyond.  A hub and a set of spokes, so that users can do tasks in whatever order they wish, potentially while things happen in the background.  There is a main setup hub where the user can set a time zone, set a root password, and do some basic storage configuration (pick target disks and a strategy to clear space on those disks).  Once all tasks are complete the user can progress into the actual installation where we just throw up a running list of tasks the backend is accomplishing.

There are very few things you can do with text mode in Fedora 18.  You cannot pick languages,  and you cannot pick installation source.  These can be provided via boot time arguments.  You also cannot do advanced storage configuration which would need a kickstart file to accomplish via "text mode".  We are planning to add some functionality for Fedora 19, but we haven't decided which items and how rich those items will be.  Text mode is still de-emphasized in favor of direct GUI or remote GUI by way of VNC.  For kickstarts however text mode is still pretty great.  The minimal UI does not prevent a fully customized kickstart from being executed.

Give text mode a spin!  It's simple, fast, unobtrusive, and gets the job done.

5 comments:

  1. Are the specifications for how to pick installation source changed? Strangely it doesn't work for me anymore. Do you know where can I find related documentation or a manual about boot time arguments? They are really scattered.

    ReplyDelete
    Replies
    1. The specification has changed a bit.

      There are two things you can define at boot time:

      1) where to get "stage2", the actual anaconda runtime environment.

      2) where to get packages from

      Often the two are one in the same, e.g. a public mirror or an NFS mount, but sometimes they are separate.

      inst.stage2= is a way to indicate where to find the stage2 content.

      inst.repo= is a way to indicate where to find the packages.

      If inst.repo is provided all by itself, anaconda will first attempt to automatically discover stage2 on whatever boot media you used, and failing that it will look for stage2 within the provided by inst.repo.

      If inst.stage2 is provided by itself anaconda does /not/ look within the stage2 location for packages.

      As for documentation of boot time arguments, see https://fedoraproject.org/wiki/Anaconda_Boot_Options (also see the note at the top linking to a draft of recent changes)

      Sadly, as with most projects, documentation comes after code, so there is always a chance that the docs have fallen behind actual code.

      Delete
    2. Worked far better than I expected (both boot arguments and text mode installation.) Thank you guys!

      Delete
  2. What are the memory requirements for the new anaconda in text-mode? Can I install with only 128 mb, 192 mb or 256 mb?

    ReplyDelete
    Replies
    1. We're still working out what the memory requirements are. The redesign has invalidated some of our old data here, and there may be some memory leaks we need to shore up. Hopefully between Beta and Final we can nail down memory requirements.

      I'd like to be able to do a text mode install over NFS with 192 or 256 megs of ram. You'd have to boot in a way that you get stage2 without downloading it into memory though, such as NFS stage2, or boot from optical media (or virt mounted iso).

      Delete