{"action":"created","issue":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/23926","repository_url":"https://api.github.com/repos/NixOS/nixpkgs","labels_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/23926/labels{/name}","comments_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/23926/comments","events_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/23926/events","html_url":"https://github.com/NixOS/nixpkgs/issues/23926","id":214457415,"number":23926,"title":"When /boot is full, system rebuilds fail","user":{"login":"joepie91","id":1663259,"avatar_url":"https://avatars2.githubusercontent.com/u/1663259?v=4","gravatar_id":"","url":"https://api.github.com/users/joepie91","html_url":"https://github.com/joepie91","followers_url":"https://api.github.com/users/joepie91/followers","following_url":"https://api.github.com/users/joepie91/following{/other_user}","gists_url":"https://api.github.com/users/joepie91/gists{/gist_id}","starred_url":"https://api.github.com/users/joepie91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joepie91/subscriptions","organizations_url":"https://api.github.com/users/joepie91/orgs","repos_url":"https://api.github.com/users/joepie91/repos","events_url":"https://api.github.com/users/joepie91/events{/privacy}","received_events_url":"https://api.github.com/users/joepie91/received_events","type":"User","site_admin":false},"labels":[{"id":60265212,"url":"https://api.github.com/repos/NixOS/nixpkgs/labels/6.topic:%20nixos","name":"6.topic: nixos","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":26,"created_at":"2017-03-15T16:57:12Z","updated_at":"2017-09-25T07:01:56Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"## Issue description\r\n\r\nWhen the `/boot` partition is entirely full (eg. when old generations have not been removed for a long time), any kind of `nixos-rebuild` command will fail if a new kernel is attempted to be installed.\r\n\r\nDeleting old generations and garbage-collecting does *not* fix the issue, because garbage collection doesn't touch the `/boot` partition, and `nixos-rebuild` will only try to remove obsolete images *after* having placed the new `initrd` in `/boot`. Since it's full, the new image cannot be copied over:\r\n\r\n```\r\ncannot copy /nix/store/8i1ixqycplb4wc812wkxxf432424jxh5-initrd/initrd to /boot/kernels/8i1ixqycplb4wc812wkxxf432424jxh5-initrd-initrd.tmp\r\nwarning: error(s) occurred while switching to the new configuration\r\n```\r\n\r\n... which means the \"remove old images\" routine never occurs, and the user is stuck.\r\n\r\nI've worked around this by manually moving a very old image out of the `/boot` partition into `/root`, then running `nixos-rebuild boot`, then moving back the moved image *after* cleanup and running `nixos-rebuild boot` *again* to ensure that it wasn't a necessary image after all.\r\n\r\n### Steps to reproduce\r\n\r\n1. Have a `/boot` with no space left.\r\n2. Try to rebuild the system with a new kernel build.\r\n\r\n## Technical details\r\n\r\n* System: 16.09.1836.067e66a (Flounder)\r\n* Nix version: nix-env (Nix) 1.11.7\r\n* Nixpkgs version: 16.09.1836.067e66a"},"comment":{"url":"https://api.github.com/repos/NixOS/nixpkgs/issues/comments/331793764","html_url":"https://github.com/NixOS/nixpkgs/issues/23926#issuecomment-331793764","issue_url":"https://api.github.com/repos/NixOS/nixpkgs/issues/23926","id":331793764,"user":{"login":"rick68","id":42619,"avatar_url":"https://avatars1.githubusercontent.com/u/42619?v=4","gravatar_id":"","url":"https://api.github.com/users/rick68","html_url":"https://github.com/rick68","followers_url":"https://api.github.com/users/rick68/followers","following_url":"https://api.github.com/users/rick68/following{/other_user}","gists_url":"https://api.github.com/users/rick68/gists{/gist_id}","starred_url":"https://api.github.com/users/rick68/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rick68/subscriptions","organizations_url":"https://api.github.com/users/rick68/orgs","repos_url":"https://api.github.com/users/rick68/repos","events_url":"https://api.github.com/users/rick68/events{/privacy}","received_events_url":"https://api.github.com/users/rick68/received_events","type":"User","site_admin":false},"created_at":"2017-09-25T07:01:56Z","updated_at":"2017-09-25T07:01:56Z","author_association":"CONTRIBUTOR","body":"I found this mail list --  https://nixos.org/nix-dev/2016-September/021832.html\r\n\r\nAfter I run thin command,\r\n``` sh\r\n/run/current-system/bin/switch-to-configuration boot\r\n```\r\nI got back my /boot space."}}
{"actor":{"display_login":"rick68"}}