Commit Graph

36 Commits

Author SHA1 Message Date
David Arnold
9e42d02047
lib/modules: add mkImageMediaOverride
so the underlaying use case of the preceding commit is so
generic, that we gain a lot in reasoning to give it an
appropriate name.

As the comment states:
image media needs to override host config short of mkForce
2021-08-03 18:28:14 -05:00
David Arnold
2af2d3146d
nixos/boot-media: soft-force entire fs layout
https://github.com/NixOS/nixpkgs/pull/131760 was made to avo
a speicific configuration conflict that errored out for multiple definitions of "/" when the installer where overlayed
on any existing host configuration.

---

Problem 1: It turns out that in also other mountpoints can coflict.

Solution 1: use `mkOverride 60` for all mountpoints (even for the ones unlikely causing confilct for consistency sake)

---

Problem 2: It turns out that on an installation media for a fresh machine (before formatting), we usually don't have any devices yet formatted. However defining for example `fileSystems.<nme>.device = "/dev/disk/by-label/...", in newer versions of nixos, seems to make the system startup fail. Similarily waiting for a non-existent swap device does not make the startup fail, but has a 1:30 min timeout.

Solution 2: For an installation medium, soft-override ("unless users know what they are doing") the entire `fileSystems` and `swapDevices` definitions.
2021-08-03 15:05:52 -05:00
jakobrs
2e4849b841 installation-cd-base.nix: Add 'live.nixos.passwd' boot option
For interactive SSH access to a system without a (working)
keyboard and monitor, without rebuilding the image itself.
2021-07-03 09:53:16 +02:00
Jörg Thalheim
b0196cacec
Merge pull request #84476 from jakobrs/installation-cd-base-terminus 2020-04-29 17:20:49 +01:00
jakobrs
34f242c13d nixos/installer: Add terminus_font to installation_iso_base 2020-04-15 14:21:42 +02:00
worldofpeace
a775961c8f Revert "Revert "iso-image: normalize volumeID""
This reverts commit 21b50e6f68.
2020-04-09 20:06:32 -04:00
worldofpeace
21b50e6f68
Revert "iso-image: normalize volumeID" 2020-04-09 19:43:59 -04:00
worldofpeace
70a8e9ace9 iso-image: normalize volumeID
The volumeID will now be in the format of:
nixos-$EDITON-$RELEASE-$ARCH

an example for the minimal image would look like:
nixos-minimal-20.09-x86-64-linux
2020-03-27 21:30:54 -04:00
John Ericson
2c2f1e37d4 reewide: Purge all uses stdenv.system and top-level system
It is deprecated and will be removed after 18.09.
2018-08-30 17:20:32 -04:00
Bob van der Linden
e1da32d887 set initialHashedPassword in installation-device.nix 2018-08-07 14:45:50 +02:00
Tuomas Tynkkynen
96190535e5 Revert "nixos: rename system.{stateVersion,defaultChannel} -> system.nixos.\1"
This reverts commit 095fe5b43d.

Pointless renames considered harmful. All they do is force people to
spend extra work updating their configs for no benefit, and hindering
the ability to switch between unstable and stable versions of NixOS.

Like, what was the value of having the "nixos." there? I mean, by
definition anything in a NixOS module has something to do with NixOS...
2018-07-28 00:12:55 +03:00
Florian Klink
bd228c05b1 nixos/modules/installer: users.extraUsers -> users.users 2018-06-30 02:26:14 +02:00
Uli Baum
dd73ab0092 nixos/tests: prevent stateVersion warnings in eval
... introduced by 1f0b6922d3
continuation of 88fa50c2f2
2018-05-15 00:22:35 +02:00
Jan Malakhovski
2e6b796761 nixos: rename config.system.nixos* -> config.system.nixos.* 2018-02-18 12:56:30 +00:00
Jan Malakhovski
119c8f91e7 nixos: introduce system.nixosLabel option and use it where appropriate
Setting nixosVersion to something custom is useful for meaningful GRUB
menus and /nix/store paths, but actuallly changing it rebulids the
whole system path (because of `nixos-version` script and manual
pages). Also, changing it is not a particularly good idea because you
can then be differentitated from other NixOS users by a lot of
programs that read /etc/os-release.

This patch introduces an alternative option that does all you want
from nixosVersion, but rebuilds only the very top system level and
/etc while using your label in the names of system /nix/store paths,
GRUB and other boot loaders' menus, getty greetings and so on.
2016-01-08 22:26:15 +00:00
Eelco Dolstra
e5db79a859 Move stuff to modules/profiles/installation-device.nix 2015-06-10 15:28:55 +02:00
Tuomas Tynkkynen
16165ddc38 install-cd: Include nixos-artwork to fix installer tests
Should fix at least nixos.tests.installer.simple.x86_64-linux
http://hydra.nixos.org/build/23001712:

machine# error: cannot download Encode-Locale-1.03.tar.gz from any mirror
machine# builder for ‘/nix/store/y8gbx2d2fdcvvjy1z53xksfgq66ydlx0-Encode-Locale-1.03.tar.gz.drv’ failed with exit code 1
machine# cannot build derivation ‘/nix/store/y1knci7rix3asnh2b4kfv8jhl2j99xih-perl-Encode-Locale-1.03.drv’: 1 dependencies couldn't be built
machine# cannot build derivation ‘/nix/store/7xspjwh48kg16drv1jjg5cffaqbxbp8p-perl-libwww-perl-6.05.drv’: 1 dependencies couldn't be built
machine# cannot build derivation ‘/nix/store/8qsmz3bbk1jwhh50c3i9700bkmn8ns5c-nss-cacert-3.19.1.drv’: 1 dependencies couldn't be built
machine# cannot build derivation ‘/nix/store/0rgf2l3mdszs4a989ympwc9gk2k8wq6z-nixos-artwork-e71b684.drv’: 1 dependencies couldn't be built
...
2015-06-08 19:12:59 +03:00
Tuomas Tynkkynen
9c2f2bc893 kernel-config: Enable FB_VESA and FRAMEBUFFER_CONSOLE
Commit 159fed47bc (nixos/grub: Fix video display on efi) changed BIOS
systems to start in non-text mode as well. Enable FB_VESA to get a
framebuffer console on BIOS systems. Change FRAMEBUFFER_CONSOLE to 'y'
instead of the default 'm' to so the user doesn't need to manually load
the fbcon module anymore.

