[Nix-dev] Nix OS installation problems - Where's the hard drive?

Alexander Zubkov green at msu.ru
Tue Oct 7 07:59:59 CEST 2014


On 10/07/2014 06:49 AM, Joseph Joe 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
>          '';
>      };
>    };
>
> Then I saved the file and entered the command
>
> # nixos-rebuild switch
>
> After the operation was finished, I entered
>
> # fdisk -l
>
> But the hard drive is still not recognized.

This does not work because you need updated kernel. But kernel is 
already loaded and is not replaced by "nixos-rebuild switch".
May be it could help to unload/load all SCSI-related modules. But I'm 
not sure that modules of newly compiled kernel will be "compatible" with 
that on flash.

>
> 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?

Yes. I think this should work.

> Also, how would I put the Ubuntu kernel onto the liveUSB?

For this question I do not know easy answer. :)
I believe there also will be problems with modules. Because you can 
overwrite kernel file, for example, but modules embedded into live 
filesystem will be much harder to replace.

>
>
> On Sun, Oct 5, 2014 at 3:49 AM, Alexander Zubkov <green at msu.ru> wrote:
>
>> I think, you can also try to build custom bootable image with changed
>> kernel:
>> https://nixos.org/wiki/Creating_a_NixOS_live_CD
>> There is also one more option to change kernel compilation parameters,
>> described in wiki:
>> https://nixos.org/wiki/How_to_tweak_Linux_kernel_config_options
>> This variant is not binded to kernel version.
>>
>>
>> On 10/05/2014 11:37 AM, Wout Mertens wrote:
>>
>>> Hi,
>>>
>>> No, the live USB doesn't store changes I'm afraid. What you can do is put
>>> the Ubuntu kernel on the liveUSB, and boot using that instead of the
>>> regular one. That should work, I don't think there are any extra-special
>>> kernel features that NixOS needs.
>>>
>>> Then you can install NixOS on your HD, but you need the kernel to have the
>>> SAS support.
>>>
>>> To change the Linux config on NixOS, you need to edit configuration.nix:
>>> http://nixos.org/nixos/manual/#sec-kernel-config
>>> Just put "CONFIG_SCSI_SAS_ATA y" in there.
>>>
>>> In the mean time, also open an issue requesting the kernel to have that
>>> configuration by default.
>>>
>>> Wout.
>>>
>>> On Sun, Oct 5, 2014 at 3:02 AM, Joseph Joe <joej at reed.edu> wrote:
>>>
>>>   Would I be able to recompile the kernel while booting from the NixOS
>>>> live-usb and would these changes be permanent on the live-usb?
>>>>
>>>> Would I just type in these commands (src:
>>>> http://www.linux.com/learn/tutorials/305766-recompile-
>>>> your-kernel-for-a-perfect-fit
>>>> )?
>>>>
>>>> cd /usr/src/linux
>>>> make clean
>>>> make
>>>> make modules_install
>>>> make install
>>>> reboot
>>>>
>>>> Then, will the appropriate kernel option be set so that my hard drive
>>>> will
>>>> be detected?
>>>>
>>>> Joseph Joe
>>>>
>>>>
>>>>
>>>>
>>>
>>
>



More information about the nix-dev mailing list