From: Mark H Weaver <mhw@netris.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 22588@debbugs.gnu.org
Subject: bug#22588: root: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY
Date: Mon, 08 Feb 2016 08:49:24 -0500 [thread overview]
Message-ID: <87twljjorf.fsf@netris.org> (raw)
In-Reply-To: <87r3gnilmk.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Mon, 08 Feb 2016 10:42:27 +0100")
ludo@gnu.org (Ludovic Courtès) writes:
> Mark H Weaver <mhw@netris.org> 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, ‘PATH’ is set in ‘base-initrd’ in (gnu system linux-initrd), and
> ‘check-file-system’ in (gnu build file-systems) indeed expects it to be
> set.
Ah, good!
>> 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")
Okay, this is much better than I expected. I asked the user to try
running "e2fsck", and when it wasn't found in PATH, I incorrectly
assumed that PATH wasn't set.
> What about changing the message to explicitly mention this command?
Sure, that would be helpful.
>> 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.
Okay, nevermind then.
>> We should probably also handle errors from fsck specially.
>
> Currently there’s no Bash in the initrd. Should we add one? Our
> ‘bash-static’ package takes 1.4 MiB (I don’t think we can make it
> smaller.)
I'm not sure it would help much without also adding 'coreutils'.
Adding busybox might be worth considering, though.
> Another idea that comes to mind: what about providing a “shell” language
> in Guile? It would automatically tokenize what the user types in and
> convert it to (system* …), plus it would have a few built-in commands
> like ‘cd’ and ‘ls’.
I like the idea of having something like this in Guile, but I'm not sure
we should rush to implement a half-baked solution. When we have
something decent along the lines of Scsh, then definitely!
IMO, anyway, but I don't feel strongly about it.
More thoughts?
Thanks!
Mark
next prev parent reply other threads:[~2016-02-08 13:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-07 21:21 bug#22588: root: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY Mark H Weaver
2016-02-08 9:42 ` Ludovic Courtès
2016-02-08 13:49 ` Mark H Weaver [this message]
2016-02-08 16:48 ` Ludovic Courtès
2016-02-08 17:52 ` Mark H Weaver
2016-02-08 22:49 ` Ludovic Courtès
2016-02-08 19:42 ` Christopher Allan Webber
2016-02-08 9:43 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87twljjorf.fsf@netris.org \
--to=mhw@netris.org \
--cc=22588@debbugs.gnu.org \
--cc=ludo@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.