From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Subject: bug#22588: root: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY Date: Mon, 08 Feb 2016 10:42:27 +0100 Message-ID: <87r3gnilmk.fsf@gnu.org> References: <874mdk2p40.fsf@netris.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46244) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSiLc-0002oW-GC for bug-guix@gnu.org; Mon, 08 Feb 2016 04:43:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aSiLW-0003wA-Gt for bug-guix@gnu.org; Mon, 08 Feb 2016 04:43:08 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:57616) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSiLW-0003w2-DG for bug-guix@gnu.org; Mon, 08 Feb 2016 04:43:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aSiLW-0002iq-8A for bug-guix@gnu.org; Mon, 08 Feb 2016 04:43:02 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <874mdk2p40.fsf@netris.org> (Mark H. Weaver's message of "Sun, 07 Feb 2016 16:21:35 -0500") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Mark H Weaver Cc: 22588@debbugs.gnu.org Mark H Weaver skribis: > I've been bitten by this once before, and a user on #guix did as well. > When there are problems in the root filesystem that fsck doesn't want to > fix automatically, the user is dumped into a guile prompt where PATH is > not set, and it's very inconvenient to run fsck manually. AFAICS, =E2=80=98PATH=E2=80=99 is set in =E2=80=98base-initrd=E2=80=99 in (= gnu system linux-initrd), and =E2=80=98check-file-system=E2=80=99 in (gnu build file-systems) indeed expe= cts it to be set. > This is what I just suggested that the user type, with apologies: > > (use-modules (ice-9 ftw) (srfi srfi-26)) > (define dirs (scandir "/gnu/store" (cut string-suffix? "e2fsprogs-1.42.= 13" <>))) > (define e2fsck (string-append "/gnu/store/" (car dirs) "/sbin/e2fsck")) > (system* e2fsck "/dev/XXX") > > Is there a better way? I think one can run: (system* "fsck.ext4" "/foo/bar") What about changing the message to explicitly mention this command? > Speaking from personal experience, it's very painful to do anything > non-trivial in that REPL. Even just adding readline would help a lot. The statically-linked Guile in the initrd lacks Readline support. We could maybe work around that, but the initrd would become much larger. > Maybe we should at least set PATH to include the available /bin and > /sbin directories before entering the REPL. Done, AFAICS. > We should probably also handle errors from fsck specially. Currently there=E2=80=99s no Bash in the initrd. Should we add one? Our =E2=80=98bash-static=E2=80=99 package takes 1.4 MiB (I don=E2=80=99t think = we can make it smaller.) Thanks, Ludo=E2=80=99.