Closed KiaraGrouwstra closed 5 years ago
./hardware-configuration.nix
:
fileSystems."/" =
{ device = "/dev/disk/by-uuid/42a1b149-72dd-4ed8-9c6a-b8bc4b1d581e";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/8567-0168";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/bf670e78-9b9d-4e15-8508-aa2f15e85a12"; }
];
$ ls /dev/disk/by-uuid/
80b30b03-af17-4d65-8f2e-5f7c2067e3f6 c7ca628b-0645-4af0-95d5-741d47d5923f
so uh, this would seem exactly like the type of fatal error that'd happen with this kind of mismatch.
sudo nixos-generate-config
:
fileSystems."/" =
{ device = "/dev/disk/by-uuid/c7ca628b-0645-4af0-95d5-741d47d5923f";
fsType = "ext4";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/80b30b03-af17-4d65-8f2e-5f7c2067e3f6"; }
];
missing /boot
this time. uh what?
hardware is gitignore'd, so nothing to commit. preparing for impending crash.
rebuild didn't like the missing /boot
. but how do I find what it should be now?
as per https://nixos.org/nixos/manual/#sec-configuration-file -> Sets, trying:
fileSystems."/boot" =
{ device = "/dev/sda1";
fsType = "ext4";
};
... rather than vfat
and by uuid.
other options:
$ ls /dev/sd
/dev/sda /dev/sda1 /dev/sda2 /dev/sdb /dev/sdb1
sda1
and sda2
failed. master
revision 15 works, after fail. probably coincided with merging in Gnome files that included a now-gitignore'd hardware config. checking where to check the hardware config for revision 15.
sda
failed too. don't see hardware-configuration.nix
in /nix/var/nix/profiles/per-user/tycho/profile-15-link/
. /etc/nixos/hardware-configuration.nix
contains the crap I last copied there, rather than of the revision I just booted. hm.
related: https://nixos.wiki/wiki/Bootloader
tried mounting any devices as ext4/vfat to check if their contents matched /boot
, but none did. so I've yet to identify what should go into /boot
.
[13:43] <jasongrossman> tycho01: You could try running `lsblk`.
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 923.5G 0 part /tmp/c7ca628b-0645-4af0-95d5-741d47d5923f
└─sda2 8:2 0 8G 0 part [SWAP]
sdb 8:16 0 119.2G 0 disk
└─sdb1 8:17 0 119.2G 0 part
sr0 11:0 1 1024M 0 rom
Looks like sr0
matches in terms of size. Not sure what partition type / uuid, but /dev/sr0
might work.
well, that worked with neither ext4
nor vfat
.
trying a sudo find / -name 'hardware-configuration.nix'
just in case a copy was still stored somewhere.
I better start backing up the hardware conf in a gist from now. :neutral_face:
failed attempts to find more info:
sudo cat /root/nix-config/hardware-configuration.nix
sudo grep -R '/boot' /**/*.nix
sudo grep -R '/boot' /**/*.drv
see #80.