Skip to content

/dev/... is mounted; will not make a filesystem here! #585

@DavHau

Description

@DavHau

Prerequisites

  • I have updated to the latest version using nix run --refresh github:nix-community/nixos-anywhere
  • I have reproduced the issue with the --debug flag
  • I have searched existing issues to make sure this isn't a duplicate

Bug Description

When a previous nixos installation failed while copying store paths, and then nixos-anywhere is executed a second time, it crashes because it cannot unmount the disk:

### Uploading install SSH keys ###
### Gathering machine facts ###
### Formatting hard drive with disko ###
umount: /mnt: target is busy.
[...]
mke2fs 1.47.2 (1-Jan-2025)
/dev/disk/by-partlabel/154842f3f4b6a1a55afdc3809550d04a7e8c is mounted; will not make a filesystem here!
+ rm -rf /tmp/tmp.hu1g7ygsjL

Steps to Reproduce

Debug Logs

.

Command Used

.

Target System

Cloud server (AWS, DigitalOcean, etc.)

NixOS Version

No response

Environment Information

  • Host OS:
  • Nix version:
  • Target architecture:

Configuration Files

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions