[Nix-dev] Fwd: Single user mode
Tobias Geerinckx-Rice
tobias.geerinckx.rice at gmail.com
Thu Jun 11 21:02:29 CEST 2015
On 11 June 2015 at 20:37, Bjørn Forsman <bjorn.forsman at gmail.com> wrote:
> On 11 June 2015 at 19:12, stewart mackenzie <setori88 at gmail.com> wrote:
>> So I've got a corrupted harddisk sector that needs a fsck.ext4 run.
>>
>> It disturbs my bootup flow nagging me of this fact.
>>
>> I'm unable to umount /nix/store so I need to boot into single user mode.
>> Pressing 'e' during bootup then typing 'single' into the line that starts
>> with 'linux' doesn't solve it. Typing 'init 1' also doesn't solve it as I'm
>> immediately presented with X11 login prompt.
>>
>> How does one enter rescue mode on nix?
>
> I think it's answered here:
>
> http://nixos.org/nixos/manual/ch-troubleshooting.html#sec-boot-problems
>
> (Add 'single' to the kernel command line.)
For completeness' sake:
- If even rescue.target does too much, adding 'boot.debug1' launches a
minimal (initramfs) shell with nothing mounted -- or modules loaded.
>From there, you should be able to fsck anything with impunity.
- Or be lazy like me and use "root=" combined with
"boot.shell_on_fail". The initramfs will load modules for you, then
hand over control to you to fsck and mount the rootfs.
Hacky fun.
Regards,
T G-R
More information about the nix-dev
mailing list