Hi,
tldr; nixos-install
fails with:
Failed to check file system type of “/boot”: No such file or directory
I think I’ve been through this install 30 times yesterday and today and I still haven’t gotten things to work. But I think I’m close. To be sure that I haven’t missed anything I’d like to share step by step everything that I’ve done:
Create bootable usb drive
- Download nixos graphical live cd from here
- Use rufus on the windows laptop to create a bootable gpt&uefi drive
Here’s a screenshot to verify those settings in rufus:
Make the Dell laptop ready
- Boot into BIOS
- Disable secure boot
- Make sure the boot mode is UEFI
(try to) Install nixos
- Start the laptop and hit F12 to open the boot menu
- Select “UEFI BOOT”: “UEFI: SanDisk, Partition 1” - this is your usb drive
- Select the first option in the list (“NixOS 20.03.1619.ab3adfe1c76 Installer”)
Picture:
- The Plasma display manager opens
- Connect to your wifi
- Open system settings → input devices → keyboard → layouts → change keyboard layout
- Open Konsole
sudo su
- Verify that we’re in UEFI:
[ -d /sys/firmware/efi/efivars ] && echo "UEFI" || echo "fail"
- it prints “UEFI” -
gdisk /dev/nvme0n1
-
o
to create a new GPT partition table -
n
to create a partition
partition number: 1
first sector: (just hit enter)
last sector: write “+512M” and hit enter
hex code: EF00 -
n
to create a partition
partition number: 2
first sector: (just hit enter)
last sector: (just hit enter)
hex code: 8E00 -
w
to write the changes
-
- See what the world looks like:
lsblk
Picture:
-
Setup encryption:
a. Format the partition:cryptsetup luksFormat /dev/nvme0n1p2
and select a password
b. Open the formatted partition:cryptsetup luksOpen /dev/nvme0n1p2 nvme0n1p2-crypt
and enter the password -
See what the world looks like:
lsblk
.
You should see the crypt disk under nvme0n1 → nvme0n1p2 → nvme0n1p2-crypt.
Picture:
- LVM stuff:
a. Initiate a physical volume to be used by LVM:pvcreate /dev/mapper/nvme0n1p2-crypt
b. Create a volume group:vgcreate vgnixos /dev/mapper/nvme0n1p2-crypt
c. Create a swap volume:lvcreate -C y -L 10G -n swap vgnixos
d. Create a volume for the rest of the space:lvcreate -l 100%FREE -n nixos vgnixos
- See what the world looks like:
lsblk
Picture:
-
mkfs.vfat -n BOOT /dev/nvme0n1p1
to format the boot partition, giving it a label of “BOOT.” - Make vgnixos-nixos an ext4 filesystem:
mkfs.ext4 /dev/vgnixos/nixos
- Make swap:
mkswap -L swap /dev/vgnixos/swap
mkdir /mnt/boot
mount /dev/nvme0n1p1 /mnt/boot
mount /dev/vgnixos/nixos /mnt
swapon /dev/vgnixos/swap
- Check the UUID of the LVM:
lsblk -f
Picture:
- Generate nix config:
nixos-generate-config --root /mnt
- Open the config:
vi /mnt/etc/nixos/configuration.nix
and update to match:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiCariables = true;
boot.initrd.luks.devices = [
{
name="nixos";
device="/dev/disk/by-uuid/e3f91b38-e297-4ba8-9bbe-925f0ed5b52e"; # I did correct this according to the screenshot above
preLVM=true;
}
];
networking.useDHCP = false;
networking.interfaces.enp0s3.useDHCP = true;
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "no";
};
time.timeZone = "Europe/Oslo";
environment.systemPackages = with pkgs; [
wget
vim
tmux
];
# Enable the OpenSSH daemon.
service.openssh.enable = true;
# Enable sound.
sound.enable = true;
hardware.pulseaudio.enable = true;
# Enable the X11 windowing system.
services.xserver.enable = true;
services.xserver.layout = "no";
services.xserver.xkbOptions = "eurosign:e";
# Enable touchpad support
services.xserver.libinput.enable = true;
# Enable the KDE Desktop Environment.
services.xserver.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true;
# Define a user account. Don't forget to set a password with `passwd`.
users.users.stian = {
isNormalUser = true;
extraGroups = [ "wheel" ];
};
system.stateVersion = "20.03";
}
- Install:
nixos-install
Here I get a warning about the format for the initrd.luks-thing changing soon, but the installer does continue.
After a while, the installer fails with
Failed to check file system type of “/boot”: No such file or directory
Picture:
What am I missing here? Any help would be very much appreciated.