diff options
Diffstat (limited to 'nixos/doc/manual/installation')
6 files changed, 61 insertions, 54 deletions
diff --git a/nixos/doc/manual/installation/changing-config.xml b/nixos/doc/manual/installation/changing-config.xml index 48193d986ab..4288806d5eb 100644 --- a/nixos/doc/manual/installation/changing-config.xml +++ b/nixos/doc/manual/installation/changing-config.xml @@ -78,7 +78,7 @@ <literal>mutableUsers = false</literal>. Another way is to temporarily add the following to your configuration: <screen> -<link linkend="opt-users.users._name__.initialHashedPassword">users.users.your-user.initialHashedPassword</link> = "test"; +<link linkend="opt-users.users._name_.initialHashedPassword">users.users.your-user.initialHashedPassword</link> = "test"; </screen> <emphasis>Important:</emphasis> delete the $hostname.qcow2 file if you have started the virtual machine at least once without the right users, otherwise diff --git a/nixos/doc/manual/installation/installing-behind-a-proxy.xml b/nixos/doc/manual/installation/installing-behind-a-proxy.xml index c1ef638e876..6788882aa8c 100644 --- a/nixos/doc/manual/installation/installing-behind-a-proxy.xml +++ b/nixos/doc/manual/installation/installing-behind-a-proxy.xml @@ -27,13 +27,13 @@ networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; Setup the proxy environment variables in the shell where you are running <literal>nixos-install</literal>. </para> -<programlisting> -# proxy_url="http://user:password@proxy:port/" -# export http_proxy="$proxy_url" -# export HTTP_PROXY="$proxy_url" -# export https_proxy="$proxy_url" -# export HTTPS_PROXY="$proxy_url" -</programlisting> +<screen> +<prompt># </prompt>proxy_url="http://user:password@proxy:port/" +<prompt># </prompt>export http_proxy="$proxy_url" +<prompt># </prompt>export HTTP_PROXY="$proxy_url" +<prompt># </prompt>export https_proxy="$proxy_url" +<prompt># </prompt>export HTTPS_PROXY="$proxy_url" +</screen> </listitem> </orderedlist> diff --git a/nixos/doc/manual/installation/installing-from-other-distro.xml b/nixos/doc/manual/installation/installing-from-other-distro.xml index 45d68f8787f..63d1d52b01b 100644 --- a/nixos/doc/manual/installation/installing-from-other-distro.xml +++ b/nixos/doc/manual/installation/installing-from-other-distro.xml @@ -47,7 +47,7 @@ Short version: </para> <screen> -<prompt>$ </prompt>curl https://nixos.org/nix/install | sh +<prompt>$ </prompt>curl -L https://nixos.org/nix/install | sh <prompt>$ </prompt>. $HOME/.nix-profile/etc/profile.d/nix.sh # …or open a fresh shell</screen> <para> More details in the @@ -84,12 +84,12 @@ nixpkgs https://nixos.org/channels/nixpkgs-unstable</screen> </para> <para> You'll need <literal>nixos-generate-config</literal> and - <literal>nixos-install</literal> and we'll throw in some man pages and - <literal>nixos-enter</literal> just in case you want to chroot into your - NixOS partition. They are installed by default on NixOS, but you don't have + <literal>nixos-install</literal>, but this also makes some man pages + and <literal>nixos-enter</literal> available, just in case you want to chroot into your + NixOS partition. NixOS installs these by default, but you don't have NixOS yet.. </para> -<screen><prompt>$ </prompt>nix-env -f '<nixpkgs/nixos>' --arg configuration {} -iA config.system.build.{nixos-generate-config,nixos-install,nixos-enter,manual.manpages}</screen> + <screen><prompt>$ </prompt>nix-env -f '<nixpkgs>' -iA nixos-install-tools</screen> </listitem> <listitem> <note> @@ -161,6 +161,13 @@ nixpkgs https://nixos.org/channels/nixpkgs-unstable</screen> existing systems without the help of a rescue USB drive or similar. </para> </warning> + <note> + <para> + On some distributions there are separate PATHS for programs intended only for root. + In order for the installation to succeed, you might have to use <literal>PATH="$PATH:/usr/sbin:/sbin"</literal> + in the following command. + </para> + </note> <screen><prompt>$ </prompt>sudo PATH="$PATH" NIX_PATH="$NIX_PATH" `which nixos-install` --root /mnt</screen> <para> Again, please refer to the <literal>nixos-install</literal> step in @@ -211,7 +218,7 @@ nixpkgs https://nixos.org/channels/nixpkgs-unstable</screen> use <literal>sudo</literal>) </para> <programlisting> -<link linkend="opt-users.users._name__.initialHashedPassword">users.users.root.initialHashedPassword</link> = ""; +<link linkend="opt-users.users._name_.initialHashedPassword">users.users.root.initialHashedPassword</link> = ""; </programlisting> </listitem> <listitem> @@ -325,14 +332,14 @@ sudo /nix/var/nix/profiles/system/bin/switch-to-configuration boot to boot on a USB rescue disk and do something along these lines: </para> <screen> -# mkdir root -# mount /dev/sdaX root -# mkdir root/nixos-root -# mv -v root/* root/nixos-root/ -# mv -v root/nixos-root/old-root/* root/ -# mv -v root/boot.bak root/boot # We had renamed this by hand earlier -# umount root -# reboot</screen> +<prompt># </prompt>mkdir root +<prompt># </prompt>mount /dev/sdaX root +<prompt># </prompt>mkdir root/nixos-root +<prompt># </prompt>mv -v root/* root/nixos-root/ +<prompt># </prompt>mv -v root/nixos-root/old-root/* root/ +<prompt># </prompt>mv -v root/boot.bak root/boot # We had renamed this by hand earlier +<prompt># </prompt>umount root +<prompt># </prompt>reboot</screen> <para> This may work as is or you might also need to reinstall the boot loader </para> diff --git a/nixos/doc/manual/installation/installing-virtualbox-guest.xml b/nixos/doc/manual/installation/installing-virtualbox-guest.xml index 1cffeed4807..019e5098a8e 100644 --- a/nixos/doc/manual/installation/installing-virtualbox-guest.xml +++ b/nixos/doc/manual/installation/installing-virtualbox-guest.xml @@ -83,17 +83,12 @@ VirtualBox settings (Machine / Settings / Shared Folders, then click on the "Add" icon). Add the following to the <literal>/etc/nixos/configuration.nix</literal> to auto-mount them. If you do - not add <literal>"nofail"</literal>, the system will no boot properly. The - same goes for disabling <literal>rngd</literal> which is normally used to get - randomness but this does not work in virtual machines. + not add <literal>"nofail"</literal>, the system will not boot properly. </para> <programlisting> { config, pkgs, ...} : { - security.rngd.enable = false; // otherwise vm will not boot - ... - fileSystems."/virtualboxshare" = { fsType = "vboxsf"; device = "nameofthesharedfolder"; diff --git a/nixos/doc/manual/installation/installing.xml b/nixos/doc/manual/installation/installing.xml index 5f216df66f8..d019bb31809 100644 --- a/nixos/doc/manual/installation/installing.xml +++ b/nixos/doc/manual/installation/installing.xml @@ -46,6 +46,12 @@ to increase the font size. </para> + <para> + To install over a serial port connect with <literal>115200n8</literal> + (e.g. <command>picocom -b 115200 /dev/ttyUSB0</command>). When the + bootloader lists boot entries, select the serial console boot entry. + </para> + <section xml:id="sec-installation-booting-networking"> <title>Networking in the installer</title> @@ -70,9 +76,13 @@ <para> If you would like to continue the installation from a different machine you - need to activate the SSH daemon via <command>systemctl start - sshd</command>. You then must set a password for either <literal>root</literal> or - <literal>nixos</literal> with <command>passwd</command> to be able to login. + can use activated SSH daemon. You need to copy your ssh key to either + <literal>/home/nixos/.ssh/authorized_keys</literal> or + <literal>/root/.ssh/authorized_keys</literal> (Tip: For installers with a + modifiable filesystem such as the sd-card installer image a key can be manually + placed by mounting the image on a different machine). Alternatively you must set + a password for either <literal>root</literal> or <literal>nixos</literal> with + <command>passwd</command> to be able to login. </para> </section> </section> @@ -370,7 +380,7 @@ You may want to look at the options starting with <option><link linkend="opt-boot.loader.efi.canTouchEfiVariables">boot.loader.efi</link></option> and - <option><link linkend="opt-boot.loader.systemd-boot.enable">boot.loader.systemd</link></option> + <option><link linkend="opt-boot.loader.systemd-boot.enable">boot.loader.systemd-boot</link></option> as well. </para> </listitem> @@ -436,8 +446,8 @@ password for the <literal>root</literal> user, e.g. <screen> setting root password... -Enter new UNIX password: *** -Retype new UNIX password: ***</screen> +New password: *** +Retype new password: ***</screen> <note> <para> For unattended installations, it is possible to use @@ -476,13 +486,8 @@ Retype new UNIX password: ***</screen> <prompt>$ </prompt>passwd eelco</screen> </para> <para> - You may also want to install some software. For instance, -<screen> -<prompt>$ </prompt>nix-env -qaP \*</screen> - shows what packages are available, and -<screen> -<prompt>$ </prompt>nix-env -f '<nixpkgs>' -iA w3m</screen> - installs the <literal>w3m</literal> browser. + You may also want to install some software. This will be covered + in <xref linkend="sec-package-management" />. </para> </listitem> </orderedlist> @@ -550,7 +555,7 @@ Retype new UNIX password: ***</screen> # Note: setting fileSystems is generally not # necessary, since nixos-generate-config figures them out # automatically in hardware-configuration.nix. - #<link linkend="opt-fileSystems._name__.device">fileSystems."/".device</link> = "/dev/disk/by-label/nixos"; + #<link linkend="opt-fileSystems._name_.device">fileSystems."/".device</link> = "/dev/disk/by-label/nixos"; # Enable the OpenSSH server. services.sshd.enable = true; diff --git a/nixos/doc/manual/installation/upgrading.xml b/nixos/doc/manual/installation/upgrading.xml index e5e02aa0752..960d4fa9a43 100644 --- a/nixos/doc/manual/installation/upgrading.xml +++ b/nixos/doc/manual/installation/upgrading.xml @@ -14,7 +14,7 @@ <para> <emphasis>Stable channels</emphasis>, such as <literal - xlink:href="https://nixos.org/channels/nixos-20.03">nixos-20.03</literal>. + xlink:href="https://nixos.org/channels/nixos-21.05">nixos-21.05</literal>. These only get conservative bug fixes and package upgrades. For instance, a channel update may cause the Linux kernel on your system to be upgraded from 4.19.34 to 4.19.38 (a minor bug fix), but not from @@ -38,7 +38,7 @@ <para> <emphasis>Small channels</emphasis>, such as <literal - xlink:href="https://nixos.org/channels/nixos-20.03-small">nixos-20.03-small</literal> + xlink:href="https://nixos.org/channels/nixos-21.05-small">nixos-21.05-small</literal> or <literal xlink:href="https://nixos.org/channels/nixos-unstable-small">nixos-unstable-small</literal>. @@ -63,36 +63,36 @@ <para> When you first install NixOS, you’re automatically subscribed to the NixOS channel that corresponds to your installation source. For instance, if you - installed from a 20.03 ISO, you will be subscribed to the - <literal>nixos-20.03</literal> channel. To see which NixOS channel you’re + installed from a 21.05 ISO, you will be subscribed to the + <literal>nixos-21.05</literal> channel. To see which NixOS channel you’re subscribed to, run the following as root: <screen> -# nix-channel --list | grep nixos +<prompt># </prompt>nix-channel --list | grep nixos nixos https://nixos.org/channels/nixos-unstable </screen> To switch to a different NixOS channel, do <screen> -# nix-channel --add https://nixos.org/channels/<replaceable>channel-name</replaceable> nixos +<prompt># </prompt>nix-channel --add https://nixos.org/channels/<replaceable>channel-name</replaceable> nixos </screen> (Be sure to include the <literal>nixos</literal> parameter at the end.) For - instance, to use the NixOS 20.03 stable channel: + instance, to use the NixOS 21.05 stable channel: <screen> -# nix-channel --add https://nixos.org/channels/nixos-20.03 nixos +<prompt># </prompt>nix-channel --add https://nixos.org/channels/nixos-21.05 nixos </screen> If you have a server, you may want to use the “small” channel instead: <screen> -# nix-channel --add https://nixos.org/channels/nixos-20.03-small nixos +<prompt># </prompt>nix-channel --add https://nixos.org/channels/nixos-21.05-small nixos </screen> And if you want to live on the bleeding edge: <screen> -# nix-channel --add https://nixos.org/channels/nixos-unstable nixos +<prompt># </prompt>nix-channel --add https://nixos.org/channels/nixos-unstable nixos </screen> </para> <para> You can then upgrade NixOS to the latest version in your chosen channel by running <screen> -# nixos-rebuild switch --upgrade +<prompt># </prompt>nixos-rebuild switch --upgrade </screen> which is equivalent to the more verbose <literal>nix-channel --update nixos; nixos-rebuild switch</literal>. @@ -132,7 +132,7 @@ nixos https://nixos.org/channels/nixos-unstable kernel, initrd or kernel modules. You can also specify a channel explicitly, e.g. <programlisting> -<xref linkend="opt-system.autoUpgrade.channel"/> = https://nixos.org/channels/nixos-20.03; +<xref linkend="opt-system.autoUpgrade.channel"/> = https://nixos.org/channels/nixos-21.05; </programlisting> </para> </section> |