[prev in list] [next in list] [prev in thread] [next in thread] 

List:       nix-dev
Subject:    Re: [Nix-dev] Grub problem: external pointer tables not supported
From:       Roger Qiu <roger.qiu () polycademy ! com>
Date:       2017-01-24 2:19:07
Message-ID: CA+HLvXnrKzOFuuAgMmJSyodEzhTpyHsRqB1dJL-JgNujzsPMzQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hey glad you solvee it.

So the problem was that you were using Grub to directly access ZFS root
drive to get the kernel, but Nixos uses lots of hardlinks and Grub has a
problem reading that. So the kernel is now copied to /boot. That's actually
how it's done in gummiboot and probably other bootloaders.

Thanks,
Roger
On 24/01/2017 12:52 PM, "Tomasz Czyż" <tomasz.czyz@gmail.com> wrote:

> It looks like I hit some ZFS feature that it's not supported by grub
> module.
>
> How I found that?
> In grub, you can list files in zfs volumes by doing ``ls $drive/@/home``
> etc.
> I could list ``ls $drive/@/nix`` or ``ls $drive/@/nix/var`` but not ``ls
> $drive/@/nix/store`` where I kept the kernels.
>
> I found some explanations about lot's of files and lot's of hardlinks (nix
> store had at that time more than 130G and probably triggered the feature).
>
> nix-collect-garbage -d didn't help.
>
> I solved the problem by using boot.loader.grub.copyKernels = true;
>
> Kernels were copied to the same volume but to /boot where there is smaller
> number of files and worked perfectly.
>
>
> 2017-01-23 16:44 GMT+00:00 Tomasz Czyż <tomasz.czyz@gmail.com>:
>
>>
>>
>> 2017-01-23 16:15 GMT+00:00 Roger Qiu <roger.qiu@matrix.ai>:
>>
>>> Hey,
>>>
>>> Changing nixos generations won't affect the grub boot partition, that
>>> only changes which nixos kernel and initramfs image gets booted.
>>>
>> Because all boot options are not working one of my guesses is that in new
>> nix version, wrong config was generated when I did system update which
>> broke all options.
>>
>>> This looks like an error in the Grub partition. Maybe you recently
>>> updated it or changed it, or the partition got corrupted.
>>>
>> It's possible, I tried to boot from USB, do ``nixos-install
>> --no-root-passwd`` to reinstall the system, but I'm not sure how to force
>> grub/uefi partition recreation/reinstalling, any idea? Should I just format
>> it and will be recreated?
>>
>>> This is why other operating systems tend to make their /boot read-only...
>>>
>>> If you can't get into the OS, then you can try booting off a USB, and
>>> then edit the boot partition. Or run the uefi terminal app (but this one
>>> never worked for me). If you had cloned/raided boot partitions you can try
>>> changing the uefi image to boot from in your uefi settings (access it like
>>> BIOS).
>>>
>> I tried that, but I'm not sure what to change. I tried to reinstall grub
>> on EFI partition but I'm not sure how to do that, is regular grub-install
>> stuff way to go (I thought I had some issues with that and I tried
>> nixos-install after that).
>>
>>> Currently I have 2 uefi boot partitions cloned, but one failed so I've
>>> been booting off the other one.
>>>
>> Nice one, I think I'll try to do something like that.
>>
>> Thanks Roger.
>>
>>> Thanks,
>>> Roger
>>> On 23/01/2017 10:48 PM, "Tomasz Czyż" <to <tomasz.czyz@gmail.com>
>>>
>>
>>
>>> masz.czyz@gmail.com <tomasz.czyz@gmail.com>> wrote:
>>>
>>>> Hello,
>>>>
>>>> recently my grub said this to me after I restarted computer:
>>>>
>>>> Error: external pointer tables not supported
>>>> Error: you need to load the kernel first.
>>>>
>>>> Every option I select with nix (also past generations) shows me this
>>>> message.
>>>>
>>>> I updated the system to 17.03pre99792.c311871 on 2016-12-23 and
>>>> restarted it before multiple times (and worked). I don't remember if I did
>>>> other updates, but this is what's grub menu shows me.
>>>>
>>>> My disk layout is: EFI boot partition for grub, next partition is
>>>> encrypted luks volume and ZFS on top of it.
>>>>
>>>> This setup worked for me for 1.5 year now without any issue.
>>>>
>>>> Anybody is aware of any changes to grub/zfs recently or had same issue?
>>>> Any suggestions how I can recover from it or what can be wrong?
>>>>
>>>> Tom
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> nix-dev mailing list
>>>> nix-dev@lists.science.uu.nl
>>>> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>>>>
>>>>
>>
>>
>> --
>> Tomasz Czyż
>>
>
>
>
> --
> Tomasz Czyż
>
> _______________________________________________
> nix-dev mailing list
> nix-dev@lists.science.uu.nl
> http://lists.science.uu.nl/mailman/listinfo/nix-dev
>
>

