<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Grub · I still don't have a title</title><link>https://oskuro.net/en/tags/grub/</link><description>Jordi's random rants</description><generator>Hugo</generator><language>en</language><copyright>© Jordi Mallach, CC-BY-SA 3.0</copyright><lastBuildDate>Sat, 28 Mar 2009 14:54:00 +0000</lastBuildDate><atom:link href="https://oskuro.net/en/tags/grub/index.xml" rel="self" type="application/rss+xml"/><item><title>An update on GRUB2</title><link>https://oskuro.net/en/posts/update-on-grub2/</link><pubDate>Sat, 28 Mar 2009 14:54:00 +0000</pubDate><guid>https://oskuro.net/en/posts/update-on-grub2/</guid><category>free software</category><category>grub</category><description>&lt;p&gt;Some time ago I wrote about the &lt;a href="https://oskuro.net/en/posts/time-for-grub2"&gt;the state of GRUB2&lt;/a&gt; and a milestone on getting it boot my Apple PowerBook G4 without manual intervention. More than a year later, GRUB2 has changed and improved a lot, as the community keeps growing and patches and ideas are continously being posted.&lt;/p&gt;
&lt;p&gt;Some months and commits after my previous post, GRUB broke again on Apple OpenFirmware and I&amp;rsquo;d get dropped to OF console, the amount of commits since the last known working version and the current SVN was quite big, and although I was able to narrow it to a few suspicious changes, I had no time to bisect it properly, and sadly I had to go back to &lt;code&gt;yaboot&lt;/code&gt; for a while.&lt;/p&gt;
&lt;p&gt;But procrastinating sometimes helps, and when I should have been writing and studying, on December I gave GRUB a new try on my laptop to see if a few important changes to memory allocation would have changed anything. And it did! So after fighting quite a few problems, I was able to &lt;a href="http://www.mail-archive.com/grub-devel@gnu.org/msg08664.html"&gt;report partial success&lt;/a&gt; to &lt;code&gt;grub-devel&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Again, getting GRUB installed correctly was a bit challenging and needed some hackery, due to incorrectly generated &lt;code&gt;device.map&lt;/code&gt;, and the linux module mysteriously not getting loaded. Luckily, Michel Dänzer found out that this was due to a bug in sort ordering in the HFS module, which broke the lookup of files with underscores like &lt;code&gt;_linux.mod&lt;/code&gt;, and for which he posted a possible fix by taking Linux&amp;rsquo;s table of character ordering, which is a blob of hex values.&lt;/p&gt;
&lt;p&gt;GRUB developers didn&amp;rsquo;t seem too happy about applying the patch: they argument that a blob like that should be well documented or written in some other more readable way, and there&amp;rsquo;s a possible problem with the mix of Linux GPLv2 and GRUB GPLv3+ codebases, if a table of data like what Michel posted is actually copyrightable. The discussion ended up dying and nothing was done&amp;hellip; until Pavel Roskin &lt;a href="http://lists.gnu.org/archive/html/grub-devel/2009-03/msg00167.html"&gt;picked it up&lt;/a&gt; weeks later and posted a new patch, based on &lt;code&gt;hfsutils&lt;/code&gt; GPLv2+ code, which addressed these issues. The new patch seems to have a few issues, which makes it fail as before, but hopefully it&amp;rsquo;ll be fixed soon.&lt;/p&gt;
&lt;p&gt;Additionally, I wasn&amp;rsquo;t able to boot using UUIDs as the search commands fails to detect the correct boot device on my system (but not on Michel&amp;rsquo;s), so I had to disable that in &lt;code&gt;/etc/default/grub&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;To workaround the linux module loading bug while the patch is fixed, I just added this ugly hack to &lt;code&gt;/etc/grub.d/09_local_prelinux&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#! /bin/sh -e

# Work-around for bugs in the hfs module which makes the load of
# linux.mod fail.

cat &amp;lt;&amp;lt; EOF
insmod (hd,3)/usr/lib/grub/powerpc-ieee1275/_linux.mod
insmod linux
EOF
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is enough to get the &lt;code&gt;initrd&lt;/code&gt; and &lt;code&gt;linux&lt;/code&gt; commands available. However, update-grub will still add &lt;code&gt;search&lt;/code&gt; commands to your menu entries even if you disabled UUID support; I can&amp;rsquo;t understand why, but I know it breaks on my PowerBook due to some OF rarety. Just removing the line from the menu entry will leave me with a working config that boots without any manual editing at GRUB prompt.&lt;/p&gt;
&lt;p&gt;The latest GRUB snapshot in Debian fixes the device.map issue, but adds one last &lt;a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=520846"&gt;issue&lt;/a&gt;: update-grub will fail due to some gfxterm detection code, a workaround is to replace an &lt;code&gt;exit 1&lt;/code&gt; with &lt;code&gt;exit 0&lt;/code&gt; when this happens in &lt;code&gt;/etc/grub.d/00_header&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;On the “weird architectures” front, it&amp;rsquo;s worth noting that this month Dave Miller popped up on the list and started posting patches to fix the rotten SPARC port, and I think it&amp;rsquo;s safe to assume that it&amp;rsquo;ll be on an usable state really soon. Impressive!&lt;/p&gt;</description></item></channel></rss>