# System hangs at "loading graphical session", chroot fails

**URL:** https://discourse.nixos.org/t/system-hangs-at-loading-graphical-session-chroot-fails/81054
**Category:** Help
**Created:** [November 8, 2026, 2:00pm UTC](https://discourse.nixos.org/t/system-hangs-at-loading-graphical-session-chroot-fails/81054 "2026-11-08T14:00:35Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![BoredSquirrel](https://discourse.nixos.org/user_avatar/discourse.nixos.org/boredsquirrel/32/31935_2.png) [@BoredSquirrel](https://discourse.nixos.org/u/BoredSquirrel)
#### Post date: [November 8, 2026, 2:00pm UTC](https://discourse.nixos.org/t/system-hangs-at-loading-graphical-session-chroot-fails/81054/1 "2026-11-08T14:00:35Z")

</div>

I have weird issues on my Chromebook, current and previous generations fail to boot, while a Live USB succeeds.

I moved a bunch of files over and then tried a chroot to fix it. The system uses flakes and encrypted BTRFS, so the docs are not complete there.

```console
[root@nixos:/home/nixos]# cryptsetup open /dev/mmcblk1p2 chromebook
Enter passphrase for /dev/mmcblk1p2:

[root@nixos:/home/nixos]# mount /dev/mapper/chromebook /mnt/

[root@nixos:/home/nixos]# nixos-enter
ln: failed to create symbolic link '/bin/.sh.tmp': No space left on device
mv: cannot stat '/bin/.sh.tmp': No such file or directory
Activation script snippet 'binsh' failed (1)
write_file '/var/lib/nixos/.tempWYLdM' - sysopen: No space left on device at /nix/store/dyx8qsmgnsz2csfzwn723gbd2jvp0j7g-update-users-groups.pl line 23.
Activation script snippet 'users' failed (28)
setting up /etc...
Died at /nix/store/rg5rf512szdxmnj9qal3wfdnpfsx38qi-setup-etc.pl line 27.
Activation script snippet 'etc' failed (28)
ln: failed to create symbolic link '/usr/bin/.env.tmp': No space left on device
mv: cannot stat '/usr/bin/.env.tmp': No such file or directory
Activation script snippet 'usrbinenv' failed (1)

```

I will try to reboot and try again

Tried again, with and without sudo or root, same result.

Trying to chroot manually fails at the `chroot` step

```console
[root@nixos:/home/nixos]# chroot /mnt /nix/var/nix/profiles/system/activate
ln: failed to create symbolic link '/bin/.sh.tmp': No space left on device
mv: cannot stat '/bin/.sh.tmp': No such file or directory
Activation script snippet 'binsh' failed (1)
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LC_CTYPE = (unset),
        LC_NUMERIC = (unset),
        LC_COLLATE = (unset),
        LC_TIME = (unset),
        LC_MESSAGES = (unset),
        LC_MONETARY = (unset),
        LC_ADDRESS = (unset),
        LC_IDENTIFICATION = (unset),
        LC_MEASUREMENT = (unset),
        LC_PAPER = (unset),
        LC_TELEPHONE = (unset),
        LC_NAME = (unset),
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
write_file '/var/lib/nixos/.tempwLncG' - sysopen: No space left on device at /nix/store/dyx8qsmgnsz2csfzwn723gbd2jvp0j7g-update-users-groups.pl line 23.
Activation script snippet 'users' failed (28)
setting up /etc...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LC_CTYPE = (unset),
        LC_NUMERIC = (unset),
        LC_COLLATE = (unset),
        LC_TIME = (unset),
        LC_MESSAGES = (unset),
        LC_MONETARY = (unset),
        LC_ADDRESS = (unset),
        LC_IDENTIFICATION = (unset),
        LC_MEASUREMENT = (unset),
        LC_PAPER = (unset),
        LC_TELEPHONE = (unset),
        LC_NAME = (unset),
        LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Died at /nix/store/rg5rf512szdxmnj9qal3wfdnpfsx38qi-setup-etc.pl line 27.
Activation script snippet 'etc' failed (28)
ln: failed to create symbolic link '/usr/bin/.env.tmp': No space left on device
mv: cannot stat '/usr/bin/.env.tmp': No such file or directory
Activation script snippet 'usrbinenv' failed (1)

```

Uhm, checking storage, is this thing simply full? Will delete some files lol

## Solved, kinda

Somehow my nix store had grown to over 100GB filling up my entire system

Needed to delete some large user files, then chrooting worked as expected.

Now I am doing a `nh clean all`

If you have other suggestions on how to prune the store, please tell me!

I already used this update.nix

```nix

{ ... }:
{
	system.autoUpgrade = {
		enable = true;
		dates = "23:00";
		randomizedDelaySec = "45min";
		runGarbageCollection = true;
		operation = "boot";
		allowReboot = true;
		rebootWindow = {
			lower = "03:00";
			upper = "07:00";
		};
	};

	# service overrides
	systemd.services.nixos-upgrade.postStop = ''
		# delete generations older than 3
		nix-env --delete-generations +3
		# garbage collect unused things
		nix-store --gc

		lib.getExe dash -c "lib.getExe flatpak update -y && lib.getExe flatpak remove --delete-data --unused -y"
	'';
}

```

But apparently it didnt work, and something blew up my store

---

<div class="post-metadata">

### Author: ![bitbloxhub](https://discourse.nixos.org/user_avatar/discourse.nixos.org/bitbloxhub/32/35210_2.png) [@bitbloxhub](https://discourse.nixos.org/u/bitbloxhub)
#### Post date: [November 8, 2026, 8:52pm UTC](https://discourse.nixos.org/t/system-hangs-at-loading-graphical-session-chroot-fails/81054/2 "2026-11-08T20:52:47Z")

</div>

I use the following tools to clean up the Nix store:

> **[GitHub - linyinfeng/angrr: Auto Nix GC Root Retention](https://github.com/linyinfeng/angrr)**
>
> Auto Nix GC Root Retention

> **[GitHub - Mic92/fast-nix-gc: A faster nix-collect-garbage.](https://github.com/Mic92/fast-nix-gc)**
>
> A faster nix-collect-garbage.

> <https://github.com/bitbloxhub/nixos-config/blob/d21ea8e0198f2128e0f52580a9b2a5c7124b372f/nix/angrr.nix>

You still do need to run `fast-nix-gc` manually, at least in my config, because when I had it running automatically, it decided to run in the middle of an update and eating stuff that wasn’t gcrooted yet due to build failures with some packages I had and needed to fix.
