<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to centos</title><link>https://sourceforge.net/p/nascc/wiki/centos/</link><description>Recent changes to centos</description><atom:link href="https://sourceforge.net/p/nascc/wiki/centos/feed" rel="self"/><language>en</language><lastBuildDate>Fri, 18 Oct 2013 13:18:14 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/nascc/wiki/centos/feed" rel="self" type="application/rss+xml"/><item><title>centos modified by Alejandro Liu</title><link>https://sourceforge.net/p/nascc/wiki/centos/</link><description>&lt;div class="markdown_content"&gt;&lt;h1 id="centos-5-on-nas200"&gt;CentOS 5 on NAS200&lt;/h1&gt;
&lt;p&gt;The following scripts are used to bootstrap CentOS 5 on to a NAS200.&lt;/p&gt;
&lt;p&gt;While this gives the NAS200 the full functionality of a full-blown&lt;br /&gt;
Linux distribution, it can be at times painfully slow.&lt;/p&gt;
&lt;h2 id="requirements"&gt;Requirements&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;A Filesystem image.&lt;/li&gt;
&lt;li&gt;A NAS200 replacement firmware (NASCC boot)&lt;/li&gt;
&lt;li&gt;Familarity with using Linux.  (That is the whole point!)&lt;/li&gt;
&lt;li&gt;USB key.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="preparing-a-usb-key"&gt;Preparing a USB key&lt;/h2&gt;
&lt;p&gt;For this to work, your USB key should be formatted with a Linux File&lt;br /&gt;
system (so no VFAT), like ext2/3 or xfs.&lt;/p&gt;
&lt;p&gt;For ext3, use these commands:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;mke2fs&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;j&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;L&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;rootfs&amp;quot;&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;dev&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;USB&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;device&lt;/span&gt;
&lt;span class="n"&gt;tune2fs&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;dev&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;USB&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;device&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;It is important to use the &lt;code&gt;rootfs&lt;/code&gt; label as the default root file&lt;br /&gt;
system will use that to locate the root partition.&lt;/p&gt;
&lt;p&gt;Create the root file system use:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;mount&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;dev&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;USB&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;device&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;mnt&lt;/span&gt;
&lt;span class="n"&gt;cd&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;mnt&lt;/span&gt;
&lt;span class="n"&gt;tar&lt;/span&gt; &lt;span class="n"&gt;jxvf&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;to&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;root&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;fs&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;tarball&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;bz2&lt;/span&gt;
&lt;span class="n"&gt;cd&lt;/span&gt;
&lt;span class="n"&gt;umount&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;mnt&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;That's all there is to it.&lt;/p&gt;
&lt;h2 id="booting-it-for-the-first-time"&gt;Booting it for the first time&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Insert the USB key in one of the NAS200 USB ports.&lt;/li&gt;
&lt;li&gt;Make sure you are running &lt;code&gt;nascc-boot&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Turn on your NAS200&lt;/li&gt;
&lt;li&gt;If you are using the binary distribution, it will take a long time&lt;br /&gt;
   before you are able to log-in due to the fact that the NAS200 is&lt;br /&gt;
   generating the three openssh keys that it needs to function,&lt;/li&gt;
&lt;li&gt;By default it will use DHCP to configure eth0.&lt;/li&gt;
&lt;li&gt;Log-on using &lt;code&gt;ssh root@nas-device&lt;/code&gt;.  The default password is&lt;br /&gt;
&lt;code&gt;admin&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;IMPORTANT&lt;/strong&gt; Configure swap.  Remember, this thing only has 32MB of RAM.&lt;br /&gt;
   You should be able to use the swap device used by the original&lt;br /&gt;
   firmware by adding the correct line to &lt;code&gt;/etc/fstab&lt;/code&gt; and then&lt;br /&gt;
   running &lt;code&gt;swapon -a&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The first thing you should run after activating swap is:&lt;br /&gt;
&lt;code&gt;yum update&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id="miscellaneous-notes"&gt;Miscellaneous notes&lt;/h2&gt;
&lt;p&gt;As you can imagine, this is a very slow system.  So don't expect any&lt;br /&gt;
performance gains.  However, this is a fully functional CentOS&lt;br /&gt;
system.&lt;/p&gt;
&lt;p&gt;The bare image is 343M, so the only built-in functionality is&lt;br /&gt;
to be able to log-in using ssh and to run yum.  Of course, you can now&lt;br /&gt;
do &lt;code&gt;yum install pkg&lt;/code&gt; to install whatever hits your fancy.&lt;/p&gt;
&lt;p&gt;If you are using my &lt;code&gt;nascc&lt;/code&gt; boot firmware you will have the original&lt;br /&gt;
firmware file system under the &lt;code&gt;/pivot&lt;/code&gt; directory.  This means, you&lt;br /&gt;
can run its utilities by doing for example:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="nx"&gt;chroot&lt;/span&gt; &lt;span class="p"&gt;/&lt;/span&gt;&lt;span class="nx"&gt;pivot&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;cmd&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;So you can do things like:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;chroot&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;pivot&lt;/span&gt; &lt;span class="n"&gt;nasctl&lt;/span&gt; &lt;span class="n"&gt;beep&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;To sound a beep.  What is more useful is that you can find the booting&lt;br /&gt;
kernel loadable modules under /pivot/lib/modules.&lt;/p&gt;
&lt;h2 id="ethernet-console"&gt;Ethernet Console&lt;/h2&gt;
&lt;p&gt;The &lt;em&gt;NAS-CC&lt;/em&gt; firmware comes with a Coraid Ethernet Console compatible&lt;br /&gt;
network console.&lt;br /&gt;
The Ethernet console can&lt;br /&gt;
be used during the boot process, so it is possible to connect to the&lt;br /&gt;
console and do any FSCK type operations in case the CentOS boot&lt;br /&gt;
sequence runs into trouble.&lt;/p&gt;
&lt;p&gt;In order to use the Ethernet Console you need to install the client:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;cec: Coraid Ethernet Console (client) &lt;br /&gt;
&lt;a class="" href="http://aoetools.sourceforge.net/"&gt;AoE Tools&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a class="" href="http://support.coraid.com/support/quickstart/cecBasicUsage.pdf" rel="nofollow"&gt;cec HowTo&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;A client for the Ethernet console can be found here:&lt;br /&gt;
&lt;a class="" href="http://sourceforge.net/p/nascc/code/HEAD/tree/trunk/extras/lec/"&gt;lec&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id="see-also"&gt;See Also&lt;/h1&gt;
&lt;p&gt;Further information and source releases can be found&lt;br /&gt;
&lt;a class="" href="http://sourceforge.net/p/nascc/code/HEAD/tree/distros/CentOS/"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Alejandro Liu</dc:creator><pubDate>Fri, 18 Oct 2013 13:18:14 -0000</pubDate><guid>https://sourceforge.netfc954f110a020ef5e29ee70634c57fdb4bc38c6c</guid></item></channel></rss>