Subject: bug#22588: closed (Re: bug#22588: root: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 08 Feb 2016 22:50:02 +0000

Your bug report

#22588: root: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY

which was filed against the guix package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
22588: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22588
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#22588: root: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY
From: [email-masked] (Ludovic Courtès)
To: Mark H Weaver <[email-masked]>
Cc: [email-masked]
Date: Mon, 08 Feb 2016 23:49:06 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

Mark H Weaver <[email-masked]> skribis:

> Okay, I must admit that's a pretty great little hack, and a nice demo of
> how easy it is to hack something together like this in Guile.

It’s fun to think we have a compiler from a subset of Bourne shell to
the Guile VM.  :-)

> Let's do it :)

Done in 6eb4390!

Thanks,
Ludo’.

Subject: root: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY
From: Mark H Weaver <[email-masked]>
To: [email-masked]
Date: Sun, 07 Feb 2016 16:21:35 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

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.

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?

Speaking from personal experience, it's very painful to do anything
non-trivial in that REPL.  Even just adding readline would help a lot.

Maybe we should at least set PATH to include the available /bin and
/sbin directories before entering the REPL.

We should probably also handle errors from fsck specially.

    Thoughts?
       Mark