<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>grub-serial-order — Bcfg2 1.3.0 documentation</title> <link rel="stylesheet" href="../../../_static/default.css" type="text/css" /> <link rel="stylesheet" href="../../../_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '../../../', VERSION: '1.3.0', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="../../../_static/jquery.js"></script> <script type="text/javascript" src="../../../_static/underscore.js"></script> <script type="text/javascript" src="../../../_static/doctools.js"></script> <script type="text/javascript" src="../../../_static/sidebar.js"></script> <link rel="shortcut icon" href="../../../_static/favicon.ico"/> <link rel="top" title="Bcfg2 1.3.0 documentation" href="../../../index.html" /> <link rel="up" title="Probes" href="index.html" /> <link rel="next" title="manufacturer" href="manufacturer.html" /> <link rel="prev" title="vserver" href="vserver.html" /> <link rel="stylesheet" href="../../../_static/bcfg2.css" type=""/> </head> <body> <div style="text-align: left; padding: 10px 10px 15px 15px"> <a href="../../../index.html"><img src="../../../_static/bcfg2_logo.png" border="0" alt="sampledoc"/></a> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../../../genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="../../../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="manufacturer.html" title="manufacturer" accesskey="N">next</a> |</li> <li class="right" > <a href="vserver.html" title="vserver" accesskey="P">previous</a> |</li> <li><a href="../../../index.html">home</a> | </li> <!--<li><a href="../../../search.html">search</a> | </li>--> <li><a href="../../../help/index.html">help</a> | </li> <li><a href="../../../contents.html">documentation </a> »</li> <li><a href="../../../contents.html" >Bcfg2 documentation 1.3.0</a> »</li> <li><a href="../../index.html" >The Bcfg2 Server</a> »</li> <li><a href="../index.html" >Plugins</a> »</li> <li><a href="index.html" accesskey="U">Probes</a> »</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <div class="section" id="grub-serial-order"> <span id="server-plugins-probes-grub-serial-order"></span><h1>grub-serial-order<a class="headerlink" href="#grub-serial-order" title="Permalink to this headline">ΒΆ</a></h1> <p>A basic hardware probe to determine if you should change the default serial ordering in grub.conf. This pre-supposes that you know your hardware is broken. You can tell something is wrong with your hardware if it takes lots of time to iterate through the “Press a key” option and present you with the grub menu. In some cases, I’ve seen this take as long as 20 minutes.</p> <div class="highlight-sh"><div class="highlight"><pre><span class="c">#!/bin/sh</span> <span class="c">#</span> <span class="c">#</span> <span class="c"># We need to modify the order of the --serial line in grub</span> <span class="c"># in order to fix silly hardware bugs. In some cases, having</span> <span class="c"># this in the wrong order causes grub to take an inordinate</span> <span class="c"># amount of time to do anything before it actually auto-picks</span> <span class="c"># the default menu option to boot.</span> <span class="c">#</span> <span class="nv">PATH</span><span class="o">=</span>/bin:/usr/bin:/sbin:/usr/sbin; <span class="nb">export </span>PATH <span class="c"># let's figure out what product type this is</span> <span class="nv">os</span><span class="o">=</span><span class="sb">`</span>uname -s<span class="sb">`</span> <span class="nv">productname</span><span class="o">=</span><span class="s2">"product-no-dmidecode"</span> <span class="k">if</span> <span class="o">[</span> <span class="nv">$os</span> <span class="o">=</span> <span class="s2">"Linux"</span> <span class="o">]</span> ; <span class="k">then</span> <span class="k"> </span><span class="nv">productname</span><span class="o">=</span><span class="sb">`</span>dmidecode -s system-product-name 2>&1<span class="sb">`</span> <span class="k">case</span> <span class="nv">$productname</span> in <span class="s2">"PowerEdge M600"</span><span class="o">)</span> <span class="nb">echo</span> <span class="s2">"console serial"</span> ;; *<span class="o">)</span> <span class="nb">echo</span> <span class="s2">"serial console"</span> ;; <span class="k">esac</span> <span class="k">fi</span> <span class="k">if</span> <span class="o">[</span> <span class="nv">$os</span> <span class="o">=</span> <span class="s2">"SunOS"</span> <span class="o">]</span> ; <span class="k">then</span> <span class="c"># Bcfg2 server is unhappy with null output from probes</span> <span class="nb">echo</span> <span class="s2">"console"</span> <span class="k">fi</span> </pre></div> </div> </div> </div> </div> </div> <div class="sphinxsidebar"> <div class="sphinxsidebarwrapper"> <h4>Previous topic</h4> <p class="topless"><a href="vserver.html" title="previous chapter">vserver</a></p> <h4>Next topic</h4> <p class="topless"><a href="manufacturer.html" title="next chapter">manufacturer</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../../../_sources/server/plugins/probes/grub-serial-order.txt" rel="nofollow">Show Source</a></li> </ul> <div id="searchbox" style="display: none"> <h3>Quick search</h3> <form class="search" action="../../../search.html" method="get"> <input type="text" name="q" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> <p class="searchtip" style="font-size: 90%"> Enter search terms or a module, class or function name. </p> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../../../genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="../../../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="manufacturer.html" title="manufacturer" >next</a> |</li> <li class="right" > <a href="vserver.html" title="vserver" >previous</a> |</li> <li><a href="../../../index.html">home</a> | </li> <!--<li><a href="../../../search.html">search</a> | </li>--> <li><a href="../../../help/index.html">help</a> | </li> <li><a href="../../../contents.html">documentation </a> »</li> <li><a href="../../../contents.html" >Bcfg2 documentation 1.3.0</a> »</li> <li><a href="../../index.html" >The Bcfg2 Server</a> »</li> <li><a href="../index.html" >Plugins</a> »</li> <li><a href="index.html" >Probes</a> »</li> </ul> </div> <div class="footer"> © Copyright 2009-2013, Narayan Desai. Last updated on Mar 20, 2013. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3. </div> </body> </html>