[Nix-dev] installation fails to install grub to separate /boot

Adam Vogt vogt.adam at gmail.com
Mon Feb 4 01:55:32 CET 2008


I lied about it working. What happened, was that nixos used /boot form my 
root partition. That means that I got a grub error 18 on boot (the bios is 
unable to address to (hd0,6).

What am I missing to have the install scripts keep /mnt/boot mounted when 
grub-install is called?

For all its changes here is my configuration.nix.

* On Monday, February 04 2008, Michael Raskin wrote:

> Adam Vogt wrote:
>> So I tried it that way, using the config already sent to this list, and 
>> /mnt/boot, stays mounted throughout the installation, except at the end, 
>> it gets unmounted, then the message is:
> Hm, strange, I mount it by device name and it stays mounted till the end.
>
>>   Probing Devices to guess BIOS drives. This may take a long time.
>>   Could not find device for /boot: Not found or not a block device
> Surely so. You need /boot mounted at the moment of GRUB installation.
>
>> Well, it was up until the nixos-install script prints "finalizing the 
>> installation", as I saw from the command mount and/or df.
> Well, it should be mounted afterwards, too... Is it just an ordinary 
> partition, no LVM etc?
>
>> That was from a fresh install. But there shouldn't be any difference 
>> between running nixos-install when /mnt contains the results of a previous 
>> install anyways, right?
> Nit sure, but should be so.
-------------- next part --------------
{
  boot = {
    copyKernels = true;
    grubDevice = "/dev/sda";
    bootMount = "/dev/sda2";
    extraGrubEntries = ''
	  title  Arch Linux
	  root   (hd0,0)
	  kernel /vmlinuz26 root=/dev/mapper/vg0-archroot ro video=vesa:off md=0,/dev/sda5,/dev/sdb2 5 quiet silent resume=/dev/sda2
	  initrd /kernel26.img

	  title Windows
	  rootnoverify	(hd1,0)
	  map (hd0) (hd1)
	  map (hd1) (hd0)
	  chainloader +1
         '';
  };

  fileSystems = [
    { mountPoint = "/boot";
      device = "/dev/sda2";
      autocreate = true;
      neededForBoot = true;
    }
    { mountPoint = "/";
      label = "nixroot";
      neededForBoot = true;
    }
    { label = "home";
      mountPoint = "/home";
      autocreate = true;    
    }
  ];

  swapDevices = [
    { label = "swap"; }
  ];
  
  services = {
    sshd = {
      enable = false;
    };
    xserver = {
      enable = false;
      driSupport = true;
      videoDriver = "radeon";
      windowManager = "twm";
    };
  };

  users = {
    extrausers = [ { createHome = true;
                     extraGroups = [ "wheel" ];
                     group = "users";
                     home = "/home/adamvo";
                     name = "adamvo";
                     uid = 1000;
                   }
                 ];
  };
}


More information about the nix-dev mailing list