[Attachment #5 (text/html)]

<p dir="ltr">Hey glad you solvee it.</p>
<p dir="ltr">So the problem was that you were using Grub to directly access ZFS root \
drive to get the kernel, but Nixos uses lots of hardlinks and Grub has a problem \
reading that. So the kernel is now copied to /boot. That&#39;s actually how it&#39;s \
done in gummiboot and probably other bootloaders.</p> <p dir="ltr">Thanks,<br>
Roger </p>
<div class="gmail_quote">On 24/01/2017 12:52 PM, &quot;Tomasz Czyż&quot; &lt;<a \
href="mailto:tomasz.czyz@gmail.com">tomasz.czyz@gmail.com</a>&gt; wrote:<br \
type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"><div \
dir="ltr"><div><div><div><div><div><div><div>It looks like I hit some ZFS feature \
that it&#39;s not supported by grub module.<br><br></div>How I found \
that?<br></div>In grub, you can list files in zfs volumes by doing ``ls \
$drive/@/home`` etc.<br></div>I could list ``ls $drive/@/nix`` or ``ls \
$drive/@/nix/var`` but not ``ls $drive/@/nix/store`` where I kept the kernels. \
<br><br></div>I found some explanations about lot&#39;s of files and lot&#39;s of \
hardlinks (nix store had at that time more than 130G and probably triggered the \
feature). <br><br></div>nix-collect-garbage -d didn&#39;t help.<br><br></div>I solved \
the problem by using boot.loader.grub.copyKernels = true;<br><br></div>Kernels were \
copied to the same volume but to /boot where there is smaller number of files and \
worked perfectly.<br><div><div><div><div><div><br></div></div></div></div></div></div><div \
class="gmail_extra"><br><div class="gmail_quote">2017-01-23 16:44 GMT+00:00 Tomasz \
Czyż <span dir="ltr">&lt;<a href="mailto:tomasz.czyz@gmail.com" \
target="_blank">tomasz.czyz@gmail.com</a>&gt;</span>:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div \
class="gmail_quote"><span>2017-01-23 16:15 GMT+00:00 Roger Qiu <span dir="ltr">&lt;<a \
href="mailto:roger.qiu@matrix.ai" \
target="_blank">roger.qiu@matrix.ai</a>&gt;</span>:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><p dir="ltr">Hey,</p> <p dir="ltr">Changing nixos generations \
won&#39;t affect the grub boot partition, that only changes which nixos kernel and \
initramfs image gets booted.</p></blockquote></span><div>Because all boot options are \
not working one of my guesses is that in new nix version, wrong config was generated \
when I did system update which broke all options.</div><span><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> <p dir="ltr">This looks like an error in the Grub partition. \
Maybe you recently updated it or changed it, or the partition got \
corrupted.</p></blockquote></span><div>It&#39;s possible, I tried to boot from USB, \
do ``nixos-install --no-root-passwd`` to reinstall the system, but I&#39;m not sure \
how to force grub/uefi partition recreation/reinstalling, any idea? Should I just \
format it and will be recreated?  </div><span><blockquote class="gmail_quote" \
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <p \
dir="ltr">This is why other operating systems tend to make their /boot \
read-only...</p> <p dir="ltr">If you can&#39;t get into the OS, then you can try \
booting off a USB, and then edit the boot partition. Or run the uefi terminal app \
(but this one never worked for me). If you had cloned/raided boot partitions you can \
try changing the uefi image to boot from in your uefi settings (access it like \
BIOS).</p></blockquote></span><div>I tried that, but I&#39;m not sure what to change. \
I tried to reinstall grub on EFI partition but I&#39;m not sure how to do that, is \
regular grub-install stuff way to go (I thought I had some issues with that and I \
tried nixos-install after that).  </div><span><blockquote class="gmail_quote" \
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr"> \
</p> <p dir="ltr">Currently I have 2 uefi boot partitions cloned, but one failed so \
I&#39;ve been booting off the other one.</p></blockquote></span><div>Nice one, I \
think I&#39;ll try to do something like that.  </div><div><br></div><div>Thanks \
Roger.</div><span><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"> <p dir="ltr">Thanks,<br>
Roger </p>
<div class="gmail_quote"><div><div \
class="m_-5021565340723901338m_-4698694332490551688h5">On 23/01/2017 10:48 PM, \
&quot;Tomasz Czyż&quot; &lt;<a href="mailto:tomasz.czyz@gmail.com" \
target="_blank">to</a></div></div></div></blockquote><div>  </div><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div class="gmail_quote"><div><div \
class="m_-5021565340723901338m_-4698694332490551688h5"><a \
href="mailto:tomasz.czyz@gmail.com" target="_blank">masz.czyz@gmail.com</a>&gt; \
wrote:<br type="attribution"></div></div><blockquote class="gmail_quote" \
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div \
class="m_-5021565340723901338m_-4698694332490551688h5"><div \
dir="ltr"><div>Hello,</div><div><br></div><div>recently my grub said this to me after \
I restarted computer:</div><div><br></div>Error: external pointer  tables not \
                supported<br>
Error: you need to load the kernel first.<div><br></div><div>Every option I select \
with nix (also past generations) shows me this message.</div><div><br></div><div>I \
updated the system to  17.03pre99792.c311871 on 2016-12-23 and restarted it before \
multiple times (and worked). I don&#39;t remember if I did other updates, but this is \
what&#39;s grub menu shows me.</div><div><br></div><div>My disk layout is: EFI boot \
partition for grub, next partition is encrypted luks volume and ZFS on top of it.  \
</div><div><br></div><div>This setup worked for me for 1.5 year now without any \
issue.</div><div><br></div><div>Anybody is aware of any changes to grub/zfs recently \
or had same issue?</div><div>Any suggestions how I can recover from it or what can be \
wrong?</div><div><br></div><div>Tom<br><br> <br>
</div></div>
<br></div></div>______________________________<wbr>_________________<br>
nix-dev mailing list<br>
<a href="mailto:nix-dev@lists.science.uu.nl" \
target="_blank">nix-dev@lists.science.uu.nl</a><br> <a \
href="http://lists.science.uu.nl/mailman/listinfo/nix-dev" rel="noreferrer" \
target="_blank">http://lists.science.uu.nl/mai<wbr>lman/listinfo/nix-dev</a><br> \
<br></blockquote></div> </blockquote></span></div><span \
class="m_-5021565340723901338HOEnZb"><font color="#888888"><br><br \
clear="all"><div><br></div>-- <br><div \
class="m_-5021565340723901338m_-4698694332490551688gmail_signature" \
data-smartmail="gmail_signature">Tomasz Czyż</div> </font></span></div></div>
</blockquote></div><br><br clear="all"><br>-- <br><div \
class="m_-5021565340723901338gmail_signature" data-smartmail="gmail_signature">Tomasz \
Czyż</div> </div>
<br>______________________________<wbr>_________________<br>
nix-dev mailing list<br>
<a href="mailto:nix-dev@lists.science.uu.nl">nix-dev@lists.science.uu.nl</a><br>
<a href="http://lists.science.uu.nl/mailman/listinfo/nix-dev" rel="noreferrer" \
target="_blank">http://lists.science.uu.nl/<wbr>mailman/listinfo/nix-dev</a><br> \
<br></blockquote></div>



_______________________________________________
nix-dev mailing list
nix-dev@lists.science.uu.nl
http://lists.science.uu.nl/mailman/listinfo/nix-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic