Cannot boot live cd
So I hear this from people from time to time, and it happened to me as well with usb stick. Then I rebooted twice and it happened to work. It's kind of random, I think some timing issue in the initrd or such.
The error I got was something like:
mount: mounting /mnt-root/iso/nix-store.squashfs on /mnt-root/nix/.ro-store failed: No such file or directory
I think musicmatze on irc got a similar message, and still cannot boot the live cd. Together with this also a warning about lvm leaking some file descriptors like:
File descriptor 3 (/nix/store/something-initrd-fsinfo) leaked on lvm invocation. Parent PID 1:...
So maybe the two are related.
cc @edolstra may know more.
This is a serious issue.
Hi, yes I have this issue. Booting from USB.
Same problem from @kylescottmcgill even with screenshot (thanks!):
https://cloud.githubusercontent.com/assets/245931/5970091/51603af2-a892-11e4-8d17-55fcea30a481.JPG
Could it be that the wrong /dev/root gets mounted to /iso? Also note that "Invalid argument" in fsck.vfat.
As I read the code of the stage-1: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/system/boot/stage-1-init.sh
It seems like that file either doesn't exist under /mnt-root/iso or the wrong /dev/root gets mounted.
I noticed a bug in new kernels regarding xhci bus initialization so the USB device never comes up. As far as I can tell this only affects haswell on 3.18+ kernels. On Feb 9, 2015 9:10 AM, "lethalman" [email protected] wrote:
As I read the code of the stage-1: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/system/boot/stage-1-init.sh
It seems like that file either doesn't exist under /mnt-root/iso or the wrong /dev/root gets mounted.
— Reply to this email directly or view it on GitHub https://github.com/NixOS/nixpkgs/issues/6265#issuecomment-73547518.
I think https://github.com/NixOS/nixpkgs/blob/80a85541d557df23a01f578aaf31e9777a894add/nixos/modules/system/boot/stage-1-init.sh#L348-L361 is somewhat wrong... it should either try forever or fail obviously after 20 tests.
Right now it just continues after 20 tests, as can be seen by the 20 lvm error messages.
So the problem is that USB doesn't come online (where it's expected/at all) and the stage 1 doesn't make that problem obvious.
On Mon Feb 09 2015 at 6:18:21 PM William A. Kennington III < [email protected]> wrote:
I noticed a bug in new kernels regarding xhci bus initialization so the USB device never comes up. As far as I can tell this only affects haswell on 3.18+ kernels. On Feb 9, 2015 9:10 AM, "lethalman" [email protected] wrote:
As I read the code of the stage-1:
https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/system/boot/stage-1-init.sh
It seems like that file either doesn't exist under /mnt-root/iso or the wrong /dev/root gets mounted.
— Reply to this email directly or view it on GitHub https://github.com/NixOS/nixpkgs/issues/6265#issuecomment-73547518.
— Reply to this email directly or view it on GitHub https://github.com/NixOS/nixpkgs/issues/6265#issuecomment-73549053.
So I wonder if that udev settling is needed when the file exists, maybe it should be behind a "if try is 20" test.
Also note that the lvm error message is probably due to the fd3 magic used for reading the fsinfo: https://github.com/NixOS/nixpkgs/blob/80a85541d557df23a01f578aaf31e9777a894add/nixos/modules/system/boot/stage-1-init.sh#L313-L318
On Mon Feb 09 2015 at 6:21:48 PM Wout Mertens [email protected] wrote:
I think https://github.com/NixOS/nixpkgs/blob/80a85541d557df23a01f578aaf31e9777a894add/nixos/modules/system/boot/stage-1-init.sh#L348-L361 is somewhat wrong... it should either try forever or fail obviously after 20 tests.
Right now it just continues after 20 tests, as can be seen by the 20 lvm error messages.
So the problem is that USB doesn't come online (where it's expected/at all) and the stage 1 doesn't make that problem obvious.
On Mon Feb 09 2015 at 6:18:21 PM William A. Kennington III < [email protected]> wrote:
I noticed a bug in new kernels regarding xhci bus initialization so the USB device never comes up. As far as I can tell this only affects haswell on 3.18+ kernels. On Feb 9, 2015 9:10 AM, "lethalman" [email protected] wrote:
As I read the code of the stage-1: https://github.com/NixOS/nixpkgs/blob/master/nixos/ modules/system/boot/stage-1-init.sh
It seems like that file either doesn't exist under /mnt-root/iso or the wrong /dev/root gets mounted.
— Reply to this email directly or view it on GitHub https://github.com/NixOS/nixpkgs/issues/6265#issuecomment-73547518.
— Reply to this email directly or view it on GitHub https://github.com/NixOS/nixpkgs/issues/6265#issuecomment-73549053.
Well I mean, the stage 1 can't know that you are using a USB storage device for the NixOS iso before the USB device with the label NIXOS_ISO comes up. It was intended to be a cd. The worst part for me is that I don't even have keyboard access (since xhci is broken) on the machines which fail so I can't really troubleshoot. On Feb 9, 2015 9:22 AM, "Wout Mertens" [email protected] wrote:
I think
https://github.com/NixOS/nixpkgs/blob/80a85541d557df23a01f578aaf31e9777a894add/nixos/modules/system/boot/stage-1-init.sh#L348-L361 is somewhat wrong... it should either try forever or fail obviously after 20 tests.
Right now it just continues after 20 tests, as can be seen by the 20 lvm error messages.
So the problem is that USB doesn't come online (where it's expected/at all) and the stage 1 doesn't make that problem obvious.
On Mon Feb 09 2015 at 6:18:21 PM William A. Kennington III < [email protected]> wrote:
I noticed a bug in new kernels regarding xhci bus initialization so the USB device never comes up. As far as I can tell this only affects haswell on 3.18+ kernels. On Feb 9, 2015 9:10 AM, "lethalman" [email protected] wrote:
As I read the code of the stage-1:
https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/system/boot/stage-1-init.sh
It seems like that file either doesn't exist under /mnt-root/iso or the wrong /dev/root gets mounted.
— Reply to this email directly or view it on GitHub https://github.com/NixOS/nixpkgs/issues/6265#issuecomment-73547518.
— Reply to this email directly or view it on GitHub https://github.com/NixOS/nixpkgs/issues/6265#issuecomment-73549053.
— Reply to this email directly or view it on GitHub https://github.com/NixOS/nixpkgs/issues/6265#issuecomment-73549801.
@wmertens the usb drive is mounted, otherwise the mount of /iso would fail. The problem is that the squashfs file inside is not found. So either burning went wrong, or the wrong /dev/root is being mounted.
I proposed #6266 which might help here - if it can't find the device it does an ls of /dev/ for people without keyboards :grin:. Should be harmless to merge.
USB Issues should be fixed in b556983eb74c07c3168600eaa8ee5fb9f28f6bb6
As for the xhci bus initialization, i can disable that on my PC at home, and that will provide some more details (maybe?). Also that PC (which has the same issue) is a i7-3770K, which from memory isnt a Haswell Processor. But the laptop (the one in the screenshot) is certainly a Haswell Processor.
If i can provide anything, please let me know, happy to test certain builds etc.
@kylescottmcgill I think I've worked that one out. There was a refactoring in the 3.18 kernel which requires the xhci_pci module to also be added to the initrd.
Btw, I got it working by doing what's in the manual (copying the iso contents to the usb drive by hand, setting the usb drive label appropriately and so on).
@wkennington but nixos live cd doesn't use 3.18 by default, does it? Default linux is 3.14 currently.
Default yes, but I use the new kernel iso On Feb 10, 2015 1:31 AM, "lethalman" [email protected] wrote:
@wkennington https://github.com/wkennington but nixos live cd doesn't use 3.18 by default, does it? Default linux is 3.14 currently.
— Reply to this email directly or view it on GitHub https://github.com/NixOS/nixpkgs/issues/6265#issuecomment-73669247.
This might be of interest here as well. It seems an image based on 96d6344 (comment) doesn't boot with UEFI, but an image based on 2d19af84de (comment) does boot. Do note that these are not the standard grub-based images, but syslinux-based images. The same problems have popped up for syslinux-based images as described in this thread.
Indeed, this is fixed in master. Re-open if the problem re-appears.
@iElectric could you reference the code that fixes this problem? I'm a bit confused on what the problem was and what fixed it.
I don't know. It does work now with latest iso.