Booting from a USB DriveFor systems without CD drive, the NixOS live CD can be booted from
a USB stick. You can use the dd utility to write the image:
dd if=path-to-image
of=/dev/sdb. Be careful about specifying the
correct drive; you can use the lsblk command to get a list of
block devices. If you're on macOS you can run diskutil list
to see the list of devices; the device you'll use for the USB must be ejected
before writing the image.The dd utility will write the image verbatim to the drive,
making it the recommended option for both UEFI and non-UEFI installations. For
non-UEFI installations, you can alternatively use
unetbootin. If you
cannot use dd for a UEFI installation, you can also mount the
ISO, copy its contents verbatim to your drive, then either:
Change the label of the disk partition to the label of the ISO
(visible with the blkid command), orEdit loader/entries/nixos-livecd.conf on the drive
and change the root= field in the options
line to point to your drive (see the documentation on root=
in
the kernel documentation for more details).If you want to load the contents of the ISO to ram after bootin
(So you can remove the stick after bootup) you can append the parameter
copytoramto the options field.