GNU bug report logs - #22588
root: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY

Previous Next

Package: guix;

Reported by: Mark H Weaver <mhw <at> netris.org>

Date: Sun, 7 Feb 2016 21:22:02 UTC

Severity: normal

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: ludo <at> gnu.org (Ludovic Courtès)
To: Mark H Weaver <mhw <at> netris.org>
Cc: 22588 <at> debbugs.gnu.org
Subject: bug#22588: root: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY
Date: Mon, 08 Feb 2016 10:42:27 +0100
Mark H Weaver <mhw <at> 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.

> 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’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.)

Thanks,
Ludo’.




This bug report was last modified 129 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.