diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2019-06-17 13:25:50 +0200 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2019-06-17 13:25:50 +0200 |
commit | a3f2131eb69c57570a41d036f395df9252c39b8b (patch) | |
tree | 881b6c92c7d70ee63e37e0416a3bc9d1ec6fd87b /nixos/doc/manual/installation | |
parent | 3c14bda7f5a065d3d290399db2ef15457af3906b (diff) | |
download | nixpkgs-a3f2131eb69c57570a41d036f395df9252c39b8b.tar nixpkgs-a3f2131eb69c57570a41d036f395df9252c39b8b.tar.gz nixpkgs-a3f2131eb69c57570a41d036f395df9252c39b8b.tar.bz2 nixpkgs-a3f2131eb69c57570a41d036f395df9252c39b8b.tar.lz nixpkgs-a3f2131eb69c57570a41d036f395df9252c39b8b.tar.xz nixpkgs-a3f2131eb69c57570a41d036f395df9252c39b8b.tar.zst nixpkgs-a3f2131eb69c57570a41d036f395df9252c39b8b.zip |
doc: Use prompt more often
Diffstat (limited to 'nixos/doc/manual/installation')
-rw-r--r-- | nixos/doc/manual/installation/installing-usb.xml | 10 | ||||
-rw-r--r-- | nixos/doc/manual/installation/installing.xml | 84 |
2 files changed, 47 insertions, 47 deletions
diff --git a/nixos/doc/manual/installation/installing-usb.xml b/nixos/doc/manual/installation/installing-usb.xml index c0372e8ebd9..83598635acc 100644 --- a/nixos/doc/manual/installation/installing-usb.xml +++ b/nixos/doc/manual/installation/installing-usb.xml @@ -15,16 +15,16 @@ <note> <title>On macOS</title> <para> -<programlisting> -$ diskutil list +<screen> +<prompt>$ </prompt>diskutil list [..] /dev/diskN (external, physical): #: TYPE NAME SIZE IDENTIFIER [..] -$ diskutil unmountDisk diskN +<prompt>$ </prompt>diskutil unmountDisk diskN Unmount of all volumes on diskN was successful -$ sudo dd if=nix.iso of=/dev/rdiskN -</programlisting> +<prompt>$ </prompt>sudo dd if=nix.iso of=/dev/rdiskN +</screen> Using the 'raw' <command>rdiskN</command> device instead of <command>diskN</command> completes in minutes instead of hours. After <command>dd</command> completes, a GUI dialog "The disk you inserted was diff --git a/nixos/doc/manual/installation/installing.xml b/nixos/doc/manual/installation/installing.xml index cc5420794af..742376378de 100644 --- a/nixos/doc/manual/installation/installing.xml +++ b/nixos/doc/manual/installation/installing.xml @@ -110,7 +110,7 @@ <listitem> <para> Create a <emphasis>GPT</emphasis> partition table. -<screen language="commands"># parted /dev/sda -- mklabel gpt</screen> +<screen language="commands"><prompt># </prompt>parted /dev/sda -- mklabel gpt</screen> </para> </listitem> <listitem> @@ -118,14 +118,14 @@ Add the <emphasis>root</emphasis> partition. This will fill the disk except for the end part, where the swap will live, and the space left in front (512MiB) which will be used by the boot partition. -<screen language="commands"># parted /dev/sda -- mkpart primary 512MiB -8GiB</screen> +<screen language="commands"><prompt># </prompt>parted /dev/sda -- mkpart primary 512MiB -8GiB</screen> </para> </listitem> <listitem> <para> Next, add a <emphasis>swap</emphasis> partition. The size required will vary according to needs, here a 8GiB one is created. -<screen language="commands"># parted /dev/sda -- mkpart primary linux-swap -8GiB 100%</screen> +<screen language="commands"><prompt># </prompt>parted /dev/sda -- mkpart primary linux-swap -8GiB 100%</screen> <note> <para> The swap partition size rules are no different than for other Linux @@ -140,8 +140,8 @@ the ESP (EFI system partition) as its <emphasis>/boot</emphasis> partition. It uses the initially reserved 512MiB at the start of the disk. -<screen language="commands"># parted /dev/sda -- mkpart ESP fat32 1MiB 512MiB -# parted /dev/sda -- set 3 boot on</screen> +<screen language="commands"><prompt># </prompt>parted /dev/sda -- mkpart ESP fat32 1MiB 512MiB +<prompt># </prompt>parted /dev/sda -- set 3 boot on</screen> </para> </listitem> </orderedlist> @@ -172,21 +172,21 @@ <listitem> <para> Create a <emphasis>MBR</emphasis> partition table. -<screen language="commands"># parted /dev/sda -- mklabel msdos</screen> +<screen language="commands"><prompt># </prompt>parted /dev/sda -- mklabel msdos</screen> </para> </listitem> <listitem> <para> Add the <emphasis>root</emphasis> partition. This will fill the the disk except for the end part, where the swap will live. -<screen language="commands"># parted /dev/sda -- mkpart primary 1MiB -8GiB</screen> +<screen language="commands"><prompt># </prompt>parted /dev/sda -- mkpart primary 1MiB -8GiB</screen> </para> </listitem> <listitem> <para> Finally, add a <emphasis>swap</emphasis> partition. The size required will vary according to needs, here a 8GiB one is created. -<screen language="commands"># parted /dev/sda -- mkpart primary linux-swap -8GiB 100%</screen> +<screen language="commands"><prompt># </prompt>parted /dev/sda -- mkpart primary linux-swap -8GiB 100%</screen> <note> <para> The swap partition size rules are no different than for other Linux @@ -218,7 +218,7 @@ since this makes the file system configuration independent from device changes. For example: <screen> -# mkfs.ext4 -L nixos /dev/sda1</screen> +<prompt># </prompt>mkfs.ext4 -L nixos /dev/sda1</screen> </para> </listitem> <listitem> @@ -227,7 +227,7 @@ recommended to assign a label to the swap partition: <option>-L <replaceable>label</replaceable></option>. For example: <screen> -# mkswap -L swap /dev/sda2</screen> +<prompt># </prompt>mkswap -L swap /dev/sda2</screen> </para> </listitem> <listitem> @@ -242,7 +242,7 @@ it’s recommended to assign a label to the boot partition: <option>-n <replaceable>label</replaceable></option>. For example: <screen> -# mkfs.fat -F 32 -n boot /dev/sda3</screen> +<prompt># </prompt>mkfs.fat -F 32 -n boot /dev/sda3</screen> </para> </listitem> </varlistentry> @@ -273,7 +273,7 @@ Mount the target file system on which NixOS should be installed on <filename>/mnt</filename>, e.g. <screen> -# mount /dev/disk/by-label/nixos /mnt +<prompt># </prompt>mount /dev/disk/by-label/nixos /mnt </screen> </para> </listitem> @@ -287,8 +287,8 @@ <para> Mount the boot file system on <filename>/mnt/boot</filename>, e.g. <screen> -# mkdir -p /mnt/boot -# mount /dev/disk/by-label/boot /mnt/boot +<prompt># </prompt>mkdir -p /mnt/boot +<prompt># </prompt>mount /dev/disk/by-label/boot /mnt/boot </screen> </para> </listitem> @@ -303,7 +303,7 @@ the build actions that it may spawn) may need quite a bit of RAM, depending on your configuration. <screen> -# swapon /dev/sda2</screen> +<prompt># </prompt>swapon /dev/sda2</screen> </para> </listitem> <listitem> @@ -325,11 +325,11 @@ The command <command>nixos-generate-config</command> can generate an initial configuration file for you: <screen> -# nixos-generate-config --root /mnt</screen> +<prompt># </prompt>nixos-generate-config --root /mnt</screen> You should then edit <filename>/mnt/etc/nixos/configuration.nix</filename> to suit your needs: <screen> -# nano /mnt/etc/nixos/configuration.nix +<prompt># </prompt>nano /mnt/etc/nixos/configuration.nix </screen> If you’re using the graphical ISO image, other editors may be available (such as <command>vim</command>). If you have network access, you can also @@ -412,7 +412,7 @@ <para> Do the installation: <screen> -# nixos-install</screen> +<prompt># </prompt>nixos-install</screen> Cross fingers. If this fails due to a temporary problem (such as a network issue while downloading binaries from the NixOS binary cache), you can just re-run <command>nixos-install</command>. Otherwise, fix your @@ -439,7 +439,7 @@ Retype new UNIX password: ***</screen> <para> If everything went well: <screen> -# reboot</screen> +<prompt># </prompt>reboot</screen> </para> </listitem> <listitem> @@ -460,16 +460,16 @@ Retype new UNIX password: ***</screen> You’ll probably want to create some user accounts as well, which can be done with <command>useradd</command>: <screen> -$ useradd -c 'Eelco Dolstra' -m eelco -$ passwd eelco</screen> +<prompt>$ </prompt>useradd -c 'Eelco Dolstra' -m eelco +<prompt>$ </prompt>passwd eelco</screen> </para> <para> You may also want to install some software. For instance, <screen> -$ nix-env -qa \*</screen> +<prompt>$ </prompt>nix-env -qa \*</screen> shows what packages are available, and <screen> -$ nix-env -i w3m</screen> +<prompt>$ </prompt>nix-env -i w3m</screen> install the <literal>w3m</literal> browser. </para> </listitem> @@ -489,19 +489,19 @@ $ nix-env -i w3m</screen> <example xml:id="ex-partition-scheme-MBR"> <title>Example partition schemes for NixOS on <filename>/dev/sda</filename> (MBR)</title> <screen language="commands"> -# parted /dev/sda -- mklabel msdos -# parted /dev/sda -- mkpart primary 1MiB -8GiB -# parted /dev/sda -- mkpart primary linux-swap -8GiB 100%</screen> +<prompt># </prompt>parted /dev/sda -- mklabel msdos +<prompt># </prompt>parted /dev/sda -- mkpart primary 1MiB -8GiB +<prompt># </prompt>parted /dev/sda -- mkpart primary linux-swap -8GiB 100%</screen> </example> <example xml:id="ex-partition-scheme-UEFI"> <title>Example partition schemes for NixOS on <filename>/dev/sda</filename> (UEFI)</title> <screen language="commands"> -# parted /dev/sda -- mklabel gpt -# parted /dev/sda -- mkpart primary 512MiB -8GiB -# parted /dev/sda -- mkpart primary linux-swap -8GiB 100% -# parted /dev/sda -- mkpart ESP fat32 1MiB 512MiB -# parted /dev/sda -- set 3 boot on</screen> +<prompt># </prompt>parted /dev/sda -- mklabel gpt +<prompt># </prompt>parted /dev/sda -- mkpart primary 512MiB -8GiB +<prompt># </prompt>parted /dev/sda -- mkpart primary linux-swap -8GiB 100% +<prompt># </prompt>parted /dev/sda -- mkpart ESP fat32 1MiB 512MiB +<prompt># </prompt>parted /dev/sda -- set 3 boot on</screen> </example> <example xml:id="ex-install-sequence"> @@ -509,17 +509,17 @@ $ nix-env -i w3m</screen> <para> With a partitioned disk. <screen language="commands"> -# mkfs.ext4 -L nixos /dev/sda1 -# mkswap -L swap /dev/sda2 -# swapon /dev/sda2 -# mkfs.fat -F 32 -n boot /dev/sda3 # <lineannotation>(for UEFI systems only)</lineannotation> -# mount /dev/disk/by-label/nixos /mnt -# mkdir -p /mnt/boot # <lineannotation>(for UEFI systems only)</lineannotation> -# mount /dev/disk/by-label/boot /mnt/boot # <lineannotation>(for UEFI systems only)</lineannotation> -# nixos-generate-config --root /mnt -# nano /mnt/etc/nixos/configuration.nix -# nixos-install -# reboot</screen> +<prompt># </prompt>mkfs.ext4 -L nixos /dev/sda1 +<prompt># </prompt>mkswap -L swap /dev/sda2 +<prompt># </prompt>swapon /dev/sda2 +<prompt># </prompt>mkfs.fat -F 32 -n boot /dev/sda3 # <lineannotation>(for UEFI systems only)</lineannotation> +<prompt># </prompt>mount /dev/disk/by-label/nixos /mnt +<prompt># </prompt>mkdir -p /mnt/boot # <lineannotation>(for UEFI systems only)</lineannotation> +<prompt># </prompt>mount /dev/disk/by-label/boot /mnt/boot # <lineannotation>(for UEFI systems only)</lineannotation> +<prompt># </prompt>nixos-generate-config --root /mnt +<prompt># </prompt>nano /mnt/etc/nixos/configuration.nix +<prompt># </prompt>nixos-install +<prompt># </prompt>reboot</screen> </para> </example> |