Bootloader: Difference between revisions

imported>CsawyerYumaed
added grub kernel command line options for booting.
imported>Edrex
Line 125: Line 125:


=== Installing x86_64 NixOS on IA-32 UEFI ===
=== Installing x86_64 NixOS on IA-32 UEFI ===
Some laptops, mostly those based on Intel Atom, have a very strange setup: x86_64 CPU, 2-4GB of RAM, and ia-32 bootloader. They usually come with 64-bit Windows 10, which is slow and jerky on such configurations. Installing Linux on these systems is trivial, because most of the time you can just install 32-bit versions, which come with 32-bit UEFI bootloader, and not lose practically anything as amount of RAM is small enough for 32 bits of address. This is not the case with NixOS, though, because by choosing a 32-bit version you lose the prebuilt packages from nixos cache. To install a full 64-bit system with 32-bit bootloader, you need to take the following steps:
Some laptops, mostly those based on Intel Atom (and first-gen 2006-2007 Intel Macs), have a very strange setup: x86_64 CPU, 2-4GB of RAM, and ia-32 bootloader. They usually come with 64-bit Windows 10, which is slow and jerky on such configurations. Installing Linux on these systems is trivial, because most of the time you can just install 32-bit versions, which come with 32-bit UEFI bootloader, and not lose practically anything as amount of RAM is small enough for 32 bits of address. This is not the case with NixOS, though, because by choosing a 32-bit version you lose the prebuilt packages from nixos cache. To install a full 64-bit system with 32-bit bootloader, you need to take the following steps:
# Download both latest "Minimal installation CD, 32-bit Intel/AMD" and "Minimal installation CD, 64-bit Intel/AMD" from https://nixos.org/nixos/download.html.
# Download both latest "Minimal installation CD, 32-bit Intel/AMD" and "Minimal installation CD, 64-bit Intel/AMD" from https://nixos.org/nixos/download.html.
# Flash 32-bit version on USB stick and boot it. If it does not boot, then you probably have a 64-bit bootloader and do not need to worry about this tutorial.
# Flash 32-bit version on USB stick and boot it. If it does not boot, then you probably have a 64-bit bootloader and do not need to worry about this tutorial.
Line 143: Line 143:
};
};
</nowiki>}}
</nowiki>}}
# If everything goes well, reboot and you now should have a bootable 32-bit system. If you do, remove USB stick and flash 64-bit version of NixOS onto it.  
# If everything goes well, reboot and you now should have a bootable 32-bit system. If you do, remove USB stick and flash 64-bit version of NixOS onto it.  
# Plug it in your PC and boot into GRUB you have just installed. Now we have to boot a 64-bit system from USB stick manually. To do that:
# Plug it in your PC and boot into GRUB you have just installed. Now we have to boot a 64-bit system from USB stick manually. To do that:
Line 153: Line 154:
# If you did everything correctly, you now should have your x86_64 system booted from USB. Now it's time to install it. Proceed with NixOS installation manual (do not forget to install GRUB, just as with 32-bit system). Add one extra thing to your configuration: i686 GRUB. To do that, add  
# If you did everything correctly, you now should have your x86_64 system booted from USB. Now it's time to install it. Proceed with NixOS installation manual (do not forget to install GRUB, just as with 32-bit system). Add one extra thing to your configuration: i686 GRUB. To do that, add  
{{file|/etc/nixos/configuration.nix|nix|<nowiki>
{{file|/etc/nixos/configuration.nix|nix|<nowiki>
nixpkgs.config.packageOverrides = pkgs: { grub2 = (import <nixpkgs> {system = "i686-linux";}).grub2; }
    forcei686 = true;
</nowiki>}}
</nowiki>}}
To your configuration.
to the grub section of your configuration.
If you have some problems with installation, report them on #nixos on freenode.
If you have some problems with installation, report them on #nixos on freenode.