Other distros have similar defaults, at least on Arch:
    CONFIG_FB_VESA=y
    CONFIG_FRAMEBUFFER_CONSOLE=y
and on Ubuntu (12.04):
    CONFIG_FB_VESA=m
    CONFIG_FRAMEBUFFER_CONSOLE=y

Fixes #8139
2015-06-04 11:26:20 +03:00
Ricardo M. Correia
f5e7190572 nixos.system_tarball_pc: Fix evaluation
It was broken due to 57b05765c9.

ZFS requires `networking.hostId` to be set.
2015-04-28 17:15:02 +02:00
Eelco Dolstra
57b05765c9 Don't include ntfs-3g by default
Issue #7117.
2015-04-19 22:06:45 +02:00
Bob van der Linden
8d092270d2 nixos: iso-image: use syslinux bootloader for USB booting support
This changes the bootloader for iso generation from Grub to
syslinux. In addition this adds USB booting support, so that
"dd" can be used to burn the generated ISO to USB thumbdrives
instead of needing applications like UnetBootin.
2015-03-24 22:01:04 +01:00
wmertens
dda62c451c Re-enable ZFS in installer image
Hopefully #4807 fixes http://hydra.nixos.org/build/16883184
2014-11-13 10:31:15 +01:00
Ricardo M. Correia
e9affb4274 nixos: Add system-wide option to set the hostid
The old boot.spl.hostid option was not working correctly due to an
upstream bug.

Instead, now we will create the /etc/hostid file so that all applications
(including the ZFS kernel modules, ZFS user-space applications and other
unrelated programs) pick-up the same system-wide host id. Note that glibc
(and by extension, the `hostid` program) also respect the host id configured in
/etc/hostid, if it exists.

The hostid option is now mandatory when using ZFS because otherwise, ZFS will
require you to force-import your ZFS pools if you want to use them, which is
undesirable because it disables some of the checks that ZFS does to make sure it
is safe to import a ZFS pool.

The /etc/hostid file must also exist when booting the initrd, before the SPL
kernel module is loaded, so that ZFS picks up the hostid correctly.

The complexity in creating the /etc/hostid file is due to having to
write the host ID as a 32-bit binary value, taking into account the
endianness of the machine, while using only shell commands and/or simple
utilities (to avoid exploding the size of the initrd).
2014-11-12 22:31:49 +01:00
Eelco Dolstra
433a845081 Disable zfs in the ISO for now
It's giving zpool-import.service errors.

http://hydra.nixos.org/build/16883184
2014-11-12 15:32:21 +01:00
Luca Bruno
e3611709d6 Revert "nixos: installation: make installation ISOs USB bootable"
This reverts commit b7f6a138b1.
2014-11-08 14:33:27 +01:00
Eelco Dolstra
f496c3cbe4 Obsolete security.initialPassword
You can now set users.extraUsers.root.initialHashedPassword instead.
2014-11-03 12:36:56 +01:00
Bob van der Linden
b7f6a138b1 nixos: installation: make installation ISOs USB bootable 2014-11-02 17:35:16 +01:00
William A. Kennington III
5118dcf4fb nixos-iso: Add zfs / btrfs to supportedFilesystems 2014-10-14 20:24:43 -07:00
William A. Kennington III
ab29b6527f nixos-iso: Use a simpler disk label
When formatting a nixos usb using my windows machine I noticed that the
disk labeling using periods was not compatible with my linux kernel /
udev recognition. When labeling a volume NIXOS_14.10 under Windows, it would
show up as NIXOS_14_10 on NixOS. This meant that /dev/root would never come
up at boot time, preventing the livecd from starting.

This patch works around this issue by eliminating any special characters
other than underscores. The previous versioning didn't seem all that
useful, especially when consdering there are many different version of
the year.month named iso.
2014-06-08 15:53:45 -05:00
Eelco Dolstra
48768f3129 NixOS ISO: Set empty root password 2014-05-21 12:04:08 +02:00
Eelco Dolstra
29027fd1e1 Rewrite ‘with pkgs.lib’ -> ‘with lib’
Using pkgs.lib on the spine of module evaluation is problematic
because the pkgs argument depends on the result of module
evaluation. To prevent an infinite recursion, pkgs and some of the
modules are evaluated twice, which is inefficient. Using ‘with lib’
prevents this problem.
2014-04-14 16:26:48 +02:00
Eelco Dolstra
e2bc9a3d14 Include Archive::Cpio in the installation CD
http://hydra.nixos.org/build/10268978
2014-04-11 17:16:44 +02:00
Ricardo M. Correia
cba2444d11 nixos/memtest: Allow user to specify memtest86 boot parameters 2014-02-09 13:55:37 +01:00
Shea Levy
d6ef65cb6a Limit livecd label to 11 characters
vfat partition labels can only be 11 characters long

Signed-off-by: Shea Levy <shea@shealevy.com>
2014-02-03 17:05:04 -05:00
Shea Levy
cd9786eed2 Fold efi booting into the default livecd
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-11-01 11:29:36 -04:00
Eelco Dolstra
5c1f8cbc70 Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00