[Nix-dev] Nix OS installation problems - Where's the hard drive?
Wout Mertens
wout.mertens at gmail.com
Tue Oct 7 10:28:00 CEST 2014
On Tue, Oct 7, 2014 at 4:49 AM, Joseph Joe <joej at reed.edu> wrote:
> I am still a bit confused. I added the following lines to
> /etc/nixos/configuration.nix
>
> nixpkgs.config.packageOverrides = pkgs:
> { linux_3_4 = pkgs.linux_3_4.override {
> extraConfig =
> ''
> CONFIG_SCSI_SAS_ATA y
> '';
> };
> };
>
> Actually this will not work unless you're using linux_3_4 which I think
you're not. The better way is what Alexander linked,
nixpkgs.config.packageOverrides = pkgs: {
stdenv = pkgs.stdenv // {
platform = pkgs.stdenv.platform // {
kernelExtraConfig = "CONFIG_SCSI_SAS_ATA y" ;
};
};
};
(I didn't test this)
> Then I saved the file and entered the command
>
> # nixos-rebuild switch
>
Like Alexander said, that doesn't activate the new kernel until when you
reboot.
> This doesn't work because I am inside the live-usb. But, I can make a
> custom image in the live-boot with this changed configuration file. This
> image will have the configuration I want. Is that correct?
>
No, the live boot doesn't use the normal boot setup, not sure if
nixos-rebuild did anything there.
> Also, how would I put the Ubuntu kernel onto the liveUSB?
>
IIRC, the liveUSB is simply a FAT32 filesystem with kernel and squashed
root filesystem, so you'd copy the ubuntu kernel on it as well and convince
the boot loader to use it. Anyway, you might have problems with providing
modules.
Here's two other approaches:
- Take an empty USB stick and install NixOS on that from the liveUSB,
with the kernelconfig as above. Then boot from that and install nixos on
your harddisk.
- Install nixos in-place from your current Linux using the techniques
discussed in https://github.com/NixOS/nixpkgs/issues/2079 , namely
install nix as root (or multiuser) on your current linux, then build nixos
into /nixos and boot using /nixos as the root directory. There's no script
that does that for you yet though.
Wout.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20141007/88f56453/attachment-0001.html
More information about the nix-dev
mailing list