UbuntuWiki:UsplashTodo

来自Ubuntu中文
Oneleaf留言 | 贡献2007年5月15日 (二) 05:13的版本 (New page: {{From|https://wiki.ubuntu.com/UsplashTodo}} {{Languages|UbuntuWiki:UsplashTodo}} == TODO list == See also [WartyWarthog/usplash] (Usersplash/microsplash/Ubuntusplash) aka Mad Phat Splash...)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)
跳到导航跳到搜索

{{#ifexist: :UbuntuWiki:UsplashTodo/zh | | {{#ifexist: UbuntuWiki:UsplashTodo/zh | | {{#ifeq: {{#titleparts:UbuntuWiki:UsplashTodo|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:UbuntuWiki:UsplashTodo|1|-1|}} | zh | | }}

TODO list

See also [WartyWarthog/usplash] (Usersplash/microsplash/Ubuntusplash) aka Mad Phat Splash

fsck attention seeking

Current code that runs fsck is in:

    • /etc/init.d/checkfs.sh
    echo "Checking all file systems..."
    fsck $spinner -R -A $fix $force
    if [ $? -gt 1 ]
    then
      echo
      echo "fsck failed.  Please repair manually."
      echo
      echo "CONTROL-D will exit from this shell and continue system startup."
      echo
      # Start a single user shell on the console
      /sbin/sulogin $CONSOLE
    fi

A chvt/unotify can be added before the sulogin command. *However*, fsck supports an option -r for interactive conformations to repair the filesystem; ...but it's the default and there doesn't seem to be an option to *not* interactively repair the filesystem (we need it fail so that we can chvt to it).

       -r     Interactively repair the filesystem (ask  for  confirmations).   ...

Looks like this can be got around with -n:

       -n     Open the filesystem read-only, and assume an answer
              of `no' to all questions.  Allows e2fsck to be used
              non-interactively.  

fsck progress bar

       -C fd  This  option  causes  e2fsck  to  write  completion
              information to the  specified  file  descriptor  so
              that  the  progress  of the filesystem check can be
              monitored. 

fsck on rootfs

Similar code appears in /etc/init.d/checkroot.sh. This will have been run before usplashd (confirm this), but after usplat, meaning that the console has already been switched away. In this case it needs to do a `chvt' on error, as it can't call usquirt to switch (usplashd isn't running). I thing this wants a little standaline program that tries to call usquirt and if that fails does an explicit chvt to the virtual terminal it was called from.

inittab sulogin

In

    • /etc/inittab
~~:S:wait:/sbin/sulogin

Started the Single-User login, this needs to have a chvt in front of it. Not sure whether init can have more than one command per entry (eg /sbin/chvt 1; /sbin/sulogin). Shells are not necessarily available at this time, so a small binary wrapper needs to be created that does:

int main(int argc, char **argv)
{
  ioctl (...);
  for(; *++argv;)
    execve(*argv, NULL, NULL);
}

This can this be called as:

~~:S:wait:/sbin/uwrapper /sbin/sulogin

And hope that works.

ColinWatson: Why aren't shells necessarily available? You can boot with init=/bin/sh, after all.

Viper550: If we want to show activity during FSCK (espically the ones that happen every 30 mounts), why not we do this? Also depicted is my idea for a progress indicator on the Ubuntu logo while I'm here...

UsplashTodo?action=AttachFile&do=get&target=usplash2_mockup.gif