Installing from Linux: Difference between revisions

imported>Raboof
mNo edit summary
m change iso url
 
(4 intermediate revisions by 3 users not shown)
Line 5: Line 5:
However, you can install 'directly from Linux' if:
However, you can install 'directly from Linux' if:


* You're feeling adventurous
* You already have a running linux distro
* You already have a running linux with GRUB on your primary partition
* You don't want to waste a CD-R (and can't boot from USB)
* You don't want to waste a CD-R (and can't boot from USB)
* You have a spare partition where to install NixOS ready.
* You have a spare partition where to install NixOS ready.


This is fairly esoteric, most users would use https://nixos.org/manual/nixos/stable/index.html#sec-installation
One method is described in the manual at https://nixos.org/manual/nixos/stable/#sec-installing-from-other-distro. For an alternative method, see below.


== How? ==
== How? ==
Line 95: Line 94:
# (chroot) mount /dev/sda3 /mnt
# (chroot) mount /dev/sda3 /mnt
# (chroot) nixos-generate-config --root /mnt
# (chroot) nixos-generate-config --root /mnt
# (chroot) nano /etc/nixos/configuration.nix
# (chroot) nano /mnt/etc/nixos/configuration.nix
</syntaxhighlight>
</syntaxhighlight>


Line 124: Line 123:


<syntaxhighlight lang="console">
<syntaxhighlight lang="console">
# wget https://d3g5gsiof5omrk.cloudfront.net/nixos/17.03/nixos-17.03.1449.2e983f14f6/nixos-minimal-17.03.1449.2e983f14f6-x86_64-linux.iso # get the latest iso (URL might change!)
# wget https://channels.nixos.org/nixos-24.05/latest-nixos-minimal-x86_64-linux.iso # get the latest iso (URL might change!)
# modprobe loop
# modprobe loop
# mount -o loop nixos-minimal-17.03.1449.2e983f14f6-x86_64-linux.iso ~/inst
# mount -o loop latest-nixos-minimal-x86_64-linux.iso ~/inst
# # mount /dev/sda1 # mount the /boot partition if you have it
# # mount /dev/sda1 # mount the /boot partition if you have it
# cp ~/inst/boot/bzImage /boot/nixos-livecd-bzImage
# cp ~/inst/boot/bzImage /boot/nixos-livecd-bzImage
Line 189: Line 188:
Thats it. Now follow the manual (Alt-F8), mount /dev/sda3 as /mnt, do
Thats it. Now follow the manual (Alt-F8), mount /dev/sda3 as /mnt, do
nixos-option and so on.
nixos-option and so on.
[[Category:Tutorial]]