[Nix-dev] Problem with grub
Marco Maggesi
maggesi at math.unifi.it
Mon May 9 18:05:10 CEST 2011
On May 9, 2011, at 5:14 PM, Michael Raskin wrote:
>> Hi,
>>
>> my last update has messed up the grub configuration of one of my nixos machine.
>> After boot, I get the grub console without any system ready to be launched.
>> Now I don't know how to boot the system.
>>
>> I'm trying to use the rescue cd but I don't know exactly how to do.
>>
>> I can mount the disk and chroot in the system, but I don't know where to find /var/run/current-system etc.
>>
>> Any suggestion?
>
> Yes, that is what I am ranting on #nixos the last week or so
>
> The problem is GRUB update. What you need is a good recovery something
> with relatively fresh GRUB2 working. Most probably you can simply
> 'set root=(hd?,?)' (I have no idea about your layout), 'linux /boot/nixos-kernel',
> and 'initrd /nixos-initrd' (then 'boot').
When I try this, I get a critical error from virtualbox.
(I can post the VBox.log if it can be useful).
(Also I had some difficulties to find the right value for 'set root=??'.
I know that my system is on (hd0,1) but this value doesn't work.
Finally I tried '(hd0,msdos2)' which I got using tab completion and has the expected filesystem type and label.)
> I sneaked all that into default GRUB generator, so you have a good chance.
>
> The problem is with GRUB detection of mount layout - http://savannah.gnu.org/bugs/?33263
>
> Technically, you can boot, mount, chroot and use /nix/var/nix/profiles/system/
> if you prefer.
I tried this also but nixos-rebuild and related commands do not work.
This is what I did:
mount /mnt -L nixos
chroot /mnt /bin/sh
source /etc/bashrc
export PATH=$PATH:/nix/var/nix/profiles/system/
mount /proc
nix-env -p /nix/var/nix/profiles/system --list-generations
[... works ...]
nixos-rebuild boot
[...]
cannot connect to daemon at `/nix/var/nix/daemon-socket/socket`
Can I fix the grub configuration from the livecd? (i.e. without chrooting in the system)
Thanks for your help.
M.
More information about the nix-dev
mailing list